/* ==========================================================================
   Roboh landing page
   1. Fonts   2. Tokens   3. Base   4. Header   5. Hero   6. Strip
   7. Products   8. Story   9. Closing   10. Footer   11. Dialog
   12. Motion   13. Khmer typography   14. Responsive
   ========================================================================== */

/* 1. Fonts (self-hosted, variable) ---------------------------------------- */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('fonts/dm-sans-latin-wght-normal.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: 'Kantumruy Pro';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('fonts/kantumruy-pro-latin-wght-normal.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: 'Kantumruy Pro';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('fonts/kantumruy-pro-khmer-wght-normal.woff2') format('woff2');
  unicode-range: U+1780-17FF, U+19E0-19FF, U+200C-200D, U+25CC;
}

/* 2. Tokens --------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Surfaces & text */
  --paper: #f6f5ef;
  --surface: #ffffff;
  --ink: #22231f;
  --muted: #565b4d;
  --subtle: #676c5a;
  --border: #dcddd4;
  --border-strong: #b4b8a8;

  /* Brand */
  --yellow: #e8f867;
  --on-yellow: #22231f;
  --accent: #5a6a17;
  --accent-soft: #7c8a2a;
  --focus: #3f4a0c;

  /* Cards & panels */
  --card-trob: #efefe5;
  --card-kum: #e9eee7;
  --panel: #e9eddf;
  --panel-ink: #59614d;
  --star: #d3dfb8;
  --card-line: #d5dace;
  --icon-kum: #d2ddcc;
  --chip: #f0f5de;
  --chip-ink: #485a1c;
  --bar: #eceee4;
  --orbit: #d9ddd0;
  --window-line: #e3e5dc;
  --window-sep: #eceee4;
  --icon-soft: #f1f2ea;
  --shadow: 0 20px 60px rgb(36 41 31 / 0.09);
  --header-bg: rgb(246 245 239 / 0.86);
  --highlight: var(--yellow);
  --highlight-ink: var(--ink);
  --button-bg: var(--ink);
  --button-ink: var(--paper);
  --button-hover: #43473b;
  --footer-bg: #22231f;
  --footer-ink: #f0f1e8;
  --footer-muted: #b9bdad;
  --footer-line: #41453a;
  --demo-line: #d0d8c4;
  --demo-track: #d3dbc6;
  --demo-fill: #6f8140;

  /* Type */
  --font-latin: 'DM Sans', 'Segoe UI', Arial, sans-serif;
  --font-khmer: 'Kantumruy Pro', 'Khmer UI', 'Noto Sans Khmer', sans-serif;
  --fs-micro: 0.75rem;
  --fs-small: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-lead: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);

  /* Layout */
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1280px;
  --section: clamp(56px, 8vw, 96px);
  --radius: 18px;
  --header-h: 84px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #181b17;
  --surface: #252c21;
  --ink: #eff1e5;
  --muted: #b6bdaa;
  --subtle: #a2aa94;
  --border: #363d31;
  --border-strong: #5a6650;

  --accent: #cfe08f;
  --accent-soft: #bed091;
  --focus: #e8f867;

  --card-trob: #232a1f;
  --card-kum: #212b24;
  --panel: #2a3524;
  --panel-ink: #bccaa7;
  --star: #3f512e;
  --card-line: #46533a;
  --icon-kum: #40513a;
  --chip: #39452b;
  --chip-ink: #d2eaa5;
  --bar: #3d4831;
  --orbit: #353e2d;
  --window-line: #414b36;
  --window-sep: #414a37;
  --icon-soft: #3b4630;
  --shadow: 0 20px 60px rgb(0 0 0 / 0.3);
  --header-bg: rgb(24 27 23 / 0.86);
  --highlight: #454e22;
  --highlight-ink: var(--yellow);
  --button-bg: var(--yellow);
  --button-ink: #22231f;
  --button-hover: #f0ff88;
  --footer-bg: #10130e;
  --footer-ink: #eff1e5;
  --footer-muted: #b1b8a4;
  --footer-line: #35412b;
  --demo-line: #4c5e3d;
  --demo-track: #475936;
  --demo-fill: var(--yellow);
}

/* 3. Base ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

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

::selection {
  background: var(--yellow);
  color: #22231f;
}

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

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.2s;
}

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

/* Shared bits */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: var(--fs-micro);
  font-weight: 650;
  letter-spacing: 0.12em;
  line-height: 1.7;
}

.tiny-dot,
.label-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: var(--fs-base);
  font-weight: 600;
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.button > span {
  display: inline-block;
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.2s;
}

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

.button:hover > span {
  transform: translate(2px, -2px);
}

.button.primary {
  background: var(--button-bg);
  color: var(--button-ink);
}

.button.primary:hover {
  background: var(--button-hover);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.14);
}

