/* Hafeez Raji — UX Director Portfolio
   Design system v3: brand sheet applied — Inter type, Primary Purple accent, neutral grayscale. */

:root {
  /* Neutrals */
  --off-white: #FEFEFE;
  --light-gray: #EDEDED;
  --warm-gray: #D6D6D6;
  --slate-gray: #6B7280;
  --charcoal: #1B1D21;
  --ink-color: #0F1113;

  /* Brand */
  --purple: #6F3DFF;
  --purple-light: #EEE9FF;
  --purple-dark: #5428CC;

  /* Semantic */
  --success: #16A344;
  --warning: #F99E0B;
  --error: #DC2626;
  --info: #2563EB;

  /* Applied tokens
     Note: --ink-soft and --line are darkened from the raw Slate Gray / Warm Gray
     swatches above — the literal swatch values fail WCAG AA (4.5:1 text / 3:1 UI
     boundaries) against our light surfaces. Raw brand swatches are preserved
     above for reference; these are the accessibility-safe applied values. */
  --ink: var(--ink-color);
  --ink-soft: #565D6B;
  --bg: var(--off-white);
  --bg-alt: #F7F5FD;
  --bg-dark: var(--charcoal);
  --line: #828282;
  --accent: var(--purple);
  --accent-dark: var(--purple-dark);
  --accent-soft: var(--purple-light);
  --blob: var(--purple-light);
  --max: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-btn: 10px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Visible keyboard focus (WCAG 2.4.7) — 7–8:1 contrast on light surfaces */
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
  border-radius: 3px;
}
/* accent-dark drops to ~2:1 on our dark surfaces, so swap to white there */
.impact a:focus-visible, .impact button:focus-visible,
footer.site-footer a:focus-visible, footer.site-footer button:focus-visible,
.outcome-card a:focus-visible {
  outline-color: #fff;
}

/* Skip link — hidden until focused, first stop for keyboard/screen-reader users */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* Nav */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(30,27,58,0.08);
}
.nav-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: var(--max);
  margin: 0 auto;
}
.nav-name { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); font-size: 1rem; }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 0.92rem; padding: 12px 8px; display: inline-block; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* Mobile burger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: var(--radius-btn);
  font-size: 0.88rem !important;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent-dark); text-decoration: none !important; }

/* Breadcrumb */
.breadcrumb { padding: 22px 0 0; font-size: 0.86rem; }
.breadcrumb a { color: var(--ink-soft); font-weight: 600; display: inline-block; padding: 10px 4px 10px 0; margin: -10px 0; }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }

