/* ==========================================================================
   NONGNOI v4 — "Exclusions first. Benefits second."
   A film you read: cinematic dark world · one ivory paper interlude ·
   pinned horizontal plan gallery · TH display Prompt · EN Fraunces
   ========================================================================== */

:root {
  --bg: #080B14;
  --bg2: #0D1424;
  --ink: #EFE9DC;
  --dim: #99A0AE;
  --gold: #C9A75D;
  --line: rgba(239, 233, 220, 0.14);
  --paper: #EDE7DA;
  --paper2: #E4DDCE;
  --paper-ink: #141922;
  --paper-dim: #5C6068;
  --paper-line: rgba(20, 25, 34, 0.16);
  --gold-deep: #8A6B2E;
  --font-display: "Fraunces", "Prompt", serif;
  --font-body: "Anuphan", system-ui, sans-serif;
  --gutter: clamp(1.5rem, 6vw, 7rem);
  --marg-w: clamp(9rem, 16vw, 15rem);
  --section-gap: clamp(8rem, 20vh, 16rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
.lang-th { --font-display: "Prompt", "Anuphan", sans-serif; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-width: thin; scrollbar-color: var(--gold) var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.lang-en body, .lang-en p { line-height: 1.75; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
::selection { background: var(--gold); color: var(--bg); }
.lang-th em { font-style: normal; }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -10%; z-index: 9500; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* ---------- preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  will-change: transform;
}
.preloader__name {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--dim); letter-spacing: 0.04em;
}

/* ---------- custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9999;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink);
  mix-blend-mode: difference;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  will-change: transform;
  translate: -50% -50%;
  opacity: 0;
  transition: width .3s var(--ease), height .3s var(--ease), opacity .3s;
}
.cursor.is-live { opacity: 1; }
.cursor__label {
  font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  text-align: center; line-height: 1.3;
  color: var(--bg); opacity: 0; transition: opacity .2s;
}
.cursor.is-active { width: 72px; height: 72px; }
.cursor.is-active .cursor__label { opacity: 1; }
@media (pointer: fine) { a, button, [data-cursor], summary { cursor: none; } }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---------- links & the ONE solid CTA ---------- */
.textlink {
  display: inline-block;
  font-weight: 400; font-size: 1rem; color: var(--gold);
  border-bottom: 1px solid rgba(201, 167, 93, 0.45);
  padding-bottom: 0.25rem; min-height: 44px;
  transition: border-color .3s, opacity .3s;
}
.textlink:hover { border-color: var(--gold); opacity: 0.8; }
.cta-line {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 58px; padding: 0 2.2rem;
  background: var(--gold); color: var(--bg);
  font-weight: 600; font-size: 1.05rem; border-radius: 2px;
  transition: background-color .3s, transform .3s var(--ease);
}
.cta-line:hover { background: #DDBC75; transform: translateY(-2px); }
.cta-line--sm { min-height: 46px; padding: 0 1.4rem; font-size: .9rem; }
.btn-ghost--sm {
  min-height: 46px; padding: 0 1.2rem; font-size: .9rem;
  border: 1px solid var(--line); border-radius: 2px; color: var(--dim);
  transition: color .3s, border-color .3s;
}
.btn-ghost--sm:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8000;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  padding: 1.4rem var(--gutter);
  background: linear-gradient(rgba(8, 11, 20, 0.78), rgba(8, 11, 20, 0));
  will-change: transform;
}
.nav__brand { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.nav__name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 400; white-space: nowrap; }
.nav__license { font-size: .72rem; color: var(--dim); letter-spacing: .05em; }
.nav__links {
  display: flex; gap: 2.2rem; padding-top: .35rem;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav__link {
  font-size: .82rem; letter-spacing: .12em; color: var(--dim);
  border-bottom: 1px solid transparent; padding-bottom: .2rem;
  transition: color .3s, border-color .3s;
}
.lang-th .nav__link { letter-spacing: .05em; }
.nav__link:hover { color: var(--ink); border-color: var(--gold); }
.nav__right { display: flex; align-items: center; gap: 1.6rem; padding-top: .2rem; }
.nav__lang {
  font-size: .8rem; letter-spacing: .06em; color: var(--dim);
  border-bottom: 1px solid transparent; padding-bottom: .15rem;
  transition: color .3s, border-color .3s; white-space: nowrap;
}
.nav__lang:hover { color: var(--ink); border-color: var(--ink); }
.nav__cta {
  font-size: .85rem; font-weight: 500; letter-spacing: .1em;
  color: var(--gold); border-bottom: 1px solid rgba(201,167,93,.4); padding-bottom: .15rem;
  transition: border-color .3s; white-space: nowrap;
}
.lang-th .nav__cta { letter-spacing: .03em; }
.nav__cta:hover { border-color: var(--gold); }
@media (max-width: 1020px) { .nav__links { display: none; } }
@media (max-width: 560px) {
  .nav__license { display: none; }
  .nav__name { font-size: .88rem; }
  .nav__cta { font-size: .8rem; }
  .nav__right { gap: 1rem; }
  .nav { padding: 1rem var(--gutter); }
}

/* ---------- hero / prologue ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--gutter) clamp(3rem, 9vh, 6rem);
  overflow: clip;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__media img {
  width: 100%; height: 112%; object-fit: cover; object-position: center 45%;
  will-change: transform;
  transform-origin: center;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(rgba(8,11,20,.58) 0%, rgba(8,11,20,.14) 42%, rgba(8,11,20,.52) 68%, rgba(8,11,20,.94) 100%);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.7rem, 7.4vw, 6.8rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 14ch;
  will-change: transform;
}
.lang-th .hero__title { line-height: 1.38; letter-spacing: 0; }
.hero__title .line { will-change: transform; }
.hero__sub {
  margin-top: 2rem; max-width: 46ch;
  color: rgba(239, 233, 220, 0.82);
  font-size: clamp(1rem, 1.15vw, 1.15rem);
}
.hero__marginalia {
  list-style: none;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  padding-top: 1.4rem;
  border-top: 1px solid rgba(239, 233, 220, 0.25);
  display: flex; flex-wrap: wrap; gap: 0.5rem 2.5rem;
}
.hero__marginalia li {
  font-size: .8rem; letter-spacing: .08em; color: rgba(239, 233, 220, 0.65);
}
.hero__marginalia li:first-child { color: var(--gold); }
.hero__scrollhint {
  position: absolute; right: var(--gutter); bottom: clamp(3rem, 9vh, 6rem);
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  font-size: .7rem; letter-spacing: .25em; text-transform: uppercase;
  color: rgba(239, 233, 220, 0.55);
  writing-mode: vertical-rl;
}
.hero__scrollline { width: 1px; height: 64px; background: rgba(239,233,220,.4); transform-origin: top; }
@media (max-width: 720px) { .hero__scrollhint { display: none; } }

/* ---------- thesis: one long breath, word by word ---------- */
.thesis {
  min-height: 88svh;
  display: flex; align-items: center;
  padding: var(--section-gap) var(--gutter) var(--section-gap) calc(var(--gutter) + var(--marg-w));
}
.thesis__statement {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 4.4rem);
  line-height: 1.28; letter-spacing: -0.01em;
  max-width: 24ch;
}
.lang-th .thesis__statement { line-height: 1.62; max-width: 26ch; }
.thesis__statement .word { opacity: 0.13; will-change: opacity; }
@media (max-width: 920px) { .thesis { padding-left: var(--gutter); min-height: 70svh; } }

/* ---------- chapter scaffolding ---------- */
.chapter, .manifesto {
  position: relative;
  padding: var(--section-gap) var(--gutter) 0 calc(var(--gutter) + var(--marg-w));
}
.chapter__marg {
  position: absolute; left: var(--gutter); top: calc(var(--section-gap) + .5rem);
  width: calc(var(--marg-w) - 2rem);
  display: flex; flex-direction: column; gap: .4rem;
}
.chapter__num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  color: var(--gold); font-weight: 300; line-height: 1;
}
.chapter__label {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim);
}
.lang-th .chapter__label { letter-spacing: .04em; text-transform: none; }
.chapter__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.2; letter-spacing: -0.01em;
  max-width: 20ch;
}
.lang-th .chapter__title { line-height: 1.45; }
.chapter__lead { margin-top: 1.8rem; max-width: 58ch; color: var(--dim); font-size: clamp(1rem, 1.2vw, 1.15rem); }
.chapter__body { max-width: 62rem; }
@media (max-width: 920px) {
  .chapter, .manifesto { padding-left: var(--gutter); }
  .chapter__marg { position: static; width: auto; margin: 0 0 2rem; flex-direction: row; align-items: baseline; gap: 1rem; }
}

