/* Khairo — Chrome Horizon tokens (v3).
   Company frame: warm black, wine accent, ivory for contrast sections.
   Product colours live only inside each product's own panel ("product window"). */
:root {
  /* company */
  --paper: #050407;
  --paper-2: #0E0A11;
  --paper-3: #17111B;
  --deep: #020103;
  --rule: #231B26;
  --rule-2: #302633;
  --ink: #F4F2F7;
  --ink-2: #C9C6D3;
  --muted: #A9A5B7;
  --muted-2: #858197;
  --wine: #C2234F;
  --wine-hover: #A51C42;
  --wine-text: #FF8FA9;
  --ivory: #F6F1EB;
  --ivory-ink: #1E1718;
  --ivory-muted: #5E5455;
  --ivory-rule: #D9CEC4;
  --ivory-wine: #9A2E47;
  --focus: #FF9DB4;

  /* status */
  --st-live: #8FD3A8;
  --st-soon: #E8B76A;
  --st-pilot: #B3B3F8;
  --st-dev: #D9B49E;

  /* product windows */
  --kn-bg: #F4EEE8; --kn-ink: #24171A; --kn-muted: #5C4E50; --kn-rule: #DDD1C6; --kn-acc: #6E1F3B; --kn-sw: #C9A27E;
  --kc-bg: #1E140C; --kc-ink: #FBF3E8; --kc-muted: #D9C8B6; --kc-rule: #3A2A1C; --kc-acc: #F2C47E; --kc-sw: #F2A33A;
  --kv-bg: #0C1046; --kv-ink: #F2F2FF; --kv-muted: #C9CBF2; --kv-rule: #262C7A; --kv-acc: #B3B3F8; --kv-sw: #6E6EF2;
  /* Lydiahem: Royal Plum x Porcelain Ivory x Champagne Gold */
  --ly-bg: #281D2D; --ly-ink: #F8F5F0; --ly-muted: #D9C9DE; --ly-rule: #493052; --ly-acc: #C5A477; --ly-sw: #C5A477;

  /* type */
  --serif: "Unbounded", "Arial Black", system-ui, sans-serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --t-display: clamp(2.875rem, 5.2vw + 1rem, 6.5rem);
  --t-section: clamp(2.25rem, 2.2vw + 1rem, 3.5rem);
  --t-h3: clamp(2rem, 1.4vw + 1.4rem, 2.75rem);
  --t-lead: clamp(1.0625rem, .35vw + 1rem, 1.25rem);
  --t-body: 1rem;
  --t-small: .875rem;
  --t-mono: .75rem;

  /* space + layout */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --container: 1440px;
  --gutter: 96px;
  --section: 128px;
  --hd-h: 88px;
  --radius-panel: 20px;
  --radius-btn: 8px;

  /* motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur: 160ms;
}
@media (max-width: 75rem) { :root { --gutter: 48px; --section: 112px; } }
@media (max-width: 60rem) { :root { --gutter: 24px; --section: 88px; --hd-h: 72px; } }
@media (max-width: 40rem) { :root { --gutter: 16px; --section: 64px; --hd-h: 64px; --radius-panel: 18px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-padding-top: calc(var(--hd-h) + 24px); scrollbar-color: var(--rule-2) var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--t-body); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: color-mix(in oklab, var(--wine) 45%, transparent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; overflow-wrap: break-word; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.serif em, .serif-em { font-style: normal; color: inherit; }
.mono { font-family: var(--mono); font-size: var(--t-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); max-width: 40em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: var(--s-4); top: -100px; z-index: 1000; background: var(--ink); color: var(--paper); padding: 12px 18px; text-decoration: none; font-weight: 500; }
.skip:focus { top: var(--s-4); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border: 1px solid transparent; border-radius: var(--radius-btn); background: var(--ink); color: var(--paper); font-weight: 500; font-size: 1rem; text-decoration: none; white-space: nowrap; transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); }
.btn:hover { background: #FFFFFF; }
.btn--wine { background: var(--wine); color: #FFFFFF; }
.btn--wine:hover { background: var(--wine-hover); }
.btn--line { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn--line:hover { background: var(--paper-2); border-color: var(--muted-2); }
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 1.0625rem; }
.btn:disabled { opacity: .6; cursor: progress; }
.link { color: var(--ink); text-underline-offset: .35em; font-size: 1rem; padding-block: 12px; }
.link:hover { color: var(--ink-2); text-decoration-color: var(--wine); }

/* status chips (colour + words, never colour alone) */
.st--live { color: var(--st-live); }
.st--soon { color: var(--st-soon); }
.st--pilot { color: var(--st-pilot); }
.st--dev { color: var(--st-dev); }
.st--early { color: #D9BC8E; }

/* product swatches: plain colour squares, not logos */
.sw { display: inline-block; width: 10px; height: 10px; flex-shrink: 0; }
.sw--kn { background: var(--kn-sw); }
.sw--kc { background: var(--kc-sw); }
.sw--kv { background: var(--kv-sw); }
.sw--ly { background: var(--ly-sw); }

.staging-flag { position: fixed; z-index: 2000; left: 50%; bottom: 12px; transform: translateX(-50%); background: #FFD166; color: #1A1200; font: 600 12px/1 var(--mono); padding: 8px 12px; border-radius: 999px; pointer-events: none; }

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

/* v3 · Chrome Horizon: wide display type, emphasis by colour only */
h1 em, h2 em, h3 em, .serif em, .serif-em { font-style: normal; }
h1, h2, h3 { font-kerning: normal; }

/* phone polish: comfortable tap targets and no text below 11px */
.mcard__a, .knlink { display: inline-flex; align-items: center; min-height: 44px; }
.hd__brand { min-height: 44px; display: inline-flex; align-items: center; }
.ft__note, .tag, .ix-label, .mail__tag, .concept small, .cs-facts dt, .demo__flag, .pp__placeholder small { font-size: 11px; }

/* ===== motion language (shell.js adds the classes; nothing hides without JS) ===== */
.rvh .rvw { display: inline-block; overflow: clip; overflow-clip-margin: .12em; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.rvh .rvw > span { display: inline-block; transform: translateY(105%); transition: transform .8s var(--ease-out) var(--d, 0ms); }
.rvh.is-in .rvw > span { transform: none; }
.rvc { outline: 1px dashed rgba(121, 180, 196, .5); outline-offset: -1px; filter: saturate(0) brightness(.55); transition: filter .7s var(--ease-out) .12s, outline-color .5s var(--ease-out) .12s; }
.rvc > * { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.rvc > :nth-child(2) { transition-delay: .08s; } .rvc > :nth-child(3) { transition-delay: .16s; } .rvc > :nth-child(n+4) { transition-delay: .24s; }
.rvc.is-in { outline-color: transparent; filter: none; }
.rvc.is-in > * { opacity: 1; transform: none; }
.rvi { clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--ease-out); }
.rvi.is-in { clip-path: inset(0 0 0 0); }

/* ===== header: one sticky bar, always solid ===== */
.hd { position: sticky; top: 0; z-index: 300; background: var(--paper); border-bottom: 1px solid var(--rule); }
.hd__in { height: var(--hd-h); display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); }
.hd__brand { display: block; flex-shrink: 0; }
.hd__brand img { height: 30px; width: auto; }
.hd__nav { display: flex; align-items: center; gap: var(--s-7); }
.hd__links { display: flex; align-items: center; gap: var(--s-2); }
.hd__link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; background: none; border: 0; color: var(--ink-2); font-size: .9375rem; text-decoration: none; transition: color var(--dur); }
.hd__link:hover, .hd__link[aria-expanded="true"] { color: var(--ink); }
.hd__link[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--wine); text-underline-offset: 10px; text-decoration-thickness: 2px; }
.hd__trigger svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform var(--dur) var(--ease-out); }
.hd__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.hd__cta { min-height: 44px; padding: 0 22px; font-size: .9375rem; }
.hd__menu { display: none; width: 44px; height: 44px; background: none; border: 0; padding: 0; position: relative; }
.hd__menu i { position: absolute; left: 11px; width: 22px; height: 1.5px; background: var(--ink); transition: transform var(--dur) var(--ease-out), top var(--dur) var(--ease-out); }
.hd__menu i:first-child { top: 17px; }
.hd__menu i:last-child { top: 26px; }
.hd__menu[aria-expanded="true"] i:first-child { top: 21px; transform: rotate(45deg); }
.hd__menu[aria-expanded="true"] i:last-child { top: 21px; transform: rotate(-45deg); }