/* 4. Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-family: var(--font-latin);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 1;
}

/* Two variants live in the markup (header, footer, story card); the active
   language decides which shows. With motion allowed, the header and footer
   logos alternate between both instead (section 12). */
.wm {
  display: none;
  white-space: nowrap;
}

html:not([lang='km']) .wm--en,
html[lang='km'] .wm--km {
  display: inline-block;
}

/* Khmer glyphs aren't in DM Sans; use the site's Khmer face at the same weight.
   Negative tracking would crowd stacked Khmer clusters, so reset it. */
.wm--km {
  font-family: var(--font-khmer);
  letter-spacing: 0;
}

.wm-tail {
  display: inline-block;
  color: var(--accent-soft);
}

.wm-dot,
.wm-word {
  display: inline-block;
}

.header nav {
  display: flex;
  gap: 8px;
}

.header nav a {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9375rem;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}

.header nav a:hover,
.header nav a[aria-current='true'] {
  color: var(--ink);
}

.header nav a[aria-current='true']::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-soft);
}

.header-actions,
.preferences-controls {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 16px;
}

.preferences-controls {
  gap: 8px;
  flex-shrink: 0;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 550;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #22231f;
}

.language-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.language-switch button {
  min-height: 36px;
  min-width: 44px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 550;
  line-height: 1.25;
  transition: background-color 0.2s, color 0.2s;
}

.language-switch button[lang='km'] {
  font-family: var(--font-khmer);
}

.language-switch button:hover {
  color: var(--ink);
}

.language-switch button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  transition: border-color 0.2s, transform 0.3s;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  transform: rotate(14deg);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.sun-icon,
[data-theme='dark'] .moon-icon {
  display: none;
}

[data-theme='dark'] .sun-icon {
  display: block;
}

/* 5. Hero ----------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  padding-block: clamp(40px, 6vw, 72px) clamp(48px, 6vw, 72px);
}

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

.hero h1 {
  margin-bottom: 28px;
  font-size: clamp(2.75rem, 1.4rem + 4.6vw, 4.9rem);
  font-weight: 550;
  letter-spacing: -0.058em;
  line-height: 1.07;
  text-wrap: balance;
}

.highlight {
  padding-inline: 0.08em;
  margin-inline: -0.08em;
  background: linear-gradient(transparent 60%, var(--highlight) 60% 93%, transparent 93%);
  color: var(--highlight-ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-description {
  max-width: 34em;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.75;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.6;
}

.mini-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Hero artwork: absolutely placed windows inside a size container so the
   composition scales with its column instead of being transformed. */
.hero-art {
  position: relative;
  container-type: inline-size;
  width: 100%;
  max-width: 560px;
  min-height: 600px;
  margin-inline: auto;
}

.art-caption {
  position: absolute;
  top: 0;
  left: 4%;
  color: var(--subtle);
  font-size: var(--fs-micro);
  letter-spacing: 0.14em;
}

.orbit {
  position: absolute;
  border: 1px solid var(--orbit);
  border-radius: 50%;
  aspect-ratio: 1;
  pointer-events: none;
}

.orbit-one {
  top: 28px;
  left: 0;
  width: min(470px, 96cqw);
}

.orbit-two {
  top: 90px;
  left: min(62px, 12cqw);
  width: min(346px, 70cqw);
}

.finance-window,
.project-window {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--window-line);
  box-shadow: var(--shadow);
}

.finance-window {
  top: 56px;
  left: 2%;
  z-index: 2;
  width: clamp(240px, 56cqw, 296px);
  padding: 22px;
  border-radius: 16px;
  rotate: -5deg;
}

.window-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
}

.window-top strong {
  font-weight: 650;
  letter-spacing: -0.02em;
}

.window-top strong span {
  color: var(--subtle);
  font-size: var(--fs-small);
  font-weight: 400;
}

.window-menu {
  margin-left: auto;
  letter-spacing: 2px;
}

.app-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.75rem;
}

.window-top .app-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 1.25rem;
}

.finance-icon {
  background: var(--yellow);
  color: #343922;
}

.project-icon {
  background: var(--icon-kum);
}

.balance-label {
  margin: 20px 0 6px;
  color: var(--subtle);
  font-size: var(--fs-micro);
  line-height: 1.5;
}

.balance {
  font-family: var(--font-latin);
  font-size: 2.5rem;
  letter-spacing: -0.055em;
  line-height: 1.2;
}

.balance > span {
  color: var(--subtle);
  font-size: 1.625rem;
  letter-spacing: -0.04em;
}

.balance-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.6875rem;
}

.trend {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--chip);
  color: var(--chip-ink);
  font-weight: 600;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  height: 96px;
  margin-top: 18px;
}

.bar-chart i {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: var(--bar);
  transform-origin: bottom;
}

.bar-chart i.last {
  background: var(--yellow);
}

.chart-days {
  display: flex;
  justify-content: space-around;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.625rem;
}