/* ---------- meet: the ivory interlude ---------- */
.meet--paper {
  background: var(--paper);
  color: var(--paper-ink);
  padding-bottom: var(--section-gap);
  margin-top: var(--section-gap);
}
.meet--paper ::selection { background: var(--gold-deep); color: var(--paper); }
.meet--paper .chapter__num { color: var(--gold-deep); }
.meet--paper .chapter__label { color: var(--paper-dim); }
.meet__grid {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
  max-width: 74rem;
}
.meet__media {
  position: relative;
  border: 1px solid var(--paper-line);
  padding: clamp(.8rem, 1.6vw, 1.3rem);
  background: #F6F2E9;
  box-shadow: 0 30px 60px -30px rgba(20, 25, 34, 0.35);
  will-change: transform;
}
.meet__media img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 20%;
}
.meet__media figcaption {
  margin-top: .9rem;
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-dim);
  display: flex; justify-content: space-between;
}
.meet__media figcaption::after { content: "—"; color: var(--gold-deep); }
.lang-th .meet__media figcaption { letter-spacing: .05em; text-transform: none; }
.meet__body p { margin-top: 1.4rem; max-width: 56ch; color: var(--paper-dim); }
.meet__body p:first-of-type { margin-top: 2rem; }
.meet--paper .chapter__title { color: var(--paper-ink); }
.meet__facts { margin-top: 2.5rem; border-top: 1px solid var(--paper-line); }
.meet__facts > div {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.25rem;
  padding: .85rem 0; border-bottom: 1px solid var(--paper-line);
}
.meet__facts dt { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-dim); padding-top: .2rem; }
.lang-th .meet__facts dt { letter-spacing: .03em; }
.meet__facts dd { font-size: .95rem; color: var(--paper-ink); }
@media (max-width: 860px) {
  .meet__grid { grid-template-columns: 1fr; }
  .meet__media { max-width: 400px; }
}

/* ---------- manifesto (pinned) ---------- */
.manifesto { min-height: 100svh; display: flex; align-items: center; }
@media (max-width: 920px) {
  .manifesto { flex-direction: column; align-items: flex-start; justify-content: center; }
}
.manifesto__stage { max-width: 60rem; }
.mline {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.7rem, 3.6vw, 3.2rem);
  line-height: 1.3; letter-spacing: -0.01em;
  color: var(--ink);
  margin: clamp(2.2rem, 6vh, 4rem) 0;
  will-change: transform, opacity;
}
.lang-th .mline { line-height: 1.55; }
.mline__num {
  display: inline-block; min-width: 2.6rem;
  font-size: .42em; color: var(--gold); vertical-align: .5em;
  letter-spacing: .1em;
}

