/* Kynovo site styles.
   Every value here mirrors a token in DESIGN.md. Change the contract first, then this file.
   Shared by index.html and component.html; pages never carry their own copy of a component. */

/* ================================================================ tokens */
:root {
  color-scheme: light;
  --surface: #F8F7FC;
  --surface-raised: #FDFCFF;
  --surface-tint: #F4F1FF;
  --on-surface: #141230;
  --on-surface-muted: #5C5C69;
  --outline: #DCD8EA;
  --outline-field: #857F9E;
  --primary: #6943D6;
  --primary-hover: #5933C4;
  --on-primary: #FDFCFF;
  --accent-ink: #6943D6;
  --error: #B3261E;
  --success: #1B7A47;
  --on-media: #FAF9FE;
  --scrim-rgb: 20 18 48;

  --font-display: "Anek Latin", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-sm-plus: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;
  --gutter: 24px;
  --section-y: 64px;
  --section-y-airy: 48px;
  --header-h: 72px;
  --container: 1440px;
  --radius: 4px;

  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-out-quint: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: linear(0, .006, .025 2.8%, .101 6.1%, .539 18.9%, .721 25.3%, .849 31.5%, .937 38.1%, .968 41.8%, .991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001);
  --dur-state: 200ms;
  --dur-hover: 400ms;
  --dur-wipe: 1100ms;
  --dur-zoom: 1600ms;
  --word-step: 62ms;
  --word-run: 900ms;
  --cascade-step: 110ms;
}

@media (min-width: 768px) {
  :root { --gutter: 48px; --section-y: 96px; --section-y-airy: 64px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 64px; --section-y: 128px; --section-y-airy: 96px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --surface: #141230;
    --surface-raised: #1C1940;
    --surface-tint: #231F4D;
    --on-surface: #F4F2FB;
    --on-surface-muted: #ABA7C4;
    --outline: #2E2A58;
    --outline-field: #7A74A0;
    --primary: #7B57E8;
    --primary-hover: #6943D6;
    --on-primary: #FDFCFF;
    --accent-ink: #B9A5FF;
    --error: #FF8A80;
    --success: #6FD6A0;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-md));
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }
.scroll-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--primary); color: var(--on-primary); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: var(--radius); }
[tabindex="-1"]:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon { width: 20px; height: 20px; fill: currentColor; flex: none; }
.icon--lg { width: 24px; height: 24px; }