.saving-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--window-sep);
  font-size: var(--fs-micro);
}

.saving-row > div {
  min-width: 0;
}

.saving-row strong {
  display: block;
  font-weight: 600;
  line-height: 1.4;
}

.saving-row small {
  display: block;
  margin-top: 2px;
  color: var(--subtle);
  font-size: 0.6875rem;
  line-height: 1.4;
}

.saving-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--icon-soft);
  font-size: 1.25rem;
}

.saving-row > span:last-child {
  margin-left: auto;
  font-weight: 600;
}

.project-window {
  top: 268px;
  right: 0;
  z-index: 3;
  width: clamp(196px, 45cqw, 240px);
  padding: 7px;
  border-radius: 14px;
  rotate: 7deg;
}

.project-image {
  position: relative;
  height: 128px;
  overflow: hidden;
  border-radius: 9px;
  background: #dce6d7;
  color: #22231f;
}

.project-image::after {
  content: '';
  position: absolute;
  top: -30px;
  left: 25px;
  width: 55px;
  height: 200px;
  border: 5px solid #d8e1d8;
  background: #c7d9dc;
  transform: rotate(28deg);
}

.project-image > span {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 15px;
  background: rgb(255 255 255 / 0.78);
  font-size: 0.6875rem;
}

.map-line {
  position: absolute;
  z-index: 1;
  width: 350px;
  height: 10px;
  background: #f8f8ed;
  transform: rotate(-28deg);
}

.line-a {
  top: 40px;
  left: -40px;
}

.line-b {
  top: 130px;
  left: -40px;
}

.line-c {
  top: 10px;
  left: 0;
  transform: rotate(61deg);
}

.map-block {
  position: absolute;
  border: 4px solid #dce6d7;
  border-radius: 9px;
  background: #baccb2;
  transform: rotate(-26deg);
}

.block-a {
  top: 14px;
  right: 12px;
  width: 55px;
  height: 37px;
}

.block-b {
  top: 79px;
  right: 16px;
  width: 72px;
  height: 35px;
}

.block-c {
  top: 40px;
  left: 90px;
  width: 45px;
  height: 37px;
}

.map-pin {
  position: absolute;
  top: 37px;
  right: 64px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 5px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #22231f;
  color: var(--yellow);
  font-size: 0.5625rem;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
  transform: rotate(-45deg);
}

.project-body {
  padding: 13px 12px 9px;
}

.project-type {
  color: var(--subtle);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
}

.project-body h3 {
  margin: 8px 0 14px;
  font-size: 1.25rem;
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.project-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--subtle);
  font-size: 0.6875rem;
}

.project-bottom > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-bottom > span:last-child {
  color: var(--ink);
  font-size: 1rem;
}

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--chip-ink);
  font-size: 0.625rem;
  font-style: normal;
  font-weight: 600;
}

.art-label {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--paper);
  font-size: var(--fs-micro);
  font-weight: 500;
}

.art-label .label-dot {
  background: #8fae67;
}

.finance-label {
  top: 76px;
  right: 3%;
  rotate: 6deg;
}

.project-label {
  bottom: 22px;
  left: 4%;
  rotate: -5deg;
}

.project-label .label-dot {
  background: #a891b3;
}

.yellow-seal {
  position: absolute;
  top: 168px;
  right: 0;
  z-index: 4;
  width: 96px;
  height: 96px;
  rotate: 15deg;
}

.yellow-seal svg {
  width: 100%;
  fill: var(--yellow);
}

.yellow-seal > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  color: #22231f;
  font-size: var(--fs-micro);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.concept-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  color: var(--subtle);
  font-size: var(--fs-micro);
}

/* 6. Brand strip ---------------------------------------------------------- */
.brand-strip {
  border-block: 1px solid var(--border);
}

.strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
  color: var(--muted);
  font-size: var(--fs-small);
}

.strip-khmer {
  color: var(--ink);
  font-family: var(--font-khmer);
  font-size: 1.375rem;
}

.strip-inner > span:last-child {
  display: flex;
  align-items: center;
  gap: 22px;
}

.strip-inner > span:last-child > span {
  color: var(--ink);
  font-size: 1.75rem;
}

/* 7. Products ------------------------------------------------------------- */
.products {
  padding-block: var(--section) calc(var(--section) * 0.8);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
}

.section-heading .eyebrow {
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(2.125rem, 1.4rem + 2.2vw, 2.875rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.14;
  text-wrap: balance;
}

.section-heading > p {
  max-width: 440px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: 1.75;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card-trob);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.kumruang-card {
  background: var(--card-kum);
}

.product-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.product-card:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.product-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--fs-micro);
  font-weight: 500;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  animation: pulse 2.4s ease-in-out infinite;
}

.product-name {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}

