/* ─────────────────────────────────────────────────────────────────────────
   Polished variant — editorial dark
   ──────────────────────────────────────────────────────────────────────── */

body[data-variant="polished"] {
  font-feature-settings: "ss01", "cv11";
}

.p-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 22px 56px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to bottom, rgba(240,236,225,0.85), rgba(240,236,225,0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.p-nav.scrolled {
  background: rgba(240,236,225,0.92);
  border-bottom: 1px solid var(--rule);
}
.p-nav .wordmark {
  font-family: var(--display);
  font-size: 22px; font-weight: 500; letter-spacing: -0.01em;
  font-style: italic;
}
.p-nav ul {
  display: flex; gap: 28px; list-style: none; margin: 0; padding: 0;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
}
.p-nav a { color: var(--ink-dim); text-decoration: none; transition: color .2s ease; }
.p-nav a:hover { color: var(--accent); }
.p-nav .nav-cta {
  font-family: var(--body); font-size: 13px; padding: 10px 18px;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  color: var(--ink); text-decoration: none; transition: all .25s ease;
}
.p-nav .nav-cta:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.p-hero {
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.p-hero .tag {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 36px;
}
.p-hero .tag-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-dim); letter-spacing: 0.06em;
}
.p-hero .tag-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.p-hero h1 {
  font-family: var(--display);
  font-size: clamp(56px, 10vw, 148px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0;
  font-feature-settings: "ss01";
}
.p-hero h1 .accent { font-style: italic; color: var(--accent); font-weight: 400; }
.p-hero h1 .word { display: inline-block; overflow: hidden; vertical-align: bottom; margin-right: 0.22em; }
.p-hero h1 .word:last-child { margin-right: 0; }
.p-hero h1 .word > span { display: inline-block; }

.p-hero .sub {
  max-width: 580px;
  margin: 40px 0 48px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-dim);
}
.p-hero .cta-row {
  display: flex; gap: 14px; flex-wrap: wrap;
}

.p-hero .meta-row {
  position: absolute;
  bottom: 56px; left: 56px; right: 56px;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); letter-spacing: 0.06em;
}
.p-hero .meta-row .col span { display: block; color: var(--ink); font-size: 13px; margin-top: 6px; letter-spacing: 0; font-family: var(--body); }

/* Hero variant: split */
.p-hero[data-h="split"] .hero-grid {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 80px; align-items: end;
}
.p-hero[data-h="split"] h1 { font-size: clamp(48px, 7vw, 110px); }
.p-hero[data-h="split"] .visual {
  aspect-ratio: 3/4;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  position: relative; overflow: hidden;
  border-radius: 2px;
}

/* Hero variant: ticker */
.p-hero[data-h="ticker"] .ticker {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap; overflow: hidden;
}
.p-hero[data-h="ticker"] .ticker-track {
  display: inline-flex; gap: 64px; padding-right: 64px;
  font-family: var(--display); font-style: italic; font-size: 28px;
  font-weight: 300; color: var(--ink-dim);
}
.p-hero[data-h="ticker"] .ticker-track span::before {
  content: '✻'; margin-right: 64px; color: var(--accent); font-style: normal;
}

/* Hero animated background blob */
.hero-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.hero-blob {
  position: absolute;
  width: 900px; height: 900px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.18;
  filter: blur(80px);
  top: -30%; right: -20%;
}
.hero-blob.b2 {
  width: 600px; height: 600px;
  top: auto; right: auto;
  bottom: -20%; left: -10%;
  background: radial-gradient(circle, var(--accent-2, #5a8fc7) 0%, transparent 70%);
  opacity: 0.18;
}

/* ─── About ────────────────────────────────────────────────────────────── */
.p-about {
  padding: 160px 0 120px;
}
.p-about .grid {
  display: grid; grid-template-columns: 1fr 2fr; gap: 80px;
}
.p-about h2 {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 300; line-height: 1; letter-spacing: -0.025em;
  margin: 24px 0 0;
  max-width: 900px;
}
.p-about h2 em { color: var(--accent); font-style: italic; font-weight: 400; }
.p-about .copy {
  font-size: 17px; line-height: 1.65; color: var(--ink-dim); max-width: 56ch;
}
.p-about .copy p + p { margin-top: 20px; }

.p-about .stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 96px;
  padding-top: 56px; border-top: 1px solid var(--rule);
}
.p-about .stat .num {
  font-family: var(--display);
  font-size: 64px; font-weight: 300; line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.p-about .stat .num em { color: var(--accent); font-style: normal; }
.p-about .stat .lbl {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-mute);
  margin-top: 14px;
}

/* ─── Services ─────────────────────────────────────────────────────────── */
.p-services {
  padding: 120px 0;
}
.p-services .head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: end;
  margin-bottom: 80px;
}
.p-services h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -0.025em;
  margin: 24px 0 0;
}
.p-services .head .copy { font-size: 16px; color: var(--ink-dim); line-height: 1.6; max-width: 44ch; }