.skip-link {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 50;
  padding: var(--space-sm-plus) var(--space-md);
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* ================================================================ type roles */
.display-xl, .display-lg, .headline, .title, .index-name, .statement {
  font-family: var(--font-display);
  text-wrap: balance;
}
.display-xl {
  font-size: clamp(44px, 5.6vw, 84px);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.display-lg, .statement {
  font-size: clamp(36px, 4.6vw, 68px);
  font-weight: 650;
  font-stretch: 110%;
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.headline {
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 650;
  font-stretch: 108%;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.title {
  font-size: clamp(22px, 1.9vw, 28px);
  font-weight: 600;
  font-stretch: 104%;
  line-height: 1.2;
}
.index-name {
  font-size: clamp(32px, 4.4vw, 64px);
  font-weight: 650;
  font-stretch: 112%;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.lede { font-size: 20px; line-height: 1.6; color: var(--on-surface-muted); max-width: 48ch; }
@media (max-width: 767.98px) {
  .lede { font-size: 18px; }
}
.body-sm { font-size: 16px; line-height: 1.6; }
.caption { font-size: 14px; line-height: 1.5; color: var(--on-surface-muted); }
.muted { color: var(--on-surface-muted); }
.placeholder { color: var(--on-surface-muted); }

/* ================================================================ layout */
.shell {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--flush-top { padding-top: 0; }
/* Optical rhythm (DESIGN.md, Layout): a type-only section already carries its own air,
   so it steps down one notch on the scale instead of taking the full section token. */
.section--airy { padding-block: var(--section-y-airy); }
.grid-12 { display: grid; gap: var(--space-lg); }
@media (min-width: 1024px) {
  .grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-lg); }
}
.section-head { display: grid; gap: var(--space-md); margin-bottom: var(--space-2xl); }
.section-head .headline { max-width: 22ch; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm-plus); }

/* Routed panels. Before the script runs, every panel shows (no JS means one long page). */
.js [data-page] { display: none; }
.js[data-route="home"] #home,
.js[data-route="about"] #about,
.js[data-route="contact"] #contact,
.js[data-route="privacy"] #privacy { display: block; }

/* ================================================================ button */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 52px;
  padding: var(--space-md) var(--space-lg);
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  font-stretch: 104%;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur-state) ease, color var(--dur-state) ease, transform var(--dur-state) ease;
}
/* Hover-aware fill (UI index C2, T2): the fill grows from the point the pointer entered
   and shrinks toward the point it left. The script sets --fill-x / --fill-y; without it
   the fill grows from the centre. The label colour never changes, so contrast holds on
   every frame. One effect per button: there is no lift. */
.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: var(--fill-x, 50%);
  top: var(--fill-y, 50%);
  width: 240%;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  scale: 0;
  background: var(--btn-fill);
  transition: scale 560ms var(--ease-out-quint);
  pointer-events: none;
}
.btn--primary { --btn-fill: var(--primary-hover); background: var(--primary); color: var(--on-primary); }
.btn--secondary { --btn-fill: var(--surface-tint); background: transparent; color: var(--on-surface); border-color: var(--on-surface); }
@media (hover: hover) {
  .btn:hover::before { scale: 1; }
}
.btn.is-hover::before { scale: 1; }
@media (prefers-reduced-motion: reduce) {
  .btn::before { transition: none; }
}
.btn:active, .btn.is-active { transform: translateY(1px); }
.btn.is-focus { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.btn[aria-busy="true"] { cursor: progress; }

/* ================================================================ text link */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  font-stretch: 104%;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
  transition: text-decoration-thickness var(--dur-state) ease;
}
.text-link .icon { transition: transform var(--dur-hover) var(--ease-out-expo); }
.text-link:hover, .text-link.is-hover { text-decoration-thickness: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .text-link:hover .icon, .text-link.is-hover .icon { transform: translateX(4px); }
}
.text-link.is-focus { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

/* ================================================================ chip (link chips and choice chips share it) */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.chip, .choice__box {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: var(--space-sm-plus) var(--space-md);
  background: var(--surface-raised);
  color: var(--on-surface);
  border: 1.5px solid var(--outline-field);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur-state) ease, background-color var(--dur-state) ease;
}
.chip:hover, .chip.is-hover,
.choice:hover .choice__box, .choice__box.is-hover { border-color: var(--on-surface); }
.chip.is-focus, .choice__box.is-focus { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice__box .icon { display: none; color: var(--accent-ink); }
.choice input:checked + .choice__box,
.choice__box.is-checked { border-color: var(--primary); background: var(--surface-tint); }
.choice input:checked + .choice__box .icon,
.choice__box.is-checked .icon { display: block; }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.choice input:disabled + .choice__box,
.choice__box.is-disabled { border-style: dashed; color: var(--on-surface-muted); cursor: not-allowed; }

/* ================================================================ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-state) ease;
}
.site-header.is-scrolled { border-bottom-color: var(--outline); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  height: var(--header-h);
}
.wordmark { display: inline-flex; align-items: center; color: var(--on-surface); text-decoration: none; }
/* The wordmark is the file extracted from the concept note, used as a mask so it
   takes the theme's ink colour. Never retype it. */
.wordmark__mark {
  display: block;
  width: 128px;
  aspect-ratio: 154.67 / 25.42;
  background: currentColor;
  -webkit-mask: url("../brand/kynovo-wordmark.svg") center / contain no-repeat;
  mask: url("../brand/kynovo-wordmark.svg") center / contain no-repeat;
}
.site-nav { display: none; }
.site-nav__link {
  position: relative;
  padding-block: var(--space-sm);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  font-stretch: 104%;
  text-decoration: none;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  inset: auto 0 var(--space-xs) 0;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-hover) var(--ease-out-expo);
}
.site-nav__link:hover::after,
.site-nav__link.is-hover::after,
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: 0 var(--space-sm-plus);
  background: transparent;
  color: var(--on-surface);
  border: 1.5px solid var(--outline-field);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  font-stretch: 104%;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .site-nav { display: flex; align-items: center; gap: var(--space-xl); }
  .menu-toggle { display: none; }
}

