/* Kanaung landing page.
 * Every value resolves to a token in tokens.css. Nothing is invented here.
 */

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

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

/* The design system specifies no Myanmar face and warns Burmese runs ~15%
   taller. Noto Sans Myanmar is the interim pick; line-height stays >= 1.35. */
.my { font-family: "Noto Sans Myanmar", var(--font-ui); line-height: 1.5; }

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-body);
  font-family: var(--font-ui);
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  letter-spacing: var(--tracking-ui);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.narrow { max-width: 760px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin: 0;
}
h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.05; letter-spacing: var(--tracking-display); }
h2 { font-size: clamp(26px, 3.6vw, 40px); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); }
h3 { font-size: var(--fs-title); line-height: var(--lh-snug); letter-spacing: var(--tracking-heading); }

p { margin: 0; }
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: var(--radius-xs); }

.overline {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.lede { font-size: var(--fs-lg); color: var(--text-body); max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: var(--fs-base); font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-ui);
  padding: 11px 18px; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.btn:hover { text-decoration: none; }
/* one primary action per view — brand ink */
.btn-primary { background: var(--action-primary); color: var(--text-inverse); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--action-primary-hover); }
.btn-secondary { background: var(--bg-raised); color: var(--text-primary); border-color: var(--border-field); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-ghost { background: none; color: var(--text-body); padding: 11px 0; }
.btn-ghost:hover { color: var(--text-primary); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg-app) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-hairline);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
.brand:hover { text-decoration: none; }
.brand svg { width: 17px; height: 17px; color: var(--ink-brand); }
.brand span {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: var(--fs-lg); letter-spacing: var(--tracking-heading);
}
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a {
  font-size: var(--fs-base); font-weight: var(--fw-medium);
  color: var(--text-secondary); letter-spacing: var(--tracking-ui);
}
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-signin {
  font-size: var(--fs-base); font-weight: var(--fw-medium);
  color: var(--text-secondary); letter-spacing: var(--tracking-ui);
}
.nav-signin:hover { color: var(--text-primary); text-decoration: none; }
/* sign in stays reachable on a phone — the nav tightens instead of dropping it */
@media (max-width: 560px) {
  .nav-in { gap: 12px; }
  .nav-cta { gap: 12px; }
  .nav-signin { font-size: var(--fs-sm); }
  .nav-cta .btn { padding: 9px 13px; font-size: var(--fs-sm); }
  .brand span { font-size: var(--fs-base); }
}
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 116px) 0 clamp(56px, 8vw, 104px); }
.hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { max-width: 17ch; margin-top: 16px; }
.hero .lede { margin-top: 20px; font-size: clamp(17px, 1.8vw, 20px); max-width: 56ch; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
/* --text-muted is 3.15:1 on the app background at 12px, below the 4.5:1 AA
   floor. --text-secondary is the next token up and clears it at 4.76:1. */
.hero-note { margin-top: 16px; font-size: var(--fs-caption); color: var(--text-secondary); text-align: center; }

/* the product shot — a real turn, not a screenshot we do not have */
.shot { margin: clamp(44px, 6vw, 76px) auto 0; padding: 0 clamp(20px, 5vw, 40px); max-width: 1180px; }
.shot-frame {
  background: var(--bg-raised); border: 1px solid var(--border-field);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-composer);
  overflow: hidden; text-align: left;
}
.shot-head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 18px; border-bottom: 1px solid var(--border-hairline);
  background: var(--bg-sunken);
  font-size: var(--fs-caption); color: var(--text-secondary);
}
.shot-head span:first-of-type { font-weight: var(--fw-semibold); color: var(--text-primary); }
.shot-mark { width: 13px; height: 13px; color: var(--ink-brand); flex: none; }
.shot-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.shot-body { padding: clamp(22px, 3vw, 34px) clamp(20px, 3vw, 32px); min-height: clamp(150px, 17vw, 210px); }
.ask {
  font-size: clamp(18px, 1.9vw, 24px); color: var(--text-primary);
  font-family: "Noto Sans Myanmar", var(--font-ui); line-height: 1.5;
  letter-spacing: var(--tracking-heading);
}
.caret {
  display: inline-block; width: 2px; height: 1.05em; background: var(--action-accent);
  margin-left: 3px; vertical-align: -2px; animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.reply {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-hairline);
  display: flex; gap: 10px; align-items: flex-start;
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.reply.on { opacity: 1; transform: none; }
.reply-mark { width: 12px; height: 12px; color: var(--ink-brand); flex: none; margin-top: 5px; }
.reply p { font-size: clamp(15px, 1.35vw, 17px); color: var(--text-body); line-height: var(--lh-normal); max-width: 62ch; }
.reply b { font-weight: var(--fw-semibold); color: var(--text-primary); font-variant-numeric: tabular-nums; }
/* the real composer, as furniture — it is where you would actually type */
.shot-composer {
  margin: 0 clamp(16px, 2.4vw, 26px) clamp(16px, 2.4vw, 26px);
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px 13px 18px;
  border: 1px solid var(--border-field); border-radius: var(--radius-pill);
  background: var(--bg-app);
}
.shot-placeholder { flex: 1; font-size: var(--fs-base); color: var(--text-placeholder); }
.shot-send {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  background: var(--action-primary); color: var(--text-inverse);
  display: grid; place-items: center; font-size: 13px; line-height: 1;
}
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } .reply { transition: none; } }

