/*
 * khurak.app
 *
 * One visual world, deliberately: the lacquer ground the app and every store
 * frame stand on, so the page never flips to a theme the brand does not have.
 * The tokens are the app's own (frontend/apps/mobile/constants/theme.ts, dark),
 * and the two accents keep the job they have there: rose names Thai, gold names
 * the other language. Colour names a language, never a person, which is why an
 * "echo" line is coloured by the language it is in and a speaker never is.
 *
 * `asset:` URLs are rewritten to content-hashed paths by build.mjs; a leftover
 * one fails the build.
 */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/fraunces-latin-opsz-normal.7234ed860a.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/fraunces-latin-ext-opsz-normal.a2930b27d1.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/fraunces-vietnamese-opsz-normal.f18853f63a.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
    U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/fraunces-latin-opsz-italic.066710ce7e.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Noto Serif Thai';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/noto-serif-thai-thai-wght-normal.9f3427e0d6.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

:root {
  color-scheme: dark;

  /* Ground and raised surfaces: near-black lacquer, warm charcoal above it. */
  --ground: #0d0a10;
  --ground-plum: #131017;
  --raised: #171519;
  --raised-2: #221e26;
  --raised-3: #2b272f;
  --rim: rgba(255, 255, 255, 0.08);
  --rim-strong: rgba(255, 255, 255, 0.13);
  --lit: inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* Ink. */
  --champagne: #f3ede2;
  --mauve: #b3a7b8;
  --dusk: #8e8195;

  /* The two voices. */
  --rose: #e2537e;
  --rose-deep: #c43d66;
  --rose-ink: #ff85a2;
  --rose-wash: rgba(226, 83, 126, 0.14);
  --gold: #edb566;
  --gold-wash: rgba(237, 181, 102, 0.13);

  /* Everything else the product draws. */
  --coral: #ff4d5e;
  --plum: #3e2a45;
  --violet: #a07fe0;
  --violet-wash: rgba(160, 127, 224, 0.14);
  --amber: #e5a94e;
  --amber-wash: rgba(229, 169, 78, 0.12);
  --green: #52b788;
  --activity: #8fafeb;

  --serif: 'Fraunces', 'Noto Serif Thai', 'Iowan Old Style', Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans Thai',
    Thonburi, 'Leelawadee UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --gutter: clamp(1rem, 4.5vw, 3.5rem);
  --max: 76rem;
  --section: clamp(5rem, 11vw, 9.5rem);
  --radius: 1.5rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  background: var(--ground);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--champagne);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

:lang(th) {
  line-height: 1.75;
}

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

p,
h1,
h2,
h3,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--rose-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(226, 83, 126, 0.35);
  color: #fff;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--champagne);
  color: var(--ground);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip:focus {
  top: calc(env(safe-area-inset-top, 0px) + 1rem);
}

/* ── Type ──────────────────────────────────────────────────────────── */

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.018em;
  text-wrap: balance;
  color: var(--champagne);
}

.display--xl {
  font-size: clamp(2.9rem, 1.6rem + 5vw, 5.75rem);
  line-height: 1;
  letter-spacing: -0.022em;
}

.display--l {
  font-size: clamp(2.1rem, 1.35rem + 2.9vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
}

.display--m {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem);
  line-height: 1.08;
}

/* Thai display sizes run optically larger and need air above and below the
   line for tone marks and the vowels that sit over and under a consonant. */
.display:lang(th) {
  letter-spacing: 0;
  font-weight: 500;
}

.display--xl:lang(th) {
  font-size: clamp(2.3rem, 12.6cqi, 4.9rem);
  line-height: 1.18;
}

.display--l:lang(th) {
  font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.65rem);
  line-height: 1.34;
}

.display--m:lang(th) {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  line-height: 1.32;
}

.display__line {
  display: block;
}

.eyebrow,
.kicker {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mauve);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
}

.kicker::before {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.eyebrow:lang(th),
.kicker:lang(th) {
  letter-spacing: 0.04em;
  font-size: 0.9375rem;
}

.invite__code-label:lang(th),
.invite-card__label:lang(th),
.mini__label:lang(th),
.sense__kind:lang(th) {
  letter-spacing: 0.02em;
}

/* The other voice. A heading's line in the reader's language, answered by the
   same line in the other language, set a step down and led by the mark's
   typing dots: love being written, in the second language. */
.echo {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-top: 1.1rem;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 0.98rem + 0.45vw, 1.35rem);
  line-height: 1.4;
  font-weight: 450;
  text-wrap: balance;
}

.echo--th {
  color: var(--rose);
}

.echo--en {
  color: var(--gold);
  font-style: italic;
  letter-spacing: -0.005em;
}

.echo__dots {
  display: inline-flex;
  flex: none;
  gap: 0.22em;
  transform: translateY(-0.12em);
}