.menu-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) var(--space-2xl);
  background: var(--surface);
  overflow-y: auto;
}
.menu-sheet[hidden] { display: none; }
.menu-sheet__top { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.menu-sheet__links { display: grid; gap: var(--space-md); margin-top: var(--space-xl); }
.menu-sheet__links a {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 650;
  font-stretch: 110%;
  line-height: 1.1;
  text-decoration: none;
}
.menu-sheet__links a[aria-current="page"] { color: var(--accent-ink); }
.menu-sheet__actions { display: grid; gap: var(--space-sm-plus); margin-top: var(--space-2xl); }
.menu-sheet__foot { margin-top: auto; padding-top: var(--space-2xl); }
/* Staggered menu (UI index N4, reduced to T2): links rise in reading order on open. */
@media (prefers-reduced-motion: no-preference) {
  .menu-sheet:not([hidden]) .menu-sheet__links a,
  .menu-sheet:not([hidden]) .menu-sheet__actions {
    animation: kyn-rise 700ms var(--ease-out-expo) both;
  }
  .menu-sheet:not([hidden]) .menu-sheet__links a:nth-child(2) { animation-delay: 60ms; }
  .menu-sheet:not([hidden]) .menu-sheet__links a:nth-child(3) { animation-delay: 120ms; }
  .menu-sheet:not([hidden]) .menu-sheet__links a:nth-child(4) { animation-delay: 180ms; }
  .menu-sheet:not([hidden]) .menu-sheet__actions { animation-delay: 260ms; }
}
@keyframes kyn-rise {
  from { opacity: 0; translate: 0 24px; }
}

/* ================================================================ hero (the one bold move) */
.hero { position: relative; }
.hero__stage { position: relative; }
.hero__scene { position: relative; display: grid; gap: var(--space-xl); padding-top: var(--space-xl); }
.hero__copy { position: relative; z-index: 2; display: grid; gap: var(--space-lg); justify-items: start; }
.hero__lede { max-width: 34ch; }
.hero__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface-tint);
  clip-path: inset(0 var(--gutter) round var(--radius));
}
.hero__img, .hero__film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
}
.hero__pause {
  position: absolute;
  right: calc(var(--gutter) + var(--space-sm-plus));
  bottom: var(--space-md);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: 0 var(--space-md);
  background: rgb(var(--scrim-rgb) / .72);
  color: var(--on-media);
  border: 1.5px solid var(--on-media);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
@media (max-width: 479px) {
  .hero__actions { display: grid; width: 100%; }
}
@media (min-width: 1024px) {
  .hero__scene {
    height: calc(100svh - var(--header-h));
    min-height: 560px;
    padding: var(--space-4xl) 0 0;
    align-content: start;
    overflow: clip;
  }
  .hero__copy { max-width: 46%; }
  .hero__media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    clip-path: inset(var(--space-lg) var(--gutter) var(--space-lg) 50% round var(--radius));
  }
  .hero__img, .hero__film { object-position: 62% 50%; }
  .hero__pause { right: calc(var(--gutter) + var(--space-md)); bottom: calc(var(--space-lg) + var(--space-md)); }
}

@supports (animation-timeline: scroll()) {
  @media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    .hero__stage { height: calc(100svh - var(--header-h) + 90svh); }
    .hero__scene { position: sticky; top: var(--header-h); }
    .hero__media {
      animation: hero-open linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 70svh;
    }
    .hero__img, .hero__film {
      animation: hero-settle linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 70svh;
    }
    .hero__copy {
      animation: hero-copy-out linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 32svh;
    }
  }
  @media (max-width: 1023.98px) and (prefers-reduced-motion: no-preference) {
    .hero__media {
      animation: hero-open-sm linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 50svh;
    }
    .hero__img, .hero__film {
      animation: hero-settle linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 50svh;
    }
  }
}
@keyframes hero-open {
  from { clip-path: inset(var(--space-lg) var(--gutter) var(--space-lg) 50% round var(--radius)); }
  to { clip-path: inset(0 0 0 0 round 0); }
}
@keyframes hero-open-sm {
  from { clip-path: inset(0 var(--gutter) round var(--radius)); }
  to { clip-path: inset(0 0 round 0); }
}
@keyframes hero-settle {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}
@keyframes hero-copy-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateX(-24px); visibility: hidden; }
}

/* ================================================================ statement block (The Kynovo thought) */
.statement { max-width: 22ch; }
.statement--muted { color: var(--on-surface-muted); }
.thought__inner { display: grid; gap: var(--space-lg); }
.thought__body { display: grid; gap: var(--space-lg); justify-items: start; margin-top: var(--space-xl); }
.thought__body .body-lead { max-width: 58ch; }
@media (min-width: 1024px) {
  .thought__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-lg); }
  .thought__inner > .statement { grid-column: 2 / span 10; }
  .thought__body { grid-column: 7 / span 6; margin-top: var(--space-2xl); }
}