/* products menu (desktop) */
.hd__in { position: relative; }
.hd__prod { position: static; }
.pmenu { position: absolute; top: calc(100% + 1px); right: var(--gutter); width: min(720px, calc(100vw - 2 * var(--gutter))); display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s-6); padding: var(--s-6); background: var(--paper-2); border: 1px solid var(--rule-2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.pmenu__label { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-bottom: var(--s-3); margin-bottom: var(--s-2); border-bottom: 1px solid var(--rule); }
.pmenu__item { display: grid; grid-template-columns: 10px 1fr auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 10px; margin-inline: -10px; text-decoration: none; transition: background var(--dur); }
.pmenu__item:hover { background: var(--paper-3); }
.pmenu__name { font-size: 1rem; font-weight: 500; }
.pmenu__st { font-family: var(--mono); font-size: 12px; }
.pmenu__desc { grid-column: 2 / -1; font-size: .875rem; color: var(--muted); }
.pmenu__all { display: inline-block; margin-top: var(--s-3); padding: 10px 0; font-size: .9375rem; color: var(--ink); text-underline-offset: .3em; }

/* mobile menu */
.mmenu { position: fixed; inset: var(--hd-h) 0 0 0; z-index: 290; background: var(--paper); overflow-y: auto; overscroll-behavior: contain; }
.mmenu__in { display: flex; flex-direction: column; padding-top: var(--s-5); padding-bottom: var(--s-8); }
.mmenu__label { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: var(--s-6); padding-bottom: var(--s-2); }
.mmenu__label:first-child { margin-top: 0; }
.mmenu__item { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border-top: 1px solid var(--rule); font-size: 1.125rem; text-decoration: none; }
.mmenu__item--sub { font-size: 1rem; color: var(--ink-2); }
.mmenu__cta { margin-top: var(--s-7); min-height: 52px; }
html.menu-open { overflow: hidden; }

@media (max-width: 60rem) {
  .hd__nav { display: none; }
  .hd__menu { display: block; }
  .hd__brand img { height: 24px; }
}
@media (min-width: 60.0625rem) { .mmenu { display: none !important; } }

/* ===== contact band: one quiet panel, one action ===== */
.cband { padding-block: clamp(64px, 8vw, 112px); background: var(--deep); border-top: 1px solid var(--rule); }
.cband__panel { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s-8); row-gap: var(--s-6); align-items: center;
  padding: clamp(32px, 4vw, 56px); border-radius: var(--radius-panel); background: var(--paper-2); border: 1px solid rgba(244, 242, 247, .08); }
