/*
 * Perfect Glass landing page.
 *
 * Colours come from the brand pack (assets/perfect-glass/README.md). The phone
 * mockups copy the guest page's own dark "cellar" theme (apps/resto/src/theme).
 * Newsreader is the voice (headlines, dish and wine names), DM Sans the chrome.
 */

/* Fonts ---------------------------------------------------------------------- */

/* Newsreader comes in three static cuts (see README.md): the 72 pt display cut
   the wordmark is set in, a medium for dish and wine names, an italic for the
   pairing reasons. */
@font-face {
  font-family: "Newsreader Display";
  src: url("/fonts/newsreader-display.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dmsans.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallbacks: while the web fonts load, Georgia and Arial take up
   the same space, so nothing moves when the real fonts swap in. */
@font-face {
  font-family: "Newsreader Display Fallback";
  src: local("Georgia");
  size-adjust: 100.7%;
  ascent-override: 72.99%;
  descent-override: 26.32%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia");
  font-weight: 500;
  size-adjust: 95.42%;
  ascent-override: 77.03%;
  descent-override: 27.77%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Newsreader Fallback";
  src: local("Georgia Italic"), local("Georgia-Italic");
  font-style: italic;
  size-adjust: 86.01%;
  ascent-override: 85.46%;
  descent-override: 30.81%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "DM Sans Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 103.25%;
  ascent-override: 96.07%;
  descent-override: 30.02%;
  line-gap-override: 0%;
}

/* Tokens --------------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Brand pack */
  --wine-ink: #6B1A2A;  /* the one accent: headlines, links, focus */
  --cream: #FAF8F5;     /* the ground */
  --cream-shade: #F2EDE6; /* the ground out of the sun */
  --wine: #47111C;      /* the pour, deep fields */
  --far-edge: #BE9BA0;  /* decoration only: too faint for text */

  /* Text. The owner app's secondary grey (#6B6B6E) is only 4.5:1 on the shaded
     cream, so the page uses a warmer, slightly darker one (5.8:1). */
  --ink: #1C1C1E;
  --ink-2: #5E595B;

  /* The daylight comes from the upper left, so shadows fall down and to the
     right, tinted with the wine rather than grey. */
  --shade: 71 17 28;

  /* The guest page's cellar theme */
  --cellar: #120A0D;
  --cellar-surface: #211318;
  --cellar-ink: #F3EAE0;
  --cellar-ink-2: #C0AEA3;
  --cellar-ink-3: #8A796F;
  --cellar-line: rgb(243 234 224 / .13);
  --gold: #D9A65B;
  --wine-on-dark: #C75B72;

  --display: "Newsreader Display", "Newsreader Display Fallback", Georgia, serif;
  --serif: "Newsreader", "Newsreader Fallback", Georgia, serif;
  --sans: "DM Sans", "DM Sans Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --system: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 5vw, 40px);
  --max: 1240px;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
}

/* Base ----------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* The page's ground lives on <html>, not <body>, and follows the section in
   view: the hero's shaded cream, then the cellar once the hero has scrolled
   past the middle of the window (main.js sets .evening). Safari tints the area
   around the notch, the bar at the bottom and the overscroll with this colour,
   so it has to match what is on screen. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--cream-shade);
}

html.evening {
  background: var(--cellar);
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgb(107 26 42 / .16);
}

:focus-visible {
  outline: 2px solid var(--focus, var(--wine-ink));
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--wine-ink);
  color: var(--cream);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus-visible {
  transform: none;
}

/* Smooth scrolling (Lenis) */
html.lenis,
html.lenis body {
  height: auto;
}

/* Masthead ------------------------------------------------------------------- */

.masthead {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  padding-top: max(22px, env(safe-area-inset-top));
}

.masthead__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.masthead__home {
  display: block;
  border-radius: 6px;
}

.masthead__home img {
  width: auto;
  height: 34px;
}

/* What Perfect Glass is, in one line, signed under the name (beside it from
   1024 px). Quiet ink, so the logo stays the mark and the headline the voice. */
.masthead__tagline {
  font-size: .875rem;
  line-height: 1.4;
  color: var(--ink-2);
}

/* Hero ----------------------------------------------------------------------- */

/* Afternoon. The room is a shade darker than the brand cream; the sun comes in
   through a window at the upper left and lifts the table back to cream where its
   panes land. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  min-height: 100vh;
  min-height: 100svh;
  padding: 128px var(--gutter) 64px;
  background: var(--cream-shade);
}

/* The light and the content each hold their own layer, light below. With the
   light at z-index -1 and the content unpositioned, iOS Safari sometimes drew
   the light over the content while the scroll drift (main.js) moved it. */
.hero__light {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}

.hero__light img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

@media (min-width: 1024px) {
  .hero__light img {
    object-position: 100% 50%;
  }
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 64px;
  max-width: var(--max);
  margin-inline: auto;
  text-align: center;
}

.hero__copy {
  max-width: 42rem;
}

/* Three short lines everywhere, broken by hand. The longest, "The right wine",
   is 6.4 em; a line up to about 7 em fits the column at every width. */
.hero__title {
  font: 400 clamp(2.25rem, 11.2vw, 5.5rem)/1 var(--display);
  letter-spacing: -.012em;
  color: var(--wine-ink);
}

/* Each line rises from behind its own mask. The padding keeps descenders and
   accents inside the mask; the negative margin gives the space back. */
.hero__line {
  display: block;
  overflow: hidden;
  overflow: clip;
  padding: .08em .04em .16em;
  margin: -.08em -.04em -.16em;
}

.hero__line > span {
  display: block;
}

.hero__lede {
  max-width: 31ch;
  margin: 28px auto 0;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* "Coming soon to the App Store": a label, not a button. It isn't clickable,
   so it gets no hover state and no pointer. No Apple logo: Apple only allows
   it inside their official badges. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 8px 20px 8px 8px;
  border: 1px solid rgb(107 26 42 / .18);
  border-radius: 16px;
  text-align: left;
}

.badge__icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgb(28 28 30 / .07), 0 2px 6px -2px rgb(var(--shade) / .25);
}