/* ================================================================ universe index (What we do) */
.universe__body { display: grid; gap: var(--space-2xl); }
.universe__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-lg);
  row-gap: var(--space-xs);
  align-items: center;
  min-height: 64px;
  padding-block: var(--space-lg);
  border-top: 1px solid var(--outline);
  color: var(--on-surface);
  text-decoration: none;
}
.universe__heading { grid-column: 1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-sm-plus); }
.universe__brand { font-size: 16px; color: var(--on-surface-muted); }
.universe__name { transition: color var(--dur-state) ease; }
.universe__desc { grid-column: 1; font-size: 18px; }
.universe__for { grid-column: 1; font-size: 16px; color: var(--on-surface-muted); }
.universe__arrow {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 24px;
  height: 24px;
  transition: transform var(--dur-hover) var(--ease-out-expo);
}
.universe__media { display: none; }
@media (min-width: 1024px) {
  .universe__body { grid-template-columns: 7fr 5fr; align-items: start; column-gap: var(--space-3xl); }
  .universe__media {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + var(--space-xl));
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface-tint);
  }
  .universe__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 600ms var(--ease-out-expo);
  }
  .universe__media img.is-current { opacity: 1; }
  .universe__list.has-current .universe__item:not(.is-current) .universe__name { color: var(--on-surface-muted); }
}
@media (prefers-reduced-motion: no-preference) {
  .universe__item.is-current .universe__arrow,
  .universe__row:hover .universe__arrow { transform: translateX(4px); }
}

/* ================================================================ moment list (The whole experience) */
.experience__grid { display: grid; gap: var(--space-2xl); }
.experience__lead .headline { max-width: 18ch; }
.experience__list { display: grid; gap: var(--space-2xl); }
.moment { display: grid; gap: var(--space-md); }
.moment__media { aspect-ratio: 4 / 3; }
.moment__text { display: grid; gap: var(--space-sm); }
.moment__text p { color: var(--on-surface-muted); max-width: 36ch; }
@media (min-width: 768px) {
  .moment { grid-template-columns: 5fr 7fr; gap: var(--space-lg); align-items: center; }
}
@media (min-width: 1024px) {
  .experience__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-lg); align-items: start; }
  .experience__lead { grid-column: 1 / span 5; position: sticky; top: calc(var(--header-h) + var(--space-2xl)); }
  .experience__list { grid-column: 7 / span 6; gap: var(--space-3xl); }
}

/* ================================================================ media frame (shared by every standalone photograph) */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-tint);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--mark { background: none; border-radius: 0; overflow: visible; }

/* Photographs drift a few percent inside their frame as the frame crosses the viewport.
   Scroll-driven on the compositor, uses the individual translate and scale properties
   so it composes with the wipe entrance (which owns transform). Backgrounds only. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .frame img {
      scale: 1.1;
      animation: kyn-drift linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }
}
@keyframes kyn-drift {
  from { translate: 0 -4%; }
  to { translate: 0 4%; }
}

/* ================================================================ standard band */
.standard__panel {
  display: grid;
  gap: var(--space-2xl);
  padding: var(--space-2xl) var(--space-lg);
  background: var(--surface-tint);
  border-radius: var(--radius);
}
.standard__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl) var(--space-lg); }
.standard__item {
  display: grid;
  gap: var(--space-sm-plus);
  align-content: start;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  font-stretch: 104%;
  line-height: 1.25;
}
.standard__item .icon { color: var(--accent-ink); }
@media (min-width: 768px) {
  .standard__panel { padding: var(--space-3xl); }
}
@media (min-width: 1024px) {
  .standard__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xl) var(--space-xl); }
}

/* ================================================================ events (What's on) */
.events__grid { display: grid; gap: var(--space-2xl); }
.event { display: grid; gap: var(--space-lg); align-content: start; }
.event__media { aspect-ratio: 4 / 5; }
.event__body { display: grid; gap: var(--space-sm-plus); justify-items: start; }
.event__kind { font-size: 16px; color: var(--on-surface-muted); }
.event__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 650;
  font-stretch: 110%;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.event__desc { max-width: 40ch; color: var(--on-surface-muted); }
.event__facts { display: grid; gap: var(--space-sm); margin-block: var(--space-xs) var(--space-sm); font-size: 16px; }
.event__facts li { display: flex; align-items: center; gap: var(--space-sm); }
.event__facts .icon { color: var(--accent-ink); }
.events__note { margin-top: var(--space-2xl); max-width: 60ch; }
@media (min-width: 768px) {
  .events__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
  .events__grid .event:nth-child(2) { margin-top: var(--space-4xl); }
}

