/* ==========================================================================
   Yassine Keyou — portfolio
   Editorial precision with product-design polish.
   ========================================================================== */

@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage.woff2") format("woff2-variations"),
       url("/assets/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2-variations"),
       url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  --canvas: #F7F5F0;
  --canvas-deep: #EFECE5;
  --surface: #FFFFFF;
  --ink: #151515;
  --ink-2: #2B2A28;
  --muted: #625F5A;
  --line: #DEDAD2;
  --line-strong: #C9C4B9;
  --accent: #5A3FD6;
  --accent-hover: #4A30C2;
  --accent-soft: #EEE9FF;
  --accent-on-ink: #B9A8FF;
  --success: #1F7A4D;
  --danger: #B42318;

  --display: "Bricolage", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.07rem + 0.3vw, 1.3rem);
  --step-2: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem);
  --step-3: clamp(1.7rem, 1.4rem + 1.4vw, 2.6rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.6vw, 3.9rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: clamp(4.5rem, 3rem + 6vw, 8rem);

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --shadow-frame: 0 1px 2px rgba(21, 21, 21, 0.05), 0 12px 32px -12px rgba(21, 21, 21, 0.18);
  --shadow-lift: 0 1px 2px rgba(21, 21, 21, 0.06), 0 24px 60px -24px rgba(40, 24, 110, 0.32);

  --max: 1200px;
  --max-text: 40rem;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --header-h: 64px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 160ms;
  --med: 240ms;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--fast) var(--ease);
}
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-s);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-3); color: #fff; }

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  --btn-border: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 600 var(--step-0)/1.2 var(--body);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease),
              color var(--fast) var(--ease), transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.btn:hover {
  --btn-bg: var(--accent-hover);
  --btn-border: var(--accent-hover);
  color: var(--btn-fg);
  box-shadow: 0 8px 20px -10px rgba(74, 48, 194, 0.7);
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--line-strong);
}
.btn--ghost:hover {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-border: var(--ink);
  box-shadow: none;
}

.btn--sm { min-height: 44px; padding: 0.55rem 1.05rem; font-size: var(--step--1); }

.btn__arrow { transition: transform var(--fast) var(--ease); }
.btn:hover .btn__arrow, .text-link:hover .btn__arrow { transform: translateX(3px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  min-height: 44px;
}
.text-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--med) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.wordmark:hover { color: var(--ink); }
.wordmark__mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0;
}

