/* Kima landing, arm-A2: tokens, type, layout, header, buttons, and the
 * non-story sections (FAQ, form, compliance, footer). Story pieces live in
 * story.css; devices in phone.css / laptop.css. */

@font-face { font-family: "Instrument Serif"; src: url("../instrument-serif-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../instrument-sans-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  /* colour: the Kima design system (ink theme) */
  --canvas: #060806;
  --surface: #0E120E;
  --raised: #141A13;
  --ink: #E9EDE0;
  --ink-2: #C2C9B6;
  --muted: #929B86;
  --label: #78816C;
  --faint: #4A5144;
  --signal: #CDF546;
  --signal-hover: #DDFA7A;
  --signal-wash: rgba(205, 245, 70, .12);
  --on-signal: #141A05;
  --paper: #EDEFE4;
  --info: #6FA8E8;
  --success: #4FC98F;
  --danger: #E2603E;
  --hair: rgba(233, 237, 224, .10);
  --hair-2: rgba(233, 237, 224, .20);

  /* type */
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --fs-hero: clamp(56px, 11.5vw, 176px);
  --fs-xl: clamp(40px, 7vw, 104px);
  --fs-lg: clamp(32px, 5.2vw, 72px);
  --fs-md: clamp(20px, 2.4vw, 28px);
  --fs-body: 17px;
  --fs-sm: 15px;
  --fs-xs: 12px;
  --tr-label: .18em;

  /* space */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 140px;
  --rail: clamp(16px, 5vw, 80px);
  --maxw: 1360px;
  --header-h: 72px;

  /* motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-expo: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { color: var(--signal); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.skip:focus-visible { position: fixed; left: 16px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--ink); color: var(--canvas); border-radius: 6px; width: auto; height: auto; clip: auto; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { position: relative; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--rail); }
.label { font: 500 var(--fs-xs)/1.2 var(--sans); text-transform: uppercase; letter-spacing: var(--tr-label); color: var(--muted); }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; }
.lime { color: var(--signal); }
.wordmark { font-family: var(--serif); font-weight: 400; letter-spacing: .01em; line-height: .86; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font: 500 var(--fs-xs)/1.2 var(--sans); text-transform: uppercase; letter-spacing: var(--tr-label);
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn-sig { background: var(--signal); color: var(--on-signal); }
.btn-sig:hover { background: var(--signal-hover); color: var(--on-signal); }
.btn-ghost { border-color: var(--hair-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-lg { min-height: 56px; padding: 18px 32px; font-size: 14px; }

/* header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: 0 var(--rail); border-bottom: 1px solid var(--hair);
  background: rgba(6, 8, 6, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); 
}
.top-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.top-brand img { width: 36px; height: 36px; }
.top-brand .wordmark { font-size: 34px; }
.top-nav { display: flex; align-items: center; gap: var(--s5); }
.top-nav .nav-link { text-decoration: none; color: var(--muted); font: 500 var(--fs-xs)/1 var(--sans); text-transform: uppercase; letter-spacing: var(--tr-label); min-height: 44px; display: inline-flex; align-items: center; }
.top-nav .nav-link:hover, .top-nav .nav-link[aria-current="true"] { color: var(--ink); }
/* "Institucional": a disclosure that opens a row of shortcuts under the header */
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; gap: 6px; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary svg { width: 10px; height: 10px; transition: transform .2s ease; }
.nav-menu[open] > summary { color: var(--ink); }
.nav-menu[open] > summary svg { transform: rotate(180deg); }
.nav-pop {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; width: max-content; padding: 12px;
  background: rgba(14, 18, 14, .97); border: 1px solid var(--hair-2); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.nav-pop a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; white-space: nowrap;
  border: 1px solid var(--hair-2); border-radius: 999px; text-decoration: none; color: var(--ink); font: 500 13px/1 var(--sans);
}
.nav-pop a:hover { border-color: var(--ink); }
.nav-pop .out { color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: var(--s3); }
.lang { display: inline-flex; border: 1px solid var(--hair-2); border-radius: 999px; padding: 2px; }
.lang button {
  min-width: 40px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: 500 var(--fs-xs)/1 var(--sans); letter-spacing: .12em; color: var(--muted);
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--canvas); }

@media (max-width: 1440px) { .top-nav { gap: var(--s4); } .top-nav .nav-link { letter-spacing: .1em; } }
@media (max-width: 1279px) { .top-nav { display: none; } }
@media (max-width: 560px) {
  :root { --header-h: 60px; }
  .top { gap: 8px; }
  .top-actions { gap: 8px; }
  .top-actions .btn-sig { white-space: nowrap; padding: 10px 14px; font-size: 11px; letter-spacing: .12em; min-height: 40px; }
  .lang button { min-width: 34px; min-height: 32px; padding: 0 8px; font-size: 11px; }
  .top-brand .wordmark { font-size: 28px; }
  .top-brand img { width: 30px; height: 30px; }
  .top-actions .btn-ghost { display: none; }
  .top-actions .btn { padding: 10px 14px; }
}

/* FAQ */
.faq { padding: var(--s9) 0; border-top: 1px solid var(--hair); position: relative; }
.faq h2, .interest h2, .compliance h2 { font: 400 var(--fs-lg)/1.06 var(--serif); letter-spacing: -.015em; margin-bottom: var(--s6); }
.faq-list { max-width: 880px; border-top: 1px solid var(--hair); }
.faq-item { border-bottom: 1px solid var(--hair); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: 64px; padding: var(--s4) 0; cursor: pointer; list-style: none;
  font: 400 clamp(20px, 2.4vw, 28px)/1.25 var(--serif);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; font: 300 28px/1 var(--sans); color: var(--muted); }
.faq-item[open] summary::after { content: "\2212"; color: var(--signal); }
.faq-item p { max-width: 62ch; padding: 0 0 var(--s5); font-size: 17px; line-height: 1.6; color: var(--ink-2); }

/* interest form (behaviour in assets/landing.js) */
.interest { padding: var(--s9) 0; border-top: 1px solid var(--hair); position: relative; }
.interest-intro { max-width: 44rem; margin-bottom: var(--s6); }
.interest-intro p { color: var(--ink-2); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); max-width: 880px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label { font: 500 13px/1.4 var(--sans); letter-spacing: .06em; color: var(--ink-2); }
.inp {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--hair-2); border-radius: 2px;
  background: var(--surface); color: var(--ink); font: 16px/1.4 var(--sans);
}
.inp:focus { outline: none; border-color: var(--signal); }
textarea.inp { min-height: 120px; resize: vertical; }
.interest-wide { grid-column: 1 / -1; }
.interest-consent { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.interest-consent input { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; flex: none; margin-top: 2px; border: 1px solid var(--hair-2); border-radius: 4px; background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.interest-consent input:checked { background: var(--signal); border-color: var(--signal); }
.interest-consent input:checked::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--on-signal); border-bottom: 2px solid var(--on-signal); transform: translateY(-1px) rotate(-45deg); }
.interest-consent input:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.btns { display: flex; flex-wrap: wrap; gap: var(--s3); }
.interest .btn { min-height: 50px; font-size: 13px; }
.interest button:disabled { opacity: .6; cursor: wait; }
.interest-status { min-height: 1.6em; margin-top: 12px; font-size: 15px; }
.interest-status[data-state="error"] { color: #ffad98; }
.interest-status[data-state="success"] { color: var(--signal); }
.interest-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) {
  .form { grid-template-columns: minmax(0, 1fr); }
  .btns { flex-direction: column; align-items: stretch; }
}

