/* ==========================================================================
   Syed Faizan Amjad — Portfolio
   Design tokens, base, components, pages
   ========================================================================== */

:root {
  /* Palette: warm off-white canvas, near-black ink, indigo accent */
  --bg: #faf9f6;
  --bg-elev: #ffffff;
  --bg-soft: #f2f0ea;
  --ink: #121216;
  --ink-2: #3f3f48;
  --ink-3: #6f6f7a;
  --line: rgba(18, 18, 22, 0.09);
  --line-strong: rgba(18, 18, 22, 0.16);

  --accent: #4f46e5;        /* indigo 600 */
  --accent-deep: #3730a3;   /* indigo 800 */
  --accent-soft: #e8e6fb;   /* indigo tint */
  --accent-glow: rgba(79, 70, 229, 0.18);
  --violet: #7c3aed;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-sm: 0 1px 2px rgba(18, 18, 22, 0.05), 0 2px 8px rgba(18, 18, 22, 0.04);
  --shadow: 0 2px 6px rgba(18, 18, 22, 0.05), 0 14px 34px -12px rgba(18, 18, 22, 0.14);
  --shadow-lg: 0 6px 16px rgba(18, 18, 22, 0.06), 0 34px 70px -24px rgba(18, 18, 22, 0.22);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 48px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent-soft); color: var(--accent-deep); }

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.accent { color: var(--accent); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section {
  padding-block: clamp(72px, 9vw, 120px);
}
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--soft { background: var(--bg-soft); }

.section-head {
  display: grid;
  gap: 18px;
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 46px);
}
.section-head p {
  font-size: 18px;
  color: var(--ink-2);
}
.section-head--split {
  max-width: none;
  grid-template-columns: 1fr auto;
  align-items: end;
}
.section-head--split .head-copy { display: grid; gap: 18px; max-width: 720px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.35s var(--ease), background 0.25s, box-shadow 0.35s var(--ease), border-color 0.25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary { --btn-bg: var(--accent); --btn-fg: #fff; }
.btn--primary:hover { background: var(--accent-deep); box-shadow: 0 12px 28px -10px var(--accent-glow), var(--shadow); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--bg-elev); border-color: var(--ink); }
.btn--sm { padding: 10px 16px; font-size: 14px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Header / Nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(250, 249, 246, 0.88); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px -6px var(--accent-glow);
}
.brand-text { display: grid; line-height: 1.15; }
.brand-text small { font-size: 12px; font-weight: 500; color: var(--ink-3); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--bg-soft); font-weight: 600; }

.nav-cta { display: inline-flex; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-elev);
  cursor: pointer;
  place-items: center;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(40px, 5vw, 72px) clamp(48px, 6vw, 88px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60vw;
  max-width: 820px;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.16), rgba(124, 58, 237, 0.06) 55%, transparent 75%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}

.hero-copy { display: grid; gap: 20px; }
.hero h1 {
  font-size: clamp(40px, 4.8vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 14ch;
}
.hero h1 .serif { font-size: 1.08em; color: var(--accent); }
.hero-lede {
  font-size: clamp(17px, 1.5vw, 19.5px);
  color: var(--ink-2);
  max-width: 54ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  width: fit-content;
  box-shadow: var(--shadow-sm);
}
.availability .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16); }
  50% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0.07); }
}

/* Portrait card */
.hero-visual { position: relative; }
.portrait-card {
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  aspect-ratio: 4 / 4.6;
}
.portrait-card picture { display: block; width: 100%; height: 100%; }
.portrait-card img,
.portrait-card .portrait-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.portrait-placeholder {
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(79, 70, 229, 0.22), transparent 55%),
    radial-gradient(90% 90% at 100% 100%, rgba(124, 58, 237, 0.18), transparent 60%),
    linear-gradient(180deg, #f6f5ff, #ecebf7);
}
.portrait-placeholder .initials {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(96px, 12vw, 150px);
  color: var(--accent-deep);
  opacity: 0.85;
  line-height: 1;
}
.portrait-card .caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(18, 18, 22, 0.86);
  color: #fff;
  font-size: 13.5px;
  backdrop-filter: blur(8px);
}
.portrait-card .caption strong { display: block; font-weight: 600; }
.portrait-card .caption span { color: rgba(255, 255, 255, 0.7); font-size: 12.5px; }