.cband__copy { display: flex; flex-direction: column; gap: var(--s-4); }
.cband__h { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 2.4vw + 1rem, 3.25rem); line-height: 1.06; letter-spacing: -0.03em; max-width: 16ch; }
.cband__p { max-width: 34em; color: var(--ink-2); font-size: var(--t-lead); line-height: 1.55; }
.cband__act { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); }
.cband__topics { display: flex; flex-wrap: wrap; column-gap: var(--s-4); row-gap: 0; font-size: .9375rem; color: var(--muted); }
.cband__topics span { width: 100%; padding-bottom: 2px; }
.cband__topics a { display: inline-block; padding-block: 8px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: .3em; transition: color var(--dur) var(--ease-out), text-decoration-color var(--dur) var(--ease-out); }
.cband__topics a:hover { color: var(--ink); text-decoration-color: var(--wine); }
@media (max-width: 60rem) {
  .cband__panel { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .cband__act .btn { width: 100%; }
}

/* ===== footer ===== */
.ft { background: var(--deep); padding-top: var(--s-8); }
.ft__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-6); row-gap: var(--s-7); }
.ft__brand { grid-column: span 5; display: flex; flex-direction: column; gap: var(--s-4); }
.ft__brand img { height: 26px; width: auto; }
.ft__line { font-family: var(--serif); font-size: 1.625rem; line-height: 1.2; color: var(--ink-2); max-width: 22ch; }
.ft__col { grid-column: span 2; }
.ft__col:first-of-type { grid-column: 7 / span 2; }
.ft__label { font-family: var(--mono); font-size: 11px; color: var(--muted-2); margin-bottom: var(--s-3); }
.ft__col li { font-size: .875rem; color: var(--ink-2); }
.ft__col a { display: inline-block; padding: 6px 0; text-decoration: none; }
.ft__col a:hover { color: var(--ink); text-decoration: underline; }
.ft__col li:not(:has(a)) { padding: 6px 0; }
.ft__note { font-family: var(--mono); font-size: 12px; color: var(--st-dev); margin-left: 4px; }
.ft__base { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-8); padding-top: var(--s-5); padding-bottom: var(--s-6); border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.ft__up { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; }
.ft__up svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ft__up:hover { color: var(--ink); }
@media (max-width: 60rem) {
  .ft__brand { grid-column: 1 / -1; }
  .ft__col, .ft__col:first-of-type { grid-column: span 4; }
}
@media (max-width: 40rem) {
  .ft__col, .ft__col:first-of-type { grid-column: span 6; }
  .ft__col:last-child { grid-column: 1 / -1; }
}