/* compliance */
.compliance { padding: var(--s9) 0; border-top: 1px solid var(--hair); position: relative; }
.compliance-card {
  position: relative; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s7);
  padding: var(--s7); border: 1px solid var(--hair-2); border-radius: 36px; background: var(--surface);
  color: var(--ink); text-decoration: none; max-width: 980px; transition: border-color .2s;
}
.compliance-card:hover { border-color: var(--ink-2); color: var(--ink); }
.compliance-logo { width: 140px; height: auto; margin-top: 8px; color: var(--ink); }
.compliance h3 { font: 500 clamp(22px, 2.6vw, 30px)/1.25 var(--sans); padding-right: 24px; }
.compliance-copy p { margin-top: var(--s4); max-width: 48ch; font-size: clamp(16px, 1.8vw, 20px); line-height: 1.6; color: var(--ink-2); }
.compliance-status { display: inline-flex; align-items: center; gap: 10px; margin-top: var(--s5); padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--canvas); font-size: 15px; font-weight: 500; }
.compliance-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .7; }
.compliance-arrow { position: absolute; top: var(--s7); right: var(--s7); width: 18px; height: 18px; color: var(--muted); }
@media (max-width: 680px) {
  .compliance-card { grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding: var(--s6) var(--s5); border-radius: 24px; }
  .compliance-logo { width: 112px; }
  .compliance-arrow { top: var(--s6); right: var(--s5); }
}

/* footer */
.foot { border-top: 1px solid var(--hair); padding: var(--s7) 0; position: relative; z-index: 2; background: var(--canvas); }
.foot .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s5); flex-wrap: wrap; }
.foot nav { display: flex; gap: var(--s5); flex-wrap: wrap; }
.foot nav a { text-decoration: none; color: var(--muted); font-size: 13px; min-height: 44px; display: inline-flex; align-items: center; }
.foot nav a:hover { color: var(--ink); }

/* instant state changes: no transitions for one forced style flush (see engine.js / phone.js) */
.no-anim, .no-anim * { transition: none !important; }

/* scenes: tall section + sticky stage (see engine.js) */
.scene { position: relative; height: calc((var(--screens, 1) + 1) * 100svh); scroll-margin-top: 0; }
.scene > .stage {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  padding-top: var(--header-h);
}
.js .scene.is-far > .stage { visibility: hidden; }   /* more than a screen away: frees its layers (engine.js) */
.js [data-far].is-far { visibility: hidden; }        /* same for blocks outside the scenes (main.js) */
.js [data-far].is-far * { animation-play-state: paused !important; }
.rm .scene, html:not(.js) .scene { height: auto; }
.rm .scene > .stage, html:not(.js) .scene > .stage { position: relative; height: auto; overflow: visible; padding-bottom: var(--s9); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
