:root {
  --paper: #ECEEEB;
  --paper-2: #E2E5E0;
  --ink: #14161A;
  --ink-2: #1D2026;
  --text: var(--ink);
  --muted: #5B6067;
  --line: rgba(20,22,26,.14);
  --line-soft: rgba(20,22,26,.06);
  --accent: #FF4D00;
  --sans: 'Archivo', system-ui, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--ink); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.skip {
  position: fixed; top: -60px; left: 16px; z-index: 300;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: .75rem; padding: 10px 16px;
  text-decoration: none; transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #C5C9C2; }
::-webkit-scrollbar-thumb:hover { background: var(--ink); }

/* ---------- dark section variant ---------- */
.dark {
  --text: var(--paper);
  --muted: #9AA0A8;
  --line: rgba(236,238,235,.15);
  --line-soft: rgba(236,238,235,.05);
  background: var(--ink);
  color: var(--paper);
}

/* ---------- nav ---------- */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw; height: 64px;
  background: rgba(236,238,235,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .4s;
}
.logo {
  font-weight: 800; font-size: .95rem; letter-spacing: .06em;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); text-transform: uppercase;
}
.logo .dot { width: 10px; height: 10px; background: var(--accent); }
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase;
  transition: color .25s; position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent); }
.nav-cta {
  padding: 9px 18px; border: 1px solid var(--ink);
  color: var(--ink) !important;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }
.nav-cta:hover::after { display: none; }
.burger { display: none; background: none; border: none; cursor: pointer; z-index: 101; padding: 6px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--accent); z-index: 200;
}

/* ---------- hero ---------- */
header {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 5vw 14vh;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(85% 90% at 25% 45%, black, transparent);
  -webkit-mask-image: radial-gradient(85% 90% at 25% 45%, black, transparent);
}
.hero-inner {
  position: relative; z-index: 1; max-width: 1280px; width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 280px; gap: 60px; align-items: end;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 40px;
}
.tick { width: 9px; height: 9px; background: var(--accent); flex: none; }
h1 {
  font-size: clamp(3.1rem, 10.5vw, 9rem);
  line-height: .92; font-weight: 900; letter-spacing: -.035em;
  text-transform: uppercase;
}
.rl { display: block; overflow: hidden; }
.rl i {
  display: block; font-style: normal;
  animation: rise .9s cubic-bezier(.2,.7,.2,1) both;
}
.rl:nth-child(2) i { animation-delay: .08s; }
.rl:nth-child(3) i { animation-delay: .16s; }
@keyframes rise { from { transform: translateY(112%); } }
.rl.serif i {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  text-transform: none; letter-spacing: -.01em; font-size: .58em;
  line-height: 1.25; padding-top: .12em;
}
.hero-sub {
  margin-top: 36px; max-width: 520px;
  color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.12rem); line-height: 1.7;
}
.hero-btns { margin-top: 44px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  padding: 16px 30px; text-decoration: none;
  font-family: var(--mono); font-weight: 500; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase;
  transition: background .25s, color .25s, border-color .25s;
  display: inline-block;
}
.btn-p { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-p:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-s { border: 1px solid var(--ink); color: var(--ink); }
.btn-s:hover { background: var(--ink); color: var(--paper); }

.hero-spec { font-family: var(--mono); border-top: 2px solid var(--ink); padding-top: 18px; }
.hero-spec dl div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.hero-spec dt { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero-spec dd { font-size: .74rem; text-align: right; }
.live { display: inline-block; width: 8px; height: 8px; background: var(--accent); margin-right: 8px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }
.typed-wrap {
  margin-top: 18px; font-size: .74rem; color: var(--muted); min-height: 1.5em;
}
.typed-wrap::after { content: '▌'; color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0 } }

.scroll-hint {
  position: absolute; bottom: 36px; left: 5vw; z-index: 1;
  color: var(--muted); font-family: var(--mono);
  font-size: .64rem; letter-spacing: .3em; text-transform: uppercase;
  display: flex; align-items: center; gap: 14px;
}
.scroll-hint .line { width: 56px; height: 1px; background: var(--ink); transform-origin: left; animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleX(0) } 55% { transform: scaleX(1) } 100% { transform: scaleX(0); transform-origin: right } }