/* Hero (homepage) */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.5fr 0.7fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 700; color: var(--accent); margin: 0 0 14px; }
.hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.15; margin: 0 0 18px; font-weight: 700; letter-spacing: -0.01em; }
.hero .sub { font-size: 1.08rem; color: var(--ink-soft); max-width: 56ch; margin: 0 0 28px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn { display: inline-block; padding: 12px 22px; border-radius: var(--radius-btn); font-weight: 600; font-size: 0.95rem; border: 0; background: none; cursor: pointer; font-family: inherit; text-align: center; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-secondary { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-tertiary { display: inline-block; padding: 8px 0; color: var(--accent); font-weight: 600; }
.btn-tertiary:hover { color: var(--accent-dark); text-decoration: none; }

.hero-photo { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-photo img { width: 168px; height: 168px; object-fit: cover; border-radius: 50%; border: 3px solid var(--bg-alt); box-shadow: 0 8px 24px rgba(30,27,58,0.12); }
.hero-photo .cap-name { font-weight: 700; margin-top: 14px; font-size: 0.98rem; }
.hero-photo .cap-title { color: var(--ink-soft); font-size: 0.85rem; }

/* Featured case (homepage lead block) */
.featured-case { padding: 52px 0 0; }
.fc-eyebrow-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 26px; }
.chip { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 100px; padding: 6px 14px; }
.fc-grid { display: grid; grid-template-columns: 0.9fr 1fr; gap: 44px; align-items: center; padding-bottom: 48px; }
.fc-grid h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.18; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 16px; }
.fc-grid .fc-sub { color: var(--ink-soft); font-size: 1.02rem; margin: 0 0 22px; max-width: 52ch; }
.fc-metric-line { display: flex; gap: 28px; margin-bottom: 26px; flex-wrap: wrap; }
.fc-metric-line .num { font-size: 1.5rem; font-weight: 700; color: var(--ink); line-height: 1; }
.fc-metric-line .label { font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }
.featured-visual { border-radius: var(--radius); overflow: hidden; box-shadow: 0 16px 40px rgba(30,27,58,0.10); }
.featured-visual img, .featured-visual iframe { width: 100%; display: block; border: 0; }
.featured-visual .cap { padding: 12px 4px 0; font-size: 0.8rem; color: var(--ink-soft); }

/* Plain/floating variant — for standalone screenshots (e.g. phone mockups) that
   already carry their own shadow/bezel and shouldn't be boxed in a frame. */
.featured-visual.plain { border: 0; background: transparent; box-shadow: none; overflow: visible; border-radius: 0; }
.featured-visual.plain .cap { background: transparent; border-top: 0; text-align: center; padding: 16px 0 0; }

/* Before/after comparison slider — self-hosted (no external embed), driven by a
   native <input type="range"> so drag, touch, and keyboard all work natively
   across every browser without custom pointer-event handling. */
/* padding-bottom ratio hack (771/1300) instead of aspect-ratio — works in every
   browser, not just the ones that shipped aspect-ratio support. */
.compare { position: relative; width: 100%; height: 0; padding-bottom: 59.3%; overflow: hidden; background: var(--bg-alt); }
.compare-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; user-select: none; -webkit-user-select: none; }
.compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); will-change: clip-path; }
.compare.dragging .compare-before { transition: none; }
.compare:not(.dragging) .compare-before { transition: clip-path 0.15s ease-out; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; transform: translateX(-50%); z-index: 1; pointer-events: none; }
.compare.dragging .compare-handle { transition: none; }
.compare:not(.dragging) .compare-handle { transition: left 0.15s ease-out; }
.compare-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); background: #fff; box-shadow: 0 0 0 1px rgba(30,27,58,0.15); }
.compare-grip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(30,27,58,0.22); }
.compare-range {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  margin: 0; padding: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.compare-range::-webkit-slider-runnable-track { -webkit-appearance: none; width: 100%; height: 100%; background: transparent; }
.compare-range::-webkit-slider-thumb { -webkit-appearance: none; width: 2px; height: 100%; background: transparent; cursor: ew-resize; border-radius: 0; }
.compare-range::-moz-range-track { width: 100%; height: 100%; background: transparent; border: 0; }
.compare-range::-moz-range-thumb { width: 2px; height: 100%; background: transparent; border: 0; cursor: ew-resize; border-radius: 0; }
.compare-range:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: -3px; }

/* Impact strip */
.impact { background: var(--bg-dark); color: #fff; padding: 40px 0; }
.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.impact-item .num { font-size: 2.1rem; font-weight: 700; color: #fff; line-height: 1; margin-bottom: 8px; }
.impact-item .label { font-size: 0.85rem; color: #c9c3e8; line-height: 1.4; }

/* Section */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: 1.6rem; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
.section .kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
.section-intro { color: var(--ink-soft); max-width: 62ch; margin-bottom: 36px; }

/* Competency columns */
.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.comp-col h3 { font-size: 1rem; margin: 0; }
.comp-col ul { margin: 0; padding-left: 18px; color: var(--ink-soft); }
.comp-col li { margin-bottom: 7px; font-size: 0.94rem; }
.comp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }

/* Case study preview / related cards */
.case-grid, .related-grid { display: grid; gap: 24px; }
.case-grid { grid-template-columns: repeat(2, 1fr); }
.related-grid { grid-template-columns: repeat(2, 1fr); }
.case-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(30,27,58,0.08);
  transition: box-shadow 0.15s, transform 0.15s;
}
.case-card:hover { box-shadow: 0 14px 32px rgba(30,27,58,0.10); transform: translateY(-2px); }
.case-card .thumb { width: 100%; height: 170px; object-fit: cover; object-position: top; background: var(--bg-alt); display: block; }
.case-card .thumb-placeholder {
  width: 100%; height: 150px;
  background: linear-gradient(135deg, var(--accent-soft), var(--blob));
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.case-card .card-body { padding: 24px; display: flex; flex-direction: column; flex-grow: 1; }
.case-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 10px; }
.case-card h3 { font-size: 1.1rem; margin: 0 0 10px; line-height: 1.35; }
.case-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 16px; flex-grow: 1; }
.case-metric { font-weight: 700; color: var(--ink); font-size: 0.88rem; margin-bottom: 14px; }
.case-card .btn-secondary { align-self: flex-start; padding: 8px 16px; font-size: 0.85rem; }

