:root{
  --paper:#FAFAF9;
  --paper-2:#F1F1EF;
  --ink:#14141A;
  --ink-soft:#4B4C56;
  --muted:#8A8B96;
  --line:#E3E3E0;
  --accent:#5B4FE8;
  --accent-soft:#EDEBFD;
  --signal:#00B8A9;
  --signal-soft:#E3F7F4;
  --radius:2px;
}

*{box-sizing:border-box; margin:0; padding:0;}

html{scroll-behavior:smooth;}
html:has(.lightbox:target){overflow:hidden;}

body{
  background:var(--paper);
  color:var(--ink);
  font-family:'Inter', sans-serif;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}

.mono{
  font-family:'JetBrains Mono', monospace;
  letter-spacing:0.02em;
}

.display{
  font-family:'Space Grotesk', sans-serif;
}

.wrap{
  max-width:920px;
  margin:0 auto;
  padding:0 28px;
}

/* ---------- NAV ---------- */
nav{
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  background:rgba(250,250,249,0.92);
  backdrop-filter:blur(6px);
  z-index:10;
}
nav .wrap{
  display:flex;
  justify-content:space-between;
  align-items:center;
  height:60px;
}
.nav-id{
  font-size:13px;
  font-weight:600;
  color:var(--ink);
  text-decoration:none;
}
.nav-right{
  display:flex;
  align-items:center;
  gap:20px;
}
.nav-status{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:var(--ink-soft);
}
.btn-nav{
  font-size:13px;
  font-weight:500;
  padding:8px 16px;
  border-radius:var(--radius);
  background:var(--ink);
  color:var(--paper);
  text-decoration:none;
  transition:background .15s ease;
}
.btn-nav:hover{background:var(--accent);}
.dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--signal);
  box-shadow:0 0 0 0 rgba(0,184,169,0.5);
  animation:pulse 2.4s infinite;
}
@keyframes pulse{
  0%{box-shadow:0 0 0 0 rgba(0,184,169,0.35);}
  70%{box-shadow:0 0 0 7px rgba(0,184,169,0);}
  100%{box-shadow:0 0 0 0 rgba(0,184,169,0);}
}
@media (prefers-reduced-motion: reduce){
  .dot{animation:none;}
}

/* ---------- HERO ---------- */
header.hero{
  padding:96px 0 64px;
  border-bottom:1px solid var(--line);
}
.eyebrow{
  font-size:12px;
  color:var(--accent);
  font-weight:500;
  margin-bottom:20px;
  display:flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{
  content:"";
  width:22px;
  height:1px;
  background:var(--accent);
  display:inline-block;
}
h1{
  font-size:56px;
  font-weight:600;
  letter-spacing:-0.02em;
  line-height:1.05;
  margin-bottom:12px;
}
.role{
  font-size:20px;
  color:var(--ink-soft);
  margin-bottom:28px;
}
.role span{color:var(--ink); font-weight:600;}
.tagline{
  font-size:18px;
  color:var(--ink-soft);
  max-width:560px;
  margin-bottom:36px;
}
.cta-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.btn{
  font-size:14px;
  font-weight:500;
  padding:13px 22px;
  border-radius:var(--radius);
  text-decoration:none;
  display:inline-block;
  transition:transform .15s ease, background .15s ease;
}
.btn:hover{transform:translateY(-1px);}
.btn-primary{
  background:var(--ink);
  color:var(--paper);
}
.btn-primary:hover{background:var(--accent);}
.btn-secondary{
  border:1px solid var(--line);
  color:var(--ink);
}
.btn-secondary:hover{border-color:var(--ink);}

/* ---------- SECTION LABEL ---------- */
.field-label{
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
  margin-bottom:18px;
  display:block;
}

section{
  padding:56px 0;
  border-bottom:1px solid var(--line);
}

/* ---------- OVERVIEW ---------- */
.profile-grid{
  display:grid;
  grid-template-columns:1fr 1.4fr;
  gap:20px 40px;
  max-width:760px;
}
.profile-item{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.profile-label{
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
}
.profile-value{
  font-size:16px;
  color:var(--ink);
  font-weight:500;
}
.overview-text{
  font-size:19px;
  line-height:1.65;
  max-width:680px;
  color:var(--ink-soft);
}
.overview-text strong{color:var(--ink); font-weight:600;}

/* ---------- METRICS ---------- */
.metrics-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:1px;
  background:var(--line);
  border:1px solid var(--line);
}
.metric{
  background:var(--paper);
  padding:26px 20px;
}
.metric-value{
  font-family:'Space Grotesk', sans-serif;
  font-size:32px;
  font-weight:600;
  color:var(--accent);
  margin-bottom:6px;
}
.metric-label{
  font-size:13px;
  color:var(--ink-soft);
  line-height:1.4;
}

/* ---------- PROCESS ---------- */
.process-intro{
  font-size:30px;
  font-weight:600;
  letter-spacing:-0.01em;
  line-height:1.3;
  max-width:640px;
  margin-bottom:48px;
}
.process-intro .accent-line{color:var(--accent);}
.process-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:1px;
  background:var(--line);
  border:1px solid var(--line);
}
.process-step{
  background:var(--paper);
  padding:24px 22px 28px;
}
.process-title{
  font-size:16px;
  font-weight:600;
  margin-bottom:10px;
  font-family:'Space Grotesk', sans-serif;
  white-space:nowrap;
}
.process-title .process-num{
  color:var(--accent);
}
.process-desc{
  font-size:14px;
  color:var(--ink-soft);
  line-height:1.5;
}

