:root {
  --ink: #0c1624;
  --ink-2: #13233a;
  --ink-line: rgba(255, 255, 255, 0.12);
  --paper: #f5f1ea;
  --paper-2: #ebe5da;
  --line: rgba(12, 22, 36, 0.14);
  --text: #0c1624;
  --muted: #586374;
  --on-ink: #f5f1ea;
  --on-ink-muted: #a9b3c2;
  --coral: #ff5b38;
  --coral-deep: #e8431f;
  --sea: #6fd3c0;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Geist", "Segoe UI", system-ui, sans-serif;

  --text-hero: clamp(2.75rem, 1.2rem + 4.6vw, 5.6rem);
  --text-h2: clamp(2rem, 1.3rem + 3vw, 3.75rem);
  --text-big: clamp(1.5rem, 1.1rem + 1.7vw, 2.4rem);
  --text-lead: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --section: clamp(4.5rem, 3rem + 7vw, 10rem);
  --radius: 14px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 160ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-display); line-height: 0.98; letter-spacing: -0.03em; margin: 0; font-weight: 800; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  color: var(--on-ink);
}
.site-header--paper { position: relative; color: var(--text); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 16px; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; min-height: 44px; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand small { font-weight: 600; opacity: 0.6; font-size: 0.85em; }
.nav { display: flex; align-items: center; gap: clamp(8px, 2vw, 28px); }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; padding: 10px 6px; min-height: 44px; display: inline-flex; align-items: center; opacity: 0.85; transition: opacity var(--fast); }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  background: var(--coral); color: #fff; border: 2px solid var(--coral);
  box-shadow: 0 10px 30px -10px rgba(255, 91, 56, 0.7);
  transition: transform var(--fast) var(--ease-out), background var(--fast), box-shadow var(--fast);
}
.btn:hover { background: var(--coral-deep); border-color: var(--coral-deep); transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(255, 91, 56, 0.85); }
.btn:active { transform: translateY(0); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 0.95rem; box-shadow: none; }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; box-shadow: none; }
.btn--ghost:hover { background: currentColor; border-color: currentColor; }
.btn--ghost:hover span { color: var(--ink); }
.on-paper .btn--ghost:hover span { color: var(--paper); }
.btn .arrow { transition: transform var(--fast) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60% 70% at 78% 45%, rgba(255, 91, 56, 0.22), transparent 70%),
    radial-gradient(50% 60% at 15% 100%, rgba(111, 211, 192, 0.14), transparent 70%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--on-ink);
  min-height: min(100svh, 980px);
  display: flex; align-items: center;
}
.hero::after { /* grain */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 24px; padding-top: 110px; padding-bottom: 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em; color: var(--on-ink-muted); margin-bottom: 26px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sea); box-shadow: 0 0 0 4px rgba(111, 211, 192, 0.2); }
.hero h1 { font-size: var(--text-hero); }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero .lead { font-size: var(--text-lead); color: var(--on-ink-muted); margin-top: 26px; max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero-stage { position: relative; height: clamp(420px, 62vh, 640px); margin-right: calc(var(--gutter) * -1); }
.hero-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; touch-action: pan-y; }
.hero-fallback { position: absolute; inset: 8% 4% 8% 4%; display: none; }
.hero-fallback img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 14px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7); transform: perspective(1200px) rotateY(-14deg) rotateX(6deg); }
.no-webgl .hero-fallback { display: block; }
.no-webgl .hero-stage canvas { display: none; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section--paper2 { background: var(--paper-2); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); flex-wrap: wrap; }
.section-head h2 { font-size: var(--text-h2); }
.kicker { display: block; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--coral); margin-bottom: 18px; }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; min-height: 44px; border-bottom: 2px solid currentColor; }
.link-arrow:hover .arrow { transform: translate(2px, -2px); }
.link-arrow .arrow { transition: transform var(--fast) var(--ease-out); }

/* Get list */
.get { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.get h2 { font-size: var(--text-h2); position: sticky; top: 40px; }
.get-list { list-style: none; margin: 0; padding: 0; counter-reset: get; }
.get-list li {
  counter-increment: get; display: grid; grid-template-columns: 3.2rem 1fr; align-items: baseline;
  padding: clamp(1.25rem, 2.6vw, 2rem) 0; border-top: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-big); letter-spacing: -0.02em; line-height: 1.1;
}
.get-list li:last-child { border-bottom: 1px solid var(--line); }
.get-list li::before { content: "0" counter(get); font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; color: var(--coral); letter-spacing: 0.04em; transform: translateY(-0.35em); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); counter-reset: step; }
.step {
  counter-increment: step; position: relative; padding: clamp(1.75rem, 3vw, 2.5rem); border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--ink-line); min-height: 280px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
}
.step::before {
  content: counter(step); position: absolute; top: -0.12em; right: 0.12em;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(7rem, 12vw, 11rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.16);
}
.steps { align-items: start; }
.step:nth-child(2) { margin-top: clamp(0px, 3vw, 40px); }
.step:nth-child(3) { margin-top: clamp(0px, 6vw, 80px); border-color: rgba(255, 91, 56, 0.45); background: linear-gradient(160deg, rgba(255, 91, 56, 0.18), rgba(255, 91, 56, 0.03)); }
.step h3 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); position: relative; }
.step p { color: var(--on-ink-muted); margin-top: 10px; position: relative; }