/* Leadership / principles */
.principle-list { display: grid; gap: 20px; }
.principle { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.principle h3 { margin: 0; font-size: 1rem; }
.principle .evidence { color: var(--ink-soft); font-size: 0.94rem; }
.principle .evidence strong { color: var(--ink); }
.principle-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }

/* Intro line above featured case */
.intro-line { padding-top: 20px; font-size: 0.92rem; color: var(--ink-soft); }
.intro-line strong { color: var(--ink); }

/* About block */
.about-grid { display: grid; grid-template-columns: 110px 1fr; gap: 28px; align-items: start; }
.about-grid img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 6px 18px rgba(30,27,58,0.12); }
.about-grid h2 { margin: 0 0 10px; }
.about-grid p { color: var(--ink-soft); max-width: 68ch; margin: 0 0 14px; }
.about-links { display: flex; gap: 12px; flex-wrap: wrap; }
.about-links a { font-weight: 600; font-size: 0.92rem; display: inline-block; padding: 10px 8px; margin: -10px -8px; }
/* CTA band (lavender, used near end of pages) */
.cta-band {
  background: var(--bg-alt);
  border-radius: 24px;
  padding: 36px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--max);
  margin: 0 auto 64px;
}
.cta-band .cta-left { display: flex; align-items: center; gap: 18px; }
.cta-band h3 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.cta-band .icon-badge { width: 48px; height: 48px; flex-shrink: 0; }

/* Footer */
footer.site-footer { background: var(--bg-dark); color: #c9c3e8; padding: 44px 0 30px; text-align: center; }
footer.site-footer .foot-links { display: flex; gap: 10px; justify-content: center; margin-bottom: 22px; }
footer.site-footer .foot-links a { color: #fff; font-weight: 600; display: inline-block; padding: 10px 12px; }
footer.site-footer .copyright { font-size: 0.8rem; color: #8a83ab; }

/* Icon badges (used in meta chips, triad cards, process steps) */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.icon-badge svg { width: 20px; height: 20px; }
.icon-badge.dark { background: rgba(255,255,255,0.12); color: #fff; }
.icon-badge.inverse { background: var(--bg-dark); border: 2px solid var(--accent-soft); color: #fff; }

/* Page-level gradient wash for case-study/résumé pages — sits on <body> so it
   shows through the translucent, blurred nav instead of stopping below it. */
body.cs-page {
  background:
    radial-gradient(ellipse 620px 380px at 22% 0%, var(--accent-soft) 0%, transparent 68%),
    radial-gradient(ellipse 520px 340px at 55% 0%, var(--accent-soft) 0%, transparent 62%),
    radial-gradient(ellipse 480px 300px at 82% 0%, var(--accent-soft) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* Case study header */
.cs-header {
  position: relative;
  padding: 40px 0 44px;
  overflow: hidden;
}
/* Subtle grain, layered over the gradient — same technique previewed for the user */
.cs-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.045;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}
.cs-header .wrap { position: relative; z-index: 1; }
.cs-header .kicker { margin-bottom: 12px; }
.cs-header h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; margin: 0 0 14px; font-weight: 700; letter-spacing: -0.01em; max-width: 18ch; }
.cs-header .outcome { font-size: 1.04rem; color: var(--ink-soft); max-width: 58ch; margin: 0 0 30px; }

.cs-hero-grid { display: grid; grid-template-columns: 0.85fr 1fr; gap: 44px; align-items: start; position: relative; z-index: 1; }

/* Meta chips row */
.meta-chips { display: grid; grid-template-columns: repeat(2, minmax(150px, auto)); gap: 20px 30px; margin-top: 8px; }
.chip-item { display: flex; align-items: flex-start; gap: 10px; }
.chip-item .c-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 2px; }
.chip-item .c-value { font-weight: 700; font-size: 0.9rem; }

/* Triad: challenge / solution / impact */
.triad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.triad-card { background: var(--bg-alt); border-radius: var(--radius); padding: 28px; }
.triad-card .icon-badge { margin-bottom: 16px; }
.triad-card h3 { margin: 0 0 10px; font-size: 1.02rem; }
.triad-card p { color: var(--ink-soft); font-size: 0.9rem; margin: 0; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 8px; font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 9px; }
.check-list li::before { content: "✓"; color: var(--accent); font-weight: 700; flex-shrink: 0; }

/* Research & findings */
.research-grid { display: grid; grid-template-columns: 0.85fr 1fr; gap: 44px; align-items: start; }
.research-grid ul { color: var(--ink-soft); padding-left: 18px; margin: 0; }
.research-grid ul li { margin-bottom: 8px; font-size: 0.94rem; }
.finding-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.finding-card { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: 0 1px 3px rgba(30,27,58,0.08); }
.finding-card .icon-badge { margin-bottom: 14px; }
.finding-card h4 { margin: 0 0 8px; font-size: 0.94rem; }
.finding-card p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); }

/* Process flow */
.process-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 30px 0 10px; }
.process-step { background: var(--bg-alt); border-radius: var(--radius); padding: 20px; text-align: left; }
.process-step .icon-badge { margin: 0 0 14px; }
.process-step h4 { margin: 0 0 6px; font-size: 0.92rem; }
.process-step p { margin: 0; font-size: 0.82rem; color: var(--ink-soft); }

/* Outcomes stat bar */
.outcomes-bar { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 34px 0; }
.outcomes-bar .stat { flex: 1; min-width: 150px; padding: 0 26px; border-left: 1px solid var(--line); }
.outcomes-bar .stat:first-child { border-left: none; padding-left: 0; }
.outcomes-bar .num { font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1; }
.outcomes-bar .label { font-size: 0.82rem; color: var(--ink-soft); margin-top: 8px; }

.cs-body h2 { font-size: 1.35rem; margin: 44px 0 16px; font-weight: 700; }
.cs-body h3 { font-size: 1.05rem; margin: 26px 0 10px; font-weight: 700; }
.cs-body p { color: var(--ink-soft); margin: 0 0 14px; max-width: 74ch; }
.cs-body ul { color: var(--ink-soft); max-width: 74ch; }
.cs-body img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); margin: 18px 0; }