.echo__dots i {
  width: 0.32em;
  height: 0.32em;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.echo--hero {
  font-size: clamp(1.25rem, 1.02rem + 0.9vw, 1.8rem);
}

.lede {
  max-width: 34rem;
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.6;
  color: var(--mauve);
}

.lede:lang(th) {
  line-height: 1.8;
}

.prose {
  display: grid;
  gap: 1.1rem;
  max-width: 34rem;
  margin-top: 2rem;
  color: var(--mauve);
  font-size: 1.125rem;
}

/* ── Buttons and store links ───────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: #fff6f3;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 6px 18px -8px rgba(226, 83, 126, 0.65);
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    filter 0.2s var(--ease);
}

.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 10px 26px -10px rgba(226, 83, 126, 0.8);
}

.button--small {
  min-height: 2.5rem;
  padding: 0.5rem 1.05rem;
  font-size: 0.9375rem;
}

.button--ghost {
  background: transparent;
  border-color: var(--rim-strong);
  color: var(--champagne);
  box-shadow: none;
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.store {
  display: block;
  border-radius: 0.6rem;
  transition:
    transform 0.2s var(--ease),
    opacity 0.2s var(--ease);
}

.store img {
  height: 3rem;
  width: auto;
}

.store:hover {
  transform: translateY(-2px);
}

/* The store that is not this device's is kept, and quietened, by site.js. */
.store.is-secondary {
  opacity: 0.55;
}

.store.is-secondary:hover {
  opacity: 1;
}

.stores__note {
  margin-top: 0.9rem;
  font-size: 0.9375rem;
  color: var(--dusk);
}

/* ── Header ────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition:
    background-color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(13, 10, 16, 0.72);
  border-bottom-color: var(--rim);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--champagne);
  text-decoration: none;
}

.brand .mark {
  width: 1.9rem;
  height: 1.9rem;
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.nav__links {
  display: none;
  gap: 0.35rem;
  margin-inline: auto;
}

.nav__links a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--mauve);
  font-size: 0.9375rem;
  text-decoration: none;
  transition:
    color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.nav__links a:hover {
  color: var(--champagne);
  background: rgba(255, 255, 255, 0.05);
}

.nav__end {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.nav__lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--rim-strong);
  color: var(--champagne);
  font-size: 0.9375rem;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s var(--ease);
}

.nav__lang:hover {
  background: rgba(255, 255, 255, 0.06);
}

@media (min-width: 62rem) {
  .nav__links {
    display: flex;
  }

  .nav__end {
    margin-left: 0;
  }
}

/* For somebody who installed the retired web app: it opens here now, with no
   address bar, so it says where Khurak went. site.js reveals it only in a
   standalone window. */
.moved {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: calc(env(safe-area-inset-top, 0px) + 0.85rem) var(--gutter) 0.85rem;
  background: linear-gradient(90deg, var(--plum), #2a1c30);
  border-bottom: 1px solid var(--rim);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.moved p {
  flex: 1;
}

.moved__close {
  flex: none;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--rim-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--champagne);
  font: inherit;
  cursor: pointer;
}

/* ── Hero ──────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(4.5rem, 9vw, 7.5rem);
}

/* Two light sources, one for each voice, meeting behind the phones. Low enough
   to read as warmth on lacquer, never as neon. */
.hero::before {
  content: '';
  position: absolute;
  inset: -20% 0 0;
  z-index: -1;
  background:
    radial-gradient(38rem 30rem at 72% 34%, rgba(226, 83, 126, 0.13), transparent 70%),
    radial-gradient(34rem 28rem at 94% 70%, rgba(237, 181, 102, 0.09), transparent 70%),
    radial-gradient(40rem 30rem at 8% 10%, rgba(62, 42, 69, 0.45), transparent 70%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  gap: clamp(3rem, 7vw, 5rem);
  align-items: center;
}

.hero__copy {
  container-type: inline-size;
  max-width: 40rem;
}

.hero__copy .eyebrow {
  margin-bottom: 1.4rem;
  color: var(--rose-ink);
}

.hero__copy .eyebrow:lang(en) {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 450;
  letter-spacing: 0.01em;
  text-transform: none;
}

@media (min-width: 68rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  }
}

/* ── The two phones ────────────────────────────────────────────────── */

.hero__demo {
  display: flex;
  justify-content: center;
}

.duo {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 2.4vw, 1.75rem);
  width: 100%;
  max-width: 40rem;
}

/* The pair leans in towards each other, as two people at one table do. */
@media (min-width: 40rem) {
  .phone--en {
    transform: translateY(1.5rem);
  }

  .phone--th {
    transform: translateY(-1.5rem);
  }
}

.phone {
  container-type: inline-size;
  min-width: 0;
}

.phone__caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  font-size: clamp(0.78rem, 0.7rem + 0.3vw, 0.9375rem);
  color: var(--mauve);
  white-space: nowrap;
}

.phone__voice {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.phone__voice--en {
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-wash);
}

.phone__voice--th {
  background: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-wash);
}