/* Price */
.price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.price-figures { display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); flex-wrap: wrap; align-items: flex-end; }
.figure strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(4.5rem, 3rem + 7vw, 9rem); line-height: 0.85; letter-spacing: -0.05em; }
.figure strong sup { font-size: 0.4em; vertical-align: top; position: relative; top: 0.25em; margin-right: 2px; letter-spacing: 0; }
.figure span { display: block; margin-top: 14px; font-weight: 500; color: var(--muted); }
.figure--accent strong { color: var(--coral); }
.price-card { background: #fff; border-radius: 24px; padding: clamp(1.75rem, 4vw, 3rem); box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(12, 22, 36, 0.45); }
.price-card ul { list-style: none; margin: 0 0 28px; padding: 0; }
.price-card li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 500; font-size: 1.1rem; }
.price-card li::before { content: ""; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--sea) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c1624' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
.price-card .btn { width: 100%; }

/* Work cards */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
.work-card { text-decoration: none; display: block; perspective: 1200px; }
.work-card .frame {
  position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink);
  box-shadow: 0 30px 60px -35px rgba(12, 22, 36, 0.6);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d;
  transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.work-card:hover .frame { box-shadow: 0 40px 80px -35px rgba(12, 22, 36, 0.75); }
.work-card .frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 700ms var(--ease-out); }
.work-card:hover .frame img { transform: scale(1.03); }
.work-card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 18px; }
.work-card h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); }
.work-card .meta span { color: var(--muted); font-weight: 500; }

/* Work page projects */
.page-hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem); }
.page-hero h1 { font-size: clamp(3.5rem, 2rem + 8vw, 9rem); }
.project { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding: clamp(3rem, 6vw, 6rem) 0; border-top: 1px solid var(--line); }
.project:nth-of-type(even) .shots { order: 2; }
.shots { position: relative; padding: 0 9% 9% 0; perspective: 1400px; }
.shots .desk {
  border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(12, 22, 36, 0.65);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 500ms var(--ease-out);
}
.shots .desk img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shots .phone {
  position: absolute; right: 0; bottom: 0; width: 26%; aspect-ratio: 9 / 19.5;
  border-radius: clamp(14px, 2.4vw, 28px); overflow: hidden; background: var(--ink);
  border: clamp(4px, 0.6vw, 7px) solid var(--ink);
  box-shadow: 0 30px 50px -20px rgba(12, 22, 36, 0.6);
  transform: translate3d(calc(var(--ry, 0deg) * 1.4), calc(var(--rx, 0deg) * -1.4), 0); transition: transform 500ms var(--ease-out);
}
.shots .phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.project h2 { font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); }
.project .type { color: var(--muted); font-weight: 500; font-size: 1.1rem; margin-top: 12px; }
.project .btn { margin-top: 30px; }

/* ---------- Footer / contact ---------- */
.contact { background: var(--ink); color: var(--on-ink); padding: var(--section) 0 40px; position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; right: -20vw; top: -30vw; border-radius: 50%; background: radial-gradient(circle, rgba(255, 91, 56, 0.25), transparent 65%); pointer-events: none; }
.contact h2 { font-size: clamp(3rem, 1.6rem + 7vw, 8rem); position: relative; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-top: clamp(2rem, 4vw, 3rem); position: relative; }
.contact .email { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 0.9rem + 1.6vw, 2.2rem); letter-spacing: -0.02em; text-decoration: none; border-bottom: 2px solid rgba(245, 241, 234, 0.35); transition: border-color var(--fast); overflow-wrap: anywhere; min-height: 44px; display: inline-flex; align-items: center; }
.contact .email:hover { border-color: var(--coral); }
.footer-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(4rem, 9vw, 8rem); padding-top: 28px; border-top: 1px solid var(--ink-line); color: var(--on-ink-muted); font-size: 0.95rem; position: relative; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: 90ms; }
.js .reveal-d2 { transition-delay: 180ms; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 112px; padding-bottom: 24px; gap: 8px; }
  .hero .lead { max-width: 34ch; }
  .hero-stage { height: clamp(320px, 88vw, 520px); margin: 0 calc(var(--gutter) * -1); }
  .get { grid-template-columns: 1fr; }
  .get h2 { position: static; }
  .steps { grid-template-columns: 1fr; }
  .step, .step:nth-child(2), .step:nth-child(3) { margin-top: 0; min-height: 200px; }
  .price { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; gap: 2rem; }
  .project:nth-of-type(even) .shots { order: 0; }
}
@media (max-width: 520px) {
  .nav a.hide-sm { display: none; }
  .brand small { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .get-list li { grid-template-columns: 2.6rem 1fr; }
}

@media (max-width: 400px) {
  .site-header .wrap { gap: 8px; }
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand svg { width: 28px; height: 28px; }
  .nav { gap: 4px; }
  .btn--sm { padding: 0 14px; font-size: 0.9rem; }
}

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