/* KORTEKX holding site. Palette B Harbour (DESIGN_v1), logo from brand pack v1.
   Layout: one 1120 px column; a 4/8 split for each section on wide screens, stacked on phones. */
@font-face {
  font-family: "Roboto Flex";
  src: url("/assets/roboto-flex.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0A0E12;
  --surface: #121A21;
  --ink: #EEF2F4;
  --muted: #93A1AC;
  --line: #22303A;
  --accent: #3FC1B0;
  --font: "Roboto Flex", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --max: 1120px;
  --s-body: 1.0625rem;   /* 17 px */
  --s-small: 0.875rem;   /* 14 px */
  --s-h2: 1.25rem;       /* 20 px */
  --s-h1: clamp(1.875rem, 1.2rem + 2.6vw, 3rem); /* 30 to 48 px */
  --s-close: clamp(1.625rem, 1.1rem + 1.9vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--s-body);
  line-height: 1.6;
  font-weight: 400;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: var(--muted); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 40px);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.skip {
  position: absolute; left: var(--gutter-l); top: 12px; z-index: 5;
  padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: 999px;
  text-decoration: none; transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Hero: the wordmark with its vertical fade, then the statement. */
.hero { padding-block: clamp(40px, 9vh, 120px) clamp(56px, 8vh, 96px); }
.hero { padding-top: max(clamp(40px, 9vh, 120px), min(6vw, 76px)); }
.art { width: 100%; height: auto; color: var(--ink); overflow: visible; }
@media (max-width: 1279px) { .hero .art { padding-inline: max(0px, calc(5.96vw - 20px)); } }
.hero h1 {
  margin-top: clamp(28px, 4vw, 48px);
  font-size: var(--s-h1);
  line-height: 1.1;
  font-weight: 460;
  letter-spacing: -0.015em;
  max-width: 20ch;
}
@media (min-width: 880px) {
  .hero h1 { max-width: none; }
  .hero h1 span { display: block; }
}
.lede {
  margin-top: 20px;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
}

/* Sections: heading left, content right on wide screens. */
.band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-block: clamp(48px, 7vw, 88px);
}
/* Section rules span the content column only, not the side gutters. */
.band, .close {
  background: linear-gradient(var(--line), var(--line)) no-repeat var(--gutter-l) 0 / calc(100% - var(--gutter-l) - var(--gutter-r)) 1px;
}
.band h2 { font-size: var(--s-h2); font-weight: 500; letter-spacing: -0.005em; line-height: 1.3; }
.band > div { min-width: 0; }
@media (min-width: 880px) {
  .band { grid-template-columns: 4fr 8fr; gap: 32px; }
}

/* What it brings together: label and line per row. */
.rows { margin: 0; }
.rows > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
}
.rows > div:first-child { padding-top: 0; }
.rows dt { font-weight: 500; }
.rows dd { margin: 0; color: var(--muted); }
@media (min-width: 640px) {
  .rows > div { grid-template-columns: 13rem 1fr; gap: 24px; }
}

/* How it works: a real three-step sequence. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 2rem 1fr; gap: 12px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.copy { max-width: 60ch; display: grid; gap: 14px; }
.copy p { color: var(--muted); }
.copy a { color: var(--ink); }
.nb { white-space: nowrap; }

/* Close: one line and the one action on the page. */
.close { padding-block: clamp(56px, 9vw, 112px); }
.close-line { font-size: var(--s-close); line-height: 1.15; font-weight: 460; letter-spacing: -0.012em; }
.close .close-line + p { margin-top: 20px; color: var(--muted); }
.mail { color: var(--accent); text-decoration-color: currentColor; font-weight: 500; overflow-wrap: anywhere; }
.mail:hover { text-decoration-thickness: 2px; }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot-in {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
  padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px));
  font-size: var(--s-small); color: var(--muted);
}
.foot-mark { display: block; color: var(--ink); text-decoration: none; }
.foot-mark svg { height: 22px; width: auto; }
.foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot nav a { color: var(--ink); }
.foot-note { width: 100%; margin: 0; }

/* Legal pages */
.top { padding-block: 28px; }
.home { display: inline-block; color: var(--ink); text-decoration: none; padding-block: 6px; }
.home svg { height: 18px; width: auto; }
.doc { padding-block: clamp(32px, 6vw, 72px) clamp(64px, 9vw, 120px); }
.doc h1 { font-size: clamp(1.875rem, 1.4rem + 1.6vw, 2.5rem); line-height: 1.15; font-weight: 460; letter-spacing: -0.012em; }
.doc .meta { margin-top: 12px; color: var(--muted); font-size: var(--s-small); }
.prose { margin-top: clamp(28px, 4vw, 44px); max-width: 68ch; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 2.2em; font-size: var(--s-h2); font-weight: 500; line-height: 1.3; }
.prose h3 { margin-top: 1.6em; font-size: 1.0625rem; font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose blockquote { margin-inline: 0; padding-left: 1em; border-left: 2px solid var(--accent); }
.prose blockquote p { margin: 0; }
.prose li + li { margin-top: 0.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 500; }
.table-scroll { overflow-x: auto; }
.facts { margin: 0; display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: var(--s-small); }
.facts dd { margin: 0; }
@media (min-width: 640px) { .facts > div { grid-template-columns: 11rem 1fr; gap: 24px; } }

.gap { color: var(--muted); }
.pending {
  margin-top: 32px; padding: 20px 22px; max-width: 68ch;
  background: var(--surface); border: 1px dashed var(--muted); border-radius: 12px; color: var(--ink);
}
.pending p + p { margin-top: 8px; color: var(--muted); }

.notfound { padding-block: clamp(64px, 14vh, 160px); }
.notfound p { margin-top: 16px; color: var(--muted); }

/* Opening: hidden until the player takes over; a fail-safe shows the still after 2 s. */
.op .art { visibility: hidden; animation: kx-show 0s 2s forwards; }
.op.run .art { visibility: visible; animation: none; }
@keyframes kx-show { to { visibility: visible; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .op .art { visibility: visible; }
}

/* Print: keep the dark page and its light text; hide the skip link. */
@media print {
  html, body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .skip { display: none; }
}
