/* ===========================================================================
   Thirteen Studio — marketing site design system.
   Brand: Ink canvas, Paper text, Crimson signature accent, Gold spark motif.
   One cohesive declarative stylesheet (brand asset, not logic).
   =========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Inter:wght@400;500&display=swap');

:root {
  --ink: #0d0d11;
  --ink-2: #14141a;
  --ink-3: #1c1c24;
  --paper: #f6f3ea;
  --paper-dim: #b8b4a8;
  --paper-mute: #7d7a72;
  --crimson: #8a2432;
  --crimson-lite: #b83a4c;
  --gold: #e5b64a;
  --gold-deep: #c9993a;
  --line: rgba(246, 243, 234, 0.10);
  --line-2: rgba(246, 243, 234, 0.18);
  --display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink); color: var(--paper); font-family: var(--body);
  font-size: 17px; line-height: 1.65; overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--crimson-lite); color: var(--paper); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.eyebrow {
  font-family: var(--display); font-size: 12.5px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); opacity: 0.6; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -0.02em; }
.display { font-size: clamp(44px, 8.5vw, 118px); line-height: 0.98; letter-spacing: -0.035em; }
.h-sec { font-size: clamp(32px, 5vw, 62px); }
.lead { font-size: clamp(18px, 2.1vw, 23px); line-height: 1.5; color: var(--paper-dim); max-width: 40ch; }
.crimson { color: var(--crimson-lite); } .gold { color: var(--gold); }
.serif-note { font-family: var(--display); font-weight: 400; font-style: normal; }

/* --- spark mark --- */
.spark { display: inline-block; }
.spark path { fill: currentColor; }

/* --- buttons --- */
.btn {
  font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--paper); background: transparent;
  transition: all 0.4s var(--ease); cursor: pointer;
}
.btn:hover { border-color: var(--paper); transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn--gold:hover { background: var(--paper); border-color: var(--paper); }
.btn .arw { transition: transform 0.4s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

/* --- nav --- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; padding: 20px 0;
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(13, 13, 17, 0.72); backdrop-filter: blur(14px); padding: 13px 0; border-bottom-color: var(--line); }
.nav__in { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -0.03em; }
.brand .spark { color: var(--gold); width: 26px; height: 26px; }
.brand .dot { color: var(--crimson-lite); }
.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__links a { font-family: var(--display); font-size: 14.5px; color: var(--paper-dim); transition: color 0.3s; }
.nav__links a:hover { color: var(--paper); }
.nav__toggle { display: none; background: none; border: 0; color: var(--paper); cursor: pointer; }

/* --- hero --- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 120px 0 80px; }
.hero__spark {
  position: absolute; right: -8vw; top: 50%; transform: translateY(-50%);
  width: min(80vh, 760px); color: var(--gold); opacity: 0.9;
  animation: float 9s ease-in-out infinite; will-change: transform;
}
.hero__spark .spark { filter: drop-shadow(0 0 80px rgba(229, 182, 74, 0.28)); }
.hero__glow { position: absolute; right: 4vw; top: 50%; width: 620px; height: 620px; transform: translateY(-50%);
  background: radial-gradient(circle, rgba(138, 36, 50, 0.35), transparent 62%); pointer-events: none; }
.hero__content { position: relative; z-index: 2; max-width: 920px; }
.hero h1 { font-size: clamp(40px, 6.6vw, 90px); margin: 22px 0; max-width: 15ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.scrollcue { position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); font-family: var(--display);
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-mute); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scrollcue span { width: 1px; height: 40px; background: linear-gradient(var(--gold), transparent); animation: cue 2s ease-in-out infinite; }

/* --- section rhythm --- */
section { position: relative; }
.band { padding: clamp(90px, 13vw, 180px) 0; }
.band--line { border-top: 1px solid var(--line); }
.sec-head { max-width: 720px; margin-bottom: 64px; }
.sec-head h2 { margin: 20px 0 22px; }

/* --- manifesto --- */
.manifesto p { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 4vw, 52px); line-height: 1.2; letter-spacing: -0.02em; max-width: 20ch; }
.manifesto .muted { color: var(--paper-mute); }
.manifesto .kk { color: var(--paper); }

/* --- capability grid --- */
.caps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.cap { background: var(--ink); padding: 40px; transition: background 0.4s var(--ease); }
.cap:hover { background: var(--ink-2); }
.cap__n { font-family: var(--display); font-size: 13px; color: var(--gold); letter-spacing: 0.1em; }
.cap h3 { font-size: 25px; margin: 16px 0 10px; }
.cap p { color: var(--paper-dim); font-size: 15.5px; }

/* --- value / why --- */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
.val__num { font-family: var(--display); font-weight: 700; font-size: 46px; color: var(--gold); letter-spacing: -0.03em; }
.val h3 { font-size: 19px; margin: 14px 0 8px; }
.val p { font-size: 15px; color: var(--paper-dim); }

/* --- portfolio card --- */
.work-card { position: relative; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--ink-2); }
.work-card__vis { aspect-ratio: 16 / 8; background:
    radial-gradient(circle at 78% 42%, rgba(229,182,74,0.16), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(138,36,50,0.30), transparent 50%), var(--ink); position: relative; overflow: hidden; }