/* ================================================================ teaser (What's on fallback, shown once every listed show has passed) */
.next__grid { display: grid; gap: var(--space-xl); align-items: center; }
.next__media { aspect-ratio: 16 / 10; }
.next__copy { display: grid; gap: var(--space-lg); justify-items: start; }
@media (min-width: 1024px) {
  .next__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-lg); }
  .next__media { grid-column: 1 / span 7; }
  .next__copy { grid-column: 9 / span 4; }
}

/* ================================================================ founder panel (The people behind Kynovo) */
.people__inner { display: grid; gap: var(--space-xl); }
.people__body { display: grid; gap: var(--space-xl); justify-items: start; }
.people__quote p {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 44px);
  font-weight: 600;
  font-stretch: 106%;
  line-height: 1.18;
  max-width: 28ch;
  text-wrap: balance;
}
.people__byline { display: flex; align-items: center; gap: var(--space-md); }
.people__name { font-family: var(--font-display); font-weight: 600; font-stretch: 104%; font-size: 20px; line-height: 1.3; }
.people__credits { display: grid; gap: var(--space-sm); max-width: 56ch; color: var(--on-surface-muted); }
.founder-mark {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  flex: none;
  background: var(--surface-tint);
  color: var(--accent-ink);
  border-radius: var(--radius);
}
.founder-mark__k {
  display: block;
  width: 40%;
  aspect-ratio: 23.29 / 24.66;
  background: currentColor;
  -webkit-mask: url("../brand/kynovo-k.svg") center / contain no-repeat;
  mask: url("../brand/kynovo-k.svg") center / contain no-repeat;
}
@media (min-width: 1024px) {
  .people__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-lg); }
  .people__inner > .headline { grid-column: 1 / span 4; }
  .people__body { grid-column: 5 / span 8; }
}

/* ================================================================ doors (join and partner) */
.doors__grid { display: grid; gap: var(--space-lg); }
.door { display: grid; gap: var(--space-lg); align-content: start; padding: var(--space-2xl) var(--space-lg); border-radius: var(--radius); }
.door--fans { background: var(--surface-tint); }
.door--partners { background: var(--surface-raised); border: 1px solid var(--outline); }
.door .headline { max-width: 16ch; }
.door__line { max-width: 44ch; }
.door__contact { font-size: 16px; color: var(--on-surface-muted); }
@media (min-width: 768px) {
  .door { padding: var(--space-3xl) var(--space-2xl); }
}
@media (min-width: 1024px) {
  .doors__grid { grid-template-columns: 1fr 1fr; }
}

