:root {
  --bg: #070712;
  --bg-2: #0b0a18;
  --surface: #11101f;
  --surface-2: #17132a;
  --surface-3: #1d1735;
  --text: #f7f5ff;
  --muted: #aaa5b8;
  --subtle: #6f6a7c;
  --line: rgba(255,255,255,.11);
  --purple: #8b5cf6;
  --purple-2: #a57cff;
  --blue: #4d8dff;
  --max: 1280px;
  --content: 760px;
  --radius: 28px;
  --shadow: 0 28px 90px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 6%, rgba(77,141,255,.08), transparent 24%),
    linear-gradient(180deg, #080713 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: auto; }
a { color: inherit; }
figure { margin: 0; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  transform: translateY(-160%);
  z-index: 999;
  padding: 10px 14px;
  background: #fff;
  color: #111;
  border-radius: 10px;
}
.skip-link:focus { transform: translateY(0); }

.container {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}
.narrow { max-width: var(--content); }
.section-shell {
  position: relative;
  padding: 120px 0;
  overflow: clip;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--purple-2);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 12px;
  font-size: clamp(4.6rem, 11vw, 10rem);
  line-height: .86;
  letter-spacing: -.018em;
}
h2 {
  margin-bottom: 24px;
  font-size: clamp(2.6rem, 5.4vw, 5.7rem);
  line-height: .98;
  letter-spacing: -.022em;
}
h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
  letter-spacing: -.012em;
}
p { color: var(--muted); }
.lede {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.6;
}
.kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--subtle);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Header */
.site-header {
  position: absolute;
  z-index: 50;
  inset: 0 0 auto;
  padding: 28px 0;
}
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.portfolio-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -.018em;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(16px);
}
.back-link {
  color: #ddd9ea;
  text-decoration: none;
  font-size: .94rem;
}
.back-link:hover { color: #fff; }

/* Hero */
.hero {
  min-height: 980px;
  padding-top: 170px;
  padding-bottom: 0;
}
.hero-copy {
  position: relative;
  z-index: 2;
}
.hero-dek {
  margin-bottom: 22px;
  max-width: 850px;
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.018em;
}
.hero-intro {
  max-width: 700px;
  font-size: 1.18rem;
  line-height: 1.7;
}
.project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 56px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.project-meta div {
  padding: 20px 22px 20px 0;
}
.project-meta div + div {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.project-meta dt {
  margin-bottom: 7px;
  color: var(--subtle);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.project-meta dd {
  margin: 0;
  color: #e8e5ef;
  font-size: .92rem;
}
.hero-phones {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(18px, 3vw, 46px);
  margin-top: 80px;
}
.hero-phones .phone { width: min(28vw, 340px); }
.hero-phones .phone-a { transform: translateY(72px) rotate(-5deg); }
.hero-phones .phone-b { position: relative; z-index: 2; width: min(31vw, 385px); }
.hero-phones .phone-c { transform: translateY(72px) rotate(5deg); }
.hero-glow {
  position: absolute;
  filter: blur(100px);
  opacity: .45;
  border-radius: 50%;
}
.hero-glow-a { width: 560px; height: 560px; right: -180px; top: 90px; background: rgba(77,141,255,.38); }
.hero-glow-b { width: 480px; height: 480px; left: -180px; bottom: 40px; background: rgba(139,92,246,.30); }

/* Phone */
.phone {
  border-radius: 38px;
  overflow: hidden;
  background: #0c0b16;
  box-shadow: var(--shadow);
}
.phone img { border-radius: inherit; }

/* Problem */
.statement { background: linear-gradient(180deg, rgba(255,255,255,.012), transparent); }
.friction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 70px;
}
.friction-card {
  min-height: 260px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.friction-card p {
  margin: 28px 0 0;
  max-width: 520px;
  color: #f3f0fa;
  font-size: clamp(1.6rem, 3.1vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.018em;
}
.friction-card.muted { background: rgba(255,255,255,.025); }
.friction-card.accent {
  background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(77,141,255,.10));
  border-color: rgba(165,124,255,.35);
}

/* Pipeline */
.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 70px;
}
.pipeline-step {
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.025);
}
.pipeline-step span { display: block; color: var(--purple-2); font-size: .75rem; font-weight: 800; }
.pipeline-step strong { display: block; margin-top: 28px; font-size: 1.32rem; }
.pipeline-step small { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; }
.pipeline-arrow { color: var(--subtle); font-size: 1.4rem; }

/* headings + story */
.section-heading {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 72px;
}
.section-heading > p { max-width: 420px; margin-bottom: 18px; }
.phone-story {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.phone-story article { min-width: 0; }
.phone-story .phone { margin-top: 26px; }
.step-number {
  margin-bottom: 12px;
  color: var(--purple-2);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}

/* split stories */
.split {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(54px, 9vw, 140px);
  align-items: start;
}
.split.reverse { grid-template-columns: 1.2fr .8fr; }
.sticky-copy {
  position: sticky;
  top: 72px;
  align-self: start;
}
.sticky-copy blockquote {
  margin: 36px 0;
  padding: 24px 0 24px 24px;
  border-left: 2px solid var(--purple);
  color: #f6f3fb;
  font-size: 1.25rem;
  line-height: 1.6;
}
.transform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.transform-list span {
  padding: 9px 12px;
  border: 1px solid rgba(165,124,255,.25);
  border-radius: 999px;
  color: #d6c4ff;
  background: rgba(139,92,246,.09);
  font-size: .84rem;
}
.visual-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.visual-stack .offset { margin-top: 120px; }

/* features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.022);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  border-radius: 14px;
  background: rgba(139,92,246,.14);
  color: var(--purple-2);
  font-size: 1.35rem;
}
.centered-phone {
  display: flex;
  justify-content: center;
  margin-top: 70px;
}
.centered-phone .large { width: min(390px, 80vw); }

.trio, .duo {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 38px);
  align-items: flex-start;
}
.trio .phone { width: min(29vw, 355px); }
.duo .phone { width: min(38vw, 410px); }

/* patterns */
.pattern-band {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  gap: 70px;
  align-items: center;
  margin-top: 90px;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(139,92,246,.09), rgba(255,255,255,.02));
}
.pattern-copy h3 { font-size: clamp(2rem, 4vw, 4rem); line-height: 1; }
.pattern-phones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

/* system */
.system-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.system-tile {
  min-height: 320px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255,255,255,.022);
  overflow: hidden;
}
.system-tile.tall { grid-row: span 2; padding: 0; }
.system-tile.tall .phone { height: 100%; border-radius: 0; box-shadow: none; }
.system-tile.tall .phone img { height: 100%; object-fit: cover; object-position: top; }
.system-tile .phone.crop { max-width: 390px; margin: 0 auto; box-shadow: none; }
.system-tile h3 { margin-top: 28px; }
.swatch {
  display: inline-block;
  width: 64px;
  height: 64px;
  margin-right: 10px;
  border-radius: 18px;
}
.swatch-1 { background: #070712; border: 1px solid var(--line); }
.swatch-2 { background: #17132a; }
.swatch-3 { background: #8b5cf6; }
.swatch-4 { background: linear-gradient(135deg, #8b5cf6, #4d8dff); }

/* AI workflow */
.ai-process { background: linear-gradient(180deg, rgba(139,92,246,.045), rgba(77,141,255,.025)); }
.ai-toolchain {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 64px;
}
.ai-toolchain article {
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7,7,18,.62);
}
.ai-toolchain article span { color: var(--purple-2); font-size: .72rem; font-weight: 800; }
.ai-toolchain article h3 { margin-top: 38px; }
.ai-toolchain article p { font-size: .9rem; }
.process-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  color: #dcd8e7;
  font-size: .92rem;
}
.process-line span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
}
.process-line i { color: var(--subtle); font-style: normal; }

/* outcome / next */
.outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
}
.outcome-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.outcome-grid li {
  position: relative;
  padding: 18px 0 18px 30px;
  border-bottom: 1px solid var(--line);
  color: #e7e3ef;
}
.outcome-grid li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--purple-2);
}
.next-card {
  padding: clamp(38px, 6vw, 82px);
  border: 1px solid rgba(165,124,255,.28);
  border-radius: 38px;
  background:
    radial-gradient(circle at 80% 20%, rgba(77,141,255,.12), transparent 28%),
    linear-gradient(135deg, rgba(139,92,246,.13), rgba(255,255,255,.025));
}
.next-card p { max-width: 720px; }
.button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), #7442e8);
  color: white;
  text-decoration: none;
  font-weight: 750;
}