/* ---------- CASES ---------- */
.case{
  display:grid;
  grid-template-columns:44px 1fr 160px;
  gap:28px;
  padding:36px 0;
  border-top:1px solid var(--line);
  align-items:start;
}
.case:last-child{border-bottom:1px solid var(--line);}
.case-index{
  font-size:13px;
  color:var(--muted);
  padding-top:4px;
}
.case-eyebrow{
  font-size:11px;
  color:var(--muted);
  margin-bottom:14px;
  display:block;
  text-transform:uppercase;
}
.case-title{
  font-size:24px;
  font-weight:600;
  font-family:'Space Grotesk', sans-serif;
  margin-bottom:12px;
  max-width:480px;
}
.case-desc{
  font-size:15px;
  color:var(--ink-soft);
  line-height:1.55;
  max-width:520px;
  margin-bottom:20px;
}
.case-breakdown{
  display:grid;
  gap:16px;
  max-width:600px;
  margin-bottom:24px;
  padding-left:16px;
  border-left:2px solid var(--line);
}
.breakdown-item{
  display:grid;
}
.breakdown-label{
  font-size:11px;
  color:var(--accent);
  text-transform:uppercase;
  margin-bottom:4px;
  display:block;
}
.breakdown-text{
  font-size:14px;
  color:var(--ink-soft);
  line-height:1.55;
}
.case-design{
  margin-bottom:24px;
}
.case-more{
  margin-bottom:20px;
}
.case-toggle{
  display:inline-block;
  font-size:13px;
  font-weight:500;
  color:var(--ink);
  border:1px solid var(--line);
  padding:10px 16px;
  border-radius:var(--radius);
  cursor:pointer;
  list-style:none;
  transition:border-color .15s ease;
}
.case-toggle::-webkit-details-marker{display:none;}
.case-toggle:hover{border-color:var(--ink);}
.case-collapsible[open] .case-toggle{margin-bottom:16px;}
.toggle-arrow{
  display:inline-block;
  transition:transform .2s ease;
}
.case-collapsible[open] .toggle-arrow{
  transform:rotate(180deg);
}
.case-design-shots{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:16px;
}
.case-design-shots figure{
  border:1px solid var(--line);
  overflow:hidden;
  background:var(--paper-2);
}
.case-design-link{
  display:block;
  cursor:zoom-in;
}
.case-design-shots img{
  display:block;
  width:100%;
  height:auto;
}
.case-design-shots figcaption{
  font-size:11px;
  color:var(--muted);
  text-transform:uppercase;
  padding:8px 10px;
  border-top:1px solid var(--line);
}
.lightbox{
  display:none;
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(20,20,26,0.92);
  align-items:center;
  justify-content:center;
  padding:40px;
  cursor:zoom-out;
}
.lightbox:target{
  display:flex;
}
.lightbox img{
  max-width:100%;
  max-height:100%;
  border-radius:3px;
  box-shadow:0 20px 60px rgba(0,0,0,0.4);
}
.case-tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.case-tag{
  font-size:11px;
  color:var(--ink-soft);
  border:1px solid var(--line);
  padding:6px 10px;
  text-transform:uppercase;
}
.case-stat{
  text-align:right;
}
.case-stat-value{
  font-family:'Space Grotesk', sans-serif;
  font-size:44px;
  font-weight:700;
  line-height:1;
  margin-bottom:8px;
}
.case-stat.accent .case-stat-value{color:var(--accent);}
.case-stat.signal .case-stat-value{color:var(--signal);}
.case-stat-label{
  font-size:13px;
  color:var(--muted);
  line-height:1.4;
}

