/* ==========================================================================
   ScaleSiam — design system
   Structural and interaction primitives. Astra art direction is in astra.css.
   Self-hosted Syne display + Anuphan for body copy and Thai.
   ========================================================================== */

:root {
  --paper: #fcfcfd;
  --ink: #08152e;
  --ink-soft: #4b5871;
  --surface: #f2f4f8;
  --surface-2: #e9edf4;
  --line: #e1e6ef;
  --green: #1c5c45;
  --green-bright: #8fc7ae;
  --green-soft: #e4efe9;
  --green-ink: #17382c;
  --btn-light: #f5f6f8;

  --font-display: Syne, Anuphan, sans-serif;
  --font-body: Anuphan, sans-serif;
  --font-display-th: Anuphan, sans-serif;
  --font-body-th: Anuphan, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: linear(
    0, 0.0407 5%, 0.1331 10%, 0.2464 15%, 0.3627 20%,
    0.472 25%, 0.5697 30%, 0.6541 35%, 0.7253 40%,
    0.7842 45%, 0.8324 50%, 0.8712 55%, 0.9023 60%,
    0.927 65%, 0.9465 70%, 0.9618 75%, 0.9737 80%,
    0.983 85%, 0.9902 90%, 0.9957 95%, 1
  );

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --header-h: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/* Hide Thai-preferring first paint until i18n.js applies. A 600ms
   failsafe on the boot script adds .i18n-ready if the map fails. */
html.i18n-pending:not(.i18n-ready) {
  visibility: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.002em;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

::selection { background: var(--green); color: var(--paper); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -52px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
}
.skip:focus-visible { top: 12px; }

/* ------------------------------------------------------------------
   Typography
------------------------------------------------------------------ */

h1, h2, h3, p { margin-top: 0; }

h1, h2, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.04;
}

h1 { font-size: clamp(2.75rem, 5.4vw, 4.5rem); margin-bottom: 20px; }
h2 { font-size: clamp(2rem, 3.8vw, 3.25rem); margin-bottom: 16px; }

h1 em, h2 em {
  font-style: italic;
  color: var(--green);
}

.kicker {
  margin-bottom: 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}
.kicker-dark { color: var(--green-bright); }

.lead, .section-lead {
  color: var(--ink-soft);
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 34rem;
}

.section-head { max-width: 44rem; }

/* Thai: no Latin italics, no tracking that splits glyphs, room for
   tone marks, line-height that doesn't clip. English display stays. */
html[lang="th"] body {
  font-family: var(--font-body-th);
  letter-spacing: 0;
  line-height: 1.7;
  line-break: loose;
  word-break: normal;
  overflow-wrap: break-word;
}

html[lang="th"] h1,
html[lang="th"] h2,
html[lang="th"] h3,
html[lang="th"] .price-card h3,
html[lang="th"] .tier h3,
html[lang="th"] .closing-title {
  font-family: var(--font-display-th);
  letter-spacing: 0;
  overflow: visible;
}

html[lang="th"] h1 {
  line-height: 1.28;
  padding-top: 0.18em;
}

html[lang="th"] h2 {
  line-height: 1.35;
  padding-top: 0.14em;
}

html[lang="th"] h3 {
  line-height: 1.35;
  padding-top: 0.08em;
}

html[lang="th"] h1 em,
html[lang="th"] h2 em {
  font-style: normal;
}

html[lang="th"] .kicker,
html[lang="th"] .chip,
html[lang="th"] .per,
html[lang="th"] .from {
  letter-spacing: 0;
  text-transform: none;
}

html[lang="th"] .kicker {
  font-size: 0.8125rem;
  font-weight: 700;
}

html[lang="th"] .btn,
html[lang="th"] .card-actions .btn,
html[lang="th"] .tier .btn {
  white-space: normal;
  line-height: 1.35;
  height: auto;
  text-align: center;
}

html[lang="th"] .faq-item summary {
  letter-spacing: 0;
  line-height: 1.45;
}

section {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ------------------------------------------------------------------
   Buttons, chips, links
------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.35s var(--spring),
    background-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    color 180ms var(--ease-out);
}

.btn-dark {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 2px rgba(8, 21, 46, 0.16), 0 2px 8px -2px rgba(8, 21, 46, 0.12);
}

.btn-light {
  background: var(--btn-light);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px rgba(8, 21, 46, 0.09),
    0 1px 2px rgba(8, 21, 46, 0.05),
    0 6px 18px -4px rgba(8, 21, 46, 0.06);
}

.btn-ondark {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -6px rgba(0, 0, 0, 0.4);
}

.btn:active { transform: scale(0.97); }

.chip {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.chip-current { background: var(--green-soft); color: var(--green); }
.chip-launch { background: var(--surface-2); color: var(--ink-soft); }

.text-link {
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(8, 21, 46, 0.3);
  transition: text-decoration-color 160ms var(--ease-out);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Focus — one visible ring everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible, .chip:focus-visible { border-radius: 999px; }

/* Controls only: no double-tap delay, no long-press selection.
   Content text stays selectable. */
.btn, .lanes button, .story-row, summary, .wordmark {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* ------------------------------------------------------------------
   Brand mark
------------------------------------------------------------------ */

.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  transition: opacity 160ms var(--ease-out);
}

/* ------------------------------------------------------------------
   Service story
------------------------------------------------------------------ */

.story {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-top: clamp(72px, 9vw, 128px);
  padding-bottom: clamp(72px, 9vw, 128px);
}

.story-head { max-width: 26rem; }

.story-rows { border-top: 1px solid var(--line); }

.story-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 44px;
  gap: 20px;
  align-items: center;
  padding: 26px 12px;
  border-bottom: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: background-color 200ms var(--ease-out);
}

.story-index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.story-name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.story-desc {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  max-width: 26rem;
}

.story-price {
  text-align: right;
  font-weight: 700;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.story-price small {
  display: block;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.story-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  transition: transform 250ms var(--ease-out), background-color 200ms var(--ease-out), color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

/* ------------------------------------------------------------------
   Research findings (dark)
------------------------------------------------------------------ */

.desk-section {
  background: var(--ink);
  color: var(--paper);
  padding-top: clamp(64px, 7vw, 96px);
  padding-bottom: clamp(64px, 7vw, 96px);
}

.desk-wrap {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}

.desk-head {
  max-width: 44rem;
  margin-bottom: 0;
}

.desk-head .section-lead { color: rgba(252, 252, 253, 0.66); }
.desk-head h2 em { color: var(--green-bright); }

/* ------------------------------------------------------------------
   Process
------------------------------------------------------------------ */

.process {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-top: clamp(72px, 9vw, 128px);
  padding-bottom: clamp(72px, 9vw, 128px);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
  list-style: none;
  padding: 0;
  margin: 44px 0 0;
}

.steps li {
  border-top: 1px solid var(--ink);
  padding-top: 18px;
}

.step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2rem;
  color: var(--green);
  display: block;
  margin-bottom: 10px;
}

.steps h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.steps p {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  margin: 0;
}

/* ------------------------------------------------------------------
   Pricing preview + shared price card styles
------------------------------------------------------------------ */

.pricing {
  background: var(--surface);
  padding-top: clamp(72px, 9vw, 128px);
  padding-bottom: clamp(72px, 9vw, 128px);
}

.pricing > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.price-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 44px;
}

.price-card, .tier {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 34px rgba(8, 21, 46, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-card-feature, .tier-feature {
  outline: 1.5px solid var(--ink);
  outline-offset: -1.5px;
}

.price-card h3, .tier h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.625rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.price-lockup {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}

.price {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price .cur { font-size: 0.6em; margin-right: 0.06em; font-weight: 600; }

.per, .from {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.price .from { font-size: 0.45em; margin-right: 0.3em; text-transform: none; letter-spacing: 0; font-weight: 500; }

.aud {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  margin: 0;
  flex: 1;
}

.card-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.pricing-foot {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.pricing-more {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.pricing-more a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(8, 21, 46, 0.3);
}

/* ------------------------------------------------------------------
   Questions
------------------------------------------------------------------ */

.questions {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-top: clamp(72px, 9vw, 128px);
  padding-bottom: clamp(72px, 9vw, 128px);
}

.faq {
  max-width: 760px;
  margin-top: 36px;
  border-bottom: 1px solid var(--line);
}

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

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 18px 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform 260ms var(--ease-out), background-color 200ms var(--ease-out);
}

.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.faq-item[open] .faq-icon, .sheet[open] .faq-icon { transform: rotate(45deg); background: var(--surface); }

.faq-body {
  padding: 0 44px 22px 4px;
  color: var(--ink-soft);
  max-width: 42rem;
}
.faq-body p { margin: 0; }

/* ------------------------------------------------------------------
   Closing — Yakshan composition
------------------------------------------------------------------ */

.contact-closing {
  position: relative;
  background: #eef1f5;
  overflow: hidden;
  min-height: 660px;
  display: flex;
  align-items: center;
}

.closing-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding-top: clamp(80px, 10vw, 140px);
  padding-bottom: clamp(80px, 10vw, 140px);
  margin-left: max(0px, calc((100% - var(--max)) / 2));
}

.closing-title {
  font-size: clamp(3rem, 6.4vw, 5.25rem);
  line-height: 1.02;
}

.closing-copy .section-lead { margin-bottom: 32px; }

.closing-img {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  max-height: 780px;
  width: auto;
  max-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 24%);
  mask-image: linear-gradient(to right, transparent 0%, black 24%);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-inner {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) calc(48px + env(safe-area-inset-bottom, 0px));
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.footer-nav {
  display: flex;
  gap: 8px 22px;
  flex-wrap: wrap;
  font-size: 0.9375rem;
  font-weight: 500;
}

.footer-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 160ms var(--ease-out);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.fine {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin: 6px 0 0;
  max-width: 56rem;
}

/* ------------------------------------------------------------------
   Composer — modal and page form share these field styles
------------------------------------------------------------------ */

.composer-modal {
  border: 0;
  padding: 0;
  border-radius: 24px;
  width: min(620px, calc(100vw - 32px));
  max-height: min(88dvh, 920px);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 40px 120px -20px rgba(8, 21, 46, 0.4);
}

body.modal-open { overflow: hidden; }

.composer-modal::backdrop {
  background: rgba(8, 21, 46, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.composer-modal[open] {
  animation: modal-in 280ms var(--ease-out);
}

.composer-modal[open]::backdrop {
  animation: backdrop-in 280ms var(--ease-out);
}

.composer-modal.closing {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
}

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

.composer-shell {
  padding: clamp(20px, 3vw, 32px);
  overflow-y: auto;
  max-height: inherit;
  overscroll-behavior: contain;
}

.composer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.composer-title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.composer-sub {
  margin: 6px 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.composer-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--btn-light);
  box-shadow: inset 0 0 0 1px rgba(8, 21, 46, 0.09);
  color: var(--ink);
  font-size: 1.125rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--spring), background-color 160ms var(--ease-out);
}
.composer-close:active { transform: scale(0.94); }

.composer { display: grid; gap: 16px; }

.field { display: grid; gap: 6px; }

.field label {
  font-size: 0.875rem;
  font-weight: 600;
}

.field input, .field select, .field textarea {
  font: inherit;
  font-size: 16px;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(28, 92, 69, 0.16);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.composer-preview {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 16px;
}

.composer-preview-label {
  margin: 0 0 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.composer-output {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink);
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.composer-status {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green);
}

.composer-truth {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* ------------------------------------------------------------------
   Contact page
------------------------------------------------------------------ */

.contact-main {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(72px, 9vw, 120px);
}

.contact-head { max-width: 44rem; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 56px);
  margin-top: 44px;
  align-items: start;
}

.composer-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(20px, 3vw, 36px);
  box-shadow: 0 14px 44px rgba(8, 21, 46, 0.06);
}

.contact-aside { min-width: 0; }

@media (min-width: 1101px) {
  .contact-aside { position: sticky; top: calc(var(--header-h) + 32px); }
}

.aside-title {
  font-family: var(--font-display);
  font-size: 1.625rem;
  margin-bottom: 18px;
}

.aside-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.aside-steps li {
  display: grid;
  gap: 2px;
  padding-left: 20px;
  border-left: 2px solid var(--green);
}

.aside-steps span { color: var(--ink-soft); font-size: 0.9375rem; }

.aside-note {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  margin-top: 28px;
}

.aside-note h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.aside-note p {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------
   Packages page
------------------------------------------------------------------ */

.pack {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(32px, 4vw, 48px) var(--gutter) clamp(72px, 9vw, 120px);
}

.pack-head { max-width: 44rem; }
.pack-head .section-lead { max-width: 38rem; }

.lane-bar {
  position: sticky;
  top: calc(var(--header-h) + 10px);
  z-index: 30;
  margin: 24px 0 32px;
}

.lanes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 600px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}

.lanes > button {
  position: relative;
  z-index: 1;
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 200ms var(--ease-out), transform 0.35s var(--spring);
}

.lanes > button:active { transform: scale(0.96); }
.lanes > button[aria-selected="true"] { color: var(--ink); }

/* Keep the focus ring above the clipped ink pill */
.lanes > button:focus-visible { z-index: 3; }

/* Active-state copy, clipped to the selected tab — the pill and the
   label color change together because they are one revealed layer. */
.lanes-active {
  position: absolute;
  inset: 4px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
  clip-path: inset(0 75% 0 0 round 24px);
  transition: clip-path 300ms var(--ease-in-out);
}

.lanes-active span {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
}

.lanes .lbl-short { display: none; }

.panel { padding-left: 0; padding-right: 0; }
.panel[hidden] { display: none; }

/* No-JS deep-link targets for #websites/#menus/#marketing/#ai —
   JS intercepts those hashes for tab selection before they scroll. */
.lane-anchor {
  display: block;
  scroll-margin-top: 150px;
}

.panel:not([hidden]) {
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out), display 260ms;
  transition-behavior: allow-discrete;
}

@starting-style {
  .panel:not([hidden]) {
    opacity: 0;
    transform: translateY(10px);
  }
}

.cluster + .cluster, .cluster + .care { margin-top: 56px; }

.cluster-head {
  max-width: 44rem;
  margin-bottom: 28px;
}

.cluster-head h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }

.cluster-lead { color: var(--ink-soft); margin: 0; }

.tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tiers-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 820px;
}

.tier { min-width: 0; scroll-margin-top: 160px; }

.tier ul {
  margin: 2px 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  display: grid;
  gap: 4px;
  flex: 1;
}

.diff {
  font-weight: 600;
  font-size: 0.9375rem;
  margin: 0;
}

.tier .card-actions {
  margin-top: auto;
  padding-top: 10px;
}

.tier .card-actions .btn { width: 100%; white-space: normal; text-align: center; }

.tier .price { font-size: 2.25rem; }

/* Setup vs monthly — always two labelled, separated figures */
.price-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 16px;
}

.price-split p {
  margin: 0;
  display: grid;
  gap: 3px;
  align-content: start;
}

.price-split p + p {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.price-split .price { font-size: 1.625rem; }
.price-split .from { display: block; font-size: 0.6875rem; }

.shared {
  color: var(--ink-soft);
  margin: 20px 0 0;
  max-width: 46rem;
  font-size: 0.9375rem;
}

.foot-note {
  background: var(--green-soft);
  color: var(--green-ink);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 20px 0 0;
  font-size: 0.9375rem;
  max-width: 46rem;
}

.foot-note .text-link { color: var(--green); display: inline-block; margin-top: 6px; }

.compare {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 0.9375rem;
}

.compare caption {
  caption-side: top;
  text-align: left;
  padding-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
}

.compare th, .compare td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}

.compare thead th {
  border-top: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}

.compare tbody th { font-weight: 600; }

.care {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px 32px;
  background: var(--green-soft);
  border-radius: 20px;
  padding: 24px;
  scroll-margin-top: 160px;
}

.care h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.625rem;
  margin: 8px 0 6px;
}