.phone__frame {
  position: relative;
  padding: 2.4cqi;
  border-radius: 15cqi;
  background: linear-gradient(160deg, #2c2530 0%, #16121a 45%, #221c26 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    0 50px 80px -40px rgba(0, 0, 0, 0.95),
    0 30px 60px -30px rgba(62, 42, 69, 0.55);
}

.phone__screen {
  --fs: max(10.5px, 4.35cqi);
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 9 / 17.6;
  overflow: hidden;
  border-radius: 12.6cqi;
  background: var(--ground);
  font-size: var(--fs);
  line-height: 1.32;
}

.phone__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3.6cqi 7cqi 1cqi;
  font-size: calc(var(--fs) * 0.95);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.phone__island {
  width: 27cqi;
  height: 7.6cqi;
  border-radius: 999px;
  background: #000;
}

.phone__signal svg {
  width: 15cqi;
  height: auto;
  color: var(--champagne);
}

.phone__header {
  display: flex;
  align-items: center;
  gap: 2.6cqi;
  padding: 2.4cqi 5cqi 2.4cqi 3.2cqi;
}

.phone__back {
  display: grid;
  place-items: center;
  width: 8.6cqi;
  height: 8.6cqi;
  border-radius: 50%;
  border: 1px solid var(--rim);
  color: var(--champagne);
}

.phone__back svg {
  width: 62%;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 9.4cqi;
  height: 9.4cqi;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a3040, #2b272f);
  color: var(--champagne);
  font-size: calc(var(--fs) * 0.9);
  font-weight: 600;
  line-height: 1;
}

.avatar:lang(th) {
  font-size: calc(var(--fs) * 0.8);
}

.phone__name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: calc(var(--fs) * 1.05);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone__call {
  width: 6.6cqi;
  color: var(--rose);
}

.phone__bar {
  display: flex;
  padding: 0 4cqi 2.4cqi;
  border-bottom: 1px solid var(--rim);
}

.phone__pill {
  display: inline-flex;
  align-items: center;
  gap: 1.2cqi;
  font-size: calc(var(--fs) * 0.78);
  font-weight: 600;
  color: var(--rose);
}

.phone__pill svg {
  width: 4.4cqi;
}

.phone__pill b {
  font-weight: 500;
  color: var(--mauve);
}

.thread {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.8cqi;
  min-height: 0;
  padding: 3cqi 3.4cqi 2.6cqi;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 8%);
  mask-image: linear-gradient(180deg, transparent 0, #000 8%);
}

.msg {
  display: grid;
  grid-template-rows: 1fr;
  max-width: 84%;
  transition:
    grid-template-rows 0.45s var(--ease),
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease);
}

.msg--mine {
  align-self: flex-end;
}

.msg--theirs {
  align-self: flex-start;
}

.msg__body {
  display: block;
  min-height: 0;
  overflow: hidden;
  padding: 2.2cqi 3.4cqi 1.8cqi;
  border-radius: 5.6cqi;
}

.msg--mine .msg__body {
  background: var(--plum);
  border-bottom-right-radius: 1.8cqi;
}

.msg--theirs .msg__body {
  background: var(--raised-2);
  border-bottom-left-radius: 1.8cqi;
}

.msg__text {
  display: block;
  color: var(--champagne);
  transition:
    opacity 0.5s var(--ease),
    filter 0.5s var(--ease);
}

.msg__text:lang(th) {
  line-height: 1.5;
}

.msg__meta {
  display: flex;
  align-items: center;
  gap: 2cqi;
  margin-top: 0.8cqi;
  font-size: calc(var(--fs) * 0.72);
  line-height: 1.3;
  white-space: nowrap;
}

.msg__show {
  font-weight: 600;
}

.msg__show--th {
  color: var(--rose);
}

.msg__show--en {
  color: var(--gold);
}

.msg__time {
  margin-left: auto;
  color: rgba(243, 237, 226, 0.5);
  font-variant-numeric: tabular-nums;
}

.msg__ticks {
  width: 3.8cqi;
  color: #7fc4a4;
}

/* Arriving: the row opens, then the bubble settles. */
.msg.is-entering {
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(2cqi) scale(0.98);
}

.msg--mine.is-entering {
  transform-origin: bottom right;
}

.msg--theirs.is-entering {
  transform-origin: bottom left;
}

/* Translating: the original shows through, quietly, until the reader's
   language dissolves in over it. The label is the app's own soft blue. */
.msg.is-translating .msg__text {
  opacity: 0.45;
  filter: blur(0.4px);
}

.msg.is-translating .msg__show {
  color: var(--activity);
  font-weight: 500;
  animation: pulse 1.2s ease-in-out infinite;
}

.msg.is-translating .msg__time {
  opacity: 0;
}

.msg.is-dissolving .msg__text {
  opacity: 0;
  filter: blur(3px);
}

.msg__typing {
  display: flex;
  gap: 1.3cqi;
  padding: 1.2cqi 0.4cqi;
}

.msg__typing i {
  width: 1.9cqi;
  height: 1.9cqi;
  border-radius: 50%;
  background: var(--mauve);
  animation: typing 1.2s ease-in-out infinite;
}

.msg__typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.msg__typing i:nth-child(3) {
  animation-delay: 0.3s;
}

.thread.is-resetting .msg {
  opacity: 0;
  transform: translateY(-3cqi);
}

.composer {
  padding: 2cqi 3.4cqi 4.6cqi;
  border-top: 1px solid var(--rim);
  background: linear-gradient(180deg, rgba(13, 10, 16, 0.4), var(--ground));
}

.tones {
  display: flex;
  gap: 1.6cqi;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent);
  mask-image: linear-gradient(90deg, #000 80%, transparent);
}

