/* Kolam Labs — kolamlabs.ai
   A screening room, not a brochure: dark, quiet, one idea per screen.
   No scripts, no trackers, no third-party requests. Fonts are self-hosted (OFL). */

@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --black: #07080A;
  --night: #0D0F13;
  --panel: #121419;
  --panel-2: #181B21;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --ink: #F3F1EC;
  --body: #B4B3AE;
  --muted: #7C7C82;
  --blue: #7D96FF;
  --blue-deep: #2251FF;
  --amber: #F2A65A;
  --red: #FF6B5E;
  --green: #4ADE80;
  --serif: "Instrument Serif", "New York", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --w: 1200px;
  --gut: 32px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--black); color: var(--ink);
  font: 400 18px/1.6 var(--sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
/* Film grain over everything, very faint */
body::after {
  content: ""; position: fixed; inset: -50%; pointer-events: none; z-index: 100; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, svg { display: block; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--blue-deep); color: #fff; }

.wrap { max-width: calc(var(--w) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- Type ---------- */
.eyebrow { font: 500 13px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.eyebrow.blue { color: var(--blue); }
.display { font: 400 clamp(56px, 9.2vw, 148px)/.92 var(--serif); letter-spacing: -.025em; }
.statement { font: 400 clamp(40px, 5.6vw, 84px)/1.02 var(--serif); letter-spacing: -.02em; }
.title { font: 400 clamp(34px, 4vw, 56px)/1.05 var(--serif); letter-spacing: -.015em; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--body); max-width: 34em; }
.small { font-size: 14px; color: var(--muted); line-height: 1.6; }
em, .italic { font-style: italic; }
.dim { color: var(--muted); }
.serif { font-family: var(--serif); font-weight: 400; }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--ink); color: var(--black); text-decoration: none; font: 600 16px/1 var(--sans);
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); background: rgba(255,255,255,.03); }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.arrow-link span { transition: transform .2s ease; }
.arrow-link:hover span { transform: translateX(4px); }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }

/* ---------- Navigation ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
.nav::before { content: ""; position: absolute; inset: 0; background: rgba(7,8,10,.62); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
.nav-row { position: relative; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font: 400 24px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 36px; font-size: 15px; }
.nav-links a { color: var(--body); text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links .btn { height: 38px; padding: 0 18px; font-size: 14px; color: var(--black); }
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font: 500 15px/1 var(--sans); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary i { position: relative; width: 14px; height: 8px; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transition: .2s; }
.menu[open] summary i { height: 0; border-bottom: none; transform: rotate(45deg); }
.menu[open] summary i::after { content: ""; position: absolute; left: 0; right: 0; top: -1.5px; border-top: 1.5px solid var(--ink); transform: rotate(-90deg); }
.menu-panel { position: fixed; left: 0; right: 0; top: 68px; bottom: 0; background: rgba(7,8,10,.97); backdrop-filter: blur(20px); padding: 32px var(--gut); display: flex; flex-direction: column; }
.menu-panel a { font: 400 44px/1.25 var(--serif); color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line); }
.menu-panel a[aria-current="page"] { color: var(--blue); }
.menu-panel .menu-mail { margin-top: auto; font: 500 17px/1 var(--sans); color: var(--blue); border: none; padding-bottom: 24px; }

/* ---------- Sections ---------- */
.sec { padding: 160px 0; position: relative; }
.sec.tight { padding: 112px 0; }
.rule { border-top: 1px solid var(--line); }
.head { display: grid; gap: 24px; max-width: 900px; }
.head .eyebrow { margin-bottom: 4px; }

/* Hero: a projector beam from above */
.hero { min-height: 100svh; display: flex; align-items: center; padding: 140px 0 96px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -30%; width: 140vmax; height: 140vmax; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(125,150,255,.16), rgba(125,150,255,.05) 45%, transparent 70%);
}
.hero-inner { position: relative; display: grid; justify-items: center; text-align: center; gap: 36px; width: 100%; }
.hero-mark { width: clamp(120px, 14vw, 180px); height: auto; color: var(--ink); filter: drop-shadow(0 0 24px rgba(125,150,255,.35)); }
.hero .display { max-width: 11ch; }
.hero .lede { margin: 0 auto; text-align: center; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: 1px; height: 56px; background: linear-gradient(var(--line-2), transparent); }

.draw { stroke-dasharray: 460; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .draw { animation: draw 3.2s cubic-bezier(.65,0,.35,1) .2s both; }
  .fade-in { animation: fadein 1.2s ease 1.2s both; }
  @keyframes draw { from { stroke-dashoffset: 460; } to { stroke-dashoffset: 0; } }
  @keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* Reveal on scroll where the browser supports it (no scripts) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  }
}