.p-services .list {
  border-top: 1px solid var(--rule);
}
.p-services .row {
  display: grid; grid-template-columns: 60px 1fr 1.5fr 200px;
  gap: 40px; align-items: center;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  transition: padding .35s ease, background .35s ease;
  cursor: pointer;
  position: relative;
}
.p-services .row:hover { padding: 36px 24px; background: var(--bg-elev); }
.p-services .row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent); transform: scaleY(0); transform-origin: top;
  transition: transform .35s ease;
}
.p-services .row:hover::before { transform: scaleY(1); }
.p-services .row .num {
  font-family: var(--mono); font-size: 12px; color: var(--ink-mute);
  letter-spacing: 0.06em;
}
.p-services .row h3 {
  font-family: var(--display); font-weight: 400;
  font-size: 28px; line-height: 1.1; margin: 0;
  letter-spacing: -0.015em;
}
.p-services .row .desc { font-size: 15px; line-height: 1.5; color: var(--ink-dim); margin: 0; }
.p-services .row .tags {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end;
}
.p-services .row .tag {
  font-family: var(--mono); font-size: 10px; padding: 5px 9px;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  color: var(--ink-dim); letter-spacing: 0.04em;
}

/* ─── Case studies (horizontal) ────────────────────────────────────────── */
.p-cases {
  padding: 120px 0 0;
}
.p-cases-pin {
  height: 100vh;
  overflow: hidden;
  display: flex; align-items: center;
}
.p-cases .head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 64px;
}
.p-cases h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -0.025em;
  margin: 24px 0 0;
}
.p-cases .head .progress {
  font-family: var(--mono); font-size: 12px; color: var(--ink-mute);
  letter-spacing: 0.06em;
}
.p-cases .head .progress .now { color: var(--accent); font-size: 18px; }

.p-cases-track {
  display: flex; gap: 32px;
  padding-left: 56px;
  will-change: transform;
}
.p-case {
  flex: 0 0 720px;
  height: 80vh;
  min-height: 580px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  display: grid; grid-template-rows: 1fr auto;
  position: relative; overflow: hidden;
  border-radius: 2px;
}
.p-case .visual {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-alt), var(--bg));
}
.p-case .visual::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.6;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.p-case .badge {
  position: absolute; top: 24px; left: 24px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 5px 10px;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  background: rgba(240,236,225,0.75); backdrop-filter: blur(8px);
}
.p-case .client {
  position: absolute; top: 24px; right: 24px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--accent); text-transform: uppercase;
}
.p-case .visual .placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-style: italic; font-size: 96px;
  color: var(--ink); opacity: 0.4;
  letter-spacing: -0.03em;
}

.p-case .body {
  padding: 32px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 18px;
  border-top: 1px solid var(--rule);
  background: var(--bg-alt);
}
.p-case .body .role {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--ink-mute); text-transform: uppercase;
}
.p-case .body h3 {
  font-family: var(--display); font-weight: 400;
  font-size: 28px; line-height: 1.15; margin: 0;
  letter-spacing: -0.015em;
}
.p-case .body .desc {
  font-size: 14px; line-height: 1.55; color: var(--ink-dim);
  margin: 0;
}
.p-case .body .metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; padding-top: 20px; border-top: 1px solid var(--rule);
}
.p-case .body .metric .v {
  font-family: var(--display); font-weight: 400;
  font-size: 24px; letter-spacing: -0.02em; color: var(--ink);
}
.p-case .body .metric .v em { color: var(--accent); font-style: normal; }
.p-case .body .metric .k {
  font-family: var(--mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-mute); margin-top: 4px;
}