/* ---------- CHANGELOG ---------- */
.changelog{
  position:relative;
  padding-left:28px;
}
.changelog::before{
  content:"";
  position:absolute;
  left:5px;
  top:6px;
  bottom:6px;
  width:1px;
  background:var(--line);
}
.release{
  position:relative;
  padding-bottom:44px;
}
.release:last-child{padding-bottom:0;}
.release::before{
  content:"";
  position:absolute;
  left:-28px;
  top:4px;
  width:11px;
  height:11px;
  border-radius:50%;
  background:var(--paper);
  border:2px solid var(--muted);
}
.release.current::before{
  border-color:var(--signal);
  background:var(--signal);
}
.release-head{
  display:flex;
  align-items:baseline;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:6px;
}
.version{
  font-size:15px;
  font-weight:600;
  color:var(--ink);
}
.latest-tag{
  font-size:11px;
  color:var(--signal);
  background:var(--signal-soft);
  padding:2px 8px;
  border-radius:20px;
  font-weight:500;
}
.release-period{
  font-size:12px;
  color:var(--muted);
  margin-left:auto;
}
.release-company{
  font-size:16px;
  font-weight:600;
  margin-bottom:4px;
}
.release-role{
  font-size:14px;
  color:var(--ink-soft);
  margin-bottom:14px;
}
.release-subhead{
  font-size:11px;
  color:var(--muted);
  text-transform:uppercase;
  display:block;
  margin-bottom:10px;
}
.release ul{
  list-style:none;
  margin-bottom:20px;
}
.release ul:last-child{
  margin-bottom:0;
}
.release li{
  font-size:15px;
  color:var(--ink-soft);
  padding-left:18px;
  position:relative;
  margin-bottom:8px;
  line-height:1.5;
}
.release li::before{
  content:"+";
  position:absolute;
  left:0;
  color:var(--signal);
  font-weight:600;
}

/* ---------- STACK ---------- */
.stack-group{
  margin-bottom:24px;
}
.stack-group:last-child{margin-bottom:0;}
.stack-group-label{
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px;
  display:block;
}
.tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.tag{
  font-size:13px;
  padding:7px 13px;
  border:1px solid var(--line);
  border-radius:20px;
  color:var(--ink-soft);
}

/* ---------- CONTACT ---------- */
footer{
  padding:64px 0 80px;
}
.contact-title{
  font-size:32px;
  font-weight:600;
  margin-bottom:8px;
}
.contact-sub{
  color:var(--ink-soft);
  margin-bottom:36px;
}
.endpoints{
  border:1px solid var(--line);
}
.endpoint{
  display:flex;
  align-items:center;
  gap:16px;
  padding:18px 20px;
  text-decoration:none;
  color:var(--ink);
  border-bottom:1px solid var(--line);
  transition:background .15s ease;
}
.endpoint:last-child{border-bottom:none;}
.endpoint:hover{background:var(--accent-soft);}
.method{
  font-size:12px;
  color:var(--signal);
  background:var(--signal-soft);
  padding:3px 8px;
  border-radius:3px;
  font-weight:500;
  min-width:44px;
  text-align:center;
}
.method.download{
  color:var(--accent);
  background:var(--accent-soft);
}
.endpoint-path{
  font-size:14px;
  flex:1;
  min-width:0;
  overflow-wrap:break-word;
}
.endpoint-arrow{
  color:var(--muted);
  font-size:16px;
  flex-shrink:0;
}

.foot-note{
  margin-top:40px;
  font-size:12px;
  color:var(--muted);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width:480px){
  .nav-status-text{display:none;}
  .nav-right{gap:12px;}
}
@media (max-width:720px){
  h1{font-size:38px;}
  .role{font-size:17px;}
  .tagline{font-size:16px;}
  .metrics-grid{grid-template-columns:repeat(2, 1fr);}
  .process-grid{grid-template-columns:repeat(2, 1fr);}
  .process-intro{font-size:24px;}
  .process-title{font-size:14px;}
  .case{grid-template-columns:1fr; gap:14px;}
  .case-design-shots{grid-template-columns:1fr;}
  .case-stat{text-align:left;}
  .case-index{padding-top:0;}
  .release-period{margin-left:0;}
  header.hero{padding:64px 0 48px;}
  section{padding:44px 0;}
  .contact-title{font-size:26px;}
}

/* ---------- FOCUS STATES ---------- */
a:focus-visible, .btn:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