/* Thesis: three lines, one idea */
.thesis p { font: 400 clamp(40px, 5.8vw, 88px)/1.04 var(--serif); letter-spacing: -.02em; }
.thesis p + p { margin-top: 18px; }
.thesis .dim { color: #55565C; }

/* Numbers */
.numbers { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 72px; }
.numbers > div { padding: 40px 32px 0 0; }
.numbers > div + div { padding-left: 32px; border-left: 1px solid var(--line); }
.num { font: 400 clamp(48px, 5.4vw, 80px)/1 var(--serif); letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.num .dim { color: var(--muted); }
.numbers p:not(.num) { margin-top: 16px; color: var(--body); font-size: 16px; max-width: 22em; }
sup a { color: var(--blue); text-decoration: none; font-size: .7em; margin-left: 2px; }
.sources { margin: 56px 0 0; padding: 24px 0 0 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--muted); columns: 2; column-gap: 48px; }
.sources li { break-inside: avoid; margin-bottom: 10px; scroll-margin-top: 96px; }
.sources li:target { color: var(--ink); }
.sources a { color: var(--muted); }

/* Product showcase */
.showcase { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: center; }
.showcase.flip { grid-template-columns: 7fr 5fr; }
.showcase.flip .copy { order: 2; }
.copy { display: grid; gap: 24px; align-content: start; }
.product-name { display: flex; align-items: center; gap: 12px; font: 500 15px/1 var(--sans); color: var(--ink); }
.product-name svg { width: 28px; height: 28px; }
.copy .actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 8px; }
.points { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.points li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--body); font-size: 17px; }
.points li::before { content: ""; width: 7px; height: 7px; margin: 10px 0 0 4px; border-radius: 50%; background: var(--blue); }