.badge__text {
  display: grid;
  line-height: 1.2;
}

.badge__lead {
  font-size: .75rem;
  font-weight: 500;
  color: var(--ink-2);
}

.badge__store {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}

/* The badge and the film's button, side by side; they wrap under each other
   on a narrow screen. */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.hero__actions .badge {
  margin-top: 0;
}

/* "Watch the video": the one thing to press on the hero, so it's filled with
   the accent, beside the badge it mirrors. */
.watch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px 8px 8px;
  border: 0;
  border-radius: 16px;
  background: var(--wine-ink);
  color: var(--cream);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s var(--ease-out);
}

.watch:hover {
  background: var(--wine);
}

.watch[hidden] {
  display: none;
}

.watch__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgb(250 248 245 / .14);
}

.watch__icon svg {
  width: 15px;
  height: 15px;
  margin-left: 2px;
  fill: currentColor;
}

.watch__text {
  display: grid;
  line-height: 1.2;
}

.watch__lead {
  font-size: .75rem;
  font-weight: 500;
  color: rgb(250 248 245 / .72);
}

.watch__title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

/* The scene: a QR card standing on the table, the guest's phone held up beside
   it. The phone overlaps only the card's blank right margin, so the code and its
   caption stay whole. Sizes derive from the phone's width. */
.scene {
  --phone-w: min(60vw, 300px);
  --card-w: calc(var(--phone-w) * .46);
  --reach: calc(var(--card-w) * .98); /* how much card shows left of the phone */
  position: relative;
  width: calc(var(--phone-w) + var(--reach));
  padding-left: var(--reach);
}

.scene__card {
  position: absolute;
  z-index: 0;
  left: 0;
  bottom: calc(var(--phone-w) * .1);
  width: var(--card-w);
}

/* Where the card meets the table */
.scene__card::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 6%;
  right: -14%;
  bottom: -4%;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(var(--shade) / .2), rgb(var(--shade) / 0));
}

.scene__phone {
  position: relative;
  z-index: 1;
}

/* Held up, a little off straight. (The scroll motion straightens it.) */
.scene .phone {
  transform: rotate(-2.5deg);
  transform-origin: 50% 85%;
}