.product-name h3 {
  font-family: var(--font-latin);
  font-size: 2.375rem;
  font-weight: 550;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.product-name h3 span {
  color: var(--accent-soft);
}

.product-name > span {
  color: var(--subtle);
  font-family: var(--font-khmer);
  font-size: 1.0625rem;
}

.product-tagline {
  margin-bottom: 10px;
  font-size: 1.0625rem;
  font-weight: 550;
  line-height: 1.5;
}

.product-description {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.75;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 22px 28px;
}

.feature-tags span {
  padding: 5px 11px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  font-size: var(--fs-micro);
  font-weight: 500;
}

.product-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--card-line);
}

.domain {
  color: var(--subtle);
  font-family: var(--font-latin);
  font-size: var(--fs-small);
}

.text-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: var(--fs-small);
  font-weight: 650;
}

/* Stretched hit area: the whole card opens the preview. */
.text-button::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.text-button:focus-visible {
  outline: none;
}

.text-button > span {
  display: inline-block;
  font-size: 1.25rem;
  transition: transform 0.2s;
}

.product-card:hover .text-button > span {
  transform: translate(3px, -3px);
}

.future-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  padding-block: 22px;
}

.future-plus {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px dashed var(--border-strong);
  border-radius: 50%;
  color: var(--subtle);
  font-size: 1.25rem;
}

.future-row p {
  font-size: var(--fs-base);
  font-weight: 550;
}

.future-row p span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 400;
}

.future-word {
  margin-left: auto;
  color: var(--subtle);
  font-size: var(--fs-small);
}

/* 8. Story ---------------------------------------------------------------- */
.story {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(32px, 6vw, 90px);
  padding-block: calc(var(--section) * 0.75) var(--section);
  border-top: 1px solid var(--border);
}

.story-art {
  position: relative;
  min-height: 380px;
  padding: 30px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
}

.story-number,
.story-definition {
  color: var(--panel-ink);
  font-size: var(--fs-micro);
}

.story-number {
  letter-spacing: 0.12em;
}

.story-word {
  margin-top: 44px;
  font-family: var(--font-latin);
  font-size: clamp(4.5rem, 3rem + 4.5vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 1.1;
}

.story-khmer {
  margin-top: 6px;
  color: var(--panel-ink);
  font-family: var(--font-khmer);
  font-size: 1.75rem;
}

/* In Khmer the large word already reads របស់ខ្ញុំ, so don't repeat it. */
html[lang='km'] .story-khmer {
  display: none;
}

.story-definition {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 44px;
}

.story-star {
  position: absolute;
  right: -36px;
  bottom: 24px;
  width: 160px;
  height: 160px;
  fill: var(--star);
  rotate: 7deg;
}

.story-copy .eyebrow {
  margin-bottom: 20px;
}

.story-copy h2 {
  margin-bottom: 24px;
}

.story-copy > p:not(.eyebrow) {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

.story-copy [lang='km'],
.story-copy em {
  font-family: var(--font-khmer);
  font-style: normal;
}

.story-signoff {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font-size: var(--fs-small);
  font-weight: 550;
}

.signoff-line {
  width: 28px;
  height: 1px;
  background: var(--border-strong);
}

/* 9. Closing -------------------------------------------------------------- */
.closing {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-block: calc(var(--section) * 0.75);
  border-top: 1px solid var(--border);
}

.closing .eyebrow {
  margin-bottom: 20px;
}

.closing h2 {
  font-size: clamp(2.5rem, 1.4rem + 3.6vw, 3.75rem);
  letter-spacing: -0.05em;
  line-height: 1.13;
}

.closing h2 span {
  color: var(--accent);
}

.closing-right {
  max-width: 380px;
}

.closing-right p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.closing-note {
  display: block;
  margin-top: 16px;
  color: var(--subtle);
  font-size: var(--fs-micro);
}

/* 10. Footer -------------------------------------------------------------- */
footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
}

footer :focus-visible {
  outline-color: var(--yellow);
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 44px;
}

.footer-main .wm-tail {
  color: var(--yellow);
}

.footer-main > p {
  color: var(--footer-muted);
  font-size: var(--fs-small);
}

.footer-main > a:last-child {
  display: flex;
  gap: 16px;
  font-size: var(--fs-small);
}

.footer-main > a:last-child:hover {
  color: var(--yellow);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
  border-top: 1px solid var(--footer-line);
  color: var(--footer-muted);
  font-size: var(--fs-micro);
}

.footer-bottom > [lang='km'] {
  font-family: var(--font-khmer);
  font-size: 0.9375rem;
}

/* 11. Product preview dialog ---------------------------------------------- */
dialog {
  width: 560px;
  max-width: calc(100% - 32px);
  max-height: calc(100dvh - 32px);
  padding: 36px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 100px rgb(0 0 0 / 0.25);
}

dialog::backdrop {
  background: rgb(24 27 23 / 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  transition: background-color 0.2s, border-color 0.2s;
}

.dialog-close:hover {
  border-color: var(--border-strong);
  background: var(--panel);
}

.dialog-eyebrow {
  margin-bottom: 18px;
  padding-right: 52px;
  color: var(--muted);
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
}

dialog h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem);
}

