/* =========================================================
   Rayaan Writer — Design System
   Minimal, paper-white, marker-highlight editorial style
   ========================================================= */

:root {
  /* Paper + ink */
  --bg: #f8f3e9;
  --bg-soft: #f2ead9;
  --surface: #fffdf8;
  --ink: #211e19;
  --ink-soft: #55503f;
  --ink-faint: #8a8371;
  --border: #e3d9c2;
  --border-strong: #d3c6a4;

  /* Highlighters */
  --yellow: #f7d154;
  --yellow-soft: #fbe6a4;
  --green: #a9d6a5;
  --green-soft: #cdeac9;
  --blue: #a7cbe8;
  --blue-soft: #cfe4f4;
  --pink: #f2b8c6;

  --ink-on-highlight: #211e19;

  --shadow: 0 6px 24px rgba(60, 50, 30, 0.08);
  --shadow-sm: 0 2px 10px rgba(60, 50, 30, 0.06);
  --shadow-lg: 0 18px 40px rgba(60, 50, 30, 0.16);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  --font-display: "IM Fell English", Georgia, "Times New Roman", serif;
  --font-body: Georgia, "Times New Roman", Times, serif;

  --maxw: 1120px;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --surface: #111111;
  --ink: #ffffff;
  --ink-soft: #d6d6d6;
  --ink-faint: #999999;
  --border: #2a2a2a;
  --border-strong: #3d3d3d;

  --yellow: #f7d154;
  --yellow-soft: #4a3d1c;
  --green: #6fa06a;
  --green-soft: #24361f;
  --blue: #6c9ec2;
  --blue-soft: #1f2f3c;
  --pink: #c98a9c;

  --ink-on-highlight: #000000;

  --shadow: 0 6px 24px rgba(255, 255, 255, 0.07);
  --shadow-sm: 0 2px 10px rgba(255, 255, 255, 0.05);
  --shadow-lg: 0 18px 40px rgba(255, 255, 255, 0.1);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(0,0,0,0.02), transparent 40%),
    radial-gradient(circle at 90% 30%, rgba(0,0,0,0.015), transparent 40%);
}

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

a { color: inherit; text-decoration: none; }

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

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.2px;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
h4 { font-size: 1.15rem; letter-spacing: 0.4px; }

p { margin: 0 0 1.1em; color: var(--ink-soft); }

.lede {
  font-size: 1.25rem;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  margin-bottom: 0.6em;
  display: block;
}

.serif-italic { font-style: italic; }

.center { text-align: center; }

/* ---------- Highlighter marks ---------- */

mark, .hl {
  background: none;
  color: inherit;
  font-weight: bold;
  padding: 0.02em 0.32em;
  border-radius: 0.9em 0.35em 0.85em 0.4em / 0.6em 0.9em 0.4em 0.9em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  display: inline;
}

.hl-yellow { background-color: transparent; background-image: linear-gradient(var(--yellow-soft), var(--yellow-soft)); }
.hl-green  { background-color: transparent; background-image: linear-gradient(var(--green-soft), var(--green-soft)); }
.hl-blue   { background-color: transparent; background-image: linear-gradient(var(--blue-soft), var(--blue-soft)); }
.hl-pink   { background-color: transparent; background-image: linear-gradient(var(--pink), var(--pink)); }

/* highlighter marks activate (sweep in) as they scroll into view */
.hl {
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.7s ease;
}
.hl.in-view { background-size: 100% 100%; }

[data-theme="dark"] mark,
[data-theme="dark"] .hl { color: var(--ink); }

/* hand-circled word */
.circle {
  position: relative;
  display: inline-block;
  padding: 0 0.15em;
  font-weight: bold;
}
.circle::after {
  content: "";
  position: absolute;
  inset: -0.22em -0.32em -0.28em -0.32em;
  border: 2.5px solid var(--circle-color, var(--blue));
  border-radius: 52% 48% 55% 45% / 48% 55% 45% 52%;
  transform: scale(0.5) rotate(-2.5deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* hand-circled marks pop in as they scroll into view */
.circle.in-view::after {
  opacity: 1;
  transform: scale(1) rotate(-2.5deg);
}
.circle-yellow { --circle-color: var(--yellow); }
.circle-green { --circle-color: var(--green); }
.circle-blue { --circle-color: var(--blue); }

.underline-squiggle {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='10' viewBox='0 0 60 10'><path d='M0,6 Q7,1 15,6 T30,6 T45,6 T60,6' fill='none' stroke='%23f7d154' stroke-width='3' stroke-linecap='round'/></svg>");
  background-repeat: repeat-x;
  background-position: 0 bottom;
  background-size: 60px 10px;
  padding-bottom: 4px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85em 1.7em;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--ink); }

.btn-soft {
  background: var(--yellow-soft);
  color: var(--ink);
  border: 2px solid transparent;
}

.btn-sm { padding: 0.55em 1.25em; font-size: 0.9rem; }

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.5px;
}
.brand .dot { color: var(--yellow); }