/* ---------- illustrated sections ---------- */
.sec { padding-top: clamp(56px, 8vw, 104px); }
.sec-intro { display: none; }   /* main.js moves this into the stage */

.scroller { position: relative; width: 100%; overflow-anchor: none; }
.pin {
  position: sticky; top: 62px; min-height: calc(100vh - 62px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 0 28px;
}
.stage {
  width: 100%; max-width: 1180px; padding: 0 clamp(20px, 5vw, 40px); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center;
}
.col-intro { width: 100%; }
.col-intro h2 { margin-top: 12px; max-width: 18ch; }
.col-intro .lede { margin-top: 16px; }

.frame { position: relative; width: 100%; }
.frame canvas { width: 100%; height: 100%; display: block; }

/* the message that starts section 01 */
.msg { position: absolute; left: 0; top: -46px; width: 100%; display: flex; justify-content: center; pointer-events: none; }
.msg span {
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-primary);
  background: var(--bg-raised); border: 1px solid var(--border-field);
  border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
  padding: 8px 14px; white-space: nowrap;
  opacity: 0; transform: translateY(-5px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.msg.on span { opacity: 1; transform: none; }
.msg.on span::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 1px;
  background: var(--action-accent); margin-right: 9px; vertical-align: 1px;
}

.caption {
  margin: 22px auto 0; max-width: 52ch; text-align: center; min-height: 3.1em;
  font-size: var(--fs-lg); color: var(--text-primary); text-wrap: balance;
  opacity: 0; transition: opacity var(--dur-slow) var(--ease-out);
}
.caption b { font-weight: var(--fw-semibold); }

/* No beat rail on the landing page — the progress line is the only orientation
   a reader needs. The labelled rail was a review control for the studies. */
.readout { width: 100%; max-width: 860px; margin: 20px auto 0; }
.prog { height: 2px; background: var(--border-default); width: 100%; overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--ink-brand); }

.stats {
  width: 100%; display: grid; opacity: 0; margin-top: 18px;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  border-top: 1px solid var(--border-default);
  transition: opacity var(--dur-slow) var(--ease-out);
}
.stat { padding: 16px 16px 15px; border-bottom: 1px solid var(--border-default); border-left: 1px solid var(--border-default); }
.stat:first-child { border-left: 0; padding-left: 2px; }
.stat .k, .stat .v { overflow-wrap: anywhere; }
.stat .v {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: clamp(19px, 2.3vw, 25px); line-height: var(--lh-tight); color: var(--text-primary);
  font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-heading);
}
.stat .k {
  margin-top: 7px; font-weight: var(--fw-semibold); font-size: 10px;
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-secondary);
  display: flex; align-items: center; gap: 7px;
}
.stat .k::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--text-primary); flex: none; }
.stat.idle .k::before { background: none; box-shadow: inset 0 0 0 1px var(--ink-5); }

/* Desktop reads as two columns — copy on the left, the world on the right —
   rather than a tall stack that wastes the width. Mobile keeps the stack. */