/* The "screen": a window on the product */
.screen { position: relative; border-radius: 22px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: 0 0 0 1px var(--line), 0 60px 120px -40px rgba(0,0,0,.8), 0 0 120px -40px rgba(125,150,255,.25); overflow: hidden; }
.screen-bar { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.screen-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2A2D35; }
.screen-bar span { margin-left: auto; font-variant-numeric: tabular-nums; }
.screen-body { padding: 32px; display: grid; gap: 22px; }
.verdict-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.verdict-status { display: flex; align-items: center; gap: 12px; font: 600 40px/1 var(--sans); letter-spacing: -.02em; color: var(--red); }
.verdict-status::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 16px var(--red); }
.verdict-head p { color: var(--body); font-size: 15px; }
.strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.strip i { aspect-ratio: 16 / 9; border-radius: 4px; background: linear-gradient(135deg, #2B3040, #1A1D25); box-shadow: inset 0 0 0 1px var(--line); }
.strip i.bad { background: linear-gradient(135deg, #4A2A2A, #2A1C1E); box-shadow: inset 0 0 0 1px rgba(255,107,94,.45); }
.curve { width: 100%; height: auto; }
.curve-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -10px; }
.finding { display: grid; gap: 6px; padding: 18px 20px; border-radius: 14px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.finding .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.finding .tag { color: var(--red); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.finding p { font-size: 16px; font-weight: 500; color: var(--ink); }
.finding .fix { font-size: 14px; font-weight: 400; color: var(--muted); }
.caption { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }

/* SceneRight stage */
.stage { width: 100%; height: auto; }

/* Vision band */
.vision { text-align: center; }
.vision .statement { max-width: 18ch; margin: 0 auto; }
.vision .actions { margin-top: 48px; display: flex; justify-content: center; }

/* Contact */
.contact { text-align: center; padding: 200px 0; position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; left: 50%; bottom: -60%; width: 120vmax; height: 120vmax; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(242,166,90,.10), transparent 70%); pointer-events: none; }
.contact .wrap { position: relative; }
.contact .display { font-size: clamp(56px, 8vw, 128px); }
.contact .mail { display: inline-block; margin-top: 40px; font: 400 clamp(28px, 3.2vw, 44px)/1 var(--serif); color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; transition: border-color .2s; }
.contact .mail:hover { border-color: var(--ink); }
.contact .small { margin-top: 28px; }

/* Grids used on product pages */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 22px; overflow: hidden; margin-top: 72px; box-shadow: 0 0 0 1px var(--line); }
.steps > div { background: var(--night); padding: 44px 36px 48px; display: grid; gap: 16px; align-content: start; }
.steps .n { font: 400 64px/1 var(--serif); color: var(--blue); }
.steps h3 { font: 500 22px/1.3 var(--sans); letter-spacing: -.01em; }
.steps p { color: var(--body); font-size: 16px; }
.steps.four { grid-template-columns: repeat(4, 1fr); }

.timeline { list-style: none; margin: 72px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: linear-gradient(90deg, var(--amber), var(--blue) 30%, var(--line-2)); }
.timeline li { position: relative; padding: 36px 28px 0 0; }
.timeline li::before { content: ""; position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 14px var(--blue); }
.timeline li:first-child::before { background: var(--amber); box-shadow: 0 0 14px var(--amber); }
.timeline .eyebrow { display: block; margin-bottom: 14px; }
.timeline p { font-size: 19px; line-height: 1.45; color: var(--ink); }

.models { margin-top: 120px; text-align: center; }
.models ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 44px; }
.models li { font: 400 clamp(32px, 3.6vw, 52px)/1.2 var(--serif); color: var(--ink); }
.models li.dim { font-style: italic; color: var(--muted); }
.models .small { margin-top: 24px; }

.chips { list-style: none; padding: 0; margin: 48px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 12px 20px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; color: var(--ink); }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px; margin-top: 72px; }
.pillars h3 { font: 500 19px/1.3 var(--sans); margin-bottom: 10px; }
.pillars p { color: var(--body); font-size: 16px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.vm { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-top: 64px; }
.vm p.serif { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.15; letter-spacing: -.01em; margin-top: 18px; }
.beliefs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; margin-top: 72px; }
.beliefs .n { font: 400 15px/1 var(--sans); color: var(--blue); letter-spacing: .1em; }
.beliefs h3 { font: 400 32px/1.1 var(--serif); margin: 18px 0 12px; }
.beliefs p { color: var(--body); font-size: 16px; }
.big-mark { width: 100%; max-width: 440px; height: auto; margin: 0 auto; color: var(--ink); filter: drop-shadow(0 0 30px rgba(125,150,255,.25)); }

/* Page header for product pages */
.page-hero { padding: 200px 0 120px; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; left: 50%; top: -40%; width: 120vmax; height: 120vmax; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(125,150,255,.12), transparent 70%); pointer-events: none; }
.page-hero .wrap { position: relative; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: 14px; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer .note { margin-top: 20px; font-size: 13px; color: #5A5B61; }

/* 404 */
.notfound { min-height: 100svh; display: grid; place-items: center; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .showcase, .showcase.flip, .split { grid-template-columns: 1fr; gap: 56px; }
  .showcase.flip .copy { order: 0; }
  .steps.four, .pillars { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --gut: 22px; }
  .nav-links { display: none; }
  .menu { display: block; }
  .sec { padding: 72px 0; }
  .sec.tight { padding: 56px 0; }
  .steps > div { grid-template-columns: 44px 1fr; column-gap: 12px; row-gap: 8px; padding: 28px 24px; }
  .steps .n { font-size: 40px; grid-row: span 2; }
  .steps h3 { font-size: 19px; }
  .showcase, .showcase.flip, .split { gap: 40px; }
  .numbers > div, .numbers > div + div { padding: 22px 0; }
  .num { font-size: 48px; }
  .points li { font-size: 16px; }
  .head { gap: 18px; }
  .beliefs h3 { font-size: 28px; margin: 12px 0 8px; }
  .hero { padding: 120px 0 88px; }
  .scroll-cue { display: none; }
  .numbers { grid-template-columns: 1fr; margin-top: 48px; }
  .numbers > div, .numbers > div + div { padding: 28px 0; border-left: none; border-bottom: 1px solid var(--line); }
  .sources { columns: 1; margin-top: 32px; }
  .steps { grid-template-columns: 1fr; margin-top: 48px; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 40px; margin-top: 48px; }
  .timeline::before { display: none; }
  .timeline li { border-top: 1px solid var(--line); padding-top: 28px; }
  .timeline li::before { top: -6px; }
  .vm, .beliefs { grid-template-columns: 1fr; gap: 40px; }
  .models { margin-top: 64px; }
  .models ul { gap: 4px 24px; }
  .models li { font-size: 30px; }
  .page-hero { padding: 120px 0 56px; }
  .contact { padding: 96px 0; }
  .screen-body { padding: 22px; }
  .verdict-status { font-size: 32px; }
}
@media (max-width: 520px) {
  .steps.four, .pillars { grid-template-columns: 1fr; gap: 32px; }
  .timeline { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .strip { grid-template-columns: repeat(6, 1fr); }
  .strip i:nth-child(n+7) { display: none; }
}

/* Utilities (the CSP forbids inline styles) */
.display-md { font-size: clamp(52px, 7.2vw, 112px); }
.centered { margin-left: auto; margin-right: auto; }
.mb-12 { margin-bottom: 12px; }
.mt-24 { margin-top: 24px; } .mt-28 { margin-top: 28px; } .mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; } .mt-56 { margin-top: 56px; } .mt-72 { margin-top: 72px; }

/* Balanced line breaks for every headline: no orphaned last words */
.display, .statement, .title, .thesis p, .vm p.serif, .beliefs h3 { text-wrap: balance; }
.lede, .numbers p { text-wrap: pretty; }