@media (min-width: 1024px) {
  .masthead {
    padding-top: 36px;
  }

  .masthead__inner {
    flex-direction: row;
    gap: 20px;
  }

  .masthead__tagline {
    padding-left: 20px;
    border-left: 1px solid rgb(107 26 42 / .2);
    font-size: .9375rem;
  }

  .masthead__home img {
    height: 38px;
  }

  .hero {
    display: grid;
    align-items: center;
    padding-top: 112px;
    padding-bottom: 72px;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: start;
    gap: clamp(32px, 4vw, 80px);
    width: 100%;
    text-align: left;
  }

  .hero__copy {
    max-width: none;
  }

  .hero__title {
    font-size: clamp(4.5rem, 6.6vw, 6.5rem);
  }

  .hero__lede {
    margin-left: 0;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  /* The phone also has to fit the window's height (it is 2.1 times as tall as wide). */
  .scene {
    --phone-w: min(22vw, 330px, calc((100svh - 190px) / 2.1));
    --card-w: calc(var(--phone-w) * .56);
  }
}

/* Table card ------------------------------------------------------------------ */

/* The QR an owner exports from the app (QrExportImage): the code, the caption
   under it, the small mark and name at the foot. Sized in its own width. */
.table-card {
  container-type: inline-size;
}

/* The card leans back a little, standing on its fold. (The tilt lives here, not
   on .table-card, which the scroll motion moves.) */
.table-card__face {
  transform: perspective(900px) rotateX(7deg);
  transform-origin: 50% 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5cqi;
  padding: 10cqi 9cqi 8cqi;
  border-radius: 3cqi;
  background: linear-gradient(172deg, #FFFEFB 0%, #FBF8F3 55%, #F2ECE4 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .9),
    0 0 0 1px rgb(var(--shade) / .05),
    5cqi 9cqi 16cqi -8cqi rgb(var(--shade) / .3);
  color: var(--ink);
}

.table-card__qr {
  width: 80cqi;
  height: auto;
  aspect-ratio: 1;
}

.table-card__caption {
  font-size: 6.6cqi;
  line-height: 1.35;
  text-align: center;
}

.table-card__sign {
  display: flex;
  align-items: center;
  gap: 2cqi;
  font: 500 5.4cqi/1 var(--serif);
  color: #8C8580;
}

.table-card__sign img {
  width: auto;
  height: 7cqi;
}

/* Phone ---------------------------------------------------------------------- */

/* An iPhone drawn in its own units: the frame is 417 units wide, the screen
   inside it 393 points. Everything scales with the phone's width. */
.phone {
  --fu: calc(100cqi / 417); /* frame unit, inside .phone */
  --pt: calc(100cqi / 393); /* screen point, inside .phone__screen */
  container-type: inline-size;
}

.phone__body {
  position: relative;
  padding: calc(12 * var(--fu));
  border-radius: calc(67 * var(--fu));
  background: #0D0A0B;
  box-shadow:
    0 0 0 calc(1.2 * var(--fu)) #4B4347,
    0 0 0 calc(2.6 * var(--fu)) #221D20,
    inset 0 0 0 calc(1 * var(--fu)) rgb(255 255 255 / .05),
    calc(26 * var(--fu)) calc(40 * var(--fu)) calc(70 * var(--fu)) calc(-18 * var(--fu)) rgb(var(--shade) / .38),
    calc(8 * var(--fu)) calc(14 * var(--fu)) calc(24 * var(--fu)) calc(-8 * var(--fu)) rgb(var(--shade) / .28);
}

/* Volume buttons and the side button */
.phone__body::before,
.phone__body::after {
  content: "";
  position: absolute;
  width: calc(3 * var(--fu));
  border-radius: calc(2 * var(--fu));
  background: #3A3336;
}

.phone__body::before {
  top: calc(178 * var(--fu));
  left: calc(-3.8 * var(--fu));
  height: calc(58 * var(--fu));
  box-shadow: 0 calc(76 * var(--fu)) 0 #3A3336;
}

.phone__body::after {
  top: calc(232 * var(--fu));
  right: calc(-3.8 * var(--fu));
  height: calc(92 * var(--fu));
}

.phone__screen {
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 393 / 852;
  border-radius: calc(55 * var(--fu));
  background: var(--cellar);
}

/* A real screenshot, when one replaces the coded screen */
.phone__screen > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone__island {
  position: absolute;
  z-index: 2;
  top: calc(23 * var(--fu));
  left: 50%;
  width: calc(126 * var(--fu));
  height: calc(37 * var(--fu));
  translate: -50% 0;
  border-radius: 999px;
  background: #000;
}

/* Guest page mockup (cellar theme) --------------------------------------------- */

/* Sizes are the guest page's own, in points (apps/resto/src/components). The
   wine's colour (the glow, the halo, the type label) is --tone, the red wine's. */
.guest {
  --scroll: 72; /* how far the guest has scrolled the page, in points: past the back link */
  --tone: 199 91 114;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--cellar);
  color: var(--cellar-ink);
  font-family: var(--sans);
}

.guest__status {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(54 * var(--pt));
  padding: calc(6 * var(--pt)) calc(34 * var(--pt)) 0 calc(46 * var(--pt));
  background: linear-gradient(var(--cellar) 62%, rgb(18 10 13 / 0));
}

.guest__time {
  font: 600 calc(17 * var(--pt))/1 var(--system);
  letter-spacing: -.02em;
}

.guest__icons {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--pt));
}