.tone {
  flex: none;
  padding: 1.1cqi 3cqi;
  border-radius: 999px;
  border: 1px solid var(--rim-strong);
  font-size: calc(var(--fs) * 0.74);
  font-weight: 600;
  color: var(--mauve);
  white-space: nowrap;
}

.tone.is-active {
  border-color: transparent;
  background: var(--rose);
  color: #fff6f3;
}

.composer__row {
  display: flex;
  align-items: center;
  gap: 2cqi;
  margin-top: 2.4cqi;
}

.composer__field {
  flex: 1;
  min-width: 0;
  padding: 2cqi 3.6cqi;
  border-radius: 999px;
  border: 1px solid var(--rim-strong);
  background: #1c1a1f;
  color: var(--dusk);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.composer__field.is-typing {
  color: var(--champagne);
}

.composer__field.is-typing::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--rose-ink);
  animation: caret 1s steps(1) infinite;
}

.composer__send {
  display: grid;
  place-items: center;
  flex: none;
  width: 9.2cqi;
  height: 9.2cqi;
  border-radius: 50%;
  background: var(--rose-deep);
  color: #fff6f3;
  opacity: 0.55;
  transition:
    opacity 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.composer__send svg {
  width: 58%;
}

.composer__send.is-ready {
  opacity: 1;
}

.composer__send.is-pressed {
  transform: scale(0.88);
}

@container (max-width: 15rem) {
  .phone__status {
    padding-inline: 6cqi;
  }

  .tones {
    display: none;
  }

  .phone__bar {
    display: none;
  }
}

/* ── Sections ──────────────────────────────────────────────────────── */

.section-head {
  max-width: 50rem;
  margin-bottom: clamp(2.75rem, 5vw, 4rem);
}

.section-head__lede {
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  font-style: italic;
  color: var(--mauve);
}

.section-head__lede:lang(th) {
  font-style: normal;
}

.readings,
.features,
.privacy,
.langs,
.steps,
.pricing,
.faq {
  padding-block: var(--section);
}

/* ── Readings: a dictionary entry ─────────────────────────────────── */
/* The one place the page sets out a single phrase the way a phrasebook
   would: the headword, how it sounds, and its senses, numbered because a
   dictionary numbers them. The sheet under it is the app's own. */

.readings {
  position: relative;
  background:
    radial-gradient(60rem 34rem at 88% 10%, rgba(160, 127, 224, 0.08), transparent 70%),
    var(--ground-plum);
  border-block: 1px solid var(--rim);
}

.readings__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

@media (min-width: 62rem) {
  .readings__grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  }

  .readings__copy {
    position: sticky;
    top: 7rem;
  }
}

.entry {
  position: relative;
}

.entry__head {
  padding: 0 0 1.75rem;
}

.entry__headword {
  font-family: var(--serif);
  font-size: clamp(3.3rem, 2.2rem + 5vw, 5.8rem);
  line-height: 1.15;
  font-weight: 500;
  color: var(--rose);
  letter-spacing: -0.01em;
}

.entry__headword:lang(en) {
  color: var(--gold);
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1;
}

.entry__gloss {
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--dusk);
}

.entry__gloss:lang(th) {
  font-style: normal;
  font-family: var(--sans);
  font-size: 1rem;
}

.entry__sheet {
  position: relative;
  padding: 1.1rem clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem);
  border-radius: 1.75rem;
  background: linear-gradient(180deg, #221e26 0%, #1b181e 100%);
  box-shadow:
    var(--lit),
    0 0 0 1px var(--rim),
    0 40px 80px -50px rgba(0, 0, 0, 0.9);
}

.entry__grabber {
  display: block;
  width: 2.6rem;
  height: 0.3rem;
  margin: 0 auto 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.entry__title {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 500;
}

.entry__title:lang(th),
.entry__sheet:lang(th) .entry__title {
  line-height: 1.4;
}

.entry__subtitle {
  margin-top: 0.3rem;
  font-size: 0.9375rem;
  color: var(--mauve);
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(160, 127, 224, 0.45);
  background: var(--violet-wash);
  color: #c7b1f5;
  font-size: 0.9375rem;
  font-weight: 600;
}

.state__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--violet);
}

.state--small {
  margin-top: 0;
  padding: 0.3rem 0.65rem;
  font-size: 0.8125rem;
}

.senses {
  display: grid;
  margin-top: 1.25rem;
  counter-reset: sense;
}

.sense {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  column-gap: 0.4rem;
  padding-block: 1rem;
  border-top: 1px solid var(--rim);
  counter-increment: sense;
}

.sense::before {
  content: counter(sense);
  grid-row: 1 / span 3;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--dusk);
  font-variant-numeric: lining-nums;
}

.sense__kind {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet);
}

.sense__kind:lang(th),
.entry:lang(th) .sense__kind {
  letter-spacing: 0.02em;
  font-size: 0.8125rem;
}

.sense__reading {
  margin-top: 0.15rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.3;
  color: var(--champagne);
}