.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav__list { display: flex; list-style: none; gap: var(--space-1); }
.nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.8rem;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.nav__list a:hover { background: var(--canvas-deep); color: var(--ink); }
.nav__list a[aria-current] { color: var(--accent); }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav__toggle svg { width: 20px; height: 20px; }
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-open { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

.cta-short { display: none; }

@media (max-width: 739px) {
  .nav__toggle { display: inline-flex; }
  .nav__list {
    position: absolute;
    top: calc(100% + 1px);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--space-2) var(--gutter) var(--space-4);
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -24px rgba(21, 21, 21, 0.35);
  }
  .nav__list[hidden] { display: none; }
  .nav__list a {
    width: 100%;
    min-height: 52px;
    padding: 0 var(--space-2);
    border-radius: var(--radius-s);
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav__list li:last-child a { border-bottom: 0; }
  .cta-full { display: none; }
  .cta-short { display: inline; }
}

@media (min-width: 740px) {
  .nav__list[hidden] { display: flex; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding-block: var(--space-9); }
.section--tight { padding-block: var(--space-8); }
.section--deep { background: var(--canvas-deep); }
.section--surface { background: var(--surface); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow__num {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.eyebrow__num::after {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  margin-left: 0.6rem;
  vertical-align: middle;
  background: var(--line-strong);
}

.section-head {
  display: grid;
  gap: var(--space-4);
  max-width: 48rem;
  margin-bottom: var(--space-7);
}
.section-head h2 { font-size: var(--step-4); }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: var(--step-1); max-width: var(--max-text); }

.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.55; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(2rem, 1rem + 4vw, 4.5rem);
  padding-bottom: var(--space-8);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto 40%;
  height: 90%;
  background: radial-gradient(closest-side, rgba(90, 63, 214, 0.13), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

.hero__copy { display: grid; gap: var(--space-5); }
.hero h1 {
  font-size: var(--step-4);
  font-weight: 680;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero__sub { font-size: var(--step-1); color: var(--muted); max-width: 36rem; line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); padding-top: var(--space-2); }

.identity {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.4rem 1rem 0.4rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  width: fit-content;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(21, 21, 21, 0.04);
}
.identity__text { font-size: 0.9rem; line-height: 1.3; color: var(--muted); }
.identity__text strong { display: block; color: var(--ink); font-weight: 600; }

.avatar {
  position: relative;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), #8B74F0);
  color: #fff;
  display: grid;
  place-items: center;
  font: 700 0.95rem/1 var(--display);
}
.avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.avatar.is-missing img { display: none; }

/* Hero proof stage */
.stage {
  position: relative;
  padding-bottom: 8%;
  padding-right: 6%;
}
.stage__caption {
  margin-top: var(--space-4);
  font-size: var(--step--1);
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stage__caption::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(31, 122, 77, 0.15);
  flex: none;
}

@media (min-width: 980px) {
  .hero__grid { grid-template-columns: 55fr 45fr; gap: var(--space-7); }
  .hero { padding-bottom: var(--space-9); }
}

/* --------------------------------------------------------------------------
   Screenshot frames
   -------------------------------------------------------------------------- */
.browser {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #FBFAF7;
}
.browser__bar span {
  width: 9px; height: 9px;
  border-radius: 999px;
  background: var(--line-strong);
}
.browser__url {
  margin-left: 10px;
  flex: 1;
  max-width: 220px;
  height: 16px;
  border-radius: 999px;
  background: var(--canvas-deep);
  font-size: 10px;
  line-height: 16px;
  padding-inline: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}

.phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28%;
  min-width: 96px;
  padding: 6px;
  background: var(--ink);
  border-radius: 26px;
  box-shadow: var(--shadow-lift);
}
.phone .shot { border-radius: 20px; }

/* A single screenshot. Aspect ratio is set inline so space is reserved (no CLS). */
.shot {
  position: relative;
  overflow: hidden;
  background: var(--canvas-deep);
  aspect-ratio: var(--ratio, 16 / 10);
}
.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.shot__missing { display: none; }
.shot.is-missing img { display: none; }
.shot.is-missing .shot__missing {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.35rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(21, 21, 21, 0.035) 14px 15px),
    var(--canvas-deep);
}
.shot__missing strong { color: var(--ink-2); font-weight: 600; font-size: 0.85rem; }
.shot__missing code { font-size: 0.7rem; word-break: break-all; }

/* --------------------------------------------------------------------------
   Credibility strip
   -------------------------------------------------------------------------- */
.proof-strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.proof-strip__list {
  display: grid;
  list-style: none;
}
.proof-strip__item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--line);
}
.proof-strip__item:last-child { border-bottom: 0; }
.proof-strip__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.proof-strip__icon svg { width: 20px; height: 20px; }
.proof-strip__item strong { display: block; font-weight: 650; line-height: 1.35; }
.proof-strip__item span { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

@media (min-width: 740px) {
  .proof-strip__list { grid-template-columns: repeat(3, 1fr); }
  .proof-strip__item {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: var(--space-6) var(--space-5);
  }
  .proof-strip__item:first-child { padding-left: 0; }
  .proof-strip__item:last-child { border-right: 0; }
}

/* --------------------------------------------------------------------------
   Featured work
   -------------------------------------------------------------------------- */
.feature {
  display: grid;
  gap: var(--space-7);
}
.feature__meta {
  display: grid;
  gap: var(--space-5);
  align-content: start;
}
.feature__meta h3 { font-size: var(--step-3); }
.feature__meta p { color: var(--muted); }

.facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; }