.guest__icons svg {
  width: auto;
  height: calc(12 * var(--pt));
  fill: currentColor;
}

.guest__icons svg:last-child {
  height: calc(13 * var(--pt));
}

.guest__viewport {
  position: absolute;
  inset: calc(54 * var(--pt)) 0 0;
  overflow: hidden;
}

.guest__page {
  position: relative;
  padding: calc(24 * var(--pt)) calc(24 * var(--pt)) calc(140 * var(--pt));
  transform: translateY(calc(var(--scroll) * var(--pt) * -1));
}

.guest__glow {
  position: absolute;
  left: 50%;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
}

.guest__glow--top {
  top: calc(-220 * var(--pt));
  width: calc(560 * var(--pt));
  background: radial-gradient(circle, rgb(217 166 91 / .1) 0%, rgb(0 0 0 / 0) 65%);
}

.guest__glow--wine {
  top: calc(40 * var(--pt));
  width: calc(620 * var(--pt));
  background: radial-gradient(circle, rgb(var(--tone) / .2) 0%, rgb(0 0 0 / 0) 65%);
}

.guest__back {
  position: relative;
  padding-block: calc(8 * var(--pt));
  font: 600 calc(13 * var(--pt))/calc(17 * var(--pt)) var(--sans);
  color: var(--gold);
}

.guest__eyebrow,
.guest__block {
  position: relative;
  margin-top: calc(24 * var(--pt));
  font: 600 calc(11 * var(--pt))/calc(15 * var(--pt)) var(--sans);
  letter-spacing: calc(2.5 * var(--pt));
  text-align: center;
  text-transform: uppercase;
}

.guest__eyebrow {
  color: var(--cellar-ink-3);
}

.guest__block {
  color: var(--gold);
}

.guest__dish {
  position: relative;
  margin-top: calc(8 * var(--pt));
  font: 500 calc(32 * var(--pt))/calc(40 * var(--pt)) var(--serif);
  text-align: center;
}

.guest__desc {
  position: relative;
  max-width: calc(320 * var(--pt));
  margin: calc(12 * var(--pt)) auto 0;
  font-size: calc(14 * var(--pt));
  line-height: calc(21 * var(--pt));
  color: var(--cellar-ink-2);
  text-align: center;
}

.guest__ornament {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(10 * var(--pt));
  width: calc(128 * var(--pt));
  margin: calc(24 * var(--pt)) auto 0;
}

.guest__ornament::before,
.guest__ornament::after {
  content: "";
  flex: 1;
  height: max(1px, var(--pt));
  background: var(--cellar-line);
}

.guest__ornament i {
  width: calc(5 * var(--pt));
  height: calc(5 * var(--pt));
  background: var(--gold);
  opacity: .75;
  rotate: 45deg;
}

.guest__hero {
  position: relative;
  margin-top: calc(16 * var(--pt));
  padding: max(1px, var(--pt));
  border-radius: calc(24 * var(--pt));
  background-image: linear-gradient(165deg, rgb(232 194 132 / .55) 0%, rgb(232 194 132 / .1) 38%, rgb(199 91 114 / .3) 100%);
}

.guest__hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(32 * var(--pt)) calc(24 * var(--pt));
  border-radius: calc(23 * var(--pt));
  background: var(--cellar-surface);
  text-align: center;
}

.guest__halo {
  display: grid;
  place-items: center;
  width: calc(132 * var(--pt));
  height: calc(132 * var(--pt));
  margin-block: calc(-12 * var(--pt));
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--tone) / .4) 0%, rgb(0 0 0 / 0) 68%);
}

.guest__glass {
  width: calc(72 * var(--pt));
  height: calc(72 * var(--pt));
  color: rgb(243 234 224 / .9);
}