/* Case studies — stacked layout (alt) */
.p-cases[data-layout="stacked"] .p-cases-track {
  flex-direction: column; padding: 0;
}
.p-cases[data-layout="stacked"] .p-case {
  flex: none; width: 100%; height: auto; min-height: 0;
  grid-template-rows: 400px auto;
  margin-bottom: 24px;
}

/* Case studies — grid layout */
.p-cases[data-layout="grid"] .p-cases-track {
  display: grid; grid-template-columns: repeat(2, 1fr); padding: 0; gap: 24px;
}
.p-cases[data-layout="grid"] .p-case {
  flex: none; width: 100%; height: 560px; min-height: 0;
}

.p-cases-spacer { height: 120px; }

/* ─── How we work (pinned scrollytelling) ──────────────────────────────── */
.p-process {
  padding: 0;
  position: relative;
}
.p-process .pin-wrap {
  height: 400vh;
  position: relative;
}
.p-process .pin-inner {
  position: sticky; top: 0;
  height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
  padding: 0 56px;
}
.p-process .left { position: relative; }
.p-process .eyebrow {
  margin-bottom: 24px;
}
.p-process h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -0.025em;
  margin: 0 0 24px;
}
.p-process h2 .step-num {
  display: inline-block; vertical-align: top;
  font-family: var(--mono); font-size: 14px; color: var(--accent);
  letter-spacing: 0.1em; margin-right: 14px;
  position: relative; top: 16px;
}
.p-process .step-copy {
  font-size: 17px; line-height: 1.6; color: var(--ink-dim);
  max-width: 50ch;
}
.p-process .step {
  position: absolute; top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  opacity: 0;
}
.p-process .step.active { opacity: 1; }

.p-process .dots {
  margin-top: 56px;
  display: flex; gap: 8px;
}
.p-process .dot {
  width: 36px; height: 3px; background: var(--rule-strong); border-radius: 2px;
  transition: background .3s ease;
}
.p-process .dot.active { background: var(--accent); }

.p-process .right {
  position: relative; aspect-ratio: 4/5;
  background: var(--bg-elev); border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.p-process .visual-frame {
  position: absolute; inset: 0;
  opacity: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.p-process .visual-frame.active { opacity: 1; }
.p-process .visual-frame svg { width: 100%; height: 100%; }

/* ─── Skills ───────────────────────────────────────────────────────────── */
.p-skills { padding: 160px 0 120px; }
.p-skills .head { margin-bottom: 64px; }
.p-skills h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -0.025em;
  margin: 24px 0 0;
  max-width: 900px;
}
.p-skills .grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  border-top: 1px solid var(--rule);
}
.p-skills .col {
  padding: 32px 24px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  min-height: 380px;
  position: relative;
  transition: background .35s ease;
}
.p-skills .col:hover { background: var(--bg-elev); }
.p-skills .col:last-child { border-right: 0; }
.p-skills .col .num {
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.08em;
}
.p-skills .col h3 {
  font-family: var(--display); font-weight: 400;
  font-size: 22px; line-height: 1.15; letter-spacing: -0.01em;
  margin: 18px 0 28px;
}
.p-skills .col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.p-skills .col li {
  font-size: 14px; color: var(--ink-dim);
  display: flex; align-items: baseline; gap: 8px;
}
.p-skills .col li::before {
  content: '+'; color: var(--accent-2, var(--accent)); font-family: var(--mono); font-size: 12px;
}

/* ─── Awards ───────────────────────────────────────────────────────────── */
.p-awards { padding: 120px 0; }
.p-awards .row {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.p-awards .award {
  padding: 56px 40px;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 14px;
}
.p-awards .award:last-child { border-right: 0; }
.p-awards .year {
  font-family: var(--mono); font-size: 11px; color: var(--accent-2, var(--accent));
  letter-spacing: 0.1em;
}
.p-awards .award h3 {
  font-family: var(--display); font-weight: 400;
  font-size: 24px; line-height: 1.2; letter-spacing: -0.015em;
  margin: 0;
}
.p-awards .award .lbl {
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ─── Contact ──────────────────────────────────────────────────────────── */
.p-contact {
  padding: 160px 0 100px;
  position: relative; overflow: hidden;
}
.p-contact .container { text-align: center; }
.p-contact h2 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(56px, 9vw, 132px); line-height: 0.95; letter-spacing: -0.035em;
  margin: 32px 0 40px;
  max-width: 14ch; margin-left: auto; margin-right: auto;
}
.p-contact h2 em { color: var(--accent); font-style: italic; font-weight: 400; }
.p-contact .sub {
  max-width: 540px; margin: 0 auto 48px;
  font-size: 18px; color: var(--ink-dim); line-height: 1.6;
}
.p-contact .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.p-foot {
  border-top: 1px solid var(--rule);
  padding: 32px 0;
}
.p-foot .container {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); letter-spacing: 0.06em;
}

