/* palette: bg=#0D1117 fg=#C9D1D9 accent=#3FB950 */
/* fonts: display="JetBrains Mono" body="IBM Plex Mono" mono="JetBrains Mono" */

:root {
  --bg: #0D1117;
  --bg-alt: #161B22;
  --bg-elev: #1C2430;
  --fg: #C9D1D9;
  --fg-soft: #E6EDF3;
  --muted: #7D8792;
  --accent: #3FB950;
  --accent-deep: #2EA043;
  --amber: #E3B341;
  --border: rgba(240, 246, 252, 0.10);
  --border-strong: rgba(240, 246, 252, 0.18);
  --grid-line: rgba(63, 185, 80, 0.06);
  --serif: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Mono', ui-monospace, monospace;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: -1px -1px;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
::selection { background: var(--accent); color: #05130A; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
}
.eyebrow::before { content: "$"; color: var(--muted); }

.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section--alt { background: var(--bg-alt); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; color: var(--fg-soft); }
h2 { font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -0.02em; line-height: 1.02; font-weight: 300; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.7; color: var(--fg); max-width: 62ch; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.header[data-scrolled="true"] {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px -12px rgba(0,0,0,0.6);
}
.header__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
@media (min-width: 768px) { .header__inner { padding: 16px 32px; } }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 16px; letter-spacing: -0.01em; color: var(--fg-soft); }
.brand__mark {
  width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--accent); color: var(--accent);
  font-size: 13px; border-radius: 3px; font-weight: 700;
}
.brand__mark::after { content: "_"; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.brand b { font-weight: 500; }

.nav { display: none; }
@media (min-width: 900px) {
  .nav { display: flex; align-items: center; gap: 30px; }
  .nav a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); text-transform: lowercase; transition: color .2s var(--ease); position: relative; }
  .nav a::before { content: "/"; color: var(--border-strong); margin-right: 4px; }
  .nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
}
.header__cta { display: none; }
@media (min-width: 900px) { .header__cta { display: inline-flex; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em;
  padding: 12px 22px; border-radius: 3px;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn--primary { background: var(--accent); color: #05130A; font-weight: 600; }
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--border-strong); color: var(--fg-soft); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn__arrow { transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.textlink { font-family: var(--mono); font-size: 13px; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; transition: gap .2s var(--ease); }
.textlink:hover { gap: 14px; }

/* ---------- mobile menu ---------- */
.menu-toggle { display: inline-flex; flex-direction: column; gap: 5px; width: 34px; height: 34px; align-items: center; justify-content: center; }
@media (min-width: 900px) { .menu-toggle { display: none; } }
.menu-toggle span { width: 20px; height: 1.5px; background: var(--fg-soft); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--bg);
  padding: 100px 28px 40px; display: flex; flex-direction: column; gap: 6px;
  transform: translateY(-100%); opacity: 0; pointer-events: none;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.mobile-menu[data-open="true"] { transform: translateY(0); opacity: 1; pointer-events: all; }
.mobile-menu a { font-family: var(--serif); font-size: 1.8rem; font-weight: 300; color: var(--fg-soft); padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.mobile-menu a span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.mobile-menu .btn { margin-top: 24px; justify-content: center; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.22; animation: heroZoom 9s var(--ease) forwards; }
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,17,23,0.55) 0%, rgba(13,17,23,0.86) 60%, var(--bg) 100%); }
.hero__inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 120px 20px 60px; width: 100%; }
@media (min-width: 768px) { .hero__inner { padding: 140px 32px 80px; } }
.hero h1 {
  font-size: clamp(3.5rem, 10vw, 9rem); line-height: 0.98; letter-spacing: -0.03em;
  font-weight: 300; max-width: 16ch; margin: 0 0 32px; color: var(--fg-soft);
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__sub { max-width: 54ch; font-size: clamp(1rem, 1.6vw, 1.22rem); color: var(--fg); line-height: 1.7; }
.hero__actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero__meta { margin-top: 64px; display: flex; flex-wrap: wrap; gap: 34px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hero__meta b { color: var(--accent); font-weight: 500; }
.hero__prompt { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.hero__prompt b { color: var(--fg); font-weight: 400; }
.hero__prompt::after { content: "▋"; color: var(--accent); animation: blink 1.1s step-end infinite; }

/* ---------- ticker ---------- */
.ticker { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); overflow: hidden; }
.ticker__track { display: flex; gap: 48px; white-space: nowrap; padding: 16px 0; animation: ticker 32s linear infinite; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ticker__track span { display: inline-flex; align-items: center; gap: 48px; }
.ticker__track span::after { content: "◈"; color: var(--accent); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- section head ---------- */
.section-head { max-width: 780px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head p { color: var(--fg); margin-top: 22px; font-size: 1.05rem; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--bg); padding: 36px 28px; }
.stat b { display: block; font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 300; color: var(--fg-soft); letter-spacing: -0.02em; line-height: 1; }
.stat b i { font-style: normal; color: var(--accent); }
.stat span { display: block; margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

/* ---------- services grid ---------- */
.grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (min-width: 640px) { .grid--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--bg); padding: 40px 32px; position: relative;
  transition: background .3s var(--ease);
}
.card:hover { background: var(--bg-elev); }
.card__no { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.08em; }
.card h3 { margin: 22px 0 14px; font-weight: 400; color: var(--fg-soft); }
.card p { font-size: 0.95rem; color: var(--muted); margin-bottom: 20px; }
.card__link { font-family: var(--mono); font-size: 12px; color: var(--fg-soft); display: inline-flex; gap: 8px; align-items: center; transition: gap .2s var(--ease), color .2s var(--ease); }
.card:hover .card__link { color: var(--accent); gap: 14px; }

/* ---------- projects (editorial) ---------- */
.projects { display: grid; gap: 28px; }
@media (min-width: 768px) { .projects { grid-template-columns: 1fr 1fr; gap: 40px; } }
.project { border: 1px solid var(--border); background: var(--bg); transition: border-color .3s var(--ease), transform .3s var(--ease); }
.project:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.project__img { aspect-ratio: 16/10; overflow: hidden; position: relative; border-bottom: 1px solid var(--border); }
.project__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.3) contrast(1.05); transition: transform .8s var(--ease), filter .5s var(--ease); }
.project:hover .project__img img { transform: scale(1.05); filter: grayscale(0) contrast(1.05); }
.project__tag { position: absolute; top: 14px; left: 14px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(13,17,23,0.8); border: 1px solid var(--border-strong); color: var(--accent); padding: 5px 10px; border-radius: 3px; backdrop-filter: blur(6px); }
.project__body { padding: 26px 28px 30px; }
.project__body h3 { font-weight: 400; font-size: 1.35rem; }
.project__body p { color: var(--muted); font-size: 0.95rem; margin: 12px 0 18px; }
.project__meta { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.05em; display: flex; gap: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.project__meta b { color: var(--fg-soft); font-weight: 400; }

/* ---------- manifesto ---------- */
.manifesto { background: var(--fg-soft); color: var(--bg); text-align: center; }
.manifesto .container { position: relative; }
.manifesto__quote { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.16; letter-spacing: -0.02em; max-width: 980px; margin: 0 auto; }
.manifesto__quote em { font-style: normal; color: var(--accent-deep); }
.manifesto__mark { font-family: var(--serif); font-size: clamp(6rem, 14vw, 11rem); line-height: 0.5; color: var(--accent-deep); display: block; margin-bottom: 10px; }
.manifesto__by { margin-top: 40px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: #2f3742; text-transform: uppercase; }

/* ---------- process ---------- */
.process { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (min-width: 768px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .process { grid-template-columns: repeat(4, 1fr); } }
.step { background: var(--bg); padding: 40px 30px; }
.step__no { font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--border-strong); width: 42px; height: 42px; display: grid; place-items: center; border-radius: 3px; color: var(--accent); }
.step h3 { margin: 26px 0 12px; font-weight: 400; font-size: 1.1rem; }
.step p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ---------- faq ---------- */
.faq { max-width: 880px; margin: 0 auto; border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 4px; font-family: var(--serif); font-weight: 400; font-size: clamp(1.05rem, 2.2vw, 1.4rem); color: var(--fg-soft); }
.faq__q .plus { font-family: var(--mono); color: var(--accent); font-size: 1.4rem; flex-shrink: 0; transition: transform .3s var(--ease); }
.faq__item[data-open="true"] .plus { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.faq__a p { padding: 0 4px 30px; color: var(--muted); font-size: 0.98rem; margin: 0; max-width: 68ch; }

/* ---------- CTA / contact ---------- */
.cta { text-align: center; }
.cta h2 { max-width: 16ch; margin: 0 auto 26px; }
.cta p { max-width: 56ch; margin: 0 auto 40px; color: var(--fg); }

.contact-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; gap: 72px; } }
.contact-info dl { margin: 0; display: grid; gap: 26px; }
.contact-info dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.contact-info dd { margin: 0; color: var(--fg-soft); font-size: 1rem; line-height: 1.6; }
.contact-info dd a:hover { color: var(--accent); }

.form { display: grid; gap: 20px; }
.form label { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.form input, .form textarea, .form select {
  width: 100%; background: var(--bg-alt); border: 1px solid var(--border); color: var(--fg-soft);
  padding: 14px 16px; font-family: var(--mono); font-size: 14px; border-radius: 3px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.form textarea { resize: vertical; min-height: 130px; }
.form .row { display: grid; gap: 20px; }
@media (min-width: 600px) { .form .row { grid-template-columns: 1fr 1fr; } }
.form .btn { justify-content: center; width: 100%; margin-top: 6px; }
.form__note { font-family: var(--mono); font-size: 11px; color: var(--muted); line-height: 1.6; }

/* ---------- team / principles text cards ---------- */
.principles { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (min-width: 768px) { .principles { grid-template-columns: repeat(3, 1fr); } }
.principle { background: var(--bg); padding: 38px 30px; }
.avatar { width: 52px; height: 52px; border-radius: 4px; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: #05130A; margin-bottom: 22px; }
.principle h3 { font-weight: 400; font-size: 1.05rem; margin-bottom: 6px; }
.principle .role { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 16px; }
.principle p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 80px 0 40px; }
.footer__grid { display: grid; gap: 44px; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer__brand p { color: var(--muted); font-size: 0.92rem; max-width: 40ch; margin-top: 20px; }
.footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; font-weight: 400; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer ul a { font-size: 0.92rem; color: var(--fg); transition: color .2s var(--ease); }
.footer ul a:hover { color: var(--accent); }
.footer__bottom { margin-top: 60px; padding-top: 28px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.footer__bottom a:hover { color: var(--accent); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s var(--ease), transform .65s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg img { animation: none; }
}

/* ---------- cookie popup ---------- */
.cookie-popup { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: flex-end; justify-content: flex-start; padding: 24px; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.cookie-popup[data-open="true"] { opacity: 1; pointer-events: all; }
.cookie-popup__card { background: var(--bg-elev); border: 1px solid var(--border-strong); padding: 30px 32px; max-width: 460px; border-radius: 4px; box-shadow: 0 20px 60px -20px rgba(0,0,0,0.8); }
.cookie-popup__label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.cookie-popup__card h3 { font-size: 1.15rem; font-weight: 500; margin-bottom: 12px; color: var(--fg-soft); }
.cookie-popup__card p { font-size: 0.86rem; color: var(--muted); line-height: 1.65; margin: 0; }
.cookie-popup__actions { display: flex; gap: 12px; margin-top: 22px; }
.cookie-popup__actions button { padding: 11px 22px; border: 1px solid var(--border-strong); font-family: var(--mono); font-size: 12px; border-radius: 3px; transition: all .2s var(--ease); }
.cookie-popup__actions button:first-child { color: var(--muted); }
.cookie-popup__actions button:first-child:hover { color: var(--fg-soft); border-color: var(--fg-soft); }
.cookie-popup__actions button:last-child { background: var(--accent); color: #05130A; border-color: var(--accent); font-weight: 600; }
.cookie-popup__actions button:last-child:hover { background: var(--accent-deep); }

/* ---------- legal / article pages ---------- */
.page-hero { padding: 140px 0 60px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 300; letter-spacing: -0.03em; max-width: 18ch; }
.page-hero p { margin-top: 24px; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 52px 0 18px; font-weight: 400; }
.prose h3 { margin: 32px 0 12px; font-size: 1.15rem; font-weight: 500; }
.prose p, .prose li { color: var(--fg); font-size: 1rem; line-height: 1.8; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 10px; }
.prose a { color: var(--accent); }
.prose strong { color: var(--fg-soft); }

/* ---------- thanks ---------- */
.thanks { min-height: 82vh; display: flex; align-items: center; text-align: center; }
.thanks__mark { font-family: var(--mono); font-size: 13px; color: var(--accent); margin-bottom: 26px; }
.thanks h1 { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 300; letter-spacing: -0.03em; margin-bottom: 22px; }
.thanks p { color: var(--muted); max-width: 48ch; margin: 0 auto 36px; }