.guest__type {
  margin-top: calc(20 * var(--pt));
  font: 600 calc(10 * var(--pt))/calc(14 * var(--pt)) var(--sans);
  letter-spacing: calc(2.5 * var(--pt));
  text-transform: uppercase;
  color: rgb(var(--tone));
}

.guest__wine {
  margin-top: calc(12 * var(--pt));
  font: 500 calc(27 * var(--pt))/calc(35 * var(--pt)) var(--serif);
}

.guest__detail,
.guest__card-detail {
  font-size: calc(13 * var(--pt));
  line-height: calc(19 * var(--pt));
  color: var(--cellar-ink-3);
}

.guest__detail {
  margin-top: calc(4 * var(--pt));
}

.guest__divider {
  width: calc(44 * var(--pt));
  height: max(1px, var(--pt));
  margin-top: calc(20 * var(--pt));
  background: var(--cellar-line);
}

.guest__reason {
  margin-top: calc(20 * var(--pt));
  font: italic 400 calc(17 * var(--pt))/calc(27 * var(--pt)) var(--serif);
  color: var(--cellar-ink-2);
}

.guest__price,
.guest__card-price {
  font: 600 calc(12 * var(--pt))/calc(15 * var(--pt)) var(--sans);
  color: var(--gold);
}

.guest__price {
  margin-top: calc(24 * var(--pt));
  letter-spacing: calc(1.5 * var(--pt));
}

.guest__card {
  position: relative;
  margin-top: calc(12 * var(--pt));
  padding: calc(20 * var(--pt));
  border: max(1px, var(--pt)) solid var(--cellar-line);
  border-radius: calc(16 * var(--pt));
  background: var(--cellar-surface);
}

.guest__badge {
  display: flex;
  align-items: center;
  gap: calc(7 * var(--pt));
  font: 600 calc(10 * var(--pt))/calc(14 * var(--pt)) var(--sans);
  letter-spacing: calc(1.5 * var(--pt));
  text-transform: uppercase;
  color: var(--cellar-ink-3);
}

.guest__badge svg {
  width: calc(20 * var(--pt));
  height: calc(20 * var(--pt));
  color: rgb(243 234 224 / .65);
}

.guest__card-wine {
  margin-top: calc(12 * var(--pt));
  font: 500 calc(19 * var(--pt))/calc(26 * var(--pt)) var(--serif);
}

.guest__card-detail {
  margin-top: calc(2 * var(--pt));
}

.guest__card-reason {
  margin-top: calc(12 * var(--pt));
  font: italic 400 calc(15 * var(--pt))/calc(24 * var(--pt)) var(--serif);
  color: var(--cellar-ink-2);
}

.guest__card-price {
  margin-top: calc(16 * var(--pt));
  letter-spacing: var(--pt);
}

/* The guest page's embers drifting up through the room */
.guest__embers {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.guest__embers i {
  position: absolute;
  top: 100%;
  width: calc(2.5 * var(--pt));
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgb(232 194 132 / .55);
  opacity: 0;
}

.guest__embers i:nth-child(1) { left: 9%;  --drift: calc(14 * var(--pt));  animation-duration: 13s; animation-delay: -3s; }
.guest__embers i:nth-child(2) { left: 26%; --drift: calc(-10 * var(--pt)); animation-duration: 17s; animation-delay: -11s; width: calc(1.5 * var(--pt)); }
.guest__embers i:nth-child(3) { left: 44%; --drift: calc(18 * var(--pt));  animation-duration: 15s; animation-delay: -6s; background: rgb(199 91 114 / .45); }
.guest__embers i:nth-child(4) { left: 61%; --drift: calc(-14 * var(--pt)); animation-duration: 19s; animation-delay: -15s; width: calc(1.5 * var(--pt)); }
.guest__embers i:nth-child(5) { left: 76%; --drift: calc(10 * var(--pt));  animation-duration: 12s; animation-delay: -1s; width: calc(3 * var(--pt)); }
.guest__embers i:nth-child(6) { left: 90%; --drift: calc(-16 * var(--pt)); animation-duration: 16s; animation-delay: -8s; background: rgb(199 91 114 / .4); }

@keyframes ember {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 1; }
  50% { transform: translate(var(--drift), calc(-460 * var(--pt))); }
  80% { opacity: 1; }
  100% { transform: translate(0, calc(-920 * var(--pt))); opacity: 0; }
}