/* ---------- sections ---------- */
section { padding: 110px 5vw; position: relative; }
.sec-head {
  max-width: 1280px; margin: 0 auto 64px;
  display: grid; grid-template-columns: 1.4fr minmax(260px, 1fr);
  gap: 20px 60px; align-items: end;
}
.kicker {
  grid-column: 1 / -1;
  font-family: var(--mono); color: var(--muted);
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
}
.kicker::before { content: ''; width: 9px; height: 9px; background: var(--accent); }
h2 {
  font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.02;
}
h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.sec-desc { color: var(--muted); line-height: 1.7; font-size: 1rem; padding-bottom: 6px; }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- marquee ---------- */
.marquee {
  background: var(--ink); padding: 18px 0;
  overflow: hidden; white-space: nowrap;
}
.marquee-track { display: inline-flex; gap: 48px; animation: scroll 32s linear infinite; will-change: transform; }
.marquee span {
  font-family: var(--mono); font-size: .74rem;
  color: #9AA0A8; letter-spacing: .18em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 48px;
}
.marquee span::after { content: '*'; color: var(--accent); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- services index ---------- */
.svc-list { max-width: 1280px; margin: 0 auto; }
.svc {
  display: grid; grid-template-columns: 64px minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px 48px; padding: 30px 24px; margin: 0 -24px;
  border-top: 1px solid var(--line);
  transition: background .25s;
}
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc-idx {
  font-family: var(--mono); font-size: .74rem; color: var(--muted);
  letter-spacing: .1em; padding-top: 6px; transition: color .25s;
}
.svc h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; letter-spacing: -.01em; transition: color .25s; }
.svc p { color: var(--muted); line-height: 1.65; font-size: .94rem; margin-top: 12px; max-width: 480px; transition: color .25s; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; justify-content: flex-end; }
.svc-tags i {
  font-style: normal; font-family: var(--mono); font-size: .66rem;
  color: var(--muted); border: 1px solid var(--line);
  padding: 5px 10px; letter-spacing: .06em; transition: color .25s, border-color .25s;
  white-space: nowrap;
}
.svc:hover { background: var(--ink); }
.svc:hover .svc-idx { color: var(--accent); }
.svc:hover h3 { color: var(--paper); }
.svc:hover p { color: #9AA0A8; }
.svc:hover .svc-tags i { color: #C9CCD0; border-color: rgba(236,238,235,.28); }

/* ---------- process ---------- */
.steps { max-width: 1280px; margin: 0 auto; }
.step {
  display: grid; grid-template-columns: 150px minmax(180px, 320px) 1fr;
  gap: 16px 40px; padding: 26px 0; border-top: 1px solid var(--line);
  align-items: baseline;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step .snum {
  font-size: 3.2rem; font-weight: 900; letter-spacing: -.02em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(236,238,235,.35);
  transition: -webkit-text-stroke-color .3s, color .3s;
}
.step:hover .snum { -webkit-text-stroke-color: var(--accent); color: var(--accent); }
.step h4 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.step p { color: var(--muted); font-size: .92rem; line-height: 1.65; max-width: 480px; }

/* ---------- terminal ---------- */
.term {
  max-width: 860px; margin: 70px auto 0; overflow: hidden;
  border: 1px solid var(--line); background: #0B0D10;
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 13px 18px; background: var(--ink-2); border-bottom: 1px solid var(--line); }
.term-bar i { width: 10px; height: 10px; }
.term-bar i:nth-child(1) { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.term-body { padding: 26px 28px; font-family: var(--mono); font-size: .83rem; line-height: 2; min-height: 260px; }
.term-body .ln { display: block; white-space: pre-wrap; }
.t-c { color: var(--accent); } .t-g { color: #9BD13B; } .t-m { color: #6B7280; } .t-w { color: #D6D9D4; } .t-v { color: var(--paper); font-weight: 500; }

/* ---------- stack ---------- */
.stack-sec { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stack-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); }
.stack-col { padding: 34px 30px; border-left: 1px solid var(--line); }
.stack-col:first-child { border-left: none; }
.stack-col h4 {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 22px;
  display: flex; align-items: center; gap: 10px; padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}
.stack-col h4::before { content: ''; width: 8px; height: 8px; background: var(--accent); }
.stack-col ul { list-style: none; }
.stack-col li {
  padding: 10px 0; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: .9rem; display: flex; justify-content: space-between; gap: 12px;
  transition: color .25s, padding-left .25s;
}
.stack-col li:last-child { border-bottom: none; }
.stack-col li:hover { color: var(--ink); padding-left: 8px; }
.stack-col li::after { content: '→'; color: var(--accent); opacity: 0; transition: opacity .25s; }
.stack-col li:hover::after { opacity: 1; }

/* ---------- contact ---------- */
.cta-wrap { max-width: 1280px; margin: 0 auto; }
.cta-wrap h2 { font-size: clamp(2.4rem, 6vw, 5rem); max-width: 900px; }
.cta-wrap p { color: var(--muted); max-width: 480px; margin: 30px 0 48px; line-height: 1.7; }
.mail-link {
  font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.5rem, 4.6vw, 3.4rem);
  color: var(--ink); text-decoration: none;
  border-bottom: 3px solid var(--accent); padding-bottom: 6px;
  transition: color .25s, border-color .25s;
  display: inline-block; word-break: break-all;
}
.mail-link:hover { color: var(--accent); }
.mail-link .arr { color: var(--accent); font-weight: 400; }

/* ---------- studio / founders ---------- */
.members { max-width: 1280px; margin: 0 auto; }
.member {
  display: grid; grid-template-columns: 340px 1fr; gap: 28px 64px;
  padding: 44px 0; border-top: 1px solid var(--line);
}
.member:last-child { border-bottom: 1px solid var(--line); }
.m-id .m-idx {
  font-family: var(--mono); font-size: .74rem; color: var(--accent);
  letter-spacing: .1em; display: block; margin-bottom: 18px;
}
.m-id h3 {
  font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800;
  letter-spacing: -.02em; line-height: 1.05;
}
.m-role {
  display: block; margin-top: 14px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.m-edu { list-style: none; margin-top: 22px; }
.m-edu li {
  font-family: var(--mono); font-size: .68rem; color: var(--muted);
  padding: 8px 0; border-top: 1px solid var(--line); line-height: 1.55;
}
.m-edu li i { font-style: normal; color: var(--ink); display: block; font-size: .72rem; }
.m-bio { color: var(--muted); line-height: 1.7; font-size: .98rem; max-width: 560px; }
.m-works { margin-top: 30px; }
.m-works h5 {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
  display: flex; align-items: center; gap: 10px;
}
.m-works h5::before { content: ''; width: 8px; height: 8px; background: var(--accent); }
.m-works ul { list-style: none; }
.m-works li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem;
}
.m-works li i {
  font-style: normal; font-family: var(--mono); font-size: .66rem;
  color: var(--muted); letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap;
}
.m-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.m-tags i {
  font-style: normal; font-family: var(--mono); font-size: .66rem;
  color: var(--muted); border: 1px solid var(--line);
  padding: 5px 10px; letter-spacing: .06em;
}

footer {
  background: var(--ink); color: #9AA0A8;
  padding: 34px 5vw;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  font-size: .8rem;
}
footer .fm { font-family: var(--mono); letter-spacing: .08em; font-size: .72rem; text-transform: uppercase; }
footer a { color: #D6D9D4; text-decoration: none; border-bottom: 1px solid rgba(236,238,235,.3); }
footer a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-spec { max-width: 360px; }
  .sec-head { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 48px 1fr; }
  .svc-tags { grid-column: 2; justify-content: flex-start; }
  .step { grid-template-columns: 90px 1fr; }
  .step p { grid-column: 2; }
  .stack-grid { grid-template-columns: 1fr; }
  .stack-col { border-left: none; border-top: 1px solid var(--line); }
  .stack-col:first-child { border-top: none; }
  .member { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; align-items: flex-start;
    background: var(--paper); gap: 30px; padding: 0 8vw;
    transform: translateY(-100%);
    transition: transform .4s cubic-bezier(.7,0,.3,1);
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-family: var(--sans); font-weight: 800; font-size: 1.8rem; letter-spacing: -.02em; text-transform: none; color: var(--ink); }
  .nav-links .nav-cta { font-family: var(--mono); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; padding: 12px 22px; }
  .burger { display: block; }
  .burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger.open span:nth-child(2) { opacity: 0; }
  .burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  header { padding-bottom: 12vh; }
  section { padding: 84px 6vw; }
  .svc { padding: 26px 0; margin: 0; grid-template-columns: 1fr; gap: 12px; }
  .svc-tags { grid-column: 1; }
  .step { grid-template-columns: 64px 1fr; }
  .step .snum { font-size: 2.4rem; }
  footer { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
