/* ==========================================================
   SB Webcraft — styles
   Accent colours live in the :root tokens below; swap them to re-theme.
   ========================================================== */
:root {
  --paper: #f6f4ef;
  --paper-2: #efece4;
  --ink: #0e0e10;
  --ink-2: #3a3a40;
  --muted: #7a7a82;
  --line: rgba(14, 14, 16, .12);
  --accent: #ffc21a;        /* from the SB monogram */
  --accent-deep: #f59e0b;
  --violet: #6d5efc;        /* subtle secondary glow */
  --dark: #0b0b0c;

  --f-display: "Bricolage Grotesque", "Inter Tight", system-ui, sans-serif;
  --f-body: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.is-loading { overflow: hidden; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* ---------------- Opening sequence ---------------- */
.intro { position: fixed; inset: 0; z-index: 500; pointer-events: all; will-change: transform; }
.intro.is-done { display: none; }
.intro__panel {
  position: absolute; inset: 0; background: var(--dark); color: #f3f1ea;
  display: grid; grid-template-rows: auto 1fr auto; padding: var(--pad);
  padding-top: max(var(--pad), env(safe-area-inset-top)); padding-bottom: max(var(--pad), env(safe-area-inset-bottom));
  overflow: hidden;
}
.intro__curve { position: absolute; left: 0; top: calc(100% - 1px); width: 100%; height: 14vh; fill: var(--dark); pointer-events: none; }
.intro__top { display: flex; justify-content: space-between; gap: 16px; opacity: 0; color: rgba(243,241,234,.7); }
.intro__idx { color: var(--accent); margin-right: 10px; }
.intro__center { display: grid; place-items: center; align-content: center; gap: clamp(8px, 2vh, 20px); }
.intro__logo { width: min(62vmin, 520px); aspect-ratio: 1; position: relative; clip-path: inset(0 100% 0 0); }
.intro__logo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: screen; }
.intro__words { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; color: rgba(243,241,234,.65); opacity: 0; font-size: 11px; }
.intro__words i { color: var(--accent); font-style: normal; }
.intro__bottom { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: clamp(16px, 4vw, 48px); }
.intro__counter { font-family: var(--f-display); font-weight: 800; font-size: clamp(64px, 16vw, 200px); line-height: .8; letter-spacing: -.04em; font-variant-numeric: tabular-nums; display: flex; align-items: flex-start; }
.intro__counter sup { font-size: .22em; margin: .2em 0 0 .12em; color: var(--accent); font-family: var(--f-mono); font-weight: 400; letter-spacing: 0; }
.intro__bar { height: 2px; background: rgba(243,241,234,.16); align-self: end; margin-bottom: .6em; overflow: hidden; }
.intro__bar span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.intro__skip { color: rgba(243,241,234,.7); padding: 8px 0; align-self: end; margin-bottom: .2em; transition: color .2s; }
.intro__skip:hover { color: var(--accent); }

/* ---------------- Header ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px var(--pad); transition: background .4s, backdrop-filter .4s, transform .5s var(--ease);
}
.nav.is-scrolled { background: rgba(246,244,239,.78); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); }
.nav.is-hidden { transform: translateY(-110%); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand__tile { width: 44px; height: 44px; border-radius: 12px; background: var(--dark); display: grid; place-items: center; padding: 8px; transition: transform .5s var(--ease); }
.brand:hover .brand__tile { transform: rotate(-6deg) scale(1.05); }
.brand__tile img { width: 100%; height: auto; }
.nav__links { display: flex; gap: clamp(20px, 3vw, 40px); margin-left: auto; margin-right: 8px; }
.nav__links a { position: relative; padding: 6px 0; }
.nav__links span { color: var(--muted); margin-right: 4px; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { display: inline-flex; padding: 11px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 500; font-size: 14px; transition: background .3s, color .3s; }
.nav__cta:hover { background: var(--accent); color: var(--ink); }
.nav__burger { display: none; width: 44px; height: 44px; position: relative; border-radius: 50%; border: 1px solid var(--line); }
.nav__burger i { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease), top .4s var(--ease); }
.nav__burger i:first-child { top: 18px; } .nav__burger i:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] i:first-child { top: 21px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] i:last-child { top: 21px; transform: rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 90; background: var(--paper); display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: var(--pad); clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease); }
.menu[hidden] { display: flex; visibility: hidden; }
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.menu a { font-family: var(--f-display); font-weight: 800; font-size: clamp(44px, 13vw, 96px); letter-spacing: -.03em; line-height: 1.05; display: flex; align-items: baseline; gap: 16px; }
.menu a span { color: var(--muted); }

/* ---------------- Hero ---------------- */
.section { padding: clamp(80px, 12vw, 180px) var(--pad); position: relative; }
.hero { min-height: 100svh; padding: clamp(110px, 16vh, 160px) var(--pad) clamp(40px, 7vh, 80px); display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; }
.hero__glow { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; will-change: transform; }
.hero__glow--a { width: 46vw; height: 46vw; max-width: 720px; max-height: 720px; right: -8vw; top: 4vh; background: radial-gradient(circle, rgba(255,194,26,.55), rgba(255,194,26,0) 65%); }
.hero__glow--b { width: 38vw; height: 38vw; max-width: 600px; max-height: 600px; left: -10vw; top: 30vh; background: radial-gradient(circle, rgba(109,94,252,.22), rgba(109,94,252,0) 65%); }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 96px 96px; mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%); opacity: .55; pointer-events: none; }
.hero__meta { color: var(--ink-2); margin-bottom: clamp(16px, 3vh, 32px); position: relative; }
.hero__meta span { color: var(--ink); font-weight: 500; }
.hero__title { font-family: var(--f-display); font-weight: 800; letter-spacing: -.05em; line-height: .84; font-size: clamp(44px, 14.6vw, 250px); position: relative; text-transform: uppercase; }
.line { display: block; overflow: hidden; padding: .04em 0 .06em; margin-bottom: -.04em; }
.line > span { display: inline-block; will-change: transform; }
.hero__title em { font-style: normal; color: var(--accent-deep); }
.hero__row { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: end; margin-top: clamp(28px, 5vh, 56px); position: relative; }
.hero__tag { font-family: var(--f-display); font-weight: 700; font-size: clamp(26px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -.03em; }
.hero__lead { color: var(--ink-2); max-width: 46ch; font-size: clamp(16px, 1.3vw, 19px); }
.hero__founder { margin-top: 18px; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.hero__founder::before { content: ""; width: 28px; height: 1px; background: var(--ink); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__scroll { position: absolute; right: var(--pad); bottom: 22px; display: none; align-items: center; gap: 10px; color: var(--muted); }
.hero__scroll span { width: 1px; height: 36px; background: linear-gradient(var(--ink), transparent); animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 999px; font-weight: 500; font-size: 16px; position: relative; overflow: hidden; isolation: isolate; transition: color .35s, border-color .35s, box-shadow .35s; will-change: transform; }
.btn svg { width: 18px; height: 18px; transition: transform .45s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: translateY(101%); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transition: transform .55s var(--ease), border-radius .55s var(--ease); }
.btn:hover::before { transform: translateY(0); border-radius: 0; }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary::before { background: var(--accent); }
.btn--primary:hover { color: var(--ink); }
.btn--ghost { border: 1px solid var(--ink); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--paper); }
.btn--ghost-light { border: 1px solid rgba(255,255,255,.35); color: #fff; }
.btn--ghost-light::before { background: #fff; }
.btn--ghost-light:hover { color: var(--ink); }
.btn--lg { padding: 20px 34px; font-size: 18px; }
.contact .btn--primary { background: var(--accent); color: var(--ink); }
.contact .btn--primary::before { background: #fff; }

/* ---------------- Marquee ---------------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; background: var(--ink); color: var(--paper); }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; padding: 18px 0; }
.marquee__track span { font-family: var(--f-display); font-weight: 700; font-size: clamp(20px, 3vw, 36px); letter-spacing: -.02em; white-space: nowrap; padding-right: .5em; text-transform: uppercase; }
.marquee__track span:nth-child(odd) { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-33.3333%); } }

/* ---------------- About ---------------- */
.eyebrow { color: var(--muted); margin-bottom: clamp(24px, 4vw, 48px); }
.eyebrow--light { color: rgba(255,255,255,.55); }
.about__statement { font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 5.2vw, 78px); line-height: 1.04; letter-spacing: -.035em; max-width: 20ch; }
.about__statement .w { display: inline-block; opacity: .14; transition: opacity .3s; }
.about__grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 7vw, 120px); margin-top: clamp(48px, 9vw, 120px); align-items: start; }
.about__copy { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.5; color: var(--ink-2); max-width: 36ch; position: sticky; top: 120px; }
.caps li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 26px 0; border-top: 1px solid var(--line); transition: padding .5s var(--ease), background .4s; }
.caps li:last-child { border-bottom: 1px solid var(--line); }
.caps li:hover { padding-left: 14px; }
.caps .mono { color: var(--accent-deep); padding-top: 6px; }
.caps h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(22px, 2.4vw, 32px); letter-spacing: -.025em; line-height: 1.1; }
.caps p { color: var(--muted); margin-top: 6px; }