.float-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.float-chip .chip-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}
.float-chip .chip-icon svg { width: 15px; height: 15px; }
.float-chip small { display: block; font-weight: 500; color: var(--ink-3); font-size: 11.5px; }
.float-chip--tl { top: 8%; left: -8%; }
.float-chip--br { bottom: 24%; right: -9%; animation-delay: -3s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --------------------------------------------------------------------------
   Trust strip
   -------------------------------------------------------------------------- */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 22px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
}
.trust-label { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.trust-items { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.trust-items li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.trust-items svg { width: 18px; height: 18px; color: var(--accent); }

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat {
  padding: 26px 26px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-value {
  font-size: clamp(34px, 3.6vw, 46px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.stat-value sup { font-size: 0.5em; color: var(--accent); vertical-align: top; top: 0.2em; position: relative; }
.stat-label { font-size: 14.5px; color: var(--ink-3); font-weight: 500; }

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.service {
  position: relative;
  padding: 30px 28px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  align-content: start;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}
.service::after {
  content: "";
  position: absolute;
  inset: auto -30% -40% auto;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(79, 70, 229, 0.3); }
.service:hover::after { opacity: 1; }
.service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.service-icon svg { width: 22px; height: 22px; }
.service h3 { font-size: 21px; }
.service p { color: var(--ink-2); font-size: 15.5px; }
.service ul { display: grid; gap: 8px; margin-top: 4px; }
.service li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.service li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
.service-num {
  position: absolute;
  top: 26px;
  right: 26px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-3);
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Case study cards (home) & detailed cases (work)
   -------------------------------------------------------------------------- */
.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.case-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.case-card:hover .case-cover::after { transform: scale(1.06); }
.case-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 24px;
}
.case-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transition: transform 0.8s var(--ease);
}
.case-cover--a::after { background: linear-gradient(135deg, #eef0ff 0%, #dcd8fb 50%, #f6f0ff 100%); }
.case-cover--b::after { background: linear-gradient(135deg, #e9f6f2 0%, #d7ece6 55%, #eef7f4 100%); }
.case-cover--c::after { background: linear-gradient(135deg, #fff2e8 0%, #fde3cf 55%, #fff6ee 100%); }
.case-cover--d::after { background: linear-gradient(135deg, #eef4ff 0%, #d9e5fb 55%, #f1f6ff 100%); }
.case-cover .tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(18, 18, 22, 0.08);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.case-cover .mini {
  width: 100%;
  max-width: 260px;
  display: grid;
  gap: 8px;
}
.mini-bar {
  height: 10px;
  border-radius: 6px;
  background: rgba(18, 18, 22, 0.1);
  overflow: hidden;
}
.mini-bar > span { display: block; height: 100%; border-radius: 6px; background: var(--accent); opacity: 0.85; }
.mini-row { display: flex; gap: 8px; align-items: center; }
.mini-row .pill { flex: 1; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(18, 18, 22, 0.06); }
.mini-row .pill.on { background: var(--accent); opacity: 0.9; }

.case-body { padding: 24px 24px 26px; display: grid; gap: 12px; align-content: start; }
.case-body h3 { font-size: 20px; }
.case-body p { color: var(--ink-2); font-size: 15px; }
.case-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
}
.case-body .link-arrow { margin-top: 6px; }

/* Detailed case (work page) */
.case-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(28px, 3.5vw, 44px);
  border-radius: var(--radius-xl);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  scroll-margin-top: 100px;
}
.case-detail + .case-detail { margin-top: 22px; }
.case-detail .case-intro { display: grid; gap: 16px; align-content: start; }
.case-detail h3 { font-size: clamp(24px, 2.6vw, 32px); }
.case-detail .case-intro p { color: var(--ink-2); }
.case-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}
.fact { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.fact small { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.fact span { font-size: 15px; font-weight: 500; }

.case-blocks { display: grid; gap: 22px; align-content: start; }
.case-block h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.case-block p, .case-block li { color: var(--ink-2); font-size: 15.5px; }
.case-block ul { display: grid; gap: 8px; }
.case-block li { position: relative; padding-left: 22px; }
.case-block li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
}
.outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.outcome {
  padding: 16px 16px 14px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.outcome strong { font-size: 20px; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
.outcome span { font-size: 13px; color: var(--ink-3); }

/* --------------------------------------------------------------------------
   Process
   -------------------------------------------------------------------------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 28px 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  align-content: start;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 30px;
  color: var(--accent);
  line-height: 1;
}
.step h3 { font-size: 19px; }
.step p { font-size: 15px; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Proof / rating block
   -------------------------------------------------------------------------- */
.proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(32px, 4.5vw, 56px);
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.proof::before {
  content: "";
  position: absolute;
  inset: auto auto -40% -10%;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.55), transparent);
  filter: blur(20px);
  pointer-events: none;
}
.proof > * { position: relative; }
.proof h2 { color: #fff; font-size: clamp(28px, 3.6vw, 40px); }
.proof p { color: rgba(255, 255, 255, 0.72); font-size: 17px; }
.proof .eyebrow { color: #a5b4fc; }
.proof .eyebrow::before { background: #a5b4fc; }
.proof-copy { display: grid; gap: 18px; }
.proof-copy .btn--ghost { --btn-fg: #fff; border-color: rgba(255, 255, 255, 0.3); }
.proof-copy .btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; }

.rating-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rating {
  padding: 22px 22px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 6px;
}
.rating strong { font-size: clamp(30px, 3vw, 38px); letter-spacing: -0.03em; line-height: 1; }
.rating strong.rating-text { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; line-height: 1.15; }
.rating span { font-size: 14px; color: rgba(255, 255, 255, 0.65); }
.stars { display: inline-flex; gap: 3px; color: #fbbf24; margin-bottom: 4px; }
.stars svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px 48px;
  padding: clamp(32px, 4.5vw, 56px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(124, 58, 237, 0.16), transparent 60%),
    linear-gradient(135deg, #ffffff, #f3f1ff);
  border: 1px solid rgba(79, 70, 229, 0.2);
}
.cta-band h2 { font-size: clamp(28px, 3.6vw, 40px); }
.cta-band p { color: var(--ink-2); font-size: 17px; margin-top: 10px; max-width: 56ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 44px 32px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.footer-grid p { color: var(--ink-3); font-size: 14.5px; max-width: 40ch; margin-top: 12px; }
.footer-col h4 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.footer-col ul { display: grid; gap: 9px; }
.footer-col a { font-size: 15px; color: var(--ink-2); transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-3);
}

.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-2);
  transition: transform 0.3s var(--ease), color 0.2s, border-color 0.2s, background 0.2s;
}
.socials a:hover { transform: translateY(-2px); color: var(--accent); border-color: rgba(79, 70, 229, 0.4); background: #fff; }
.socials svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Page hero (Work / Contact)
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  padding-block: clamp(56px, 7vw, 96px) clamp(40px, 5vw, 64px);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -10%;
  width: 50vw;
  max-width: 700px;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.12), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.page-hero .container { position: relative; display: grid; gap: 20px; max-width: 820px; margin-inline: auto; }
.page-hero h1 { font-size: clamp(38px, 5.4vw, 62px); letter-spacing: -0.03em; line-height: 1.04; }
.page-hero h1 .serif { color: var(--accent); }
.page-hero p { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); max-width: 60ch; }
.page-hero--left .container { margin-inline: auto; max-width: none; }

/* Sub-nav (work page jump links) */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.subnav a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.2s;
}
.subnav a:hover { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------------------------
   Timeline (work page)
   -------------------------------------------------------------------------- */
.timeline { display: grid; gap: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(79, 70, 229, 0.08));
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 0 0 36px 40px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-when { font-size: 14px; font-weight: 600; color: var(--ink-3); padding-top: 6px; letter-spacing: 0.02em; }
.tl-when span { display: block; font-weight: 500; color: var(--accent); margin-top: 4px; font-size: 13px; }
.tl-card {
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.tl-card h3 { font-size: 20px; }
.tl-card .org { font-size: 15px; color: var(--ink-3); font-weight: 500; }
.tl-card p { color: var(--ink-2); font-size: 15.5px; }
.tl-card ul { display: grid; gap: 6px; margin-top: 4px; }
.tl-card li { position: relative; padding-left: 18px; font-size: 15px; color: var(--ink-2); }
.tl-card li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.7; }
.tl-card .case-meta { margin-top: 6px; }

/* --------------------------------------------------------------------------
   Skills grid
   -------------------------------------------------------------------------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-group {
  padding: 26px 26px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
  align-content: start;
}
.skill-group h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.skill-group h3 svg { width: 20px; height: 20px; color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 0.2s;
}
.tags li:hover { border-color: rgba(79, 70, 229, 0.4); color: var(--accent); background: var(--accent-soft); }

/* Education / creds */
.creds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cred {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  align-content: start;
}
.cred .cred-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 6px;
}
.cred .cred-icon svg { width: 20px; height: 20px; }
.cred h3 { font-size: 18px; }
.cred p { color: var(--ink-2); font-size: 15px; }
.cred small { color: var(--ink-3); font-size: 13.5px; font-weight: 500; }

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.contact-side { display: grid; gap: 28px; position: sticky; top: 100px; }
.contact-card {
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.contact-card h3 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.contact-card a.big { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); transition: color 0.2s; }
.contact-card a.big:hover { color: var(--accent); }
.contact-card p { color: var(--ink-2); font-size: 15px; }
.contact-list { display: grid; gap: 12px; }
.contact-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  transition: transform 0.3s var(--ease), border-color 0.2s, box-shadow 0.3s var(--ease);
}
.contact-list a:hover { transform: translateY(-2px); border-color: rgba(79, 70, 229, 0.4); box-shadow: var(--shadow-sm); }
.contact-list .ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.contact-list .ic svg { width: 18px; height: 18px; }
.contact-list strong { display: block; font-size: 15px; }
.contact-list span { font-size: 13.5px; color: var(--ink-3); }
.contact-list .go { margin-left: auto; color: var(--ink-3); }
.contact-list .go svg { width: 16px; height: 16px; }

.form-card {
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: var(--radius-xl);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.form-card h2 { font-size: 26px; margin-bottom: 6px; }
.form-card > p { color: var(--ink-2); font-size: 15.5px; margin-bottom: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field label .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 15.5px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236f6f7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background: #fff;
}
.field input::placeholder, .field textarea::placeholder { color: #a3a3ad; }
.field .error-msg { display: none; font-size: 13px; color: #dc2626; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #dc2626; }
.field.has-error .error-msg { display: block; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

.form-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 6px;
}
.form-foot small { color: var(--ink-3); font-size: 13px; flex: 1 1 auto; min-width: 0; max-width: 46ch; }
.form-foot .btn { flex: 0 0 auto; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }

.form-status {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
}
.form-status.is-success { display: block; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.form-status.is-error { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* --------------------------------------------------------------------------
   Reveal animations
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-chip, .availability .dot { animation: none; }
  .btn, .stat, .service, .case-card { transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .services, .cases, .skills, .creds { grid-template-columns: repeat(2, 1fr); }
  .float-chip--tl { left: -2%; }
  .float-chip--br { right: -2%; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; }
  .hero h1 { max-width: none; }
  .case-detail { grid-template-columns: 1fr; }
  .proof { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-head--split { grid-template-columns: 1fr; align-items: start; }
  .tl-item { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { height: 68px; }
  .nav-toggle { display: grid; }
  .nav-cta { display: none; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px var(--gutter) 20px;
    background: rgba(250, 249, 246, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.3s var(--ease);
  }
  .nav-links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 13px 14px; font-size: 16px; }
  .nav-links .btn { margin-top: 6px; justify-content: center; }
  .brand-text small { display: none; }

  .services, .cases, .skills, .creds, .process, .stats { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: 1fr; }
  .rating-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 26px; }
  .float-chip--tl { top: -22px; left: 0; }
  .float-chip--br { bottom: 30%; right: 0; }
  .portrait-card .caption > span:last-child { display: none; }
  .portrait-card .caption { left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; }
  .case-facts { grid-template-columns: 1fr 1fr; }
  .trust-row { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .rating-grid { grid-template-columns: 1fr; }
  .form-foot { flex-wrap: wrap; }
  .form-foot .btn { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .float-chip { font-size: 12px; padding: 8px 11px; }
}

/* ==========================================================================
   v2 — Motion system & new home sections
   ========================================================================== */

/* No-JS safety: never hide content when scripts don't run */
.no-js .reveal { opacity: 1; transform: none; }
.no-js .word > span { transform: none; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--violet));
  z-index: 60;
  pointer-events: none;
}

/* Word-by-word masked reveal */
.split .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.split .word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease);
  transition-delay: var(--wd, 0ms);
}
.split.is-visible .word > span { transform: translateY(0); }

/* Rotating role text */
.hero-role {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 10px;
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 500;
  color: var(--ink-2);
  margin-top: -6px;
}
.rotator {
  position: relative;
  display: inline-grid;
  height: 1.45em;
  overflow: hidden;
  vertical-align: bottom;
  color: var(--accent);
  font-weight: 600;
}
.rotator > span {
  grid-area: 1 / 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  opacity: 0;
  transform: translateY(110%);
  transition: transform 0.6s var(--ease), opacity 0.4s;
}
.rotator > span.is-in { opacity: 1; transform: translateY(0); }
.rotator > span.is-out { opacity: 0; transform: translateY(-110%); }

/* Animated hero background */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(18, 18, 22, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}
.hero::before { animation: blobDrift 18s ease-in-out infinite alternate; }
.blob {
  position: absolute;
  z-index: 0;
  width: 42vw;
  max-width: 560px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.55;
}
.blob--1 { left: -14%; bottom: -30%; background: radial-gradient(closest-side, rgba(124, 58, 237, 0.18), transparent 70%); animation: blobDrift 22s ease-in-out infinite alternate-reverse; }
@keyframes blobDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(3%, -4%) scale(1.06); }
  100% { transform: translate(-2%, 3%) scale(0.98); }
}

/* 3D tilt on portrait */
.hero-visual { perspective: 1200px; }
.tilt {
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
  will-change: transform;
}
.tilt .portrait-card { transform: translateZ(0); }
.tilt .float-chip { transform: translateZ(40px); }
.tilt .float-chip--br { animation: none; }
.tilt .float-chip--tl { animation: none; }

/* Ticker / marquee */
.ticker {
  --gap: 42px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 18px;
  background: var(--bg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  gap: var(--gap);
  animation: ticker 48s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track ul {
  display: flex;
  align-items: center;
  gap: var(--gap);
  flex: none;
}
.ticker-track li {
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.ticker-track li::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - var(--gap) / 2)); }
}

/* Spotlight hover (cards follow cursor) */
.spot {
  position: relative;
  overflow: hidden;
}
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(79, 70, 229, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; z-index: 1; }

/* Personas — who I work with */
.personas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.persona {
  padding: 30px 28px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  align-content: start;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}
.persona:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(79, 70, 229, 0.3); }
.persona-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  box-shadow: 0 8px 18px -8px var(--accent-glow);
}
.persona-icon svg { width: 22px; height: 22px; }
.persona h3 { font-size: 21px; }
.persona .quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink-2);
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}
.persona .how { display: grid; gap: 6px; }
.persona .how small { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.persona .how p { font-size: 15px; color: var(--ink-2); }

/* Process connector line */
.process { position: relative; }
.process::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 44px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  opacity: 0.35;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.4s var(--ease) 0.2s;
  z-index: 0;
}
.process.is-visible::before { transform: scaleX(1); }
.step { position: relative; z-index: 1; }
.step::after {
  content: "";
  position: absolute;
  top: 36px;
  right: 24px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: var(--bg-elev);
}

/* About section */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about-copy { display: grid; gap: 20px; }
.about-copy h2 { font-size: clamp(30px, 4.2vw, 46px); }
.about-copy p { font-size: 17.5px; color: var(--ink-2); }
.about-copy .lead { font-size: clamp(19px, 1.8vw, 23px); color: var(--ink); font-weight: 500; letter-spacing: -0.01em; }
.about-side { display: grid; gap: 18px; }
.facts {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 14px;
}
.facts h3 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.facts li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-2);
}
.facts li:first-of-type { border-top: 0; padding-top: 0; }
.facts li svg { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 2px; }
.facts li strong { color: var(--ink); font-weight: 600; }

.clocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.clock {
  padding: 18px 16px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  display: grid;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.clock::after {
  content: "";
  position: absolute;
  right: -30%;
  bottom: -50%;
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.5), transparent);
  filter: blur(12px);
}
.clock > * { position: relative; z-index: 1; }
.clock small { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.clock time { font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.clock span { font-size: 12.5px; color: rgba(255, 255, 255, 0.65); }
.clock .live { display: inline-flex; align-items: center; gap: 6px; }
.clock .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2); }

/* Engagement models */
.models {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.model {
  padding: 30px 28px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  align-content: start;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}
.model:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.model--featured {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.model--featured h3, .model--featured .model-head small { color: #fff; }
.model.model--featured p, .model.model--featured li { color: rgba(255, 255, 255, 0.92); }
.model.model--featured .model-head small { color: rgba(255, 255, 255, 0.78); }
.model--featured .model-tag { background: rgba(255, 255, 255, 0.12); color: #c7d2fe; border-color: transparent; }
.model--featured li::before { border-color: #a5b4fc; background: transparent; }
.model--featured .btn--ghost { --btn-fg: #fff; border-color: rgba(255, 255, 255, 0.3); }
.model--featured .btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; }
.model-head { display: grid; gap: 8px; }
.model-tag {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(79, 70, 229, 0.25);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.model h3 { font-size: 22px; }
.model .model-head small { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.model p { font-size: 15.5px; color: var(--ink-2); }
.model ul { display: grid; gap: 8px; }
.model li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--ink-2); }
.model li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
}
.model .btn { justify-self: start; margin-top: 6px; }

/* FAQ accordion */
.faq { max-width: 860px; margin-inline: auto; display: grid; gap: 10px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.faq-item.is-open { border-color: rgba(79, 70, 229, 0.35); box-shadow: var(--shadow-sm); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.faq-q .plus {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--accent);
  transition: transform 0.4s var(--ease), background 0.3s;
}
.faq-q .plus svg { width: 14px; height: 14px; }
.faq-item.is-open .faq-q .plus { transform: rotate(45deg); background: var(--accent-soft); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 22px 22px; font-size: 15.5px; color: var(--ink-2); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }

/* Testimonials (hidden until real quotes are added) */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.testimonial {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  align-content: start;
}
.testimonial .quote-mark { font-family: var(--font-serif); font-style: italic; font-size: 54px; line-height: 0.6; color: var(--accent); }
.testimonial blockquote { margin: 0; font-size: 16.5px; color: var(--ink-2); line-height: 1.55; }
.testimonial figcaption { display: grid; gap: 2px; font-size: 14px; }
.testimonial figcaption strong { color: var(--ink); }
.testimonial figcaption span { color: var(--ink-3); }

/* Back to top */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease), background 0.2s;
  z-index: 40;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.to-top svg { width: 18px; height: 18px; }

/* Contact: what happens next */
.next-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: ns;
}
.next-step {
  padding: 24px 24px 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
  align-content: start;
}
.next-step::before {
  counter-increment: ns;
  content: counter(ns);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
}
.next-step h3 { font-size: 18px; }
.next-step p { font-size: 15px; color: var(--ink-2); }

/* Work page: current-role pulse */
.tl-item.is-current::before { animation: pulse 2.2s infinite; }

/* Case card hover: mini UI animates */
.case-card .mini-bar > span { transition: width 0.8s var(--ease); }
.case-card:hover .mini-bar > span { width: 96% !important; }
.case-card .mini-row .pill { transition: background 0.4s, opacity 0.4s; }
.case-card:hover .mini-row .pill { background: var(--accent); opacity: 0.85; }

/* Staggered tags */
.tags li { transition: all 0.2s, opacity 0.5s var(--ease), transform 0.5s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; flex-wrap: wrap; width: auto; }
  .ticker-track ul:last-child { display: none; }
  .hero::before, .blob { animation: none; }
  .split .word > span { transform: none; transition: none; }
  .rotator > span { transition: none; }
  .tilt { transition: none; }
  .process::before { transform: scaleX(1); transition: none; }
  .faq-a { transition: none; }
  .scroll-progress { display: none; }
}

@media (max-width: 1080px) {
  .personas, .models, .testimonials { grid-template-columns: repeat(2, 1fr); }
  .process::before { display: none; }
  .step::after { display: none; }
}
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .next-steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .personas, .models, .testimonials { grid-template-columns: 1fr; }
  .clocks { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .clock { padding: 14px 12px 12px; }
  .faq-q { font-size: 16px; padding: 18px 18px; }
  .faq-a p { padding: 0 18px 18px; }
  .to-top { right: 16px; bottom: 16px; }
  .hero-role { font-size: 16px; }
}
.reveal:not(.is-visible) .tags li { opacity: 0; transform: translateY(8px); }
.no-js .tags li { opacity: 1; transform: none; }

/* WhatsApp */
.btn--wa { --btn-bg: #25d366; --btn-fg: #062b18; }
.btn--wa:hover { background: #1ebe5a; }
.wa-float {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: 999px;
  background: #25d366;
  color: #062b18;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 24px -8px rgba(37, 211, 102, 0.55), var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(37, 211, 102, 0.6), var(--shadow); }
.wa-float svg { width: 22px; height: 22px; flex: none; }
.wa-float .wa-dot { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.contact-list a.wa .ic { background: #dcfce7; color: #16a34a; }
@media (max-width: 760px) {
  .wa-float { left: 16px; bottom: 16px; padding: 12px; }
  .wa-float span.label { display: none; }
}
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; } .stat { padding: 20px 18px 18px; } }
@media (max-width: 380px) { .stats { grid-template-columns: 1fr; } }

/* Logo */
.brand img { display: block; height: 44px; width: auto; }
.site-footer .brand img { height: 40px; }
@media (max-width: 760px) { .brand img { height: 38px; } }

.portrait-card .caption .caption-mark { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.portrait-card .caption > div { flex: 1; min-width: 0; }
@media (max-width: 760px) { .portrait-card .caption .caption-mark { width: 30px; height: 30px; } }

/* Turnstile */
.turnstile-wrap { min-height: 0; }
.turnstile-wrap .cf-turnstile:empty { display: none; }
.turnstile-wrap iframe { border-radius: 12px; }

/* ==========================================================================
   Book
   ========================================================================== */
.book-hero { padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px); position: relative; overflow: hidden; }
.book-hero::before {
  content: ""; position: absolute; inset: -30% auto auto -10%; width: 55vw; max-width: 760px; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(79, 70, 229, 0.14), transparent 70%); filter: blur(10px); pointer-events: none;
}
.book-grid { position: relative; display: grid; grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.book-cover-wrap { perspective: 1200px; }
.book-cover {
  display: block; width: 100%; max-width: 380px; margin-inline: auto; border-radius: 10px;
  box-shadow: 0 30px 70px -24px rgba(18, 18, 22, 0.45), 0 8px 20px -10px rgba(18, 18, 22, 0.25);
  transform: rotateY(-8deg) rotateX(2deg); transition: transform 0.6s var(--ease);
}
.book-cover-wrap:hover .book-cover { transform: rotateY(0) rotateX(0); }
.book-cover img { display: block; width: 100%; height: auto; border-radius: 10px; }
.book-copy { display: grid; gap: 22px; }
.book-copy h1 { font-size: clamp(36px, 4.8vw, 58px); letter-spacing: -0.03em; line-height: 1.04; }
.book-copy .subtitle { font-size: clamp(19px, 2vw, 24px); color: var(--ink-2); font-weight: 500; letter-spacing: -0.01em; }
.book-copy .pitch { font-size: 17.5px; color: var(--ink-2); max-width: 58ch; }
.book-meta { display: flex; flex-wrap: wrap; gap: 8px; }

.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.stores .btn { padding: 12px 18px; }
.stores .btn svg { width: 18px; height: 18px; }
.stores .btn[hidden] { display: none; }
.stores .btn--ghost {
  --btn-bg: rgba(79, 70, 229, 0.07);
  --btn-fg: var(--accent);
  border-color: rgba(79, 70, 229, 0.28);
  font-weight: 600;
}
.stores .btn--ghost:hover { --btn-bg: rgba(79, 70, 229, 0.13); border-color: var(--accent); transform: translateY(-1px); }
.stores-note { font-size: 13.5px; color: var(--ink-3); }
.stores-block { display: grid; gap: 12px; }

.book-section-title { font-size: clamp(28px, 3.6vw, 40px); }

/* Governed Loop */
.loop { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: phase; position: relative; }
.loop::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: 42px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet)); opacity: 0.35; z-index: 0;
}
.phase { position: relative; z-index: 1; padding: 24px 20px 22px; border-radius: var(--radius-lg); background: var(--bg-elev); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.phase::before { counter-increment: phase; content: counter(phase); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--violet)); color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 0 0 5px var(--bg); }
.phase h3 { font-size: 19px; }
.phase p { font-size: 14.5px; color: var(--ink-2); }

.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.check { padding: 20px 22px; border-radius: var(--radius); background: var(--ink); color: #fff; display: grid; gap: 6px; }
.check small { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #a5b4fc; font-weight: 600; }
.check strong { font-size: 18px; }
.check span { font-size: 14px; color: rgba(255, 255, 255, 0.72); }

/* Who it's for / what you'll learn */
.book-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.book-card { padding: 28px; border-radius: var(--radius-lg); background: var(--bg-elev); border: 1px solid var(--line); display: grid; gap: 14px; align-content: start; }
.book-card h3 { font-size: 21px; }
.book-card ul { display: grid; gap: 9px; }
.book-card li { position: relative; padding-left: 22px; font-size: 15.5px; color: var(--ink-2); }
.book-card li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent-soft); border: 2px solid var(--accent); }
.book-card p { font-size: 15.5px; color: var(--ink-2); }

/* Excerpt */
.excerpt { max-width: 760px; margin-inline: auto; padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-xl); background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow); }
.excerpt .eyebrow { margin-bottom: 14px; }
.excerpt h2 { font-size: clamp(24px, 2.8vw, 32px); margin-bottom: 6px; }
.excerpt h3 { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 24px; color: var(--accent-deep); margin: 26px 0 8px; }
.excerpt p { font-size: 17px; line-height: 1.7; color: var(--ink-2); margin: 0 0 16px; }
.excerpt p.dropcap::first-letter { font-family: var(--font-serif); font-size: 3.2em; float: left; line-height: 0.85; padding: 6px 10px 0 0; color: var(--accent); }
.excerpt-fade { position: relative; }
.excerpt-fade::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(180deg, rgba(255,255,255,0), var(--bg-elev)); pointer-events: none; }
.excerpt-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.excerpt-cta p { margin: 0; font-size: 15px; color: var(--ink-3); }