/* ---------- plans: the horizontal gallery ---------- */
.plans { position: relative; padding: var(--section-gap) 0 0; }
.plans__head {
  position: relative;
  padding: 0 var(--gutter) 0 calc(var(--gutter) + var(--marg-w));
  margin-bottom: clamp(2.5rem, 7vh, 5rem);
}
.plans__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2rem, 4.4vw, 3.8rem);
  line-height: 1.15; letter-spacing: -0.01em;
  max-width: 20ch;
}
.lang-th .plans__title { line-height: 1.45; }
.plans__viewport {
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: clamp(3rem, 8vh, 5rem);
}
.plans__viewport::-webkit-scrollbar { display: none; }
.plans__viewport.is-pinned {
  overflow: visible;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-bottom: 0;
}
.plans__track {
  display: flex; align-items: stretch;
  gap: clamp(2rem, 4vw, 4.5rem);
  width: max-content;
  padding-inline: calc(var(--gutter) + var(--marg-w)) var(--gutter);
  will-change: transform;
}
.plancard {
  flex: 0 0 auto;
  width: min(76vw, 64rem);
}
.plancard__link {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: end;
}
.plancard__link:hover .textlink { border-color: var(--gold); opacity: 0.8; }
.plancard__media { overflow: hidden; will-change: clip-path; }
.plancard__media img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  will-change: transform; transform-origin: center;
}
.plancard__text {
  display: grid; gap: .9rem; justify-items: start;
  padding-bottom: .4rem;
}
.plancard__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: var(--gold); line-height: 1; font-weight: 300;
}
.plancard__text h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
}
.plancard__text p { color: var(--dim); font-size: clamp(1rem, 1.15vw, 1.12rem); max-width: 30ch; }
.plans__progress {
  position: absolute; left: calc(var(--gutter) + var(--marg-w)); right: var(--gutter); bottom: clamp(1.6rem, 5vh, 3rem);
  height: 1px; background: rgba(239, 233, 220, 0.14);
}
.plans__progressbar {
  display: block; height: 100%;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
}
@media (max-width: 920px) {
  .plans__head { padding-left: var(--gutter); }
  .plans__track { padding-inline: var(--gutter); }
  .plans__progress { left: var(--gutter); }
}
@media (max-width: 860px) {
  .plans__viewport { overflow-x: clip; }
  .plans__track {
    flex-direction: column; width: auto; align-items: stretch;
    gap: clamp(3.5rem, 10vh, 5rem);
  }
  .plancard { width: auto; }
  .plancard__link { grid-template-columns: 1fr; align-items: start; gap: 1.4rem; }
  .plancard__text p { max-width: 46ch; }
  .plans__progress { display: none; }
}

/* ---------- doors ---------- */
.doors__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  max-width: 74rem;
}
.door {
  border-top: 1px solid var(--gold);
  padding-top: clamp(1.4rem, 3vh, 2.2rem);
  display: grid; gap: 1.2rem; justify-items: start; align-content: start;
}
.door__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.25;
}
.lang-th .door__title { line-height: 1.5; }
.door__body { color: var(--dim); font-size: clamp(1rem, 1.15vw, 1.12rem); max-width: 46ch; }
@media (max-width: 860px) { .doors__grid { grid-template-columns: 1fr; } }

/* ---------- receipts ---------- */
.receipts__list { max-width: 62rem; border-top: 1px solid var(--line); }
.receipts__row {
  display: grid; grid-template-columns: minmax(10rem, 20rem) 1fr;
  gap: clamp(1.5rem, 4vw, 4rem); align-items: baseline;
  padding: clamp(1.6rem, 3.5vh, 2.4rem) 0;
  border-bottom: 1px solid var(--line);
}
.receipts__value {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  color: var(--ink); line-height: 1.1; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.receipts__row:first-child .receipts__value { color: var(--gold); }
.receipts__note { color: var(--dim); font-size: .95rem; max-width: 52ch; }
@media (max-width: 700px) {
  .receipts__row { grid-template-columns: 1fr; gap: .5rem; }
}

/* ---------- marquee ---------- */
.marquee {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.2rem, 3vh, 2rem) 0;
  overflow: clip;
}
.marquee__inner {
  display: flex; width: max-content;
  animation: marquee 46s linear infinite;
  will-change: transform;
}
.marquee__inner span {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.5rem, 3.2vw, 2.8rem);
  color: var(--dim);
  white-space: nowrap;
  padding-right: .5em;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- quiz ---------- */