@media (min-width: 1000px) {
  .stage {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    column-gap: clamp(36px, 4.5vw, 72px);
    align-items: center; justify-items: stretch;
  }
  .col-intro { grid-column: 1; grid-row: 1; align-self: end; }
  .stage > .frame { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .stage > .caption { grid-column: 1; grid-row: 2; text-align: left; margin: 20px 0 0; max-width: 46ch; }
  .stage > .readout { grid-column: 1; grid-row: 3; margin: 22px 0 0; align-self: start; }
  .stage > .readout .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 04 is the interactive one — it does not pin and you act on it, so it gets a
     centred, wider posture instead of the two-column "watch this" frame. */
  .sec-wide .stage {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center; max-width: 1180px;
  }
  .sec-wide .col-intro { grid-column: 1; grid-row: 1; text-align: center; max-width: 62ch; margin-inline: auto; }
  .sec-wide .col-intro h2 { max-width: none; margin-inline: auto; }
  .sec-wide .col-intro .lede { margin-inline: auto; }
  .sec-wide .stage > .frame { grid-column: 1; grid-row: 2; margin-top: 26px; }
  .sec-wide .stage > .caption { grid-column: 1; grid-row: 3; text-align: center; margin: 20px auto 0; }
  .sec-wide .stage > .readout { grid-column: 1; grid-row: 4; margin: 22px auto 0; max-width: 880px; }
  .sec-wide .stage > .readout .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- the approval card (section 04) ---------- */
.card {
  position: absolute; left: 42%; top: 2%; width: min(304px, 64%);
  background: var(--bg-raised); border: 1px solid var(--border-field);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 15px 16px 14px; text-align: left; z-index: 3;
  opacity: 0; transform: translateY(-6px) scale(.985); pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.card.on { opacity: 1; transform: none; pointer-events: auto; }
.card .tag {
  font-weight: var(--fw-semibold); font-size: var(--fs-micro); letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--text-secondary); display: flex; align-items: center; gap: 7px;
}
.card .tag::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--action-accent); flex: none; }
.card .who { margin-top: 11px; font-size: var(--fs-base); font-weight: var(--fw-medium); color: var(--text-primary); line-height: var(--lh-snug); }
.card .desc { margin-top: 4px; font-size: var(--fs-caption); color: var(--text-secondary); line-height: 1.45; }
.card .rows { margin: 11px 0 0; padding-top: 10px; border-top: 1px solid var(--border-hairline); display: grid; gap: 5px; }
.card .row { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-caption); }
.card .row dt { color: var(--text-secondary); }
.card .row dd { margin: 0; color: var(--text-primary); font-variant-numeric: tabular-nums; text-align: right; }
.card .acts { display: flex; gap: 8px; margin-top: 14px; }
.card button {
  appearance: none; font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-medium);
  padding: 9px 15px; cursor: pointer; border: 1px solid transparent; border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease-out);
}
/* confirm is the accent — this is Kanaung proposing, not the user initiating */
.card .ok { background: var(--action-accent); color: var(--text-inverse); flex: 1; box-shadow: var(--shadow-xs); }
.card .ok:hover { background: var(--action-accent-hover); }
.card .no { background: var(--bg-raised); color: var(--text-primary); border-color: var(--border-field); flex: 0 0 auto; }
.card .no:hover { background: var(--bg-hover); }
.card .done {
  margin-top: 14px; font-weight: var(--fw-semibold); font-size: var(--fs-micro);
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--text-secondary);
}

/* ---------- what it covers ---------- */
.covers { padding-top: clamp(80px, 11vw, 140px); }
.covers h2 { margin-top: 14px; max-width: 18ch; }
.covers-line {
  margin-top: 24px; max-width: 62ch;
  font-size: clamp(18px, 1.9vw, 22px); line-height: var(--lh-normal);
  color: var(--text-secondary);
}
.covers-line b { font-weight: var(--fw-medium); color: var(--text-primary); }

/* ---------- closing ---------- */
.close { padding-top: clamp(88px, 12vw, 156px); padding-bottom: clamp(72px, 9vw, 108px); }
.close-in {
  background: var(--bg-inverse); color: var(--text-inverse);
  border-radius: var(--radius-xl); padding: clamp(40px, 6vw, 68px);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center;
}
@media (min-width: 900px) {
  .close-in { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 4vw, 64px); }
}
.close-copy { min-width: 0; }
/* the four-dot mark, drawn in the same square-dot lattice as the worlds above */
.close-mark { width: 100%; aspect-ratio: 1 / 1; max-width: 320px; justify-self: center; display: block; }
@media (max-width: 899px) { .close-mark { max-width: 200px; } }
.close-in h2 { color: var(--text-inverse); max-width: 17ch; }
.close-in p { margin-top: 18px; color: var(--text-inverse-2); font-size: var(--fs-lg); max-width: 52ch; }
.close-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.close-in .btn-primary { background: var(--white); color: var(--ink-brand); }
.close-in .btn-primary:hover { background: var(--surface-hover); }
.close-in .btn-secondary { background: transparent; color: var(--text-inverse); border-color: rgba(255, 255, 255, .28); }
.close-in .btn-secondary:hover { background: rgba(255, 255, 255, .08); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--border-hairline); padding: 34px 0 56px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.foot .brand span { font-size: var(--fs-base); }
.foot small { margin-left: auto; font-size: var(--fs-caption); color: var(--text-secondary); }
@media (max-width: 620px) { .foot small { margin-left: 0; } }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 14px 12px 13px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 2px; }

  /* the approval card needs the frame to itself at this size */
  .card { left: auto; right: 0; top: 0; width: min(280px, 88%); }

  .pin { top: 62px; min-height: calc(100svh - 62px); padding: 12px 0 20px; }
  .caption { font-size: var(--fs-md); min-height: 4.2em; }
  .msg { top: -40px; }
  .msg span { font-size: var(--fs-caption); padding: 7px 11px; }
  .composer { padding: 14px 14px 12px; }
  .hero-actions { gap: 10px; }
}