.sense__note {
  margin-top: 0.2rem;
  color: var(--mauve);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.ask {
  margin-top: 0.75rem;
  padding: 1.1rem 1.2rem 1.25rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(229, 169, 78, 0.55);
  background: var(--amber-wash);
}

.ask__title {
  font-weight: 650;
  color: var(--amber);
}

.ask__body {
  margin-top: 0.2rem;
  font-size: 0.9375rem;
  color: var(--champagne);
}

.ask__button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  margin-top: 1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--rose), var(--rose-deep));
  color: #fff6f3;
  font-weight: 600;
  box-shadow: 0 10px 30px -14px rgba(226, 83, 126, 0.9);
}

.ask__explain {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--mauve);
  text-align: center;
}

.entry__honest {
  margin-top: 1.25rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--mauve);
  text-align: center;
}

.entry__honest:lang(th),
.entry:lang(th) .entry__honest {
  font-style: normal;
}

/* ── Features ──────────────────────────────────────────────────────── */

.tiles {
  display: grid;
  gap: 1rem;
}

@media (min-width: 44rem) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tile--together {
    grid-column: 1 / -1;
  }
}

@media (min-width: 44rem) {
  .table__phone {
    aspect-ratio: 2.05 / 1;
  }
}

@media (min-width: 68rem) {
  .tiles {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .tile--together {
    grid-column: span 4;
  }

  .tile--decoder {
    grid-column: span 2;
  }

  .tile--phrasebook,
  .tile--voice,
  .tile--calls {
    grid-column: span 2;
  }
}

.tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--raised);
  box-shadow:
    var(--lit),
    0 0 0 1px var(--rim);
}

.tile__text {
  padding: 1.5rem clamp(1.4rem, 2.5vw, 2rem) 2rem;
}

.tile__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 1.15rem + 0.6vw, 1.7rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.tile__title:lang(th),
.features:lang(th) .tile__title {
  line-height: 1.38;
  letter-spacing: 0;
}

.tile__text p {
  margin-top: 0.7rem;
  max-width: 34rem;
  color: var(--mauve);
  font-size: 1rem;
  line-height: 1.6;
}

/* The vignettes: small pieces of the app, drawn with its tokens. */

.mini,
.card-flash {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 15rem;
  padding: 2rem clamp(1.25rem, 3vw, 2rem) 0;
}

.mini > div,
.card-flash > div {
  width: 100%;
  max-width: 20rem;
}

.mini__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dusk);
}

.mini__label:lang(th),
.features:lang(th) .mini__label {
  letter-spacing: 0.02em;
  font-size: 0.75rem;
}

.mini__input {
  margin: 0.45rem 0 0.9rem;
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--rim-strong);
  background: #1c1a1f;
  font-size: 1.1rem;
}

.caret {
  display: inline-block;
  width: 1.5px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--rose-ink);
  animation: caret 1.1s steps(1) infinite;
}

.mini__output {
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.3;
}

.mini--decoder .state {
  margin-bottom: 1.1rem;
}

.card-flash > div {
  padding: 1.4rem 1.4rem 1.6rem;
  border-radius: 1.2rem;
  background: var(--raised-2);
  box-shadow: var(--lit);
  text-align: center;
  transform: rotate(-2deg);
}

.card-flash__term {
  margin-top: 0.6rem;
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1.1;
  font-weight: 560;
  letter-spacing: -0.01em;
}

.card-flash__meaning {
  margin-top: 0.8rem;
  padding: 0.8rem;
  border-radius: 0.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  color: var(--mauve);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.voice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 1.1rem 1.1rem 1.1rem 0.35rem;
  background: var(--raised-2);
}

.voice__play {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--rose);
  color: #fff6f3;
}

.voice__play svg {
  width: 1rem;
  margin-left: 2px;
}

.voice__wave {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  height: 1.6rem;
}

.voice__wave i {
  flex: 1;
  max-width: 4px;
  border-radius: 2px;
  background: rgba(243, 237, 226, 0.55);
}

.voice__wave i:nth-child(-n + 8) {
  background: var(--rose);
}

.voice__wave .h4 { height: 16%; }
.voice__wave .h5 { height: 22%; }
.voice__wave .h6 { height: 28%; }
.voice__wave .h7 { height: 34%; }
.voice__wave .h8 { height: 40%; }
.voice__wave .h9 { height: 46%; }
.voice__wave .h10 { height: 52%; }
.voice__wave .h11 { height: 58%; }
.voice__wave .h12 { height: 64%; }
.voice__wave .h13 { height: 70%; }
.voice__wave .h14 { height: 76%; }
.voice__wave .h15 { height: 82%; }
.voice__wave .h17 { height: 92%; }
.voice__wave .h18 { height: 100%; }

.voice__time {
  font-size: 0.8125rem;
  color: var(--dusk);
  font-variant-numeric: tabular-nums;
}

.voice__original {
  margin: 0.9rem 0 0 0.25rem;
  padding-left: 0.8rem;
  border-left: 2px solid var(--rose);
  color: var(--mauve);
  font-size: 0.9375rem;
}

.voice__original:lang(en) {
  border-left-color: var(--gold);
}

.voice__translation {
  margin: 0.35rem 0 0 1.05rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.3;
}

.call__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--dusk);
  font-variant-numeric: tabular-nums;
}