.quiz__card {
  margin-top: 3rem; max-width: 700px;
  border: 1px solid var(--line);
  background: var(--bg2);
  padding: clamp(1.6rem, 4vw, 3rem);
}
.quiz__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.quiz__stepof { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.lang-th .quiz__stepof { letter-spacing: .04em; text-transform: none; }
.quiz__stepname { font-family: var(--font-display); font-size: 1rem; color: var(--gold); }
.quiz__progress { margin-top: 1.1rem; height: 1px; background: rgba(239,233,220,.15); overflow: hidden; }
.quiz__progressbar {
  display: block; height: 100%; width: 100%;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease);
}
.quiz__screens { margin-top: 2.2rem; min-height: 320px; }
.qscreen__q {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.4;
}
.qscreen__q:focus { outline: none; } /* programmatic focus target on screen swaps */
.lang-th .qscreen__q { line-height: 1.55; }
.qscreen__tag {
  display: inline-block; margin-left: .7rem;
  font-family: var(--font-body); font-size: .72rem; color: var(--dim);
  border: 1px solid var(--line); border-radius: 999px; padding: .15rem .65rem;
  vertical-align: middle;
}
.qscreen__hint { margin-top: .5rem; font-size: .85rem; color: var(--dim); }
.qscreen__opts { display: grid; margin-top: 1.6rem; }
.qopt {
  min-height: 56px;
  display: flex; align-items: center;
  padding: .85rem .5rem;
  border-bottom: 1px solid var(--line);
  text-align: left; line-height: 1.55; font-size: 1.02rem;
  color: var(--ink);
  transition: color .25s, padding-left .25s var(--ease);
}
.qopt:first-child { border-top: 1px solid var(--line); }
.qopt::before {
  content: ""; flex: 0 0 8px; height: 8px; border-radius: 50%;
  border: 1px solid var(--dim); margin-right: 1rem;
  transition: background-color .25s, border-color .25s;
}
.qopt:hover { color: var(--gold); padding-left: 1rem; }
.qopt.is-selected { color: var(--gold); }
.qopt.is-selected::before { background: var(--gold); border-color: var(--gold); }
.qchoice-row .qopt { border: 1px solid var(--line); padding: .7rem 1.1rem; margin-right: .6rem; margin-top: .6rem; }
.qchoice-row { display: flex; flex-wrap: wrap; }
.qchoice-row .qopt::before { display: none; }
.qscreen__continue { margin-top: 1.6rem; }
.qfield { margin-top: 1.3rem; }
.qfield label { display: block; font-size: .82rem; color: var(--dim); margin-bottom: .4rem; }
.qfield input {
  width: 100%; min-height: 56px;
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  color: var(--ink); padding: 0 .2rem; font-size: 1.1rem;
  font-family: var(--font-display);
  transition: border-color .25s;
}
.qfield input:focus { outline: none; border-color: var(--gold); }
.qfield .qerr { display: none; margin-top: .4rem; font-size: .8rem; color: #A04338; }
.qfield.has-error input { border-color: #B4564B; }
.qfield.has-error .qerr { display: block; }
.qconsent { display: flex; gap: .85rem; align-items: flex-start; margin-top: 1.4rem; }
.qconsent input {
  appearance: none; flex: 0 0 24px; width: 24px; height: 24px; margin-top: .25rem;
  border: 1px solid rgba(201,167,93,.5); border-radius: 2px;
  display: grid; place-content: center;
  transition: background-color .2s, border-color .2s;
}
.qconsent input::before {
  content: ""; width: 12px; height: 12px; background: var(--bg);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
  transform: scale(0); transition: transform .2s;
}
.qconsent input:checked { background: var(--gold); border-color: var(--gold); }
.qconsent input:checked::before { transform: scale(1); }
.qconsent label { font-size: .82rem; color: var(--dim); line-height: 1.7; }
.qconsent.has-error label { color: #A04338; }
.qscreen__privacy { margin-top: 1.4rem; font-size: .78rem; color: var(--dim); }
.qscreen__submit { margin-top: 1.6rem; width: 100%; }
.quiz__back {
  margin-top: 1.4rem; min-height: 44px; padding: 0 .2rem;
  font-size: .85rem; color: var(--dim);
  border-bottom: 1px solid transparent;
  transition: color .25s;
}
.quiz__back:hover { color: var(--gold); }
.quiz__thanks { text-align: left; padding: .5rem 0; }
.quiz__thanks h3 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--ink);
}
.quiz__thanks p { margin-top: 1rem; color: var(--dim); }
.quiz__thanks .cta-line, .quiz__thanks .btn-ghost--sm { margin-top: 1rem; width: 100%; }
.callcard { margin-top: 1.6rem; width: 100%; }
.callcard__label { display: block; font-size: .82rem; color: var(--dim); margin-bottom: .45rem; }
.callcard__btn {
  display: flex; align-items: center; justify-content: center; gap: .65rem;
  width: 100%; padding: .8rem 1.2rem;
  border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .06em;
  transition: border-color .25s ease, transform .25s ease;
}
.callcard__btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.callcard__btn svg { width: 17px; height: 17px; fill: none; stroke: var(--gold-deep); stroke-width: 1.5; flex: 0 0 auto; }

/* ---------- faq ---------- */
.faq__list { max-width: 56rem; border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  min-height: 56px; padding: 1.4rem 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.1rem, 1.9vw, 1.45rem); line-height: 1.4;
  transition: color .25s;
}
.lang-th .faq__item summary { line-height: 1.6; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--gold); }
.faq__chev {
  flex: 0 0 11px; width: 11px; height: 11px;
  border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
  transform: rotate(45deg);
  transition: transform .3s var(--ease);
}
.faq__item[open] .faq__chev { transform: rotate(225deg) translate(-2px, -2px); }
.faq__item p { padding: 0 0 1.6rem; color: var(--dim); max-width: 62ch; }

/* ---------- invite: the epilogue ---------- */
.invite {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: var(--section-gap) var(--gutter);
  margin-top: var(--section-gap);
  overflow: clip;
  isolation: isolate;
}
.invite__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.invite__media img {
  width: 100%; height: 112%; object-fit: cover; object-position: center 60%;
  will-change: transform;
}
.invite__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(8,11,20,.94) 0%, rgba(8,11,20,.72) 45%, rgba(8,11,20,.35) 100%);
}
.invite__content { position: relative; }
.invite__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.6rem, 7.5vw, 6.8rem);
  line-height: 1.12; letter-spacing: -0.015em;
  max-width: 14ch;
}
.lang-th .invite__title { line-height: 1.4; }
.invite__body { margin-top: 2rem; max-width: 50ch; color: rgba(239,233,220,.78); font-size: clamp(1rem, 1.25vw, 1.2rem); }
.invite__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; margin-top: 2.8rem; }
.invite__hours { margin-top: 1.6rem; font-size: .85rem; letter-spacing: .1em; color: rgba(239,233,220,.6); }

/* ---------- footer: the back of the envelope ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 4.5rem var(--gutter) calc(4.5rem + 64px);
}
.footer__top {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem 5rem; align-items: start;
}
.footer__name {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink);
}
.footer__company { margin-top: 1.1rem; font-size: .82rem; line-height: 1.75; color: var(--dim); max-width: 52ch; }
.footer__links { margin-top: 1.5rem; font-size: .82rem; line-height: 2.2; color: var(--dim); }
.footer__fine p { font-size: .78rem; line-height: 1.8; color: var(--dim); margin-bottom: 1rem; }
.footer__warning { color: var(--ink) !important; font-weight: 500; }
.footer__link { color: var(--gold); border-bottom: 1px solid rgba(201,167,93,.4); }
.footer__link:hover { opacity: .75; }
.footer__linkbtn { font-size: .82rem; padding: 0; }
.footer__bar {
  display: flex; flex-wrap: wrap; gap: .8rem 2rem; justify-content: space-between;
  margin-top: 3.2rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.footer__copy, .footer__colophon { font-size: .75rem; color: var(--dim); }
.footer__colophon { font-style: italic; opacity: .8; }
.privacy { margin-top: 3.2rem; border-top: 1px solid var(--line); padding-top: 2.5rem; }
.privacy h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; color: var(--ink); margin-bottom: 1.4rem; }
.privacy__body { columns: 2; column-gap: 4rem; }
.privacy__body p { font-size: .78rem; line-height: 1.8; color: var(--dim); margin-bottom: 1rem; break-inside: avoid; }
@media (max-width: 860px) {
  .footer__top { grid-template-columns: 1fr; }
  .privacy__body { columns: 1; }
}

/* ---------- sticky mobile bar ---------- */
.mobilebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 7000;
  display: none; gap: 1.5rem; align-items: center;
  padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(8, 11, 20, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.mobilebar__btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 52px; font-size: .95rem;
}
.mobilebar__btn--line { background: var(--gold); color: var(--bg); font-weight: 600; border-radius: 2px; }
.mobilebar__btn--quiz { color: var(--gold); border-bottom: 1px solid rgba(201,167,93,.4); }
@media (max-width: 860px) { .mobilebar { display: flex; } }