/* responsive */
@media (max-width: 980px) {
  .p-about .grid { grid-template-columns: 1fr; gap: 40px; }
  .p-about .stats { grid-template-columns: repeat(2, 1fr); }
  .p-services .head { grid-template-columns: 1fr; gap: 32px; }
  .p-services .row { grid-template-columns: 40px 1fr; gap: 16px; }
  .p-services .row .desc, .p-services .row .tags { display: none; }
  .p-process .pin-inner { grid-template-columns: 1fr; }
  .p-process .right { display: none; }
  .p-skills .grid { grid-template-columns: repeat(2, 1fr); }
  .p-awards .row { grid-template-columns: 1fr; }
  .p-awards .award { border-right: 0; border-bottom: 1px solid var(--rule); }
}

/* ─ Mobile ─ */
@media (max-width: 720px) {
  .p-nav { padding: 14px 20px; }
  .p-nav ul { display: none; }
  .p-nav .nav-cta { font-size: 12px; padding: 8px 14px; }
  .p-nav .wordmark { font-size: 18px; }

  .p-hero { padding: 110px 0 60px; min-height: auto; }
  .p-hero h1 { font-size: clamp(40px, 12vw, 72px); }
  .p-hero .sub { font-size: 16px; margin: 28px 0 32px; }
  .p-hero .cta-row .btn { width: 100%; justify-content: center; }
  .p-hero[data-h="split"] .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .p-hero[data-h="split"] .visual { display: none; }
  .p-hero .ticker { font-size: 12px; }

  .p-about { padding: 80px 0; }
  .p-about h2 { font-size: clamp(36px, 9vw, 56px); }
  .p-about .stats { grid-template-columns: 1fr 1fr; gap: 24px; }
  .p-about .stat .num { font-size: 44px; }

  .p-services { padding: 80px 0; }
  .p-services .head h2 { font-size: clamp(36px, 9vw, 56px); }
  .p-services .row { padding: 24px 0; }
  .p-services .row .num { font-size: 12px; }
  .p-services .row .title { font-size: 22px; }

  .p-cases { padding: 80px 0; }
  .p-cases h2 { font-size: clamp(36px, 9vw, 56px); }
  .p-cases .head { flex-direction: column; align-items: start; gap: 16px; margin-bottom: 40px; }
  /* Disable horizontal pin-scroll on mobile — fall back to a vertical stack */
  .p-cases-pin { height: auto; display: block; overflow: visible; }
  .p-cases-track { flex-direction: column; padding: 0; gap: 20px; transform: none !important; }
  .p-case { flex: none; width: 100%; height: auto; min-height: 0; }
  .p-case .visual { min-height: 240px; }
  .p-case .visual .placeholder { font-size: 64px; }
  .p-case .body { padding: 22px; gap: 14px; }
  .p-case .body h3 { font-size: 22px; }
  .p-case .body .metrics { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .p-case .body .metric .v { font-size: 18px; }
  .p-cases-spacer { display: none; }

  .p-process { padding: 80px 0; }
  .p-process h2 { font-size: clamp(36px, 9vw, 56px); }
  .p-process .step-title { font-size: 28px; }

  .p-skills { padding: 80px 0; }
  .p-skills h2 { font-size: clamp(36px, 9vw, 56px); }
  .p-skills .grid { grid-template-columns: 1fr; gap: 24px; }

  .p-awards { padding: 60px 0; }

  .p-contact { padding: 100px 0; }
  .p-contact h2 { font-size: clamp(44px, 13vw, 88px); }
  .p-contact .cta-row { flex-direction: column; }
  .p-contact .cta-row .btn { width: 100%; justify-content: center; }

  .p-foot { padding: 24px 0; flex-direction: column; gap: 12px; text-align: center; }
}