/* ---------------- Services ---------------- */
.services { background: var(--paper-2); }
.services__head { margin-bottom: clamp(32px, 6vw, 80px); }
.services__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(54px, 12vw, 190px); line-height: .9; letter-spacing: -.05em; }
.service { position: relative; display: grid; grid-template-columns: 90px 1.2fr 1fr 48px; gap: clamp(16px, 3vw, 48px); align-items: center; padding: clamp(28px, 4vw, 52px) 0; border-top: 1px solid var(--ink); cursor: default; isolation: isolate; transition: padding .6s var(--ease); }
.service:last-of-type { border-bottom: 1px solid var(--ink); }
.service::before { content: ""; position: absolute; inset: 0 calc(var(--pad) * -1); z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); }
.service:hover::before, .service:focus-within::before { transform: scaleY(1); }
.service:hover { color: var(--paper); padding-inline: 8px; }
.service__num { color: var(--muted); transition: color .4s; }
.service:hover .service__num { color: var(--accent); }
.service h3 { font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 4.6vw, 70px); line-height: 1; letter-spacing: -.04em; }
.service p { margin-top: 12px; color: var(--ink-2); max-width: 36ch; transition: color .4s; }
.service:hover p { color: rgba(246,244,239,.72); }
.service__art { width: min(100%, 260px); justify-self: end; }
.service__art svg { width: 100%; height: auto; overflow: visible; }
.s-stroke { stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.s-fill { fill: var(--accent-deep); stroke: none; }
.service__art .s-draw { transition: transform .7s var(--ease), opacity .5s; transform-box: fill-box; transform-origin: center; }
.service:hover .s-draw { transform: translateY(-4px); }
.service:hover .s-stroke { stroke: var(--paper); }
.service:hover .s-fill { fill: var(--accent); }
.service__arrow { font-size: 32px; justify-self: end; transition: transform .5s var(--ease), color .4s; }
.service:hover .service__arrow { transform: translate(6px, -6px) rotate(0deg); color: var(--accent); }

/* ---------------- Contact ---------------- */
.contact { background: var(--dark); color: #fff; overflow: hidden; border-radius: clamp(24px, 4vw, 56px) clamp(24px, 4vw, 56px) 0 0; }
.contact__glow { position: absolute; width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; right: -15vw; top: -20vw; border-radius: 50%; background: radial-gradient(circle, rgba(255,194,26,.35), rgba(109,94,252,.12) 50%, transparent 70%); filter: blur(70px); pointer-events: none; }
.contact__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(46px, 9.6vw, 160px); line-height: .92; letter-spacing: -.05em; max-width: 12ch; position: relative; }
.contact__lead { margin-top: clamp(24px, 4vw, 48px); max-width: 44ch; color: rgba(255,255,255,.68); font-size: clamp(17px, 1.5vw, 22px); position: relative; }
.contact__details { margin-top: clamp(36px, 6vw, 80px); display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: clamp(28px, 6vw, 96px); position: relative; }
.contact__details > div { border-top: 1px solid rgba(255,255,255,.22); padding-top: 16px; }
.contact__details dt { color: rgba(255,255,255,.5); margin-bottom: 8px; }
.contact__details dd { font-family: var(--f-display); font-weight: 700; font-size: clamp(20px, 2.2vw, 32px); letter-spacing: -.02em; overflow-wrap: anywhere; }
.contact__details a { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease), color .3s; }
.contact__details a:hover { background-size: 100% 2px; color: var(--accent); }
.contact__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(36px, 6vw, 72px); position: relative; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 28px var(--pad) calc(28px + env(safe-area-inset-bottom)); background: var(--dark); color: rgba(255,255,255,.5); border-top: 1px solid rgba(255,255,255,.12); }

/* ---------------- Reveal defaults (set by JS) ---------------- */
html.has-gsap [data-reveal] { opacity: 0; transform: translateY(28px); }
html.has-gsap .line > span { transform: translateY(112%); }

/* Word-mask headings */
.wl { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .1em; margin: 0 -.04em -.1em; }
.wl > span { display: inline-block; will-change: transform; }

/* ---------------- Responsive ---------------- */
@media (min-width: 900px) { .hero__scroll { display: flex; } }
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; margin-left: auto; }
  .hero__row, .about__grid { grid-template-columns: 1fr; }
  .about__copy { position: static; }
  .service { grid-template-columns: 52px 1fr 40px; }
  .service__art { display: none; }
  .contact__details { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .intro__bottom { grid-template-columns: 1fr auto; }
  .intro__bar { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  .btn { padding: 15px 22px; }
  .hero__ctas .btn, .contact__ctas .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .marquee__track { animation: none; }
  .intro { display: none !important; }
  html.has-gsap [data-reveal], html.has-gsap .line > span { opacity: 1; transform: none; }
  .about__statement .w { opacity: 1 !important; }
}