/* ================================================================ forms */
.form { display: grid; gap: var(--space-lg); }
.form__grid { display: grid; gap: var(--space-lg); }
.field { display: grid; gap: var(--space-sm); align-content: start; }
.field__label { font-size: 16px; font-weight: 600; line-height: 1.4; }
.field__optional { font-weight: 400; color: var(--on-surface-muted); }
.field__control {
  width: 100%;
  min-height: 48px;
  padding: var(--space-sm-plus) var(--space-md);
  background: var(--surface-raised);
  color: var(--on-surface);
  border: 1.5px solid var(--outline-field);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.4;
  transition: border-color var(--dur-state) ease;
}
.field__control:hover, .field__control.is-hover { border-color: var(--on-surface-muted); }
.field__control:focus-visible, .field__control.is-focus { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.field__control[aria-invalid="true"] { border-color: var(--error); }
.field__control:disabled { border-style: dashed; color: var(--on-surface-muted); cursor: not-allowed; }
textarea.field__control { min-height: 144px; resize: vertical; }
.field__select { position: relative; }
.field__select select { appearance: none; padding-right: var(--space-2xl); cursor: pointer; }
.field__select .icon { position: absolute; right: var(--space-md); top: 50%; transform: translateY(-50%); pointer-events: none; }
.field__prefixed { display: flex; }
.field__prefix {
  display: grid;
  place-items: center;
  padding-inline: var(--space-md);
  background: var(--surface-tint);
  border: 1.5px solid var(--outline-field);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  font-weight: 600;
}
.field__prefixed .field__control { border-radius: 0 var(--radius) var(--radius) 0; }
.field__help { font-size: 15px; line-height: 1.5; color: var(--on-surface-muted); }
.field__error { display: none; align-items: center; gap: var(--space-sm); font-size: 15px; line-height: 1.4; color: var(--error); }
.field.has-error .field__error,
.choice-set.has-error .field__error { display: flex; }
.field--check { gap: var(--space-xs); }
.field.has-error .check__box { border-color: var(--error); }

.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--space-sm-plus); align-items: start; min-height: 44px; font-size: 16px; line-height: 1.5; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; }
.check__box {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--surface-raised);
  border: 1.5px solid var(--outline-field);
  border-radius: var(--radius);
  transition: background-color var(--dur-state) ease, border-color var(--dur-state) ease;
}
.check__box .icon { width: 16px; height: 16px; color: var(--on-primary); opacity: 0; }
.check:hover .check__box, .check__box.is-hover { border-color: var(--on-surface); }
.check input:checked + .check__box, .check__box.is-checked { background: var(--primary); border-color: var(--primary); }
.check input:checked + .check__box .icon, .check__box.is-checked .icon { opacity: 1; }
.check input:focus-visible + .check__box, .check__box.is-focus { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.check input:disabled + .check__box, .check__box.is-disabled { border-style: dashed; cursor: not-allowed; }
.check input:disabled ~ .check__label { color: var(--on-surface-muted); }
.check.has-error .check__box { border-color: var(--error); }
.check-group { display: grid; gap: var(--space-xs); }

.choice-set { display: grid; gap: var(--space-md); margin: 0; padding: 0; border: 0; min-width: 0; }
.choice-set legend { padding: 0; margin-bottom: var(--space-md); }
.choice-set__options { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

.form__notice { font-size: 15px; line-height: 1.5; color: var(--on-surface-muted); max-width: 60ch; }
.form__alert { display: none; align-items: center; gap: var(--space-sm); padding: var(--space-sm-plus) var(--space-md); border: 1.5px solid var(--error); border-radius: var(--radius); color: var(--error); font-size: 16px; }
.form.has-alert .form__alert { display: flex; }
.form-status {
  display: grid;
  gap: var(--space-md);
  justify-items: start;
  padding: var(--space-xl);
  background: var(--surface-raised);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
}
.form-status[hidden] { display: none; }
.form-status .icon { color: var(--success); width: 32px; height: 32px; }

[data-show-for][hidden] { display: none; }

@media (min-width: 768px) {
  .form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--full { grid-column: 1 / -1; }
}

/* ================================================================ page hero (About, Contact, Privacy) */
.page-hero { padding-top: var(--space-3xl); }
.page-hero__copy { display: grid; gap: var(--space-lg); }
.page-hero__copy .display-xl { max-width: 16ch; }
.page-hero__media { margin-top: var(--space-2xl); aspect-ratio: 3 / 2; }
@media (min-width: 1024px) {
  .page-hero__media { aspect-ratio: 21 / 9; }
}

/* ================================================================ About compositions */
.name__pair { display: grid; gap: var(--space-2xl); margin-block: var(--space-2xl); }
.name__part { display: grid; gap: var(--space-md); align-content: start; }
.name__word {
  font-family: var(--font-display);
  font-size: clamp(72px, 12vw, 176px);
  font-weight: 700;
  font-stretch: 118%;
  line-height: 1;
  letter-spacing: -0.03em;
}
.name__part p:last-child { max-width: 34ch; color: var(--on-surface-muted); }
@media (min-width: 768px) {
  .name__pair { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
}

.quality-list__item { display: grid; gap: var(--space-sm); padding-block: var(--space-lg); border-top: 1px solid var(--outline); }
.quality-list__item p { max-width: 44ch; color: var(--on-surface-muted); }
@media (min-width: 1024px) {
  .quality-list__item { grid-template-columns: 5fr 7fr; column-gap: var(--space-lg); align-items: baseline; }
}

.method-steps { display: grid; gap: var(--space-xl); }
.method-steps__item { display: grid; gap: var(--space-sm-plus); align-content: start; padding-top: var(--space-lg); border-top: 2px solid var(--on-surface); max-width: 40ch; }
.method-steps__n { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--accent-ink); }
.method-steps__item p { color: var(--on-surface-muted); }
@media (min-width: 1024px) {
  .method-steps { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-lg); }
  .method-steps__item:nth-child(1) { grid-column: 1 / span 4; }
  .method-steps__item:nth-child(2) { grid-column: 5 / span 4; margin-top: var(--space-3xl); }
  .method-steps__item:nth-child(3) { grid-column: 9 / span 4; margin-top: var(--space-5xl); }
}

.promise__list { display: grid; gap: var(--space-2xl); }
.promise__item { display: grid; gap: var(--space-sm-plus); }
.promise__text {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 38px);
  font-weight: 600;
  font-stretch: 106%;
  line-height: 1.2;
  max-width: 32ch;
  text-wrap: balance;
}
@media (min-width: 1024px) {
  .promise__item { grid-template-columns: 3fr 9fr; column-gap: var(--space-lg); align-items: baseline; }
}