/* iOS Safari's floating address bar and the home indicator */
.guest__safari {
  position: absolute;
  z-index: 2;
  right: calc(14 * var(--pt));
  bottom: calc(28 * var(--pt));
  left: calc(14 * var(--pt));
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(50 * var(--pt));
  padding-inline: calc(20 * var(--pt));
  border-radius: 999px;
  background: rgb(44 32 37 / .84);
  box-shadow:
    inset 0 0 0 max(1px, calc(.8 * var(--pt))) rgb(255 255 255 / .1),
    0 calc(8 * var(--pt)) calc(24 * var(--pt)) rgb(0 0 0 / .4);
  font: 500 calc(15 * var(--pt))/1 var(--system);
  color: rgb(255 255 255 / .92);
}

.guest__safari-btn {
  font-size: calc(19 * var(--pt));
  color: rgb(255 255 255 / .75);
}

.guest__home {
  position: absolute;
  z-index: 2;
  bottom: calc(8 * var(--pt));
  left: 50%;
  width: calc(134 * var(--pt));
  height: calc(5 * var(--pt));
  translate: -50% 0;
  border-radius: 999px;
  background: rgb(255 255 255 / .55);
}

/* Section titles --------------------------------------------------------------- */

/* The hero's voice, a size down. Each line rises from its own mask as the title
   comes into view (js/main.js); without motion they simply stand. */
.title {
  font: 400 clamp(2.375rem, 10vw, 4.5rem)/1 var(--display);
  letter-spacing: -.012em;
  color: var(--wine-ink);
}

.title__line {
  display: block;
  overflow: hidden;
  overflow: clip;
  padding: .08em .04em .16em;
  margin: -.08em -.04em -.16em;
}

.title__line > span {
  display: block;
}

@media (min-width: 1024px) {
  .title {
    font-size: clamp(3.75rem, 5.4vw, 5.25rem);
  }
}

/* The close ------------------------------------------------------------------ */

/* Evening, by candlelight. A full window, like the hero: the film ends here. */
.close {
  --focus: var(--gold);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(80px, 12vw, 160px) var(--gutter) clamp(96px, 12vw, 160px);
  background: var(--cellar);
  color: var(--cellar-ink);
  text-align: center;
}

/* The candle's embers, drifting up through the room (the guest page's own). */
.embers {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.embers i {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--s);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--c);
  opacity: 0;
}

.embers i:nth-child(1)  { --x: 6%;  --s: 3px;   --c: rgb(232 194 132 / .55); --drift: 18px;  animation-duration: 13s; animation-delay: -2s; }
.embers i:nth-child(2)  { --x: 15%; --s: 2px;   --c: rgb(232 194 132 / .4);  --drift: -12px; animation-duration: 17s; animation-delay: -9s; }
.embers i:nth-child(3)  { --x: 24%; --s: 2.5px; --c: rgb(199 91 114 / .45);  --drift: 22px;  animation-duration: 15s; animation-delay: -5s; }
.embers i:nth-child(4)  { --x: 33%; --s: 2px;   --c: rgb(232 194 132 / .35); --drift: -18px; animation-duration: 19s; animation-delay: -14s; }
.embers i:nth-child(5)  { --x: 44%; --s: 3.5px; --c: rgb(232 194 132 / .5);  --drift: 12px;  animation-duration: 12s; animation-delay: -7s; }
.embers i:nth-child(6)  { --x: 55%; --s: 2px;   --c: rgb(232 194 132 / .4);  --drift: -22px; animation-duration: 18s; animation-delay: -3s; }
.embers i:nth-child(7)  { --x: 63%; --s: 2.5px; --c: rgb(199 91 114 / .4);   --drift: 20px;  animation-duration: 14s; animation-delay: -11s; }
.embers i:nth-child(8)  { --x: 72%; --s: 3px;   --c: rgb(232 194 132 / .5);  --drift: -14px; animation-duration: 16s; animation-delay: -1s; }
.embers i:nth-child(9)  { --x: 81%; --s: 2px;   --c: rgb(232 194 132 / .35); --drift: 14px;  animation-duration: 20s; animation-delay: -16s; }
.embers i:nth-child(10) { --x: 90%; --s: 2.5px; --c: rgb(199 91 114 / .45);  --drift: -20px; animation-duration: 13.5s; animation-delay: -6s; }

@keyframes drift-up {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: 1; }
  50% { transform: translate(var(--drift), -55vh); }
  80% { opacity: 1; }
  100% { transform: translate(0, -110vh); opacity: 0; }
}