/* ===== simple page head (contact, privacy, 404) ===== */
.phead { padding-block: var(--s-9) var(--s-8); border-bottom: 1px solid var(--rule); }
.phead__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-6); align-items: end; row-gap: var(--s-5); }
.phead__text { grid-column: span 8; display: flex; flex-direction: column; gap: var(--s-5); }
.phead__h { font-family: var(--serif); font-size: var(--t-section); line-height: 1.08; letter-spacing: -0.02em; }
.phead__h em { color: inherit; }
.phead__aside { grid-column: 9 / span 4; color: var(--ink-2); font-size: var(--t-lead); line-height: 1.55; }
@media (max-width: 60rem) { .phead__text, .phead__aside { grid-column: 1 / -1; } }

/* ===== long-form text (privacy) ===== */
.prose { max-width: 720px; padding-block: var(--s-8) var(--section); }
.prose h2 { font-family: var(--serif); font-size: 2rem; line-height: 1.1; margin: var(--s-7) 0 var(--s-3); }
.prose p, .prose li { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.65; }
.prose p + p { margin-top: var(--s-4); }
.prose ul { margin: var(--s-3) 0 var(--s-4); padding-left: 1.2em; list-style: disc; }
.prose li + li { margin-top: 4px; }
.prose a { color: var(--ink); }
.prose a:hover { text-decoration-color: var(--wine); }
.prose b { color: var(--ink); font-weight: 500; }
.prose .updated { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ===== breadcrumb bar (product, work and case-study pages) ===== */
.pbar { border-bottom: 1px solid var(--rule); }
.pbar__in { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding-block: 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; padding: 10px 0; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); padding: 10px 0; }
.crumbs span[aria-hidden] { padding: 10px 0; }


/* ===== tablets and phones: 12-column layouts collapse to one column.
   Twelve tracks plus their gaps cannot fit inside padded cards at phone widths. ===== */
@media (max-width: 60rem) {
  /* body :is() outranks the same class selectors in the page stylesheets, which load after this file */
  body :is(.shead, .hero__grid, .ai__in, .client__in, .build__in,
  .psec__head, .film, .kcx, .kvl, .duo, .faq, .srow,
  .phead__in, .cpage__in, .whead, .wcase, .cs-hero__in, .cs-cols, .svc) { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  .ft__in { column-gap: var(--s-4); }
}