.brand-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
}
.brand-avatar img { width: 100%; height: 100%; object-fit: cover; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.98rem;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  padding: 4px 2px;
  color: var(--ink-soft);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 6px;
  background: var(--yellow-soft);
  border-radius: 4px;
  z-index: -1;
}

.nav-right { display: flex; align-items: center; gap: 14px; }

.mobile-hire { display: none; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 6px 6px;
  background: var(--surface);
  cursor: pointer;
}
.theme-toggle button {
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink-faint);
}
.theme-toggle button.active {
  background: var(--yellow-soft);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 90px;
  padding-bottom: 70px;
  text-align: center;
}
.hero h1 { max-width: 900px; margin-left: auto; margin-right: auto; }
.hero .lede {
  max-width: 720px;
  margin: 24px auto 8px;
}
.hero-sub {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--ink-faint);
  font-style: italic;
}
.hero-art {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}
.hero-avatar {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow);
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sections ---------- */

.section { padding-top: 76px; padding-bottom: 76px; }
.section-tight { padding-top: 40px; padding-bottom: 40px; }
.section-alt { background: var(--bg-soft); }
.section-title {
  margin-bottom: 44px;
}
.section-title h2 { margin-bottom: 0.15em; }
.section-title .eyebrow { margin-bottom: 0.8em; }
.section-title p { max-width: 640px; }
.section-title.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-title.center p { margin-left: auto; margin-right: auto; }

.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 0;
}

/* ---------- Cards / numbered list ---------- */

.grid {
  display: grid;
  gap: 22px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.num-row {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}
.num-row:last-child { }
.num-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink-faint);
}
.num-row.hl-1 .num-badge { background: var(--yellow-soft); border-color: transparent; color: var(--ink); }
.num-row.hl-2 .num-badge { background: var(--green-soft); border-color: transparent; color: var(--ink); }
.num-row.hl-3 .num-badge { background: var(--blue-soft); border-color: transparent; color: var(--ink); }
.num-row.hl-4 .num-badge { background: var(--pink); border-color: transparent; color: var(--ink); }
.num-content h3 { margin-bottom: 0.3em; }
.num-content p { margin-bottom: 0; }

/* boxed variant: each numbered row/step becomes its own shadowed card */
.num-row.boxed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  border-top: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.num-row.boxed:last-child { margin-bottom: 0; }
.num-row.boxed:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

/* ---------- Edition cards (floating) ---------- */

.edition-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 34px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.edition-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.edition-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  font-size: 1.6rem;
}
.edition-card.hl-1 .edition-icon { background: var(--yellow-soft); }
.edition-card.hl-2 .edition-icon { background: var(--green-soft); }
.edition-card.hl-3 .edition-icon { background: var(--blue-soft); }
.edition-card.hl-4 .edition-icon { background: var(--pink); }
.edition-card h3, .edition-card h4 { margin-bottom: 0.35em; }
.edition-card .text-faint { margin-bottom: 0.9em; }
.edition-card p:last-child { margin-bottom: 0; }

/* ---------- Value / feature cards ---------- */

.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  background: var(--surface);
  display: flex;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.feature-card .icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
}
.feature-card h4 { margin-bottom: 0.35em; }
.feature-card p { margin-bottom: 0; font-size: 0.98rem; }

/* ---------- Timeline (act structure) ---------- */

.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: flex;
  gap: 22px;
  padding-bottom: 34px;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 54px;
  bottom: 0;
  width: 2px;
  background: var(--border-strong);
}
.timeline-num {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--yellow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  z-index: 1;
}
.timeline-item:nth-child(2) .timeline-num { background: var(--green-soft); }
.timeline-item:nth-child(3) .timeline-num { background: var(--blue-soft); }

/* boxed variant: each act becomes its own shadowed card, no connecting line */
.timeline-item.boxed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.timeline-item.boxed:last-child { margin-bottom: 0; }
.timeline-item.boxed::before { content: none; }
.timeline-item.boxed:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

/* ---------- FAQ ---------- */

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  background: var(--surface);
  overflow: hidden;
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 26px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
}
.faq-q .plus {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease;
  font-size: 1.1rem;
  color: var(--ink-faint);
}
.faq-item.open .faq-q .plus { transform: rotate(45deg); background: var(--yellow-soft); border-color: transparent; color: var(--ink); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 26px;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 26px 22px; }
.faq-a p { margin-bottom: 0; }

/* ---------- Sliding logo marquee ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 18px;
  width: max-content;
  animation: marquee-scroll 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-tile {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 84px;
  padding: 0 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- Substack embed ---------- */

.substack-embed {
  display: flex;
  justify-content: center;
  margin: 8px auto 0;
}
.substack-embed iframe {
  width: 480px;
  max-width: 100%;
  height: 320px;
  border-radius: var(--radius-md);
}
@media (max-width: 520px) {
  .substack-embed iframe { height: 280px; }
}

.footer-subscribe {
  width: 300px;
  max-width: 100%;
  height: 58px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  position: relative;
}
.footer-subscribe iframe {
  width: 100%;
  height: 280px;
  border: none;
  display: block;
  margin-top: -157px;
}