/* ---------- cookie bar ---------- */
.cookiebar {
  position: fixed; z-index: 8500;
  left: 50%; transform: translateX(-50%);
  bottom: calc(64px + 12px);
  width: min(680px, calc(100% - 2rem));
  background: var(--bg2);
  border: 1px solid var(--line);
  padding: 1.1rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem;
}
.cookiebar[hidden] { display: none; }
.cookiebar__text { font-size: .8rem; color: var(--dim); flex: 1; }
.cookiebar__actions { display: flex; gap: .7rem; flex-shrink: 0; }
@media (min-width: 861px) { .cookiebar { bottom: 1.5rem; } }
@media (max-width: 560px) {
  .cookiebar { flex-direction: column; align-items: stretch; gap: .8rem; }
  .cookiebar__actions { justify-content: flex-end; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .preloader, .cursor { display: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .marquee__inner { animation: none; flex-wrap: wrap; width: auto; }
}

/* ==========================================================================
   v5 — "A letter from Noi"
   The sealed envelope (scroll-scrubbed open) · the letter on paper ·
   the reply sheet · the six brochure pages
   ========================================================================== */

/* ---------- envelope: the prologue you open with your thumb ---------- */
.envelope {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  overflow: clip;
  isolation: isolate;
}
.envelope__paperbg {
  position: absolute; inset: 0; z-index: -1;
  background: var(--paper);
  opacity: 0;
}
.envelope__stage {
  position: relative;
  width: min(88vw, 600px);
  will-change: transform, opacity;
}
.env {
  position: relative;
  aspect-ratio: 1.5;
  perspective: 1400px;
  will-change: transform;
}
.env__back {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(160deg, #E8E1D1, #D8CFBA);
  border-radius: 6px;
  box-shadow: 0 48px 100px -34px rgba(0, 0, 0, 0.6);
}
.env__letter {
  position: absolute; left: 5%; right: 5%; top: 6%; bottom: 6%; z-index: 2;
  background: #F7F3EB;
  border-radius: 2px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  display: flex; align-items: center; justify-content: center;
  padding: 6%;
  will-change: transform;
}
.env__letterhead {
  position: absolute; top: 7.5%; left: 0; right: 0;
  text-align: center;
  font-size: clamp(.55rem, 1.3vw, .68rem);
  letter-spacing: .22em;
  color: rgba(20, 25, 34, 0.38);
  padding-bottom: .5em;
}
.env__letterhead::after {
  content: "";
  position: absolute; left: 18%; right: 18%; bottom: 0;
  height: 1px;
  background: rgba(20, 25, 34, 0.14);
}
.env__letterbody { text-align: center; }
.env__greeting {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.6rem, 4.2vw, 3rem);
  line-height: 1.3; letter-spacing: -0.01em;
  color: var(--paper-ink);
}
.lang-th .env__greeting { line-height: 1.5; }
.env__hint {
  margin-top: 1.1rem;
  font-size: .78rem; letter-spacing: .12em;
  color: var(--paper-dim);
}
.env__front {
  position: absolute; inset: 0; z-index: 3;
  background:
    linear-gradient(180deg, rgba(20, 25, 34, 0.14) 0%, rgba(20, 25, 34, 0) 40%),
    linear-gradient(200deg, #EDE6D5, #DCD3BE);
  clip-path: polygon(0 0, 50% 46%, 100% 0, 100% 100%, 0 100%);
  border-radius: 6px;
}
.env__flap {
  position: absolute; left: 0; right: 0; top: 0; height: 52%; z-index: 4;
  background: linear-gradient(180deg, #DDD5C1, #CEC4AA);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 6px 6px 0 0;
  transform-origin: top center;
  backface-visibility: hidden;
  will-change: transform;
}
.env__addr { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.env__from {
  position: absolute; top: 6%; left: 6.5%;
  font-size: clamp(.62rem, 1.4vw, .78rem);
  letter-spacing: .12em;
  color: rgba(20, 25, 34, 0.66);
}
.lang-th .env__from { letter-spacing: .05em; }
.env__stamp {
  position: absolute; top: 4.5%; right: 5.5%;
  width: clamp(44px, 10%, 66px); aspect-ratio: 4 / 5;
  transform: rotate(2.5deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.22));
}
.env__stamp svg { display: block; width: 100%; height: 100%; font-family: var(--font-display); }
.env__to {
  position: absolute; left: 50%; bottom: 15%;
  transform: translateX(-50%) rotate(-1.5deg);
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(1.5rem, 4.6vw, 2.6rem);
  color: var(--paper-ink);
  white-space: nowrap;
}
.lang-th .env__to { font-style: normal; }
.env__seal {
  position: absolute; left: 50%; top: 47%; z-index: 6;
  width: clamp(64px, 15%, 96px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid; place-content: center;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
  transition: transform .3s var(--ease);
  will-change: transform, opacity;
}
.env__seal:hover { transform: translate(-50%, -50%) scale(1.07); }
.env__seal svg { width: 100%; height: 100%; display: block; font-family: var(--font-display); }
.envelope__hint {
  position: absolute;
  left: 50%; top: calc(100% + clamp(1.8rem, 5vh, 3rem));
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .8rem;
  font-size: .72rem; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(239, 233, 220, 0.55);
  text-align: center;
  white-space: nowrap;
}
.lang-th .envelope__hint { letter-spacing: .08em; text-transform: none; }
.envelope__line {
  width: 1px; height: 54px;
  background: rgba(239, 233, 220, 0.4);
  transform-origin: top;
}
.no-gsap .envelope, .rm .envelope { display: none; }
@media (prefers-reduced-motion: reduce) { .envelope { display: none; } }

/* ---------- the letter: paper, her hand, her signature ---------- */
.letter {
  background: var(--paper);
  color: var(--paper-ink);
  padding-bottom: var(--section-gap);
  overflow-x: clip;
}
.letter ::selection { background: var(--gold-deep); color: var(--paper); }
.letter .chapter__num { color: var(--gold-deep); }
.letter .chapter__label { color: var(--paper-dim); }
.letter__paper { max-width: 44rem; }
.letter__body {
  margin-top: 1.7rem;
  font-size: clamp(1.02rem, 1.25vw, 1.18rem);
  line-height: 1.95;
  color: #2A2F3A;
}
.lang-en .letter__body { line-height: 1.85; }
.letter__body:first-child { margin-top: 0; }
.letter__photo {
  position: relative;
  margin: clamp(2.4rem, 7vh, 4rem) 0;
  max-width: 400px;
  transform: rotate(-1.6deg);
  border: 1px solid var(--paper-line);
  padding: .8rem .8rem 0;
  background: #F6F2E9;
  box-shadow: 0 26px 54px -26px rgba(20, 25, 34, 0.42);
}
.letter__photo::before {
  content: "";
  position: absolute; top: -13px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 96px; height: 26px;
  background: rgba(233, 226, 205, 0.78);
  border-left: 1px dashed rgba(20, 25, 34, 0.14);
  border-right: 1px dashed rgba(20, 25, 34, 0.14);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.letter__photo img {
  width: 100%; aspect-ratio: 3 / 4;
  object-fit: cover; object-position: center 20%;
}
.letter__photo figcaption {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .8rem 0 .9rem;
  font-size: .75rem; letter-spacing: .1em;
  color: var(--paper-dim);
}
.letter__sig { margin-top: 2.2rem; display: flex; flex-direction: column; gap: .25rem; }
.letter__signame {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  line-height: 1.2;
  color: var(--paper-ink);
}
.lang-th .letter__signame { font-style: normal; }
.letter__sigfull { color: var(--paper-dim); font-size: .95rem; }
.letter__ps {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--paper-line);
  font-size: .85rem; line-height: 1.85;
  color: var(--paper-dim);
  max-width: 58ch;
}

/* ---------- quiz as the reply sheet ---------- */
.quiz--paper {
  background: var(--paper);
  color: var(--paper-ink);
  margin-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}
.quiz--paper ::selection { background: var(--gold-deep); color: var(--paper); }
.quiz--paper .chapter__num { color: var(--gold-deep); }
.quiz--paper .chapter__label { color: var(--paper-dim); }
.quiz--paper .chapter__title { color: var(--paper-ink); }
.quiz--paper .chapter__lead { color: var(--paper-dim); }
.quiz--paper .quiz__card {
  background: #F6F2E9;
  border-color: var(--paper-line);
  box-shadow: 0 32px 70px -34px rgba(20, 25, 34, 0.35);
}
.quiz--paper .quiz__stepof { color: var(--paper-dim); }
.quiz--paper .quiz__stepname { color: var(--gold-deep); }
.quiz--paper .quiz__progress { background: rgba(20, 25, 34, 0.14); }
.quiz--paper .quiz__progressbar { background: var(--gold-deep); }
.quiz--paper .qscreen__q { color: var(--paper-ink); }
.quiz--paper .qscreen__tag { color: var(--paper-dim); border-color: var(--paper-line); }
.quiz--paper .qscreen__hint { color: var(--paper-dim); }
.quiz--paper .qopt { color: var(--paper-ink); border-color: var(--paper-line); }
.quiz--paper .qopt::before { border-color: var(--paper-dim); }
.quiz--paper .qopt:hover { color: var(--gold-deep); }
.quiz--paper .qopt.is-selected { color: var(--gold-deep); }
.quiz--paper .qopt.is-selected::before { background: var(--gold-deep); border-color: var(--gold-deep); }
.quiz--paper .qchoice-row .qopt { border-color: var(--paper-line); }
.quiz--paper .qfield label { color: var(--paper-dim); }
.quiz--paper .qfield input { color: var(--paper-ink); border-color: var(--paper-line); }
.quiz--paper .qfield input:focus { border-color: var(--gold-deep); }
.quiz--paper .qfield input::placeholder { color: rgba(92, 96, 104, 0.6); }
.quiz--paper .qconsent input { border-color: rgba(138, 107, 46, 0.55); }
.quiz--paper .qconsent input:checked { background: var(--gold-deep); border-color: var(--gold-deep); }
.quiz--paper .qconsent input::before { background: #F6F2E9; }
.quiz--paper .qconsent label { color: var(--paper-dim); }
.quiz--paper .qscreen__privacy { color: var(--paper-dim); }
.quiz--paper .quiz__back { color: var(--paper-dim); }
.quiz--paper .quiz__back:hover { color: var(--gold-deep); }
.quiz--paper .quiz__thanks h3 { color: var(--paper-ink); }
.quiz--paper .quiz__thanks p { color: var(--paper-dim); }
.quiz--paper .callcard__label { color: var(--paper-dim); }
.quiz--paper .callcard__btn { color: var(--paper-ink); border-color: var(--paper-line); }
.quiz--paper .callcard__btn:hover { border-color: var(--gold-deep); }
.quiz--paper .cta-line { background: var(--gold-deep); color: #F6F2E9; }
.quiz--paper .cta-line:hover { background: #A5803B; }
.quiz--paper .btn-ghost--sm { border-color: var(--paper-line); color: var(--paper-dim); }
.quiz--paper .btn-ghost--sm:hover { color: var(--paper-ink); border-color: var(--paper-ink); }

/* ---------- brochure pages ---------- */
.hero--page { min-height: 92svh; }
.hero__kicker {
  margin-bottom: 1.3rem;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 1px 12px rgba(8, 11, 20, 0.85), 0 0 2px rgba(8, 11, 20, 0.6);
}
.lang-th .hero__kicker { letter-spacing: .05em; text-transform: none; }

.excl--paper {
  background: var(--paper);
  color: var(--paper-ink);
  margin-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}
.excl--paper ::selection { background: var(--gold-deep); color: var(--paper); }
.excl--paper .chapter__num { color: var(--gold-deep); }
.excl--paper .chapter__label { color: var(--paper-dim); }
.excl--paper .chapter__title { color: var(--paper-ink); }
.excl__list {
  list-style: none;
  margin-top: 2.6rem;
  max-width: 62rem;
  border-top: 1px solid var(--paper-line);
}
.excl__item {
  display: grid; grid-template-columns: 4.5rem 1fr;
  gap: 1.5rem; align-items: baseline;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--paper-line);
}
.excl__num {
  font-family: var(--font-display); font-weight: 300;
  font-size: 1.4rem; color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}
.excl__item p { color: #2A2F3A; max-width: 62ch; }
@media (max-width: 700px) { .excl__item { grid-template-columns: 3rem 1fr; gap: 1rem; } }

.pprod__list { margin-top: 2.6rem; max-width: 62rem; }
.pprod {
  display: grid; grid-template-columns: 4.5rem 1fr;
  gap: 1.5rem; align-items: baseline;
  padding: 1.9rem 0;
  border-top: 1px solid var(--line);
}
.pprod:last-child { border-bottom: 1px solid var(--line); }
.pprod__num {
  font-family: var(--font-display); font-weight: 300;
  font-size: 1.4rem; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.pprod__name {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.45;
}
.pprod__line { margin-top: .65rem; color: var(--dim); max-width: 60ch; }
.pprod__note { margin-top: 2rem; font-size: .82rem; color: var(--dim); max-width: 72ch; }
@media (max-width: 700px) { .pprod { grid-template-columns: 3rem 1fr; gap: 1rem; } }

.pcta {
  padding: var(--section-gap) var(--gutter);
  display: flex; justify-content: center;
}
.pcta__paper {
  width: min(100%, 62rem);
  background: var(--paper); color: var(--paper-ink);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  box-shadow: 0 44px 96px -40px rgba(0, 0, 0, 0.62);
  text-align: center;
  display: grid; justify-items: center; gap: 1.5rem;
}
.pcta__kicker {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--paper-dim);
}
.lang-th .pcta__kicker { letter-spacing: .04em; text-transform: none; }
.pcta__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.25; max-width: 22ch;
}
.lang-th .pcta__title { line-height: 1.5; }
.pcta__actions .cta-line { background: var(--gold-deep); color: #F6F2E9; }
.pcta__actions .cta-line:hover { background: #A5803B; }
.pcta__links { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: center; }
.pcta__links .textlink { color: var(--gold-deep); border-color: rgba(138, 107, 46, 0.45); }
.pcta__links .textlink:hover { border-color: var(--gold-deep); }


/* ==========================================================================
   v6 — "The promise, in writing"
   The desk under the envelope · the postmark dated today · the formal
   underwriter letter with its round stamp · Nongnoi's margin note ·
   the chapter calculators · the paper wipe between chapters.
   ========================================================================== */

/* ---------- the desk the envelope lies on ---------- */
.envelope::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: url(/img/desk-hero.webp) center / cover no-repeat;
}
.envelope::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 90% at 50% 42%, rgba(8, 11, 20, 0) 46%, rgba(8, 11, 20, 0.55) 100%);
  pointer-events: none;
}
.envelope__paperbg { z-index: 0; }
.envelope__stage { z-index: 1; }

/* ---------- the postmark: stamped the day you arrive ---------- */
.env__postmark {
  position: absolute; top: 11%; right: 15.5%;
  width: clamp(58px, 15%, 92px); aspect-ratio: 1;
  transform: rotate(-9deg);
  color: rgba(20, 25, 34, 0.52);
  mix-blend-mode: multiply;
}
.env__postmark svg { display: block; width: 100%; height: 100%; font-family: var(--font-body); }

/* ---------- the formal letter: the underwriter's two beats ---------- */
.letter__paper--formal { position: relative; }
.letter__head { text-align: center; padding-bottom: 1.6rem; position: relative; }
.letter__head::after {
  content: "";
  position: absolute; left: 12%; right: 12%; bottom: 0; height: 3px;
  border-top: 1px solid rgba(20, 25, 34, 0.32);
  border-bottom: 1px solid rgba(20, 25, 34, 0.32);
}
.letter__brand {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.15rem, 2.1vw, 1.45rem);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--paper-ink);
}
.lang-th .letter__brand { letter-spacing: .04em; text-transform: none; }
.letter__brandsub {
  margin-top: .5rem;
  font-size: .78rem; letter-spacing: .1em;
  color: var(--paper-dim);
}
.letter__to {
  margin-top: 2.2rem;
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  color: var(--paper-ink);
}
.lang-th .letter__to { font-style: normal; }
.letter__foot {
  margin-top: 2.6rem; padding-top: 1.3rem;
  border-top: 1px solid var(--paper-line);
  max-width: 25rem;
}
.letter__underwriter {
  font-size: .92rem; font-weight: 500; letter-spacing: .02em;
  color: var(--paper-ink);
}
.letter__warning {
  margin-top: .45rem;
  font-size: .8rem; line-height: 1.7;
  color: var(--paper-dim);
}

/* ---------- the round stamp: it lands when you reach the end ---------- */
.letter__stamp {
  position: absolute; right: -1rem; bottom: 7.5rem;
  width: clamp(132px, 24vw, 176px); aspect-ratio: 1;
  color: #2F4A8F;
  opacity: 0;
  transform: rotate(-8deg);
  mix-blend-mode: multiply;
  pointer-events: none;
  will-change: transform, opacity;
}
.letter__stamp svg { display: block; width: 100%; height: 100%; }
.letter__stampring { font-family: var(--font-body); font-size: 12px; letter-spacing: 1.2px; }
.lang-th .letter__stampring { font-size: 10px; letter-spacing: .6px; }
.letter__stampcenter { font-family: var(--font-display); font-weight: 400; }
.no-gsap .letter__stamp, .rm .letter__stamp { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .letter__stamp { opacity: 1; } }

/* ---------- the P.S.: a different hand inside the formal letter ---------- */
.letter__ps--hand {
  border-top: 0;
  transform: rotate(-0.7deg);
  color: #2A3F7A;
  opacity: .92;
  max-width: none;
}
.lang-en .letter__ps--hand {
  font-family: "Caveat", cursive;
  font-size: 1.65rem; line-height: 1.45;
}
.lang-th .letter__ps--hand {
  font-family: "Charmonman", cursive;
  font-size: 1.45rem; line-height: 1.65;
}
.letter__ps .hw { will-change: opacity; }

/* ---------- the date line on the formal letter: always today ---------- */
.letter__date {
  margin-top: 1rem;
  font-size: .82rem; letter-spacing: .05em;
  color: var(--paper-dim);
}

/* ---------- the margin note: taped beside the letter ---------- */
.note {
  background: var(--paper);
  color: var(--paper-ink);
  padding-bottom: var(--section-gap);
}
.note ::selection { background: var(--gold-deep); color: var(--paper); }
.note .chapter__num { color: var(--gold-deep); }
.note .chapter__label { color: var(--paper-dim); }
.note__card {
  position: relative;
  display: flex; gap: clamp(1.6rem, 4vw, 3rem); align-items: flex-start;
  max-width: 52rem;
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  background: #F9F5EC;
  border: 1px solid var(--paper-line);
  box-shadow: 0 34px 70px -30px rgba(20, 25, 34, 0.38);
  transform: rotate(-0.5deg);
}
.note__tape {
  position: absolute; top: -13px; left: 50%;
  transform: translateX(-50%) rotate(-1.6deg);
  width: 110px; height: 28px;
  background: rgba(233, 226, 205, 0.8);
  border-left: 1px dashed rgba(20, 25, 34, 0.14);
  border-right: 1px dashed rgba(20, 25, 34, 0.14);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.note__photo {
  flex: 0 0 clamp(150px, 24vw, 220px);
  border: 1px solid var(--paper-line);
  background: #F6F2E9;
  padding: .55rem;
  box-shadow: 0 16px 34px -18px rgba(20, 25, 34, 0.4);
  transform: rotate(1.1deg);
}
.note__photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 20%; display: block; }
.note__lead {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(1.35rem, 2.8vw, 1.8rem);
  line-height: 1.5;
  color: var(--paper-ink);
}
.lang-th .note__lead { font-style: normal; }
.note__body {
  margin-top: 1.1rem;
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.9;
  color: #2A2F3A;
}
.note__sig {
  margin-top: 1.4rem; padding-top: 1rem;
  border-top: 1px solid var(--paper-line);
  font-size: .82rem; letter-spacing: .06em;
  color: var(--paper-dim);
}

/* ---------- the paper wipe between chapters ---------- */
.pagewipe {
  position: fixed; inset: 0; z-index: 200;
  background: #080B14;
  opacity: 0; pointer-events: none;
  will-change: opacity;
}

/* ---------- the calculator: your number, on paper ---------- */
.pcalc {
  background: var(--paper);
  color: var(--paper-ink);
  margin-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}
.pcalc ::selection { background: var(--gold-deep); color: var(--paper); }
.pcalc .chapter__num { color: var(--gold-deep); }
.pcalc .chapter__label { color: var(--paper-dim); }
.pcalc .chapter__title { color: var(--paper-ink); }
.calc {
  max-width: 40rem;
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
  background: #F9F5EC;
  border: 1px solid var(--paper-line);
  box-shadow: 0 30px 60px -28px rgba(20, 25, 34, 0.35);
}
.calc__fields { display: grid; gap: 1.15rem; margin-top: 1.6rem; }
.calc__field { display: grid; gap: .35rem; }
.calc__label { font-size: .82rem; letter-spacing: .05em; color: var(--paper-dim); }
.calc__input {
  width: 100%;
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(20, 25, 34, 0.3);
  padding: .45rem 0;
  font: inherit; font-size: 1.15rem;
  color: var(--paper-ink);
  border-radius: 0;
}
.calc__input:focus { outline: none; border-bottom-color: var(--gold-deep); }
.calc__input::-webkit-outer-spin-button,
.calc__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc__input { -moz-appearance: textfield; appearance: textfield; }
.calc__result { margin-top: 2rem; display: grid; gap: .3rem; }
.calc__resultlabel {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--paper-dim);
}
.lang-th .calc__resultlabel { letter-spacing: .05em; text-transform: none; }
.calc__resultnum {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.15;
  color: var(--gold-deep);
}
.calc__note {
  margin-top: 1.3rem; padding-top: 1rem;
  border-top: 1px solid var(--paper-line);
  font-size: .8rem; line-height: 1.75;
  color: var(--paper-dim);
}

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .letter__stamp {
    position: relative; right: auto; bottom: auto;
    margin: -0.6rem 0 0 auto;
    width: 128px;
  }
  .note__card { flex-direction: column; }
  .note__photo { flex-basis: auto; width: min(64vw, 240px); }
}

/* ---------- a11y/SEO utility: present for screen readers & crawlers, invisible on screen ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