/* TOC */
.toc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; max-width: 980px; margin-inline: auto; }
.toc-part { padding: 20px 22px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--line); }
.toc-part h3 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.toc-part ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.toc-part li { display: flex; gap: 12px; font-size: 15px; color: var(--ink-2); }
.toc-part li b { color: var(--ink-3); font-weight: 600; min-width: 2.2em; font-variant-numeric: tabular-nums; }

/* Author block */
.author { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; padding: clamp(24px, 3.5vw, 40px); border-radius: var(--radius-xl); background: var(--bg-elev); border: 1px solid var(--line); }
.author img { width: 200px; height: 200px; object-fit: cover; object-position: center 20%; border-radius: 24px; }
.author h3 { font-size: 24px; margin-bottom: 8px; }
.author p { font-size: 16px; color: var(--ink-2); }
.author .hero-actions { margin-top: 16px; }

/* Home: book feature */
.book-feature { display: grid; grid-template-columns: minmax(220px, 0.6fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(28px, 4vw, 52px); border-radius: var(--radius-xl); background: radial-gradient(90% 120% at 100% 0%, rgba(124, 58, 237, 0.12), transparent 60%), linear-gradient(135deg, #ffffff, #f3f1ff); border: 1px solid rgba(79, 70, 229, 0.2); }
.book-feature .book-cover { max-width: 300px; }
.book-feature-copy { display: grid; gap: 16px; }
.book-feature-copy h2 { font-size: clamp(28px, 3.6vw, 40px); }
.book-feature-copy .subtitle { font-size: 18px; color: var(--ink-2); font-weight: 500; }
.book-feature-copy p { font-size: 16.5px; color: var(--ink-2); max-width: 60ch; }
.book-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; width: fit-content; }
.book-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.availability .book-link { margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--line-strong); color: var(--accent); font-weight: 600; }

@media (max-width: 1080px) { .loop { grid-template-columns: repeat(3, 1fr); } .loop::before { display: none; } }
@media (max-width: 900px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-cover { max-width: 300px; transform: none; }
  .book-two { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .toc { grid-template-columns: 1fr; }
  .author { grid-template-columns: 1fr; text-align: left; }
  .author img { width: 140px; height: 140px; }
  .book-feature { grid-template-columns: 1fr; }
  .book-feature .book-cover { max-width: 240px; margin-inline: 0; }
}
@media (max-width: 760px) { .loop { grid-template-columns: 1fr 1fr; } .stores .btn { flex: 1 1 45%; } }
@media (max-width: 480px) { .loop { grid-template-columns: 1fr; } .stores .btn { flex-basis: 100%; } .availability .book-link { display: none; } }


/* ---- Book page v2: interactive loop, collapsibles ---- */
.book-stats .stat-value { color: var(--accent); }

.loop-wrap { position: relative; display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 3.5vw, 44px); border-radius: var(--radius-xl); background: var(--bg-elev); border: 1px solid var(--line); }
.loop-wrap > input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.loop-visual { display: grid; place-items: center; }
.loop-svg { width: 100%; max-width: 420px; height: auto; font-family: var(--font-sans); }
.loop-svg .ring { fill: none; stroke: var(--accent-soft); stroke-width: 10; }
.loop-svg .ring-arrow { fill: none; stroke: var(--accent); stroke-width: 3; }
.loop-svg .hub { fill: var(--ink); }
.loop-svg .hub-t1 { fill: #fff; font-size: 13px; font-weight: 600; }
.loop-svg .node circle { fill: #fff; stroke: var(--accent); stroke-width: 3; transition: fill 0.3s, r 0.3s; }
.loop-svg .node .num { fill: var(--accent); font-size: 13px; font-weight: 700; }
.loop-svg .node .lbl { fill: var(--ink-2); font-size: 13px; font-weight: 600; }
.loop-svg .node.is-on circle, #ph1:checked ~ .loop-visual .n1 circle, #ph2:checked ~ .loop-visual .n2 circle, #ph3:checked ~ .loop-visual .n3 circle, #ph4:checked ~ .loop-visual .n4 circle, #ph5:checked ~ .loop-visual .n5 circle { fill: var(--accent); }
#ph1:checked ~ .loop-visual .n1 .num, #ph2:checked ~ .loop-visual .n2 .num, #ph3:checked ~ .loop-visual .n3 .num, #ph4:checked ~ .loop-visual .n4 .num, #ph5:checked ~ .loop-visual .n5 .num { fill: #fff; }
#ph1:checked ~ .loop-visual .n1 .lbl, #ph2:checked ~ .loop-visual .n2 .lbl, #ph3:checked ~ .loop-visual .n3 .lbl, #ph4:checked ~ .loop-visual .n4 .lbl, #ph5:checked ~ .loop-visual .n5 .lbl { fill: var(--accent-deep); }

.loop-side { display: grid; gap: 18px; }
.loop-labels { display: flex; flex-wrap: wrap; gap: 8px; }
.loop-labels label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 9px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all 0.2s; }
.loop-labels label b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.loop-labels label:hover { border-color: var(--accent); color: var(--accent); }
#ph1:checked ~ .loop-side label[for="ph1"], #ph2:checked ~ .loop-side label[for="ph2"], #ph3:checked ~ .loop-side label[for="ph3"], #ph4:checked ~ .loop-side label[for="ph4"], #ph5:checked ~ .loop-side label[for="ph5"] { background: var(--ink); color: #fff; border-color: var(--ink); }
#ph1:checked ~ .loop-side label[for="ph1"] b, #ph2:checked ~ .loop-side label[for="ph2"] b, #ph3:checked ~ .loop-side label[for="ph3"] b, #ph4:checked ~ .loop-side label[for="ph4"] b, #ph5:checked ~ .loop-side label[for="ph5"] b { background: var(--accent); color: #fff; }
.loop-panels { min-height: 120px; position: relative; }
.loop-panel { display: none; padding: 20px 22px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); animation: fadeUp 0.35s var(--ease); }
.loop-panel h3 { font-size: 22px; margin-bottom: 6px; }
.loop-panel p { font-size: 15.5px; color: var(--ink-2); }
#ph1:checked ~ .loop-side .p1, #ph2:checked ~ .loop-side .p2, #ph3:checked ~ .loop-side .p3, #ph4:checked ~ .loop-side .p4, #ph5:checked ~ .loop-side .p5 { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.loop-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lc { display: flex; gap: 10px; align-items: flex-start; padding: 12px 12px; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--line); }
.lc-ic { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: #fff; }
.lc-ic svg { width: 14px; height: 14px; }
.lc strong { display: block; font-size: 14px; }
.lc span { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; display: block; }

/* details / collapsibles */
details.more summary { list-style: none; cursor: pointer; display: inline-flex; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); font-size: 15px; }
details.more summary span svg { width: 16px; height: 16px; }
details.more:not([open]) .more-close { display: none; }
details.more[open] .more-open { display: none; }
details.more .more-body { margin-top: 16px; }
details.more .more-body h3 { margin-top: 20px; }

.toc-details { padding: 0; overflow: hidden; }
.toc-details summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "eyebrow plus" "title plus" "hint plus"; gap: 4px 16px; align-items: center; padding: 26px 28px; }
.toc-details summary::-webkit-details-marker { display: none; }
.toc-details summary .eyebrow { grid-area: eyebrow; }
.toc-details summary .toc-title { grid-area: title; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.toc-details summary .toc-hint { grid-area: hint; font-size: 14px; color: var(--ink-3); }
.toc-details summary .plus { grid-area: plus; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-soft); color: var(--accent); transition: transform 0.4s var(--ease); }
.toc-details summary .plus svg { width: 16px; height: 16px; }
.toc-details[open] summary .plus { transform: rotate(45deg); background: var(--accent-soft); }
.toc--stack { grid-template-columns: 1fr; gap: 10px; padding: 0 20px 22px; max-width: none; }
.toc--stack .toc-part { padding: 14px 16px; background: var(--bg-soft); }
.author--card { grid-template-columns: 160px 1fr; align-items: start; }
.author--card img { width: 160px; height: 160px; border-radius: 20px; }
.author--card p { font-size: 15.5px; }
.author--card .hero-actions { margin-top: 14px; gap: 8px; }