/* ---------- Logos ---------- */

.logo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  align-items: center;
}
.logo-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
}
.logo-tile img {
  max-height: 130px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: var(--logo-filter, none);
}
[data-theme="dark"] .logo-tile { background: var(--surface); }
[data-theme="dark"] .logo-tile img { filter: brightness(0.92) contrast(0.95); }

.marquee-track .logo-tile {
  flex-shrink: 0;
  width: 260px;
}

.marquee-track .logo-tile.sm {
  width: 170px;
  height: 90px;
  padding: 14px;
}
.marquee-track .logo-tile.sm img { max-height: 54px; }

/* ---------- Forms ---------- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.form-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

/* Thinker's Compass hero: image sits beside text on desktop, between headline and text on mobile */
.thinker-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "headline image" "text image";
  gap: 40px;
  align-items: center;
}
.thinker-hero-headline { grid-area: headline; }
.thinker-hero-image { grid-area: image; }
.thinker-hero-text { grid-area: text; }
@media (max-width: 760px) {
  .thinker-hero {
    grid-template-columns: 1fr;
    grid-template-areas: "headline" "image" "text";
  }
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 6px;
  color: var(--ink);
}
input, textarea, select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  margin-bottom: 20px;
  transition: border-color 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--yellow);
}
textarea { resize: vertical; min-height: 130px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 50px 0 32px;
  margin-top: 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.footer-links {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-col h4 { margin-bottom: 12px; font-size: 1rem; }
.footer-col a {
  display: block;
  color: var(--ink-soft);
  padding: 5px 0;
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--ink-faint);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ---------- Callout / CTA band ---------- */

.cta-band {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-band:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.cta-band h2 { margin-bottom: 0.3em; }
.cta-band p { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Tags / badges ---------- */

.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--ink-soft);
}

.pill-list { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Utility ---------- */

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-faint { color: var(--ink-faint); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.rule-space { margin: 60px 0; }


/* ---------- Scroll-reveal (immersive scrolling) ---------- */

.reveal, .reveal-scale {
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal { transform: translateY(34px); }
.reveal-scale { transform: scale(0.94); }
.reveal.in-view, .reveal-scale.in-view {
  opacity: 1;
  transform: none;
}

/* staggered entrance for grouped cards/rows */
.reveal-group > .reveal:nth-child(1), .reveal-group > .reveal-scale:nth-child(1) { transition-delay: 0.04s; }
.reveal-group > .reveal:nth-child(2), .reveal-group > .reveal-scale:nth-child(2) { transition-delay: 0.16s; }
.reveal-group > .reveal:nth-child(3), .reveal-group > .reveal-scale:nth-child(3) { transition-delay: 0.28s; }
.reveal-group > .reveal:nth-child(4), .reveal-group > .reveal-scale:nth-child(4) { transition-delay: 0.4s; }
.reveal-group > .reveal:nth-child(5), .reveal-group > .reveal-scale:nth-child(5) { transition-delay: 0.52s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale, .hl, .circle::after {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    background-size: 100% 100% !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .logo-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 28px 26px;
    gap: 16px;
  }
  .nav.open .nav-links .mobile-hire {
    display: inline-flex;
    background: var(--ink);
    color: var(--bg);
    padding: 0.6em 1.4em;
    border-radius: var(--radius-pill);
    font-weight: 700;
  }
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
  .logo-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-top { flex-direction: column; }
  .footer-links { gap: 28px; }
  .hero { padding-top: 60px; padding-bottom: 40px; }
  .section { padding-top: 54px; padding-bottom: 54px; }
  .cta-band { padding: 40px 24px; }
  .form-card { padding: 26px; }
}

@media (max-width: 520px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .logo-strip { grid-template-columns: repeat(2, 1fr); }
  body { font-size: 16.5px; }
  .nav { padding: 14px 18px; gap: 10px; }
  .brand { font-size: 1.1rem; white-space: nowrap; }
  .brand-avatar { width: 28px; height: 28px; }
  .nav-right { gap: 8px; }
  .nav-right > .btn { display: none; }
  .theme-toggle button { padding: 5px 8px; font-size: 0.9rem; }
  .nav-toggle { padding: 7px 9px; }
}

/* ---------- Dark mode: force all highlight/circle marks to yellow ---------- */

[data-theme="dark"] .hl-yellow,
[data-theme="dark"] .hl-green,
[data-theme="dark"] .hl-blue,
[data-theme="dark"] .hl-pink {
  background-color: transparent;
  background-image: linear-gradient(var(--yellow), var(--yellow));
}
[data-theme="dark"] mark,
[data-theme="dark"] .hl {
  color: #000000;
}
[data-theme="dark"] .circle-yellow,
[data-theme="dark"] .circle-green,
[data-theme="dark"] .circle-blue {
  --circle-color: var(--yellow);
}

/* dark mode: italic caption/eyebrow text stays fully white, not faded gray */
[data-theme="dark"] .eyebrow,
[data-theme="dark"] [style*="font-style:italic"] {
  color: var(--ink);
}