.call__live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--mauve);
  font-weight: 600;
}

.call__live i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(82, 183, 136, 0.6);
  animation: live 2s ease-out infinite;
}

.call__caption {
  margin-top: 0.9rem;
  padding: 0.75rem 0.95rem;
  border-radius: 0.95rem;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px var(--rim);
  font-size: 1rem;
  line-height: 1.45;
}

.call__caption--other {
  color: var(--mauve);
}

.call__caption--mine {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--champagne);
}

.call__controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
}

.call__controls span {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--raised-3);
  color: var(--champagne);
}

.call__controls svg {
  width: 1.25rem;
}

.call__controls .call__end {
  background: #e85c5c;
  color: #fff;
}

/* Together Mode: a phone lying flat on the table, seen from above. The far
   half is turned to face the person across from the reader. */
.table {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 18rem;
  padding: 2.25rem 1.5rem 0.5rem;
  background:
    radial-gradient(28rem 16rem at 50% 55%, rgba(237, 181, 102, 0.08), transparent 70%);
}

.table__phone {
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  width: min(100%, 34rem);
  aspect-ratio: 1.55 / 1;
  padding: 0.55rem;
  border-radius: 2.4rem;
  background: linear-gradient(160deg, #2c2530 0%, #16121a 45%, #221c26 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 40px 60px -30px rgba(0, 0, 0, 0.95);
  transform: perspective(60rem) rotateX(18deg);
}

.table__half {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.4rem;
  background: var(--ground);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 0.8rem + 1.2vw, 1.75rem);
  line-height: 1.25;
}

.table__half--far {
  border-radius: 1.9rem 1.9rem 0 0;
  transform: rotate(180deg);
  color: var(--mauve);
}

.table__half--near {
  border-radius: 0 0 1.9rem 1.9rem;
}

.table__half--far .table__line:lang(th),
.table__half--near .table__line:lang(th) {
  line-height: 1.45;
}

.table__seam {
  position: relative;
  display: grid;
  place-items: center;
  height: 1px;
  background: var(--rim-strong);
}

.table__seam span {
  position: absolute;
  right: 1.25rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--raised-2);
  box-shadow: 0 0 0 4px var(--ground);
}

.mark--seam {
  width: 1.2rem;
  height: 1.2rem;
}

.table__wave {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: none;
  height: 1.4rem;
}

.table__wave i {
  width: 3px;
  border-radius: 2px;
  background: currentColor;
  animation: talk 1.4s ease-in-out infinite;
}

.table__wave--th {
  color: var(--rose);
}

.table__wave--en {
  color: var(--gold);
}

.table__wave i:nth-child(1) { height: 35%; animation-delay: -0.2s; }
.table__wave i:nth-child(2) { height: 80%; animation-delay: -0.5s; }
.table__wave i:nth-child(3) { height: 55%; animation-delay: -0.1s; }
.table__wave i:nth-child(4) { height: 95%; animation-delay: -0.7s; }
.table__wave i:nth-child(5) { height: 45%; animation-delay: -0.35s; }

.table__half--far .table__wave i {
  animation: none;
  opacity: 0.5;
}

/* ── Privacy ───────────────────────────────────────────────────────── */

.privacy__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 5.5rem);
}

@media (min-width: 62rem) {
  .privacy__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
  }
}

.privacy__statement .display {
  max-width: 14ch;
}

.privacy__statement .display:lang(th) {
  max-width: 16ch;
}

.facts {
  display: grid;
}

.fact {
  padding-block: 1.6rem;
  border-top: 1px solid var(--rim);
}

.fact:last-child {
  border-bottom: 1px solid var(--rim);
}

.fact dt {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  line-height: 1.25;
  font-weight: 500;
}

.fact dt:lang(th),
.privacy:lang(th) .fact dt {
  line-height: 1.45;
}

.fact dd {
  margin-top: 0.45rem;
  color: var(--mauve);
  max-width: 32rem;
}

.invite-card {
  width: min(100%, 21rem);
  margin-top: 3rem;
}

.invite-card > div {
  padding: 1.5rem 1.5rem 1.6rem;
  border-radius: 1.4rem;
  background: linear-gradient(160deg, var(--plum) 0%, #2a1d31 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 30px 60px -35px rgba(0, 0, 0, 0.9);
  transform: rotate(-1.5deg);
}

.invite-card__title {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.25;
}

.invite-card__label {
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 237, 226, 0.6);
}

.invite-card__code {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.invite-card__code span {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1.15;
  border-radius: 0.55rem;
  background: rgba(13, 10, 16, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--champagne);
}

/* ── Languages ─────────────────────────────────────────────────────── */

.langs {
  border-top: 1px solid var(--rim);
}

.langs__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}

@media (min-width: 62rem) {
  .langs__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.langs__body {
  margin-top: 1.4rem;
  max-width: 30rem;
  color: var(--mauve);
  font-size: 1.125rem;
}

.phrase {
  display: grid;
  gap: 1.25rem;
}

.phrase__source {
  font-family: var(--serif);
  font-size: clamp(3rem, 2rem + 4.5vw, 5.4rem);
  line-height: 1.2;
  color: var(--rose);
}

.phrase__rule {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, rgba(226, 83, 126, 0.6), rgba(237, 181, 102, 0.6));
}