.checks { list-style: none; display: grid; gap: var(--space-3); }
.checks li {
  position: relative;
  padding-left: 1.9rem;
  line-height: 1.5;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.18em;
  width: 1.2rem; height: 1.2rem;
  border-radius: 999px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235A3FD6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.feature__col { display: grid; gap: var(--space-5); align-content: start; }

@media (min-width: 980px) {
  .feature__meta { grid-template-columns: 1.1fr 1fr; gap: var(--space-8); }
}

/* --------------------------------------------------------------------------
   Before / after comparison
   -------------------------------------------------------------------------- */
.compare {
  margin: 0;
  display: grid;
  gap: var(--space-4);
}
.compare__panes {
  display: grid;
  gap: var(--space-4);
}
.compare__pane {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-frame);
}
.compare__pane--after { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.compare__label {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border: 1px solid var(--line);
}
.compare__pane--after .compare__label {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.compare__caption {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 62rem;
}
.compare__caption strong { color: var(--ink); font-weight: 650; }

.compare--mobile .compare__panes { grid-template-columns: 1fr 1fr; max-width: 560px; }

@media (min-width: 740px) {
  .compare__panes { grid-template-columns: 1fr 1fr; }
}

/* --------------------------------------------------------------------------
   Capabilities
   -------------------------------------------------------------------------- */
.cap-grid {
  display: grid;
  gap: var(--space-4);
  list-style: none;
}
.cap {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  transition: border-color var(--med) var(--ease), transform var(--med) var(--ease), box-shadow var(--med) var(--ease);
}
.cap:hover { border-color: var(--line-strong); box-shadow: var(--shadow-frame); }
.cap__num {
  font: 600 0.85rem/1 var(--body);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cap h3 { font-size: var(--step-2); }
.cap ul { list-style: none; display: grid; gap: 0.45rem; }
.cap ul li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.cap ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.cap__evidence {
  margin-top: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-m);
  background: var(--accent-soft);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.cap__evidence b {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.cap__evidence a { font-weight: 600; }

@media (min-width: 740px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.services {
  display: grid;
  gap: var(--space-4);
  list-style: none;
}
.service {
  position: relative;
  display: grid;
  gap: var(--space-4);
  align-content: start;
  padding: var(--space-6);
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--canvas);
}
.service--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.service--primary h3 { color: #fff; }
.service--primary .service__for { color: rgba(255, 255, 255, 0.72); }
.service--primary .service__scope li { color: rgba(255, 255, 255, 0.9); border-color: rgba(255, 255, 255, 0.14); }
.service--primary .service__tag { background: rgba(185, 168, 255, 0.16); color: var(--accent-on-ink); }
.service__tag {
  justify-self: start;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.service h3 { font-size: var(--step-2); }
.service__for { color: var(--muted); }
.service__scope { list-style: none; display: grid; }
.service__scope li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-2);
}

@media (min-width: 980px) {
  .services { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
}

/* --------------------------------------------------------------------------
   Process
   -------------------------------------------------------------------------- */
.steps {
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: step;
  border-top: 1px solid var(--line);
}
.step {
  counter-increment: step;
  display: grid;
  align-content: start;
  grid-template-columns: 3rem 1fr;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--line);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font: 600 0.9rem/1.9 var(--body);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: var(--step-1); margin-bottom: 0.3rem; letter-spacing: -0.015em; }
.step p { color: var(--muted); }

@media (min-width: 980px) {
  .steps { grid-template-columns: repeat(4, 1fr); border-top: 0; gap: var(--space-5); }
  .step {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-5) 0 0;
    border-bottom: 0;
    border-top: 2px solid var(--ink);
  }
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
.portrait {
  position: relative;
  margin: 0;
  border-radius: var(--radius-l);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-width: 460px;
  background: linear-gradient(160deg, #6B52E0, #2A1A7A);
  box-shadow: var(--shadow-lift);
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait__fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: rgba(255, 255, 255, 0.9);
  font: 700 clamp(4rem, 3rem + 5vw, 7rem)/1 var(--display);
  letter-spacing: -0.04em;
}
.portrait.is-missing img { display: none; }
.portrait.is-missing .portrait__fallback { display: grid; }

.about__copy { display: grid; gap: var(--space-5); }
.about__copy h2 { font-size: var(--step-4); }
.about__copy p:not(.eyebrow) { font-size: var(--step-1); line-height: 1.6; color: var(--ink-2); max-width: var(--max-text); }

.meta-list {
  list-style: none;
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-2);
}
.meta-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--ink-2);
}
.meta-list svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.meta-list a { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

@media (min-width: 980px) {
  .about { grid-template-columns: 5fr 7fr; gap: var(--space-8); }
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-layout { display: grid; gap: var(--space-6); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
  padding: var(--space-4) 0;
  cursor: pointer;
  list-style: none;
  font: 600 var(--step-1)/1.35 var(--display);
  letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 32px; height: 32px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23151515' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M10 5v10M5 10h10'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform var(--med) var(--ease), background-color var(--fast) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--accent-soft); }
.faq summary:hover::after { border-color: var(--ink); }
.faq__answer { padding: 0 0 var(--space-5); color: var(--ink-2); max-width: var(--max-text); display: grid; gap: var(--space-3); }

@media (min-width: 980px) {
  .faq-layout { grid-template-columns: 4fr 8fr; gap: var(--space-8); }
  .faq-layout .section-head { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
}

/* --------------------------------------------------------------------------
   Contact (dark)
   -------------------------------------------------------------------------- */
.contact {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% 30%;
  height: 80%;
  background: radial-gradient(closest-side, rgba(122, 96, 240, 0.35), transparent 70%);
  pointer-events: none;
}
.contact .wrap { position: relative; }
.contact__grid { display: grid; gap: var(--space-7); }
.contact h2 { color: #fff; font-size: var(--step-4); max-width: 16ch; }
.contact .eyebrow { color: var(--accent-on-ink); }
.contact .eyebrow__num { color: rgba(255, 255, 255, 0.6); }
.contact .eyebrow__num::after { background: rgba(255, 255, 255, 0.25); }
.contact__intro { display: grid; gap: var(--space-5); align-content: start; }
.contact__intro p:not(.eyebrow) { color: rgba(255, 255, 255, 0.78); font-size: var(--step-1); max-width: 34rem; }
.contact a { color: var(--accent-on-ink); }
.contact a:hover { color: #fff; }
.contact :focus-visible { outline-color: var(--accent-on-ink); }

.promise { list-style: none; display: grid; gap: var(--space-3); padding-top: var(--space-2); }
.promise li {
  display: flex;
  gap: var(--space-3);
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
}
.promise svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--accent-on-ink); }

.form-card {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-l);
  padding: clamp(1.25rem, 0.8rem + 2vw, 2.25rem);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}
.form-card a { color: var(--accent); }
.form-card :focus-visible { outline-color: var(--accent); }

.form { display: grid; gap: var(--space-5); }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .optional { font-weight: 400; color: var(--muted); }
.field .hint { font-size: 0.85rem; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 0.95rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: 400 1rem/1.4 var(--body);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8C8880; }
.field input:hover, .field textarea:hover { border-color: #A9A399; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(90, 63, 214, 0.18);
}
.field[data-invalid] input, .field[data-invalid] textarea { border-color: var(--danger); }
.field__error { display: none; color: var(--danger); font-size: 0.875rem; font-weight: 500; }
.field[data-invalid] .field__error { display: block; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__submit { width: 100%; min-height: 54px; font-size: 1.05rem; }
.form__submit .spinner {
  display: none;
  width: 18px; height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.form[data-state="submitting"] .form__submit .spinner { display: inline-block; }
.form[data-state="submitting"] .form__submit .btn__arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.form__note { font-size: 0.85rem; color: var(--muted); text-align: center; }

.form-status {
  display: none;
  padding: var(--space-4);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.form-status[data-kind="error"] { display: block; background: #FEF3F2; color: #7A271A; border: 1px solid #FECDCA; }

.form-success { display: none; text-align: center; padding: var(--space-6) var(--space-2); }
.form-success h3 { font-size: var(--step-2); margin: var(--space-4) 0 var(--space-3); }
.form-success p { color: var(--muted); }
.form-success__icon {
  margin-inline: auto;
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 999px;
  background: #E7F5EE;
  color: var(--success);
}
.form-card[data-state="success"] .form { display: none; }
.form-card[data-state="success"] .form-success { display: block; }

.alt-contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted);
}
.alt-contact > span { flex-basis: 100%; }
.alt-contact a { font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; }
.alt-contact svg { width: 18px; height: 18px; }

@media (min-width: 980px) {
  .contact__grid { grid-template-columns: 5fr 6fr; gap: var(--space-8); align-items: start; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: var(--space-6);
  font-size: 0.92rem;
}
.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: center;
}
.site-footer strong { color: #fff; font-weight: 600; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.site-footer a { color: rgba(255, 255, 255, 0.85); min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: var(--accent-on-ink); }

.site-footer--light { background: var(--canvas); color: var(--muted); border-top-color: var(--line); }
.site-footer--light strong { color: var(--ink); }
.site-footer--light a { color: var(--ink-2); }
.site-footer--light a:hover { color: var(--accent); }
.site-footer--light :focus-visible { outline-color: var(--accent); }

/* --------------------------------------------------------------------------
   Sticky mobile CTA
   -------------------------------------------------------------------------- */
.dock {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
  display: none;
}
.dock .btn { width: 100%; box-shadow: 0 14px 30px -12px rgba(21, 21, 21, 0.55); }

@media (max-width: 739px) {
  .has-dock .dock {
    display: block;
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform var(--med) var(--ease), opacity var(--med) var(--ease);
  }
  .has-dock.dock-visible .dock { transform: none; opacity: 1; pointer-events: auto; }
  .has-dock .site-footer { padding-bottom: calc(var(--space-6) + 76px); }
}

/* --------------------------------------------------------------------------
   Case study
   -------------------------------------------------------------------------- */
.cs-hero { padding-top: clamp(2rem, 1rem + 4vw, 4.5rem); padding-bottom: var(--space-7); }
.cs-hero__head { display: grid; justify-items: start; gap: var(--space-5); max-width: 54rem; margin-bottom: var(--space-7); }
.cs-hero h1 { font-size: var(--step-4); letter-spacing: -0.035em; }
.crumb { font-size: 0.9rem; color: var(--muted); }
.crumb a { color: var(--muted); font-weight: 500; }
.crumb a:hover { color: var(--accent); }

.cs-glance {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.cs-glance div {
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.25rem;
}
.cs-glance dt {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-glance dd { margin: 0; font-weight: 500; line-height: 1.45; }

@media (min-width: 740px) {
  .cs-glance { grid-template-columns: repeat(2, 1fr); column-gap: var(--space-6); }
}
@media (min-width: 980px) {
  .cs-glance { grid-template-columns: repeat(4, 1fr); }
}

.prose { display: grid; gap: var(--space-4); max-width: var(--max-text); }
.prose p { color: var(--ink-2); line-height: 1.7; }
.prose h3 { font-size: var(--step-2); margin-top: var(--space-4); }

.two-col { display: grid; gap: var(--space-6); }
@media (min-width: 980px) {
  .two-col { grid-template-columns: 4fr 7fr; gap: var(--space-8); }
  .two-col > .section-head { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; margin-bottom: 0; }
}

.issue-list { list-style: none; display: grid; gap: var(--space-4); }
.issue {
  display: grid;
  gap: 0.35rem;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
}
.issue h3 { font-size: var(--step-1); letter-spacing: -0.015em; }
.issue p { color: var(--muted); }

.goal-grid { display: grid; gap: var(--space-5); }
.goal-grid h3 { font-size: var(--step-1); margin-bottom: var(--space-3); }
@media (min-width: 740px) { .goal-grid { grid-template-columns: 1fr 1fr; } }

.decisions { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.decision {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--line);
}
.decision h3 { font-size: var(--step-1); letter-spacing: -0.015em; }
.decision p { color: var(--muted); }
@media (min-width: 740px) {
  .decision { grid-template-columns: 16rem 1fr; gap: var(--space-6); }
}

.story { display: grid; gap: var(--space-6); padding-block: var(--space-8); border-top: 1px solid var(--line); }
.story:first-of-type { border-top: 0; padding-top: 0; }
.story__head { display: grid; gap: var(--space-3); max-width: 48rem; }
.story__head h3 { font-size: var(--step-3); }
.story__index { font: 600 0.9rem/1 var(--body); color: var(--accent); letter-spacing: 0.04em; }
.story__points { display: grid; gap: var(--space-4); list-style: none; }
.story__points li { display: grid; gap: 0.2rem; }
.story__points b {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.story__points span { color: var(--ink-2); }
@media (min-width: 740px) { .story__points { grid-template-columns: repeat(2, 1fr); column-gap: var(--space-6); } }
@media (min-width: 980px) { .story__points { grid-template-columns: repeat(4, 1fr); } }

.hood { display: grid; gap: var(--space-4); list-style: none; }
.hood__item {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  padding: var(--space-5);
  display: grid;
  gap: var(--space-3);
  align-content: start;
}
.hood__item h3 { font-size: var(--step-1); letter-spacing: -0.015em; }
.hood__item > p { color: var(--ink-2); }
.hood__tag {
  justify-self: start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}
.hood details { border-top: 1px solid var(--line); padding-top: var(--space-3); }
.hood summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.hood details p { font-size: 0.92rem; color: var(--muted); padding-bottom: var(--space-2); }
@media (min-width: 740px) { .hood { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); } }

.gallery { display: grid; gap: var(--space-6); list-style: none; }
.gallery figure { margin: 0; display: grid; gap: var(--space-3); }
.gallery .frame {
  border-radius: var(--radius-m);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-frame);
  background: var(--surface);
}
.gallery figcaption { font-size: 0.95rem; color: var(--muted); line-height: 1.5; }
.gallery figcaption strong { color: var(--ink); font-weight: 650; }
.gallery__wide { grid-column: 1 / -1; }
.gallery__phones { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.gallery__phones .frame { border-radius: 26px; padding: 6px; background: var(--ink); border-color: var(--ink); }
.gallery__phones .shot { border-radius: 20px; }
@media (min-width: 740px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.results {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-6);
  border-radius: var(--radius-l);
  background: var(--surface);
  border: 1px solid var(--line);
}
.results .checks li { color: var(--ink-2); }
.note {
  padding: var(--space-4) var(--space-5);
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.cs-next {
  display: grid;
  gap: var(--space-5);
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  border-radius: var(--radius-l);
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cs-next::before {
  content: "";
  position: absolute;
  inset: -50% -20% auto 40%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(122, 96, 240, 0.4), transparent 70%);
  pointer-events: none;
}
.cs-next > * { position: relative; }
.cs-next h2 { color: #fff; font-size: var(--step-3); max-width: 22ch; }
.cs-next p { color: rgba(255, 255, 255, 0.78); font-size: var(--step-1); max-width: 40rem; }
.cs-next :focus-visible { outline-color: var(--accent-on-ink); }
.cs-next .btn--ghost { --btn-fg: #fff; --btn-border: rgba(255, 255, 255, 0.35); }
.cs-next .btn--ghost:hover { --btn-bg: rgba(255, 255, 255, 0.08); --btn-fg: #fff; --btn-border: #fff; }

/* --------------------------------------------------------------------------
   Simple pages (privacy, 404)
   -------------------------------------------------------------------------- */
.simple { padding-block: var(--space-8) var(--space-9); }
.simple .prose { max-width: 44rem; }
.simple h1 { font-size: var(--step-4); margin-bottom: var(--space-3); }
.simple h2 { font-size: var(--step-2); margin-top: var(--space-5); }
.simple ul { padding-left: 1.2rem; display: grid; gap: 0.4rem; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Motion: modest reveal, never hides content without JS or with reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 250ms var(--ease), transform 250ms var(--ease);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .site-header, .dock, .contact::before { display: none; }
}
.feature__col > .btn { justify-self: start; }

/* Instagram-first contact */
.btn svg:not(.btn__arrow) { flex: none; }
.btn--lg { min-height: 56px; padding: 0.9rem 1.6rem; font-size: 1.05rem; }
.contact .btn { color: var(--btn-fg); }
.contact .btn:hover { color: var(--btn-fg); }
.contact__primary { padding-top: var(--space-2); }
.form-card__title { font-size: var(--step-1); letter-spacing: -0.015em; }
.form-card__sub { color: var(--muted); font-size: 0.92rem; margin: 0.25rem 0 var(--space-5); }
.wordmark, .btn { white-space: nowrap; }
@media (max-width: 739px) {
  .site-header .btn--sm svg { display: none; }
}
@media (max-width: 360px) {
  .wordmark span:not(.wordmark__mark) { display: none; }
}
.gallery__phones { max-width: 760px; }

/* Real iPhone frames: mobile screenshots are pre-composited into the device */
.shot--device { background: transparent; overflow: visible; }
.shot--device img { object-fit: contain; filter: drop-shadow(0 18px 30px rgba(21, 21, 21, 0.22)); }
.phone { background: none; padding: 0; border-radius: 0; box-shadow: none; width: 30%; right: -2%; bottom: -4%; }
.phone .shot { border-radius: 0; }
.compare--mobile .compare__panes { max-width: 620px; gap: var(--space-5); }
.compare--mobile .compare__pane { background: none; border: 0; box-shadow: none; overflow: visible; padding-top: 44px; }
.compare--mobile .compare__label { top: 0; left: 50%; transform: translateX(-50%); }
.gallery__phones .frame { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; overflow: visible; }
.gallery__phones .shot { border-radius: 0; }
.feature__col > .text-link { justify-self: start; margin-top: -0.5rem; }