.care p { margin: 0; max-width: 34rem; color: var(--green-ink); }

.care-copy { min-width: 0; }

.care-side {
  display: grid;
  gap: 12px;
  justify-items: end;
  flex: none;
}

.care-side .price-lockup { justify-content: flex-end; }

#custom { background: var(--surface); }
#custom p { color: var(--ink-soft); }

.price-quote { font-size: 2rem; }

/* All-prices sheet */
.sheet {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  margin-bottom: 24px;
}

.sheet summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.sheet summary::-webkit-details-marker { display: none; }

.sheet-body { padding: 0 20px 20px; }

.sheet table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
}

.sheet th, .sheet td {
  padding: 9px 12px 9px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}

.sheet thead th {
  border-top: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}

.sheet tbody th { font-weight: 600; }
.sheet a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(8, 21, 46, 0.3); }

/* ------------------------------------------------------------------
   Motion — entrances and scroll reveals
------------------------------------------------------------------ */

/* Scroll reveals — scroll-position-derived, so nothing can stick
   hidden; no @supports means fully visible. */
@supports (animation-timeline: view()) {
  .story-row,
  .price-card,
  .steps li,
  .tier,
  .care,
  .cluster-head {
    animation-name: rise-in;
    animation-timing-function: var(--ease-out);
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }

  .price-card:nth-child(2), .steps li:nth-child(2), .tier:nth-child(2) { animation-range: entry 5% entry 45%; }
  .price-card:nth-child(3), .steps li:nth-child(3), .tier:nth-child(3) { animation-range: entry 10% entry 50%; }
  .steps li:nth-child(4) { animation-range: entry 15% entry 55%; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
}

/* Accordion height animation where supported; instant elsewhere */
@supports (interpolate-size: allow-keywords) and (selector(::details-content)) {
  :root { interpolate-size: allow-keywords; }

  .faq-item::details-content, .sheet::details-content {
    height: 0;
    opacity: 0;
    overflow: clip;
    transition: height 240ms var(--ease-out), opacity 240ms var(--ease-out), content-visibility 240ms;
    transition-behavior: allow-discrete;
  }

  .faq-item[open]::details-content, .sheet[open]::details-content {
    height: auto;
    opacity: 1;
  }
}

/* Hover — fine pointers only, touch never fakes it */
@media (hover: hover) and (pointer: fine) {
  .btn-dark:hover { background: #12224a; transform: translateY(-1px); }
  .btn-light:hover { background: #ffffff; transform: translateY(-1px); }
  .btn-ondark:hover { transform: translateY(-1px); }

  .wordmark:hover { opacity: 0.65; }

  .story-row:hover { background: var(--surface); }
  .story-row:hover .story-arrow {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
    transform: translateX(4px);
  }

  .text-link:hover { text-decoration-color: var(--ink); }
  .footer-nav a:hover { color: var(--ink); }
  .pricing-more a:hover { text-decoration-color: var(--ink); }
  .composer-close:hover { background: var(--surface-2); }
  .lanes > button:not([aria-selected="true"]):hover { color: var(--ink); }
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */

@media (min-width: 1101px) {
  .story-head { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}

@media (max-width: 1100px) {
  .story { grid-template-columns: 1fr; }
  .story-head { max-width: 40rem; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .desk-wrap { grid-template-columns: 1fr; gap: 36px; }

  .tiers, .tiers-2, .price-cards { grid-template-columns: 1fr; }
  .tiers-2 { max-width: none; }

  .contact-closing { min-height: 0; display: block; }

  .closing-copy {
    margin-left: 0;
    max-width: 34rem;
    padding-top: clamp(64px, 10vw, 96px);
    padding-bottom: 0;
  }

  /* Edge-to-edge crop focused on the right-side face */
  .closing-img {
    position: static;
    width: calc(100% + 2 * var(--gutter));
    max-width: none;
    height: clamp(350px, 92vw, 390px);
    margin: 32px calc(-1 * var(--gutter)) 0;
    object-fit: cover;
    object-position: 100% 28%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 12%);
  }
}

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }

  .story-row {
    grid-template-columns: 36px minmax(0, 1fr) 44px;
    grid-template-areas:
      "index body arrow"
      "index price arrow";
    row-gap: 8px;
    padding: 22px 4px;
  }
  .story-index { grid-area: index; }
  .story-body { grid-area: body; }
  .story-price { grid-area: price; text-align: left; }
  .story-price small { display: inline; margin-right: 4px; }
  .story-arrow { grid-area: arrow; }

  .lanes .lbl-full { display: none; }
  .lanes .lbl-short { display: inline; }

  .care { flex-direction: column; align-items: flex-start; }
  .care-side { justify-items: start; }
  .care-side .price-lockup { justify-content: flex-start; }

  .compare { display: block; overflow-x: auto; overscroll-behavior: contain; }
}

@media (max-width: 430px) {
  .wordmark { font-size: 1.3rem; }
}

@media (max-width: 360px) {
  .wordmark { font-size: 1.2rem; }
}

/* ------------------------------------------------------------------
   Reduced motion — fewer and gentler, not zero
------------------------------------------------------------------ */

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

  .story-row, .price-card, .steps li, .tier, .care, .cluster-head { animation: none; }

  .panel:not([hidden]) { transition-duration: 120ms; }

  .btn, .composer-close, .lanes > button { transition: none; }
  .btn:active, .composer-close:active { transform: none; }

  .faq-icon { transition: none; }

  .faq-item::details-content, .sheet::details-content {
    transition: opacity 160ms var(--ease-out), content-visibility 160ms;
    transition-behavior: allow-discrete;
  }

  .composer-modal[open] { animation-duration: 160ms; }
  @keyframes modal-in {
    from { opacity: 0; transform: none; }
  }
}

/* ------------------------------------------------------------------
   Print
------------------------------------------------------------------ */

@media print {
  .skip, .lane-bar, .actions, .card-actions { display: none; }
  .panel[hidden] { display: block !important; }
  .story-row, .price-card, .steps li, .tier, .care { animation: none; }
  .closing-img { position: static; width: 60%; margin-left: auto; mask-image: none; -webkit-mask-image: none; }
}