.pairs { display: grid; gap: var(--space-lg) var(--space-2xl); }
.pairs__item {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 650;
  font-stretch: 108%;
  line-height: 1.15;
  text-wrap: balance;
}
.pairs__item span { color: var(--on-surface-muted); }
@media (min-width: 768px) {
  .pairs { grid-template-columns: 1fr 1fr; }
}

.team__grid { display: grid; gap: var(--space-2xl); }
.profile { display: grid; gap: var(--space-sm-plus); align-content: start; }
.profile .founder-mark { width: 100%; height: auto; aspect-ratio: 4 / 5; }
.profile .founder-mark__k { width: 28%; }
.profile p { color: var(--on-surface-muted); max-width: 44ch; }
@media (min-width: 768px) {
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); }
}
@media (min-width: 1024px) {
  .team__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .team__grid .profile:nth-child(1) { grid-column: 1 / span 4; }
  .team__grid .profile:nth-child(2) { grid-column: 6 / span 4; }
}

.borderless__grid { display: grid; gap: var(--space-2xl); align-items: center; }
.borderless__copy { display: grid; gap: var(--space-lg); justify-items: start; }
.borderless__media { aspect-ratio: 3 / 2; }
@media (min-width: 1024px) {
  .borderless__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-lg); }
  .borderless__copy { grid-column: 1 / span 5; }
  .borderless__media { grid-column: 7 / span 6; }
}

/* ================================================================ Contact compositions */
.contact__grid { display: grid; gap: var(--space-3xl); }
.contact__main { display: grid; gap: var(--space-2xl); align-content: start; }
.contact__intro { display: grid; gap: var(--space-lg); }
.contact__aside { display: grid; gap: var(--space-2xl); align-content: start; }
.contact-lines { display: grid; gap: var(--space-lg); }
.contact-lines__row { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-sm-plus); }
.contact-lines__row .icon { margin-top: var(--space-xs); color: var(--accent-ink); }
.contact-lines dt { font-weight: 600; font-size: 16px; }
.contact-lines dd { color: var(--on-surface-muted); font-size: 16px; }
.contact__fans { display: grid; gap: var(--space-md); justify-items: start; padding-top: var(--space-2xl); border-top: 1px solid var(--outline); }
@media (min-width: 1024px) {
  .contact__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-lg); }
  .contact__main { grid-column: 1 / span 7; }
  .contact__aside { grid-column: 9 / span 4; position: sticky; top: calc(var(--header-h) + var(--space-xl)); }
}

.prose { display: grid; gap: var(--space-lg); max-width: 68ch; }

/* ================================================================ footer */
.site-footer { padding-block: var(--space-3xl) var(--space-xl); border-top: 1px solid var(--outline); }
.site-footer__grid { display: grid; gap: var(--space-2xl); }
.site-footer__brand { display: grid; gap: var(--space-md); align-content: start; }
.site-footer__brand .wordmark__mark { width: 160px; }
.site-footer__links { display: grid; }
.footer-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--outline);
  list-style: none;
  cursor: pointer;
}
.footer-group summary::-webkit-details-marker { display: none; }
.footer-group__title { font-family: var(--font-display); font-size: 16px; font-weight: 600; font-stretch: 104%; }
.footer-group .icon-open { display: none; }
.footer-group[open] .icon-open { display: block; }
.footer-group[open] .icon-closed { display: none; }
.footer-group ul { display: grid; gap: var(--space-sm-plus); padding-block: var(--space-md); }
.footer-group a { font-size: 16px; text-decoration: none; }
.footer-group a:hover { text-decoration: underline; }
.site-footer__contact { display: grid; gap: var(--space-sm); align-content: start; font-size: 16px; }
.site-footer__contact h2 { font-family: var(--font-display); font-size: 16px; font-weight: 600; font-stretch: 104%; margin-bottom: var(--space-sm); }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--outline);
  font-size: 14px;
  color: var(--on-surface-muted);
}
@media (min-width: 768px) {
  .site-footer__links { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
  .footer-group summary { min-height: 0; margin-bottom: var(--space-md); border-bottom: 0; pointer-events: none; }
  .footer-group summary .icon,
  .footer-group[open] summary .icon-open { display: none; }
  .footer-group ul { padding-block: 0; }
}
@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-lg); }
  .site-footer__brand { grid-column: 1 / span 4; }
  .site-footer__links { grid-column: 5 / span 5; }
  .site-footer__contact { grid-column: 10 / span 3; }
  .site-footer__legal { grid-column: 1 / -1; }
}

