/*
 * Skillissuelab design system — "Finder × Polar".
 * Spec: docs/design-system.md. Monochrome surfaces and two-tone type from
 * polar.sh; the red core, bracket mark, mono labels and grain from Finder.
 */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/jbmono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/jbmono-700.woff2') format('woff2'); }

:root {
  /* neutral scale (polar) */
  --gray-50: #d9d9d9;
  --gray-200: #adadad;
  --gray-300: #9e9e9e;
  --gray-400: #858585;
  --gray-500: #757575;
  --gray-600: #292929;
  --gray-700: #212121;
  --gray-800: #181818;
  --gray-900: #111111;
  --gray-950: #090909;

  /* roles */
  --bg: var(--gray-950);
  --panel: var(--gray-900);
  --panel-hover: var(--gray-800);
  --line: var(--gray-700);
  --line-strong: var(--gray-600);
  --fg: #ffffff;
  --dim: var(--gray-300);
  --faint: var(--gray-500);

  /* the one color (finder) */
  --accent: #ec3013;
  --accent-soft: #f27864;
  --shell: #d0ccc6;

  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --radius-panel: 4px;
  --radius-control: 10px;
  --radius-pill: 999px;

  --wrap: 1280px;
  --gutter: clamp(20px, 5.5vw, 80px);
  --section-y: clamp(72px, 10vw, 136px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #fff; color: #000; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* type — two-tone display: first line white, <span> line gray */
.display {
  font-size: clamp(26px, 3.1vw, 40px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.display > span { display: block; color: var(--faint); }
h1.display { font-size: clamp(30px, 3.4vw, 44px); }
h2.display { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -0.02em; }
.label { font-size: clamp(20px, 2.2vw, 28px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.lead { margin-top: 28px; max-width: 46ch; font-size: 18px; line-height: 1.45; color: var(--faint); }
h3 { font-size: 17px; font-weight: 500; letter-spacing: -0.015em; }

/* icons — 24px grid, 1.5 stroke, square geometry, red core */
.icon { display: block; flex: none; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon .accent-fill { fill: var(--accent); stroke: none; }
.icon .accent-stroke { stroke: var(--accent); }

/* grain (finder) */
.bg-grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  transform: translateZ(0);
  contain: layout paint style;
}

/* announcement bar */
.announce {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px var(--gutter);
  background: var(--panel);
  font-size: 14px; font-weight: 500; text-align: center;
  transition: background 0.2s;
}
.announce:hover { background: var(--panel-hover); }
.announce span { transition: transform 0.2s var(--ease); }
.announce:hover span { transform: translateX(3px); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(9, 9, 9, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.site-header .wrap { display: flex; align-items: center; gap: 36px; height: 88px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.site-header nav { display: flex; gap: 24px; font-size: 16px; }
.site-header nav a { color: var(--faint); transition: color 0.15s; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--fg); }
.site-header .btn { margin-left: auto; }
@media (max-width: 760px) {
  .site-header .wrap { height: 68px; gap: 16px; }
  .site-header nav { display: none; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 40px; padding: 0 20px;
  border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--fg);
  font: 500 14px/1 var(--font-sans); letter-spacing: -0.01em; white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:hover { background: var(--panel-hover); }
.btn:active { transform: scale(0.98); }
.btn.solid { background: var(--fg); color: #000; }
.btn.solid:hover { background: var(--gray-50); }
.btn.ghost { box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn .chev { font-size: 16px; line-height: 1; transition: transform 0.2s var(--ease); }
.btn:hover .chev { transform: translateX(2px); }
.textlink { display: inline-flex; gap: 8px; margin-top: 32px; font-size: 14px; font-weight: 500; }
.textlink i, .more i { font-style: normal; display: inline-block; transition: transform 0.2s var(--ease); }
.textlink:hover i, a:hover > .more i { transform: translateX(3px); }

/* sections — hairline between, no full-height blocks */
section { position: relative; padding: var(--section-y) 0; }
/* hairline that draws in from the left once the section is seen (static without JS) */
section::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--line); transform-origin: left;
}
.js section::before { transform: scaleX(0); transition: transform 1.4s var(--ease); }
.js section.seen::before { transform: none; }
section.hero::before { content: none; }
section.hero { padding-top: clamp(40px, 6vw, 72px); }
.hero h1 { margin-bottom: clamp(56px, 8vw, 104px); }

/* split header: label left, statement + lead right */
.split { display: grid; gap: 20px; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 8px; } }

/* panels — flat, sharp, gap instead of borders */
.panels { display: grid; gap: 8px; margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 620px) { .panels.two, .panels.three { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .panels.three { grid-template-columns: repeat(3, 1fr); } }
.panel {
  position: relative;
  display: flex; flex-direction: column;
  padding: 40px;
  background: var(--panel);
  border-radius: var(--radius-panel);
  transition: background 0.25s;
}
a.panel:hover { background: var(--panel-hover); }
.panel .art { display: grid; place-items: center; height: 300px; margin: -8px 0 24px; color: var(--fg); }
.panel .art .icon { width: 132px; height: 132px; stroke-width: 0.55; transition: transform 0.6s var(--ease); }
a.panel:hover .art .icon { transform: scale(1.06); }
.panel p { flex: none; }
.panel p { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--faint); max-width: 38ch; }
.panel .more { margin-top: auto; padding-top: 20px; font-size: 14px; font-weight: 500; }
.panel.compact { padding: 32px; min-height: 220px; }
.panel.compact .icon { margin-bottom: 40px; }
@media (max-width: 620px) { .panel { padding: 28px; } .panel .art { height: 200px; } }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.chips span {
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--panel);
  font-family: var(--font-mono); font-size: 12px; color: var(--dim);
  transition: color 0.15s, background 0.15s;
}
.chips span:hover { color: var(--fg); background: var(--gray-700); }

/* text columns */
.cols { display: grid; gap: 40px; margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 760px) { .cols { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
.cols > div { padding-top: 24px; border-top: 1px solid var(--line-strong); }
.cols p { margin-top: 8px; font-size: 15px; color: var(--faint); max-width: 34ch; }

/* link rows */
.rows { margin-top: clamp(40px, 6vw, 72px); }
.row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: baseline; gap: 24px;
  padding: 22px 0; border-top: 1px solid var(--line);
  transition: padding 0.25s var(--ease), border-color 0.25s;
}
.rows .row:last-child { border-bottom: 1px solid var(--line); }
.row .tag { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.row .arrow { color: var(--faint); transition: transform 0.25s var(--ease), color 0.25s; }
a.row:hover { padding-left: 12px; border-top-color: var(--line-strong); }
a.row:hover .arrow { color: var(--accent); transform: translateX(4px); }
@media (max-width: 620px) { .row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; } .row .tag { grid-column: 1 / -1; } }

/* faq — hairline rows that open in place */
.faq { margin-top: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 17px; font-weight: 500; letter-spacing: -0.015em;
  transition: padding 0.25s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 11px; height: 11px;
  background:
    linear-gradient(var(--fg), var(--fg)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--fg), var(--fg)) center / 1.5px 100% no-repeat;
  transition: transform 0.3s var(--ease), background-size 0.3s var(--ease);
}
.faq summary:hover { padding-left: 12px; }
.faq details[open] summary::after {
  transform: rotate(90deg);
  background:
    linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 0 100% no-repeat;
}
.faq .a { padding: 0 0 26px; max-width: 68ch; font-size: 16px; color: var(--dim); }
.faq details[open] .a { animation: rise 0.45s var(--ease) both; }
.faq .a p + p { margin-top: 12px; }
.faq .a a, .prose a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gray-500); }
.faq .a a:hover, .prose a:hover { text-decoration-color: var(--fg); }

/* prose — legal and long-form pages */
.prose { max-width: 720px; padding: clamp(40px, 6vw, 72px) 0 var(--section-y); }
.prose .meta { margin-top: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.prose .summary { margin-top: 32px; padding: 20px 24px; background: var(--panel); border-left: 2px solid var(--accent); border-radius: 0 var(--radius-panel) var(--radius-panel) 0; color: var(--gray-50); }
.prose h2 { margin-top: 56px; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; scroll-margin-top: 104px; }
.prose h2 + p, .prose h2 + ul { margin-top: 14px; }
.prose p, .prose li { color: var(--dim); line-height: 1.65; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 14px; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--fg); font-weight: 500; }

/* cta + footer */
.cta { text-align: center; }
.cta-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 36px; }
.site-footer { position: relative; border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--faint); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 40px; flex-wrap: wrap; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { transition: color 0.15s; }
.site-footer a:hover { color: var(--fg); }

/* panel spotlight: a soft gray light that follows the pointer */
.spot { position: relative; isolation: isolate; overflow: hidden; }
.spot::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.075), transparent 65%);
  opacity: 0; transition: opacity 0.35s;
}
.spot:hover::after { opacity: 1; }

/* icon micro-animations, played while the parent is hovered */
.icon :is(.a-pulse, .a-enter, .a-grow, .a-pop, .a-flow) { transform-box: fill-box; transform-origin: center; }
:is(a, .panel, .row):hover .a-pulse { animation: a-pulse 2s ease-in-out infinite; }
:is(a, .panel, .row):hover .a-enter { animation: a-enter 2.2s ease-in-out infinite; }
:is(a, .panel, .row):hover .a-grow { animation: a-grow 2s ease-in-out infinite; transform-origin: left; }
:is(a, .panel, .row):hover .a-pop { animation: a-pop 2s ease-in-out infinite; }
:is(a, .panel, .row):hover .a-flow { animation: a-flow 1.4s linear infinite; }
@keyframes a-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.55); opacity: .5; } }
@keyframes a-enter { 0% { transform: translateX(-4px); opacity: 0; } 30%, 100% { transform: none; opacity: 1; } }
@keyframes a-grow { 0% { transform: scaleX(.15); } 55%, 100% { transform: scaleX(1); } }
@keyframes a-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes a-flow { to { stroke-dashoffset: -10; } }

/* marquee */
.marquee { overflow: hidden; margin-top: 32px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .chips { flex-wrap: nowrap; width: max-content; margin-top: 0; padding-right: 8px; animation: marquee 38s linear infinite; }
.marquee:hover .chips { animation-play-state: paused; }
.marquee .chips span { white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* headline words rise out of their own line (JS wraps words in .w) */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.14em; margin-bottom: -0.14em; font-style: normal; }
.w > i { display: inline-block; font-style: normal; transform: translateY(110%); transition: transform 0.9s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.in .w > i { transform: none; }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.js .rise { opacity: 0; }
.js .rise.in { animation: rise 0.8s var(--ease) both; }
.d1 { animation-delay: 0.08s; } .d2 { animation-delay: 0.16s; } .d3 { animation-delay: 0.24s; } .d4 { animation-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise { opacity: 1; }
  .rise.in, .marquee .chips { animation: none; }
  .marquee .chips { flex-wrap: wrap; width: auto; }
  .w > i { transform: none; }
  * { transition-duration: 0.01ms !important; }
}
