/* Gridworks — brand tokens */
:root {
  --ink: #0E0E10;
  --paper: #F3F1EC;
  --paper-2: #E6E2DA;
  --signal: #FF5B1F;
  --cobalt: #3346FF;
  --graphite: #1B1B1F;
  --graphite-2: #2A2A30;
  --line: #222227;
  --line-2: #3A3A40;
  --muted: #A3A19B;
  --soft: #C9C6BF;
  --smoke: #6B6964;
  --fd: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
  --fb: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --fm: 'Geist Mono', ui-monospace, Menlo, monospace;
  --gutter: 16px;
  --tabbar: 76px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--fb);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-inline: var(--gutter); }
.fd { font-family: var(--fd); }
.fm { font-family: var(--fm); }
.label { font-family: var(--fm); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.h2 { font-family: var(--fd); font-weight: 800; font-size: clamp(40px, 7vw, 84px); letter-spacing: -0.055em; line-height: 0.92; margin: 8px 0 0; }
.lede { color: var(--soft); font-size: clamp(16px, 1.6vw, 20px); max-width: 560px; margin: 16px 0 0; }
.section { padding-top: clamp(56px, 9vw, 120px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; border: 1.5px solid transparent;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-signal { background: var(--signal); color: var(--ink); }
.btn-signal:hover { background: #ff7440; }
.btn-ghost { border-color: var(--paper); color: var(--paper); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-paper { background: #fff; color: var(--cobalt); }
.btn-ink-outline { border-color: var(--ink); color: var(--ink); }
.btn-ink-outline:hover { background: var(--ink); color: var(--paper); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: rgba(14, 14, 16, 0.88);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-word { font-family: var(--fd); font-weight: 800; font-size: 24px; letter-spacing: -0.055em; line-height: 1; }
.os-pill { font-family: var(--fm); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--cobalt); color: #fff; letter-spacing: 0.02em; }
.nav-links { display: none; gap: 32px; font-size: 15px; font-weight: 500; }
.nav-links a { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.nav-links a:hover { color: var(--signal); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }

.sheet { position: fixed; inset: 60px 0 0; z-index: 39; background: var(--ink); padding: 24px var(--gutter); display: flex; flex-direction: column; gap: 4px; }
.sheet a { font-family: var(--fd); font-weight: 800; font-size: 40px; letter-spacing: -0.05em; text-decoration: none; padding: 6px 0; }
.sheet .btn { margin-top: 20px; font-family: var(--fb); font-size: 16px; letter-spacing: 0; }

/* Stories */
.stories { display: flex; gap: 14px; padding: 16px var(--gutter); overflow-x: auto; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; font-size: 12px; width: 70px; }
.story-ring { width: 66px; height: 66px; border-radius: 999px; border: 2px solid var(--signal); padding: 3px; }
.story-ring.dim { border-color: var(--line-2); }
.story-ring.os { border-color: var(--cobalt); }
.story-dot { width: 100%; height: 100%; border-radius: 999px; background: var(--graphite); display: flex; align-items: center; justify-content: center; font-family: var(--fm); font-size: 11px; font-weight: 600; }
.story-dot.signal { background: var(--signal); color: var(--ink); }
.story-dot.os { background: var(--cobalt); color: #fff; }

/* Posts */
.post { background: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-inline: calc(var(--gutter) * -1); }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 8px 12px var(--gutter); }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--signal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--fm); font-size: 12px; font-weight: 600; color: var(--ink); }
.post-name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.post-sub { font-size: 12px; color: var(--muted); }
.post-media { background: var(--signal); color: var(--ink); padding: 24px var(--gutter); min-height: 460px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.hero-title { font-family: var(--fd); font-weight: 800; font-size: clamp(84px, 24vw, 184px); letter-spacing: -0.06em; line-height: 0.84; margin: 0; }
.hero-sub { font-size: clamp(18px, 2vw, 22px); font-weight: 500; line-height: 1.35; margin: 18px 0 0; max-width: 460px; }
.post-actions { display: flex; align-items: center; padding: 4px 4px 0; }
.post-actions .spacer { flex-grow: 1; }
.caption { margin: 4px var(--gutter) 0; font-size: 15px; }
.caption b { font-weight: 600; }
.ctas { display: flex; flex-direction: column; gap: 10px; padding: 18px var(--gutter) 20px; }

/* Profile grid (the work) */
.profile { padding-top: 32px; }
.profile-head { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; }
.profile-ring { width: 76px; height: 76px; border-radius: 999px; border: 2px solid var(--signal); padding: 4px; flex-shrink: 0; }
.profile-ring span { width: 100%; height: 100%; border-radius: 999px; background: var(--signal); display: flex; align-items: center; justify-content: center; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; flex-grow: 1; text-align: center; }
.stat b { display: block; font-family: var(--fd); font-weight: 800; font-size: 20px; letter-spacing: -0.03em; line-height: 1.1; }
.stat span { font-size: 11px; color: var(--muted); line-height: 1.25; display: block; margin-top: 2px; }
.profile-bio { font-size: 14px; color: var(--soft); margin: 0 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin-inline: calc(var(--gutter) * -1); }
.tile { aspect-ratio: 1 / 1; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; background: var(--graphite); overflow: hidden; transition: filter .15s ease; }
.tile:hover { filter: brightness(1.12); }
.tile .fm { font-size: 10px; letter-spacing: 0.08em; color: var(--muted); }
.tile b { font-size: clamp(13px, 1.4vw, 17px); line-height: 1.15; font-weight: 700; }
.tile small { display: block; font-family: var(--fm); font-size: 11px; color: var(--muted); margin-top: 2px; }
.tile.t-signal { background: var(--signal); color: var(--ink); }
.tile.t-signal .fm, .tile.t-signal small { color: var(--ink); }
.tile.t-paper { background: var(--paper); color: var(--ink); }
.tile.t-paper .fm, .tile.t-paper small { color: var(--smoke); }
.tile.t-g2 { background: var(--graphite-2); }
.tile .big { font-family: var(--fd); font-weight: 800; font-size: clamp(22px, 3vw, 34px); letter-spacing: -0.04em; line-height: 1; }
.grid-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* Brand marquee */
.marquee { margin-top: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 22px 0; }
.marquee-label { text-align: center; margin-bottom: 14px; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { font-family: var(--fd); font-weight: 700; font-size: clamp(22px, 3vw, 32px); letter-spacing: -0.03em; color: var(--smoke); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Horizontal swipe rows */
.swipe { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.swipe::-webkit-scrollbar { display: none; }
.swipe > * { scroll-snap-align: start; flex-shrink: 0; }
.dots { display: flex; gap: 6px; justify-content: center; padding-top: 16px; }
.dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--line-2); transition: width .2s ease, background-color .2s ease; }
.dots span.on { width: 22px; background: var(--signal); }

/* Case studies */
.case { width: min(86vw, 520px); background: var(--graphite); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; }
.case-media { padding: 24px; min-height: 240px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.case-media.signal { background: var(--signal); color: var(--ink); }
.case-media.paper { background: var(--paper); color: var(--ink); }
.case-media.dark { background: var(--graphite-2); color: var(--paper); }
.case-metric { font-family: var(--fd); font-weight: 800; font-size: clamp(56px, 9vw, 92px); letter-spacing: -0.06em; line-height: 0.88; }
.case-metric-sub { font-size: 16px; font-weight: 500; margin-top: 8px; }
.case-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 14px; flex-grow: 1; }
.case-body h3 { margin: 0; font-size: 20px; font-weight: 600; }
.case-body p { margin: 0; font-size: 15px; color: var(--soft); }
.brand-chips, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--fm); font-size: 12px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); }
.chip.signal { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.cases-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* Process */
.step { width: 300px; min-height: 300px; border-radius: 24px; background: var(--graphite); padding: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.step .num { font-family: var(--fm); font-size: 14px; color: var(--signal); }
.step h3 { font-family: var(--fd); font-weight: 800; font-size: 36px; letter-spacing: -0.04em; margin: 0; }
.step p { margin: 8px 0 0; color: var(--soft); font-size: 15px; }
.step.signal { background: var(--signal); color: var(--ink); }
.step.signal .num, .step.signal p { color: var(--ink); }

/* Services */
.services { margin-top: 20px; border-top: 1px solid var(--line); }
.service { display: flex; gap: 14px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.service .fm { font-size: 12px; color: var(--signal); padding-top: 5px; width: 14px; }
.service h3 { margin: 0; font-size: 20px; font-weight: 600; }
.service p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

/* Founder */
.founder { background: var(--paper); color: var(--ink); border-radius: 28px; padding: 28px 24px; display: grid; gap: 24px; }
.founder .label { color: var(--smoke); }
.founder h2 { font-family: var(--fd); font-weight: 800; font-size: clamp(36px, 5vw, 64px); letter-spacing: -0.05em; line-height: 0.95; margin: 8px 0 0; }
.founder-id { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.founder-photo { width: 72px; height: 72px; border-radius: 999px; object-fit: cover; object-position: center top; flex-shrink: 0; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--signal); }
.founder-id b { display: block; font-size: 17px; }
.founder-id span { font-size: 14px; color: var(--smoke); }
.cv { list-style: none; margin: 0; padding: 0; border-top: 1px solid #D6D2C9; }
.cv li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #D6D2C9; font-size: 15px; }
.cv li b { font-weight: 600; }
.cv li span { color: var(--smoke); text-align: right; font-size: 14px; }

/* Pricing */
.tiers { display: grid; gap: 12px; margin-top: 28px; }
.tier { background: var(--graphite); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.tier.featured { background: var(--signal); color: var(--ink); }
.tier-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tier-name { font-family: var(--fm); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; }
.tier-tag { font-family: var(--fm); font-size: 11px; padding: 4px 9px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.tier-spend { font-size: 15px; color: var(--soft); }
.tier.featured .tier-spend { color: var(--ink); }
.tier-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tier-price b { font-family: var(--fd); font-weight: 800; font-size: 60px; letter-spacing: -0.05em; line-height: 1; }
.tier-price span { font-size: 14px; color: var(--muted); }
.tier.featured .tier-price span { color: var(--ink); }
.tier .btn { margin-top: auto; }
.tier.featured .btn-ghost { border-color: var(--ink); color: var(--ink); }
.tier.featured .btn-ghost:hover { background: var(--ink); color: var(--paper); }
.includes { margin-top: 16px; background: var(--graphite); border-radius: 24px; padding: 24px; display: grid; gap: 20px; }
.includes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.includes li { display: flex; gap: 10px; font-size: 15px; }
.includes li svg { flex-shrink: 0; color: var(--signal); margin-top: 2px; }
.custom { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.custom p { margin: 0; color: var(--soft); font-size: 15px; }
.fine { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* Who it's for */
.fit { background: var(--paper); color: var(--ink); border-radius: 28px; padding: 28px 24px; }
.fit .label { color: var(--smoke); }
.fit h2 { font-family: var(--fd); font-weight: 800; font-size: clamp(34px, 5vw, 60px); letter-spacing: -0.05em; line-height: 0.95; margin: 8px 0 20px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 16px; }
.checks li { display: flex; gap: 10px; }
.checks svg { flex-shrink: 0; margin-top: 2px; }

/* OS promo */
.os-card { background: var(--cobalt); color: #fff; border-radius: 28px; padding: 28px 24px; display: grid; gap: 24px; }
.os-card h2 { font-family: var(--fd); font-weight: 800; font-size: clamp(34px, 5vw, 64px); letter-spacing: -0.05em; line-height: 0.95; margin: 16px 0 10px; }
.os-card p { margin: 0; font-size: 16px; }
.os-prices { display: grid; gap: 8px; }
.os-prices div { display: flex; justify-content: space-between; padding: 14px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.12); }
.os-prices .fm { font-size: 13px; }

/* Booking */
.book { display: grid; gap: 32px; }
.book-title { font-family: var(--fd); font-weight: 800; font-size: clamp(64px, 12vw, 160px); letter-spacing: -0.06em; line-height: 0.84; margin: 0; }
.form { background: var(--graphite); border-radius: 28px; padding: 24px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--ink);
  color: var(--paper); font: inherit; font-size: 16px; padding: 12px 14px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--signal); }
.form-row { display: grid; gap: 14px; }
.form small { color: var(--muted); font-size: 12px; }

/* Footer */
.site-footer { margin-top: clamp(64px, 10vw, 128px); border-top: 1px solid var(--line); padding: 32px 0; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--signal); }

/* Mobile tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
  padding: 8px 8px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(14, 14, 16, 0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: center;
}
.tab { width: 56px; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); text-decoration: none; font-family: var(--fm); font-size: 14px; font-weight: 600; }
.tab::after { content: ''; width: 4px; height: 4px; border-radius: 999px; background: transparent; }
.tab.active { color: var(--paper); }
.tab.active::after { background: var(--signal); }
.tab-book { width: 54px; height: 44px; border-radius: 14px; background: var(--signal); color: var(--ink); display: flex; align-items: center; justify-content: center; }

/* Desktop */
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  body { padding-bottom: 0; }
  .tabbar, .menu-btn, .sheet { display: none !important; }
  .nav-links { display: flex; }
  .site-header .wrap { height: 80px; }
  .logo-word { font-size: 30px; }
  .stories { justify-content: center; padding-block: 24px; }
  .hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; padding-top: 8px; }
  .post { margin-inline: 0; border: 1px solid var(--line); border-radius: 32px; overflow: hidden; }
  .post-media { min-height: 560px; padding: 36px; }
  .ctas { flex-direction: row; }
  .ctas .btn { flex: 1; }
  .profile { padding-top: 0; position: sticky; top: 104px; }
  .grid3 { margin-inline: 0; gap: 4px; }
  .tile { border-radius: 8px; padding: 14px; }
  .swipe.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .swipe.cases .case { width: auto; }
  .swipe.cases .case:nth-child(3):last-child { grid-column: 1 / -1; }
  .swipe.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .swipe.steps .step { width: auto; min-height: 340px; }
  .dots { display: none; }
  .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: start; }
  .founder { grid-template-columns: 1fr 1fr; padding: 48px; gap: 48px; }
  .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tier { padding: 32px; min-height: 340px; }
  .includes { grid-template-columns: 1.4fr 1fr; padding: 32px; gap: 40px; }
  .includes ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
  .custom { border-top: 0; border-left: 1px solid var(--line-2); padding: 0 0 0 40px; }
  .fit { padding: 44px; }
  .os-card { grid-template-columns: 1.3fr 1fr; padding: 56px; align-items: center; gap: 48px; }
  .book { grid-template-columns: 1.1fr 1fr; align-items: start; gap: 64px; }
  .form { padding: 32px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 1180px) {
  .swipe.cases { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .swipe.cases .case:nth-child(3):last-child { grid-column: auto; }
  .swipe.cases .case-metric { font-size: clamp(48px, 4.4vw, 68px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track [aria-hidden="true"] { display: none; }
}