.friction-grid, .persona-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 20px 0 30px; }
.fp-card, .persona-card { background: var(--bg-alt); border-radius: var(--radius); padding: 20px; }
.fp-card h4, .persona-card h4 { margin: 0 0 8px; font-size: 0.95rem; }
.fp-card p, .persona-card p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

.related { margin-top: 20px; }

/* Contact modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,17,19,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.modal-overlay[hidden] { display: none; }
.modal-overlay.open { opacity: 1; }
.modal {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  width: 100%; max-width: 460px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 36px 32px 32px;
  box-shadow: 0 24px 60px rgba(15,17,19,0.28);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s ease;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: var(--bg-alt);
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal-close:hover { background: var(--accent-soft); color: var(--accent); }
.modal h2 { margin: 0 0 8px; font-size: 1.35rem; }
.modal-intro { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 24px; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-row.has-error input, .form-row.has-error textarea {
  border-color: var(--error);
  background: #fff;
}
.field-error { display: block; font-size: 0.78rem; color: var(--error); margin-top: 5px; min-height: 1em; }
.form-status { font-size: 0.86rem; margin: 4px 0 16px; min-height: 1em; }
.form-status.error { color: var(--error); }
.form-status.sending { color: var(--ink-soft); }
.contact-form .btn { width: 100%; text-align: center; border: 0; cursor: pointer; }
.contact-form .btn[disabled] { opacity: 0.6; cursor: default; }

.modal-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 20px; color: var(--ink-soft); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.modal-divider::before, .modal-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.modal-alt-options { display: flex; flex-direction: column; gap: 10px; }
.modal-alt-options .btn { width: 100%; text-align: center; }

.modal-success { text-align: center; padding: 8px 0; }
.modal-success .icon-badge { width: 56px; height: 56px; margin: 0 auto 18px; background: #DCFCE7; color: var(--success); }
.modal-success .icon-badge svg { width: 26px; height: 26px; }
.modal-success h2 { margin-bottom: 10px; }
.modal-success p { color: var(--ink-soft); margin: 0 0 22px; }
.modal-success .btn { width: 100%; text-align: center; margin-bottom: 10px; }

@media (max-width: 860px) {
  .hero-grid, .fc-grid, .cs-hero-grid, .research-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .comp-grid, .case-grid, .friction-grid, .persona-grid, .triad-grid, .finding-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .meta-chips { gap: 20px; }
  .principle { grid-template-columns: 1fr; gap: 6px; }
  .process-flow { grid-template-columns: 1fr; }
  .outcomes-bar .stat { flex: 1 1 100%; border-left: none; border-top: 1px solid var(--line); padding: 18px 0 0; margin-top: 14px; }
  .outcomes-bar .stat:first-child { border-top: none; margin-top: 0; padding-top: 0; }
  .cta-band { flex-direction: column; text-align: center; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 28px rgba(30,27,58,0.10);
    padding: 8px 28px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-cta { text-align: center; margin-top: 10px; }
}