.work-card__vis .spark { position: absolute; right: 8%; top: 50%; transform: translateY(-50%); width: 42%; color: var(--gold); opacity: 0.55; }
.work-card__body { padding: 34px 40px 40px; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: flex-end; }
.work-card h3 { font-size: 34px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { font-family: var(--display); font-size: 12.5px; color: var(--paper-dim); border: 1px solid var(--line-2); padding: 6px 13px; border-radius: 100px; }
.pill-live { font-family: var(--display); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); display: inline-flex; align-items: center; gap: 8px; }
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(229,182,74,0.6); animation: pulse 2.2s infinite; }

/* --- principles --- */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle { background: var(--ink); padding: 46px 40px; display: flex; gap: 26px; align-items: baseline; transition: background 0.4s; }
.principle:hover { background: var(--ink-2); }
.principle__n { font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--crimson-lite); }
.principle h3 { font-size: 28px; margin-bottom: 10px; }
.principle p { color: var(--paper-dim); font-size: 15.5px; max-width: 34ch; }

/* --- process --- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 20px; }
.step { padding: 28px 22px 0; border-top: 2px solid var(--line-2); position: relative; }
.step.act { border-top-color: var(--gold); }
.step__n { font-family: var(--display); font-size: 13px; color: var(--gold); }
.step h3 { font-size: 20px; margin: 12px 0 8px; }
.step p { font-size: 14px; color: var(--paper-dim); }

/* --- CTA / contact --- */
.cta { text-align: center; position: relative; overflow: hidden; }
.cta__spark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 620px; color: var(--crimson); opacity: 0.12; }
.cta h2 { position: relative; margin-bottom: 28px; }
.cta__row { position: relative; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* --- footer --- */
.foot { border-top: 1px solid var(--line); padding: 60px 0 46px; }
.foot__top { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.foot__links { display: flex; flex-wrap: wrap; gap: 26px; font-family: var(--display); font-size: 14.5px; }
.foot__links a { color: var(--paper-dim); } .foot__links a:hover { color: var(--paper); }
.foot__base { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; margin-top: 44px; color: var(--paper-mute); font-size: 13.5px; }

/* --- reveal animation --- */
.rv { opacity: 0; transform: translateY(34px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv-2 { transition-delay: 0.08s; } .rv-3 { transition-delay: 0.16s; } .rv-4 { transition-delay: 0.24s; }

@keyframes float { 0%, 100% { transform: translateY(-50%) rotate(0deg); } 50% { transform: translateY(-56%) rotate(8deg); } }
@keyframes cue { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(229,182,74,0); } 100% { box-shadow: 0 0 0 0 rgba(229,182,74,0); } }

/* --- responsive --- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__links.open { display: flex; position: fixed; inset: 62px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(13,13,17,0.96); backdrop-filter: blur(14px); padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__links.open a { padding: 15px clamp(20px,5vw,48px); width: 100%; }
  .nav__toggle { display: block; }
  .caps, .why, .principles, .steps { grid-template-columns: 1fr; }
  .hero__spark { width: 90vw; right: -30vw; opacity: 0.5; }
  .why { gap: 34px 24px; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .why { grid-template-columns: 1fr; } .principle { flex-direction: column; gap: 10px; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