.phrase__rule span {
  position: absolute;
  top: -0.25rem;
  left: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(237, 181, 102, 0.7);
  animation: travel 3.2s var(--ease) infinite;
}

.phrase__target {
  display: grid;
  min-height: 1.3em;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 1.5rem + 3.2vw, 4rem);
  line-height: 1.25;
  font-style: italic;
  color: var(--gold);
}

.phrase__word {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(0.3em);
  filter: blur(6px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease),
    filter 0.7s var(--ease);
}

.phrase__word.is-current {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Scripts Fraunces does not carry, set in the serif each platform ships. */
.phrase__word:lang(ru) {
  font-family: Georgia, 'Times New Roman', serif;
}

.phrase__word:lang(zh) {
  font-family: 'Songti SC', 'STSong', 'Noto Serif SC', 'Source Han Serif SC', serif;
  font-style: normal;
}

.phrase__word:lang(ja) {
  font-family: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif;
  font-style: normal;
}

.phrase__word:lang(ko) {
  font-family: 'AppleMyungjo', 'Nanum Myeongjo', 'Noto Serif KR', serif;
  font-style: normal;
}

.phrase__word:lang(hi) {
  font-family: 'Kohinoor Devanagari', 'Noto Serif Devanagari', 'Nirmala UI', serif;
  font-style: normal;
}

.langs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.55rem;
  margin-top: 1rem;
}

.langs__list li {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--rim);
  color: var(--mauve);
  font-size: 0.9375rem;
  line-height: 1.5;
  transition:
    color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    background-color 0.4s var(--ease);
}

.langs__list li.is-current {
  color: var(--ground);
  border-color: var(--gold);
  background: var(--gold);
}

/* ── Steps ─────────────────────────────────────────────────────────── */

.steps {
  background: var(--ground-plum);
  border-block: 1px solid var(--rim);
}

.section-head--row {
  display: grid;
  gap: 0.5rem;
}

.steps__list {
  display: grid;
  gap: 2.5rem;
  counter-reset: step;
}

@media (min-width: 52rem) {
  .steps__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.step {
  position: relative;
  padding-top: 4.4rem;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--serif);
  font-size: 3.2rem;
  line-height: 1;
  font-weight: 400;
  font-style: italic;
  color: var(--rose);
}

.step::after {
  content: '';
  position: absolute;
  top: 1.6rem;
  left: 3.4rem;
  right: 0;
  height: 1px;
  background: var(--rim-strong);
}

.step:last-child::after {
  right: auto;
  width: 2rem;
}

.step__title {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 500;
}

.step__title:lang(th),
.steps:lang(th) .step__title {
  line-height: 1.4;
}

.step p {
  margin-top: 0.55rem;
  max-width: 22rem;
  color: var(--mauve);
}

/* ── Pricing ───────────────────────────────────────────────────────── */

.plans {
  display: grid;
  gap: 1rem;
}

@media (min-width: 56rem) {
  .plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  border-radius: var(--radius);
  background: var(--raised);
  box-shadow:
    var(--lit),
    0 0 0 1px var(--rim);
}

.plan--plus {
  background:
    radial-gradient(22rem 14rem at 100% 0%, rgba(226, 83, 126, 0.14), transparent 70%),
    var(--raised);
  box-shadow:
    var(--lit),
    0 0 0 1px rgba(226, 83, 126, 0.45);
}

.plan__head {
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rim);
}

.plan__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--mauve);
}

.plan__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 2rem + 1.5vw, 3.1rem);
  line-height: 1.1;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}

.plan__per {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--dusk);
}

.plan__tagline {
  margin-top: 0.4rem;
  color: var(--champagne);
}

.plan__items {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.plan__items li {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 0.7rem;
  color: var(--mauve);
  font-size: 0.975rem;
  line-height: 1.5;
}

.plan__items svg {
  width: 1.1rem;
  margin-top: 0.2rem;
  color: var(--green);
}

.pricing__note {
  max-width: 44rem;
  margin-top: 2rem;
  color: var(--dusk);
  font-size: 0.9375rem;
}

/* ── FAQ ───────────────────────────────────────────────────────────── */

.faq {
  border-top: 1px solid var(--rim);
}

.faq__grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 62rem) {
  .faq__grid {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 4rem;
  }
}

.faq__list {
  border-top: 1px solid var(--rim);
}

.qa {
  border-bottom: 1px solid var(--rim);
}

.qa__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.4rem;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  line-height: 1.35;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.qa__q:lang(th),
.faq:lang(th) .qa__q {
  line-height: 1.5;
}

.qa__q::-webkit-details-marker {
  display: none;
}

.qa__sign {
  position: relative;
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  border: 1px solid var(--rim-strong);
  transition:
    transform 0.3s var(--ease),
    background-color 0.3s var(--ease);
}

.qa__sign::before,
.qa__sign::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.7rem;
  height: 1.5px;
  background: var(--champagne);
  transform: translate(-50%, -50%);
}

.qa__sign::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.3s var(--ease);
}