#dialog-description {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.75;
}

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 14px;
}

.demo-tabs button {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  font-size: var(--fs-small);
  font-weight: 550;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.demo-tabs button:hover {
  border-color: var(--border-strong);
}

.demo-tabs button[aria-selected='true'] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

#demo-content {
  min-height: 200px;
  padding: 22px;
  border-radius: 14px;
  background: var(--panel);
}

#demo-content > * {
  animation: fade-up 0.3s both;
}

.demo-label {
  color: var(--panel-ink);
  font-size: var(--fs-micro);
}

.demo-amount {
  margin: 8px 0 16px;
  font-family: var(--font-latin);
  font-size: 2.25rem;
  letter-spacing: -0.05em;
}

.demo-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--demo-line);
  font-size: var(--fs-base);
}

.demo-row span:first-child {
  color: var(--panel-ink);
}

.demo-progress {
  height: 10px;
  margin: 18px 0 8px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--demo-track);
}

.demo-progress span {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: 8px;
  background: var(--demo-fill);
  transform-origin: left;
  animation: fill 0.8s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.demo-pill {
  display: inline-block;
  margin: 8px 6px 0 0;
  padding: 5px 11px;
  border: 1px solid var(--demo-line);
  border-radius: 999px;
  font-size: var(--fs-micro);
}

.demo-title {
  margin: 10px 0;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.demo-copy {
  color: var(--panel-ink);
  line-height: 1.75;
}

.dialog-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: var(--fs-micro);
  line-height: 1.7;
}

/* 12. Motion -------------------------------------------------------------- */
@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes grow {
  from {
    transform: scaleY(0.05);
  }
}

@keyframes fill {
  from {
    transform: scaleX(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

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

/* A calm 7s loop: the dot drops in, the word is written out left to right,
   the full mark holds for about 4.5s, then the word is wiped away and the dot
   lifts off before the next cycle. Both tracks share the period so they never
   drift apart; the offsets live in the keyframes rather than in delays. The
   clip insets are negative top/bottom so tall Khmer clusters are never cut. */
@keyframes wm-dot {
  0%,
  3% {
    opacity: 0;
    transform: translateY(-0.55em) scale(0.4);
    animation-timing-function: cubic-bezier(0.3, 1.4, 0.5, 1);
  }

  7.7% {
    opacity: 1;
    transform: translateY(0.05em) scale(1.15);
  }

  11%,
  89% {
    opacity: 1;
    transform: none;
    animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0);
  }

  95%,
  100% {
    opacity: 0;
    transform: translateY(-0.35em) scale(0.6);
  }
}

@keyframes wm-word {
  0%,
  7% {
    opacity: 0;
    transform: translateX(-0.3em);
    clip-path: inset(-0.7em 100% -0.7em 0);
    animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  16.5%,
  83% {
    opacity: 1;
    transform: none;
    clip-path: inset(-0.7em -0.3em -0.7em 0);
    animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4);
  }

  91%,
  100% {
    opacity: 0;
    transform: translateX(-0.15em);
    clip-path: inset(-0.7em 100% -0.7em 0);
  }
}

/* Khmer has no dot to wait for, so its word is written out sooner and holds
   a little longer. */
@keyframes wm-word-km {
  0%,
  3.5% {
    opacity: 0;
    transform: translateX(-0.3em);
    clip-path: inset(-0.7em 100% -0.7em 0);
    animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  13%,
  86% {
    opacity: 1;
    transform: none;
    clip-path: inset(-0.7em -0.3em -0.7em 0);
    animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4);
  }

  94%,
  100% {
    opacity: 0;
    transform: translateX(-0.15em);
    clip-path: inset(-0.7em 100% -0.7em 0);
  }
}

/* Header and footer logos alternate English, then Khmer, on a 14s cycle: each
   variant owns one 7s half and runs its own dot/word loop inside it. The name
   eases in as the cycle starts and out once the tail has been wiped away. */
@keyframes wm-swap {
  0% {
    opacity: 0;
    transform: translateY(0.12em);
    animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  3%,
  45.5% {
    opacity: 1;
    transform: none;
    animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0);
  }

  49%,
  100% {
    opacity: 0;
    transform: translateY(-0.12em);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .wm-dot {
    animation: wm-dot 7s linear infinite;
  }

  .wm-word {
    animation: wm-word 7s linear infinite;
  }

  .wm--km .wm-word {
    animation-name: wm-word-km;
  }

  /* Stack both variants in one grid cell so the logo keeps a steady size
     while they take turns, English first. */
  .wordmark {
    display: inline-grid;
    align-items: baseline;
    justify-items: start;
  }

  .wordmark .wm {
    display: inline-block;
    grid-area: 1 / 1;
    animation: wm-swap 14s linear infinite;
  }

  .wordmark .wm--km {
    animation-delay: -7s;
  }

  /* The story card is scroll-revealed: hold its logo animation until the card
     appears, otherwise it would finish while the card is still invisible. */
  .story-art:not(.is-visible) .wm-dot,
  .story-art:not(.is-visible) .wm-word {
    animation: none;
  }

  .finance-window {
    animation: float 7s ease-in-out infinite;
  }

  .project-window {
    animation: float 8s 1s ease-in-out infinite;
  }

  .bar-chart i {
    animation: grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .bar-chart i:nth-child(2) { animation-delay: 0.06s; }
  .bar-chart i:nth-child(3) { animation-delay: 0.12s; }
  .bar-chart i:nth-child(4) { animation-delay: 0.18s; }
  .bar-chart i:nth-child(5) { animation-delay: 0.24s; }
  .bar-chart i:nth-child(6) { animation-delay: 0.3s; }
  .bar-chart i:nth-child(7) { animation-delay: 0.36s; }

  dialog[open] {
    animation: dialog-in 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  /* Scroll reveal: only hidden when JS is running and can reveal it again. */
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0s);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* 13. Khmer typography ---------------------------------------------------- */
html[lang='km'] {
  --fs-micro: 0.8125rem;
  --fs-small: 0.875rem;
  --fs-base: 1rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
}

html[lang='km'] body {
  font-family: var(--font-khmer);
  line-height: 1.75;
}

html[lang='km'] .eyebrow,
html[lang='km'] .art-caption,
html[lang='km'] .project-type,
html[lang='km'] .story-number,
html[lang='km'] .dialog-eyebrow {
  letter-spacing: 0;
}

html[lang='km'] .hero h1 {
  font-size: clamp(2.375rem, 1.2rem + 3.6vw, 3.875rem);
  font-weight: 550;
  letter-spacing: 0;
  line-height: 1.55;
}

html[lang='km'] h2 {
  font-size: clamp(1.875rem, 1.3rem + 1.8vw, 2.5rem);
  font-weight: 550;
  letter-spacing: 0;
  line-height: 1.55;
}

html[lang='km'] .closing h2 {
  font-size: clamp(2rem, 1.2rem + 2.8vw, 3.125rem);
  line-height: 1.55;
}

html[lang='km'] .highlight {
  background: linear-gradient(transparent 68%, var(--highlight) 68% 96%, transparent 96%);
}

html[lang='km'] .hero-description br,
html[lang='km'] .section-heading > p br {
  display: none;
}

html[lang='km'] .hero-description {
  line-height: 1.95;
}

html[lang='km'] .hero-note,
html[lang='km'] .product-description,
html[lang='km'] .closing-right p,
html[lang='km'] .future-row p,
html[lang='km'] .demo-copy,
html[lang='km'] #dialog-description {
  line-height: 1.95;
}

html[lang='km'] .story-copy > p:not(.eyebrow) {
  line-height: 2;
}

html[lang='km'] .section-heading > p {
  max-width: 360px;
  line-height: 2;
}

html[lang='km'] .project-body h3 {
  font-size: 1.0625rem;
  letter-spacing: 0;
  line-height: 1.7;
  margin-bottom: 10px;
}

html[lang='km'] .product-tagline {
  font-size: 1.125rem;
  line-height: 1.8;
}

html[lang='km'] .demo-title {
  letter-spacing: 0;
  line-height: 1.7;
}

html[lang='km'] .demo-row strong {
  text-align: right;
}

html[lang='km'] .button {
  line-height: 1.7;
}

html[lang='km'] .header nav a {
  font-size: 1rem;
}

/* 14. Responsive ---------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav-cta {
    display: none;
  }

  .hero {
    gap: 16px;
  }

  .product-card {
    padding: 28px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 76px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .hero-art {
    max-width: 520px;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .story {
    grid-template-columns: 1fr;
  }

  .closing {
    flex-direction: column;
    align-items: flex-start;
  }

  .closing-right {
    max-width: 440px;
  }
}

@media (max-width: 700px) {
  /* Keep navigation reachable on phones: it drops to its own row, and the
     header stays pinned to the top like on larger screens. */
  :root {
    --header-h: 120px;
  }

  .header {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding-top: 14px;
    min-height: 0;
  }

  .wordmark {
    font-size: 2.125rem;
  }

  .header-actions {
    margin-left: auto;
  }

  .header nav {
    order: 3;
    width: 100%;
    gap: 4px;
    margin-inline: -14px;
    padding-bottom: 6px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .strip-inner {
    flex-wrap: wrap;
    padding-block: 18px;
  }

  .strip-inner > span:last-child {
    display: none;
  }

  .future-word {
    display: none;
  }

  .footer-main {
    flex-wrap: wrap;
  }

  .footer-main > p {
    margin-left: auto;
  }

  .footer-main > a:last-child {
    width: 100%;
  }

  .footer-bottom {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  /* Phones: the two windows flow and overlap only slightly, so nothing
     important (the 68% progress, labels) is covered. */
  .hero-art {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-block: 34px 40px;
  }

  .finance-window,
  .project-window {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
  }

  .finance-window {
    width: min(100%, 300px);
    margin-top: 14px;
    padding: 18px;
    rotate: -3deg;
  }

  .project-window {
    width: min(100%, 250px);
    margin: 10px 0 0 auto;
    rotate: 4deg;
  }

  .finance-label {
    top: 70px;
    right: 0;
  }

  .project-label {
    bottom: 56px;
    left: 0;
  }

  .yellow-seal {
    top: 118px;
    width: 84px;
    height: 84px;
  }

  .orbit-one {
    top: 60px;
  }

  .product-card {
    padding: 24px;
  }

  .product-name h3 {
    font-size: 2.125rem;
  }

  dialog {
    padding: 28px 20px 24px;
  }

  .demo-row {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .button {
    width: 100%;
  }

  .story-art {
    min-height: 330px;
    padding: 24px;
  }
}

@media (max-width: 380px) {
  .language-switch button {
    min-width: 40px;
    padding-inline: 9px;
  }

  .header-actions {
    gap: 8px;
  }

  .preferences-controls {
    gap: 6px;
  }
}

/* 15. Laptop fit: one section per screen ---------------------------------- */
/* On desktop-width viewports every section is exactly one screen tall (below
   the sticky header) and its content scales with the viewport height, so a
   15.6" laptop never has to scroll *within* a section. Sections use
   `min-height`, so very short windows still scroll rather than clip. */
@media (min-width: 901px) and (min-height: 500px) {
  :root {
    --header-h: 84px;
    --strip-h: 76px;
    --footer-h: 152px;
    --pad-y: clamp(20px, 4.2vh, 56px);
  }

  html {
    scroll-snap-type: y proximity;
    scroll-padding-top: var(--header-h);
  }

  .screen {
    min-height: calc(100svh - var(--header-h));
    scroll-snap-align: start;
  }

  /* Hero and brand strip share the first screen. */
  .screen--hero {
    display: flex;
    flex-direction: column;
  }

  .screen--hero .hero {
    flex: 1;
    padding-block: var(--pad-y);
  }

  .strip-inner {
    min-height: var(--strip-h);
  }

  .hero .eyebrow {
    margin-bottom: clamp(12px, 2.6vh, 24px);
  }

  .hero h1 {
    margin-bottom: clamp(14px, 2.8vh, 28px);
    font-size: clamp(2.25rem, min(1.4rem + 4.6vw, 8.4vh), 4.9rem);
  }

  html[lang='km'] .hero h1 {
    font-size: clamp(2rem, min(1.2rem + 3.6vw, 6.8vh), 3.875rem);
  }

  .hero-description {
    margin-bottom: clamp(16px, 3vh, 32px);
    font-size: clamp(0.9375rem, 2.1vh, 1.125rem);
  }

  .hero-note {
    margin-top: clamp(16px, 3.6vh, 36px);
  }

  /* The artwork is a fixed 600px-tall composition; scale it down in steps and
     pull the following content up by the space the scaling frees. */
  .hero-art {
    --z: 1;
    transform: scale(var(--z));
    transform-origin: top center;
    margin-bottom: calc(600px * (var(--z) - 1));
  }

  .products {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: var(--pad-y);
  }

  .section-heading {
    margin-bottom: clamp(14px, 3vh, 32px);
  }

  .section-heading .eyebrow,
  .story-copy .eyebrow,
  .closing .eyebrow {
    margin-bottom: clamp(8px, 1.8vh, 18px);
  }

  .section-heading h2,
  .story-copy h2 {
    font-size: clamp(1.625rem, min(1.4rem + 2.2vw, 5.2vh), 2.875rem);
  }

  html[lang='km'] .section-heading h2,
  html[lang='km'] .story-copy h2 {
    font-size: clamp(1.5rem, min(1.3rem + 1.8vw, 4.6vh), 2.5rem);
  }

  .product-card {
    padding: clamp(18px, 3.4vh, 32px) clamp(20px, 2.4vw, 32px);
  }

  .product-tagline {
    font-size: clamp(0.9375rem, 2.2vh, 1.0625rem);
  }

  .feature-tags {
    margin-block: clamp(12px, 2.2vh, 22px) clamp(14px, 2.8vh, 28px);
  }

  .product-link-row {
    margin-top: clamp(10px, 1.8vh, 16px);
    padding-top: clamp(10px, 2vh, 20px);
  }

  .future-row {
    margin-top: clamp(6px, 1.8vh, 24px);
    padding-block: clamp(8px, 1.6vh, 22px);
  }

  .story {
    padding-block: var(--pad-y);
  }

  .story-art {
    min-height: clamp(240px, 52vh, 420px);
    padding: clamp(18px, 3.2vh, 30px) 30px;
  }

  .story-word {
    margin-top: clamp(16px, 4.5vh, 44px);
    font-size: clamp(3.25rem, 11vh, 6.5rem);
  }

  .story-definition {
    margin-top: clamp(16px, 4.5vh, 44px);
  }

  .story-copy h2 {
    margin-bottom: clamp(12px, 2.4vh, 24px);
  }

  .story-copy > p:not(.eyebrow) {
    margin-bottom: clamp(8px, 1.8vh, 16px);
    font-size: clamp(0.9375rem, 2vh, 1rem);
    line-height: 1.75;
  }

  html[lang='km'] .story-copy > p:not(.eyebrow) {
    line-height: 1.95;
  }

  .story-signoff {
    margin-top: clamp(12px, 2.6vh, 28px);
  }

  .screen--closing {
    min-height: calc(100svh - var(--header-h) - var(--footer-h));
    align-items: center;
    padding-block: var(--pad-y);
  }

  .closing h2 {
    font-size: clamp(2rem, min(1.4rem + 3.6vw, 7.6vh), 3.75rem);
  }

  html[lang='km'] .closing h2 {
    font-size: clamp(1.875rem, min(1.2rem + 2.8vw, 6.4vh), 3.125rem);
  }

  footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: var(--footer-h);
  }

  .footer-main {
    padding-block: clamp(14px, 2.4vh, 22px);
  }

  .footer-bottom {
    padding-block: clamp(10px, 1.6vh, 14px);
  }

  /* Khmer script needs generous line-height in running text, but headings and
     secondary copy can be tighter so a section still fits one screen. */
  html[lang='km'] .hero h1 {
    line-height: 1.45;
  }

  html[lang='km'] .section-heading h2,
  html[lang='km'] .story-copy h2 {
    line-height: 1.4;
  }

  html[lang='km'] .product-tagline {
    line-height: 1.5;
  }

  html[lang='km'] .future-row p,
  html[lang='km'] .future-row p span {
    line-height: 1.6;
  }

  .text-button {
    min-height: 40px;
  }
}

/* Wider laptops: put the product icon, name and status on one row so both
   cards stay short enough to share a screen with the heading. */
@media (min-width: 1100px) and (min-height: 500px) {
  .product-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr auto auto;
    column-gap: 14px;
    align-items: center;
  }

  .product-top {
    display: contents;
  }

  .product-top .app-icon {
    grid-column: 1;
    grid-row: 1;
  }

  .product-top .status {
    grid-column: 3;
    grid-row: 1;
  }

  .product-name {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .product-name h3 {
    font-size: clamp(1.75rem, 4.4vh, 2.375rem);
  }

  .product-tagline,
  .product-description,
  .feature-tags,
  .product-link-row {
    grid-column: 1 / -1;
  }

  .product-tagline {
    margin: clamp(10px, 2.2vh, 20px) 0 6px;
  }

  .product-description {
    align-self: start;
    max-width: 52ch;
  }

  html[lang='km'] .product-description {
    max-width: none;
    font-size: 0.9375rem;
    line-height: 1.7;
  }

  .product-link-row {
    align-self: end;
  }
}

/* Artwork scale by viewport height (see .hero-art above). */
@media (min-width: 901px) and (max-height: 879px) { .hero-art { --z: 0.95; } }
@media (min-width: 901px) and (max-height: 819px) { .hero-art { --z: 0.88; } }
@media (min-width: 901px) and (max-height: 769px) { .hero-art { --z: 0.82; } }

/* Short laptop screens (1366x768 and 150%-scaled 1080p): tighter chrome and
   less secondary copy so every section still fits without scrolling. */
@media (min-width: 901px) and (min-height: 500px) and (max-height: 720px) {
  :root {
    --header-h: 64px;
    --strip-h: 60px;
    --footer-h: 128px;
  }

  .wordmark {
    font-size: 2rem;
  }

  .nav-cta {
    padding-block: 8px;
  }

  .hero-art { --z: 0.78; }
  .hero-note { display: none; }
  .future-row p span { display: none; }
}

@media (min-width: 901px) and (min-height: 500px) and (max-height: 659px) {
  .hero-art { --z: 0.7; }
  .product-card { padding-block: 16px; }
}

@media (min-width: 901px) and (min-height: 500px) and (max-height: 599px) {
  .hero-art { --z: 0.58; }
  .hero-description { display: none; }
  .product-description { display: none; }
  .feature-tags { display: none; }
  .story-signoff { display: none; }
}