/* ================================================================ entrance motion
   Hidden starting states apply only once the script has run and set .reveal-ready,
   and only when motion is allowed, so a script failure or a reduced-motion setting
   always leaves the content visible. Transform, opacity and clip-path only. */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal="words"] .w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: .18em;
    margin-bottom: -.18em;
  }
  .reveal-ready [data-reveal="words"] .w__i {
    display: inline-block;
    transform: translateY(130%);
    transition: transform var(--word-run) var(--ease-out-expo);
    transition-delay: calc(var(--wi, 0) * var(--word-step));
  }
  .reveal-ready [data-reveal="words"].is-in .w__i { transform: none; }

  /* The observed element is the unclipped wrapper; the clip sits on the inner frame
     (a clipped element reports an intersection ratio of 0, entrance-motion Trap 1). */
  .reveal-ready [data-reveal="wipe"] > .frame {
    clip-path: inset(100% 0 0 0);
    transition: clip-path var(--dur-wipe) var(--ease-out-quint);
  }
  .reveal-ready [data-reveal="wipe"] > .frame img {
    transform: scale(1.12);
    transition: transform var(--dur-zoom) var(--ease-out-expo);
  }
  .reveal-ready [data-reveal="wipe"].is-in > .frame { clip-path: inset(0 0 0 0); }
  .reveal-ready [data-reveal="wipe"].is-in > .frame img { transform: none; }

  .reveal-ready [data-reveal="cascade"] > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out-expo), transform 900ms var(--ease-spring);
    transition-delay: calc(var(--ci, 0) * var(--cascade-step));
  }
  .reveal-ready [data-reveal="cascade"].is-in > * { opacity: 1; transform: none; }
}

/* ================================================================ effects layer (assets/js/kynovo-fx.js)
   Everything below is inert until the effects script adds its class. With the script
   missing, WebGL unavailable or reduced motion requested, the site renders as above. */

/* Smooth scroll (Lenis), desktop pointers only. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

/* Page transition curtain. Transform only; hidden and inert at rest. */
.route-curtain {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding-inline: var(--gutter);
  background: var(--primary);
  color: var(--on-primary);
  transform: translateY(100%);
  visibility: hidden;
  pointer-events: none;
}
.route-curtain.is-active { visibility: visible; pointer-events: auto; }
.route-curtain__label {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 104px);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: center;
}

/* WebGL hero: the canvas sits over the CSS window and takes over once its first frame
   is painted. The photograph and the CSS clip stay underneath as the fallback. */
.hero__gl {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms var(--ease-out-expo);
}
.hero--gl .hero__gl { opacity: 1; }
.hero--gl-ready .hero__media { visibility: hidden; }
@media (max-width: 1023.98px) {
  /* Below the desktop layout the CSS window is the hero; the canvas is not used. */
  .hero__gl { display: none; }
}

/* Kinetic name (About, Kyn and Novo): each letter sits in a box fixed at its resting
   advance, so moving the weight axis never reflows the word. Width stays at 118. */
.kin-letter {
  display: inline-block;
  font-variation-settings: "wght" var(--kw, 700);
}

/* Footer sign-off: the wordmark at full container width. */
.footer-mark { grid-column: 1 / -1; color: var(--on-surface); padding-top: var(--space-2xl); }
.footer-mark .wordmark__mark { width: 100%; }

/* What we do: the image in focus wipes up over the previous one. */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .universe--fx .universe__media img {
    opacity: 1;
    clip-path: inset(100% 0 0 0);
    transform: scale(1.08);
    transition: clip-path 800ms var(--ease-out-quint), transform 1400ms var(--ease-out-expo);
  }
  .universe--fx .universe__media img.is-current { z-index: 2; clip-path: inset(0 0 0 0); transform: none; }
  .universe--fx .universe__media img.was-current { z-index: 1; clip-path: inset(0 0 0 0); transform: none; }
}