/* footer */
.site-footer {
  padding: 40px 0 52px;
  border-top: 1px solid var(--line);
}
.footer-inner strong, .footer-inner span { display: block; }
.footer-inner span { margin-top: 4px; color: var(--subtle); font-size: .86rem; }
.footer-inner a { color: var(--muted); text-decoration: none; }


/* Refinement pass - typography, spacing, polish */
body {
  text-rendering: optimizeLegibility;
}

h1, h2, h3,
.hero-dek,
.friction-card p,
.pattern-copy h3 {
  text-wrap: balance;
}

p,
.project-meta dd,
.feature-card p,
.ai-toolchain article p,
.outcome-grid li {
  text-wrap: pretty;
}

.hero-copy {
  max-width: 1120px;
}

.hero-intro {
  max-width: 760px;
}

.project-meta {
  border-color: rgba(255,255,255,.09);
}

.project-meta div {
  min-height: 112px;
}

.project-meta dd {
  line-height: 1.55;
}

.phone {
  border: 1px solid rgba(255,255,255,.07);
}

.hero-phones .phone-b {
  box-shadow:
    0 42px 120px rgba(0,0,0,.58),
    0 0 0 1px rgba(165,124,255,.05);
}

.friction-card,
.pipeline-step,
.feature-card,
.ai-toolchain article,
.system-tile,
.next-card,
.pattern-band {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.friction-card,
.feature-card,
.pipeline-step,
.ai-toolchain article,
.system-tile {
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

@media (hover:hover) {
  .friction-card:hover,
  .feature-card:hover,
  .pipeline-step:hover,
  .ai-toolchain article:hover,
  .system-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(165,124,255,.22);
    background: rgba(255,255,255,.032);
  }
}

.section-heading > div {
  max-width: 820px;
}

.section-heading > p {
  line-height: 1.7;
}

.phone-story article > p {
  max-width: 28ch;
}

.sticky-copy > p:not(.eyebrow) {
  max-width: 36ch;
}

.pattern-copy p {
  max-width: 34ch;
}

.process-line span {
  line-height: 1.2;
}

.button {
  min-height: 48px;
  padding-inline: 20px;
  box-shadow: 0 14px 40px rgba(116,66,232,.24);
}

.button:hover {
  transform: translateY(-1px);
}

.site-footer {
  background: rgba(255,255,255,.01);
}

@media (max-width: 760px) {
  .hero-dek {
    line-height: 1.12;
  }

  .hero-intro,
  .lede {
    line-height: 1.58;
  }

  .phone-story article > p,
  .sticky-copy > p:not(.eyebrow),
  .pattern-copy p {
    max-width: none;
  }

  .project-meta div {
    min-height: auto;
  }

  .friction-card {
    padding: 28px;
  }

  .feature-card,
  .ai-toolchain article,
  .system-tile {
    padding: 26px;
  }

  .next-card {
    border-radius: 30px;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .section-shell { padding: 96px 0; }
  .project-meta { grid-template-columns: 1fr 1fr; }
  .project-meta div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .project-meta div:nth-child(4) { border-top: 1px solid var(--line); }
  .phone-story { grid-template-columns: 1fr 1fr; gap: 60px 22px; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline-arrow { display: none; }
  .ai-toolchain { grid-template-columns: 1fr 1fr; }
  .ai-toolchain article:last-child { grid-column: 1 / -1; }
  .hero { min-height: auto; }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 32px), var(--max)); }
  .section-shell { padding: 78px 0; }
  .site-header { padding-top: 18px; }
  h1 { font-size: clamp(4.2rem, 23vw, 7rem); }
  h2 { font-size: clamp(2.35rem, 12vw, 4rem); }
  .hero { padding-top: 126px; }
  .hero-intro { font-size: 1.05rem; }
  .project-meta { grid-template-columns: 1fr; }
  .project-meta div, .project-meta div + div {
    padding: 16px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .project-meta div:first-child { border-top: 0; }
  .hero-phones {
    justify-content: flex-start;
    gap: 14px;
    width: calc(100% + 80px);
    margin-left: -40px;
    overflow: hidden;
  }
  .hero-phones .phone,
  .hero-phones .phone-b { flex: 0 0 55vw; width: 55vw; }
  .hero-phones .phone-a { transform: translateY(36px) rotate(-4deg); }
  .hero-phones .phone-c { transform: translateY(36px) rotate(4deg); }
  .friction-grid,
  .section-heading,
  .split,
  .split.reverse,
  .feature-grid,
  .pattern-band,
  .outcome-grid,
  .system-grid { grid-template-columns: 1fr; }
  .friction-card { min-height: 210px; }
  .section-heading { gap: 12px; margin-bottom: 48px; }
  .pipeline { grid-template-columns: 1fr; }
  .phone-story { grid-template-columns: 1fr; }
  .phone-story article {
    display: grid;
    grid-template-columns: 1fr;
  }
  .phone-story .phone { width: min(82vw, 380px); margin-inline: auto; }
  .sticky-copy { position: static; }
  .visual-stack { margin-top: 18px; gap: 12px; }
  .visual-stack .offset { margin-top: 70px; }
  .trio {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
  }
  .trio .phone { flex: 0 0 78vw; width: 78vw; scroll-snap-align: center; }
  .duo { display: grid; grid-template-columns: 1fr; }
  .duo .phone { width: min(82vw, 390px); margin-inline: auto; }
  .pattern-band { padding: 28px 20px; gap: 42px; }
  .pattern-phones { gap: 10px; }
  .system-tile.tall { grid-row: auto; max-height: 700px; }
  .ai-toolchain { grid-template-columns: 1fr; }
  .ai-toolchain article:last-child { grid-column: auto; }
  .process-line { justify-content: flex-start; }
  .process-line i { display: none; }
  .outcome-grid { gap: 34px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 440px) {
  .visual-stack { grid-template-columns: 1fr; }
  .visual-stack .phone { width: 78vw; margin-inline: auto; }
  .visual-stack .offset { margin-top: 0; }
  .pattern-phones { grid-template-columns: 1fr; }
  .pattern-phones .phone { width: 78vw; margin-inline: auto; }
  .swatch { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