.qa[open] .qa__sign {
  background: rgba(255, 255, 255, 0.06);
}

.qa[open] .qa__sign::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.qa__a {
  padding: 0 3rem 1.6rem 0;
  color: var(--mauve);
  max-width: 44rem;
}

.qa__a a {
  color: var(--rose-ink);
  text-underline-offset: 3px;
}

/* ── Download ──────────────────────────────────────────────────────── */

.download {
  position: relative;
  isolation: isolate;
  padding-block: clamp(5rem, 10vw, 8.5rem);
  background: var(--ground-plum);
  border-top: 1px solid var(--rim);
  overflow: hidden;
}

.download::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40rem 24rem at 15% 100%, rgba(226, 83, 126, 0.16), transparent 70%),
    radial-gradient(36rem 22rem at 90% 0%, rgba(237, 181, 102, 0.1), transparent 70%);
}

.download__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .download__grid {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.mark--large {
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: 2rem;
}

.download__body {
  margin-top: 1.25rem;
  color: var(--mauve);
  font-size: 1.125rem;
}

/* A QR only helps somebody reading on a computer. */
.qr {
  display: none;
}

@media (min-width: 56rem) and (hover: hover) {
  .qr {
    display: grid;
    justify-items: center;
    gap: 0.9rem;
    padding: 1.1rem 1.1rem 1rem;
    border-radius: 1.5rem;
    background: var(--champagne);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  }

  .qr img {
    width: 11rem;
    height: 11rem;
  }

  .qr figcaption {
    max-width: 11rem;
    color: #3a2f3e;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
  }
}

/* ── Footer ────────────────────────────────────────────────────────── */

.footer {
  padding-block: 3.5rem calc(env(safe-area-inset-bottom, 0px) + 3rem);
  border-top: 1px solid var(--rim);
  font-size: 0.9375rem;
}

.footer__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 56rem) {
  .footer__grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

.footer__made {
  max-width: 26rem;
  margin-top: 1rem;
  color: var(--mauve);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}

.footer__links a {
  color: var(--mauve);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--champagne);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rim);
  color: var(--dusk);
}

.footer__legal a {
  color: var(--dusk);
}

/* ── The invite page and the 404 ───────────────────────────────────── */

.invite,
.lost {
  display: grid;
  align-content: start;
  gap: 2.5rem;
  min-height: 100svh;
  padding-block: calc(env(safe-area-inset-top, 0px) + 1.5rem) 3rem;
}

.invite {
  max-width: 34rem;
  justify-items: stretch;
}

.invite__card {
  padding: clamp(1.75rem, 5vw, 2.5rem);
  border-radius: 1.75rem;
  background:
    radial-gradient(30rem 16rem at 100% 0%, rgba(226, 83, 126, 0.12), transparent 70%),
    var(--raised);
  box-shadow:
    var(--lit),
    0 0 0 1px var(--rim);
}

.invite__card .eyebrow {
  margin-bottom: 0.8rem;
  color: var(--rose-ink);
}

.invite__lede {
  margin-top: 0.9rem;
  color: var(--mauve);
  font-size: 1.0625rem;
}

.invite__code {
  margin-top: 1.75rem;
  padding: 1.2rem 1rem;
  border-radius: 1.1rem;
  background: rgba(13, 10, 16, 0.6);
  box-shadow: inset 0 0 0 1px var(--rim);
  text-align: center;
}

/* No code in the URL (a truncated link): nothing to keep, so no card and no
   hint that points at one. Decided in CSS so the page is right without JS. */
.invite[data-code=''] .invite__code,
.invite[data-code=''] .invite__hint {
  display: none;
}

.invite__code-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dusk);
}

.invite__code-value {
  margin-top: 0.3rem;
  font-family: var(--mono);
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gold);
  word-break: break-all;
}

.invite__copy {
  margin-top: 0.4rem;
  padding: 0.3rem 0.6rem;
  border: 0;
  background: none;
  color: var(--mauve);
  font: inherit;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.invite__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.invite__open {
  display: flex;
  width: 100%;
  margin-top: 1rem;
}

.invite__hint {
  margin-top: 1.25rem;
  color: var(--dusk);
  font-size: 0.9375rem;
  text-align: center;
}

.invite__legal,
.lost .stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  color: var(--dusk);
  font-size: 0.9375rem;
}

.invite__legal a {
  color: var(--dusk);
}

.lost__pair {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 52rem) {
  .lost__pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.lost__side {
  display: grid;
  align-content: start;
  gap: 1rem;
  color: var(--mauve);
}

.lost__th {
  color: var(--rose);
}

/* ── Motion ────────────────────────────────────────────────────────── */

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-35%);
    opacity: 1;
  }
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}

@keyframes talk {
  50% {
    transform: scaleY(0.35);
  }
}

@keyframes live {
  70% {
    box-shadow: 0 0 0 0.45rem rgba(82, 183, 136, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(82, 183, 136, 0);
  }
}

@keyframes travel {
  0% {
    left: 0;
    opacity: 0;
    background: var(--rose);
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 0.55rem);
    opacity: 0;
    background: var(--gold);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .phrase__rule span {
    display: none;
  }
}