/* The app icon in the candle's light: the cream tile, the glass in its own colours. */
.close__icon {
  position: relative;
  z-index: 2;
  width: clamp(96px, 10vw, 128px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 22.4%;
  background: var(--cream);
  box-shadow:
    0 0 0 1px rgb(217 166 91 / .3),
    0 0 44px rgb(217 166 91 / .28),
    0 0 120px rgb(217 166 91 / .14);
}

.close__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* The glint where the light catches the rim. Only the motion shows it, once. */
.close__glint {
  opacity: 0;
}

.close__title {
  position: relative;
  z-index: 2;
  margin-top: clamp(40px, 5vw, 56px);
  color: var(--cellar-ink);
}

.close__body {
  position: relative;
  z-index: 2;
  max-width: 30ch;
  margin-top: 24px;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  line-height: 1.55;
  color: var(--cellar-ink-2);
  text-wrap: pretty;
}

.close .badge {
  position: relative;
  z-index: 2;
}

/* Back to the hero, at the foot of the close, out of the way of the centred
   content above it: a pill in the badge's gold line, so it reads as a control. */
.close__top {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: clamp(24px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-inline: auto;
  padding: 10px 20px 10px 16px;
  border: 1px solid rgb(217 166 91 / .4);
  border-radius: 999px;
  color: var(--cellar-ink);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out);
}

.close__top:hover {
  border-color: rgb(217 166 91 / .7);
  background: rgb(217 166 91 / .08);
}

.close__top svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge--dark {
  border-color: rgb(217 166 91 / .35);
}

.badge--dark .badge__lead {
  color: var(--cellar-ink-2);
}

.badge--dark .badge__store {
  color: var(--cellar-ink);
}

/* Footer ------------------------------------------------------------------------- */

.footer {
  --focus: var(--gold);
  padding: 40px var(--gutter) max(36px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--cellar-line);
  background: var(--cellar);
  color: var(--cellar-ink-2);
  font-size: .9375rem;
}

.footer__inner {
  display: grid;
  justify-items: center;
  gap: 22px;
  max-width: var(--max);
  margin-inline: auto;
}

.footer__home {
  display: block;
  border-radius: 6px;
}

.footer__home img {
  width: auto;
  height: 36px;
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer a {
  color: var(--cellar-ink-2);
  text-decoration: none;
  transition: color .2s var(--ease-out);
}

.footer a:hover {
  color: var(--cellar-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.footer__copy {
  color: var(--cellar-ink-3);
  font-size: .875rem;
}

@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "home ."
      "copy legal";
    align-items: center;
    justify-items: start;
    row-gap: 28px;
  }

  .footer__home { grid-area: home; }
  .footer__legal { grid-area: legal; }
  .footer__copy { grid-area: copy; }
}

/* Entrance --------------------------------------------------------------------- */

/* One orchestrated moment on load, in the app's own cadence (HeroHeadline):
   the lines rise from their masks one after another, the words settle, the
   table comes in, then the light. Nothing here runs with reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .masthead[data-intro] {
    animation: fade-in 1.2s var(--ease-out) 100ms backwards;
  }

  .hero__line > [data-intro] {
    animation: rise 1.1s var(--ease-expo) backwards;
    animation-delay: calc(200ms + var(--i) * 140ms);
  }

  .hero__lede[data-intro] {
    animation: lift 1s var(--ease-out) 640ms backwards;
  }

  .hero__actions[data-intro] {
    animation: lift 1s var(--ease-out) 760ms backwards;
  }

  .scene__phone[data-intro] {
    animation: arrive 1.4s var(--ease-expo) 520ms backwards;
  }

  .scene__card[data-intro] {
    animation: arrive 1.4s var(--ease-expo) 700ms backwards;
  }

  .hero__light[data-intro] {
    animation: fade-in 2.4s var(--ease-out) 1000ms backwards;
  }

  .guest__embers i {
    animation-name: ember;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }

  .embers i {
    animation-name: drift-up;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }

  /* Set by the inline script in <head> until the headline font has loaded. */
  .intro-wait [data-intro] {
    animation-play-state: paused;
  }
}

/* 130 %: clear of the mask's bottom padding, so no ascender peeks out early. */
@keyframes rise {
  from { transform: translateY(130%); }
}

@keyframes lift {
  from { opacity: 0; transform: translateY(14px); }
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(56px); }
}

@keyframes fade-in {
  from { opacity: 0; }
}