@media (max-width: 1080px) { .loop-checks { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .loop-wrap { grid-template-columns: 1fr; }
  .loop-svg { max-width: 300px; }
  .author--card { grid-template-columns: 1fr; }
  .author--card img { width: 120px; height: 120px; }
}
@media (max-width: 760px) { .book-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .loop-labels label { flex: 1 1 45%; justify-content: center; } }

/* Book: excerpt + author side by side */
.excerpt-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.excerpt-grid .excerpt { max-width: none; margin-inline: 0; }
.author--side { grid-template-columns: 1fr; gap: 16px; position: sticky; top: 96px; padding: 26px; }
.author--side img { width: 120px; height: 120px; border-radius: 18px; }
.author--side h3 { font-size: 21px; }
.author--side p { font-size: 15px; }
.author--side .hero-actions { margin-top: 14px; gap: 8px; }
.book-hero { scroll-margin-top: 0; }
@media (max-width: 900px) {
  .excerpt-grid { grid-template-columns: 1fr; }
  .author--side { position: static; grid-template-columns: 120px 1fr; align-items: center; }
  .author--side .hero-actions { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .author--side { grid-template-columns: 1fr; } }


/* ---- Hero: keep the two hero buttons above the fold on laptop screens ---- */
@media (min-width: 901px) and (max-height: 860px) {
  .hero { padding-top: 28px; padding-bottom: 56px; }
  .hero-copy { gap: 16px; }
  .hero h1 { font-size: clamp(38px, 4.2vw, 54px); }
  .hero-lede { font-size: 16.5px; max-width: 52ch; }
  .hero-role { margin-top: -2px; }
  .hero .eyebrow { font-size: 12px; letter-spacing: 0.12em; }
}
@media (min-width: 901px) and (max-height: 720px) {
  .hero { padding-top: 16px; padding-bottom: 40px; }
  .hero-copy { gap: 12px; }
  .hero h1 { font-size: clamp(36px, 3.8vw, 48px); }
  .hero-lede { font-size: 16px; }
  .hero-visual { max-width: 400px; justify-self: end; }
}
