/* ============================================================
   Thrive Learning Resources — Modern Redesign
   Cool neutral palette: crisp off-white + deep slate ink with
   an indigo accent. (Variable names kept from v1 for stability:
   --cream = background, --sage = tint, --amber = accent.)
   ============================================================ */

:root {
  --cream: #F7F8FA;
  --cream-2: #EDF0F5;
  --sage: #E9E7FC;
  --white: #FFFFFF;
  --ink: #14162B;
  --ink-soft: #4B5065;
  --ink-faint: #878CA0;
  --amber: #6C5CE7;
  --amber-deep: #4B3FD4;
  --line: rgba(20, 22, 43, 0.10);

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  --radius: 24px;
  --radius-sm: 14px;
  --shadow-sm: 0 2px 12px rgba(20, 22, 43, 0.06);
  --shadow-md: 0 12px 40px rgba(20, 22, 43, 0.10);
  --shadow-lg: 0 24px 70px rgba(20, 22, 43, 0.16);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 88px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }

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

/* ---------- Type ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.display-xl { font-size: clamp(2.9rem, 7vw, 5.4rem); }
.display-lg { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.display-md { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.display-sm { font-size: clamp(1.3rem, 2.2vw, 1.65rem); }

.accent-italic {
  font-weight: 600;
  color: var(--amber);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-deep);
}
.eyebrow::before {
  content: "";
  width: 34px; height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

/* ---------- Layout ---------- */
.container { width: min(1180px, 92vw); margin-inline: auto; }
.container-narrow { width: min(820px, 92vw); margin-inline: auto; }

section { position: relative; }
.section-pad { padding: clamp(70px, 10vw, 130px) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    background 0.35s, color 0.35s, border-color 0.35s;
  position: relative;
  overflow: hidden;
}
.btn .arrow { transition: transform 0.35s var(--ease-out); }
.btn:hover .arrow { transform: translateX(5px); }

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover {
  background: var(--amber);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(108, 92, 231, 0.35);
}

.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--amber); color: #fff; transform: translateY(-3px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
.site-header.scrolled {
  background: rgba(247, 248, 250, 0.94);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}
.header-inner {
  width: min(1180px, 92vw);
  margin-inline: auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
  transition: height 0.4s var(--ease-out);
}
.site-header.scrolled .header-inner { height: 68px; }

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 7px 18px;
  border: 2px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(var(--cream), var(--cream)) padding-box,
    linear-gradient(120deg, var(--amber), #38BDF8 55%, var(--amber)) border-box;
  animation: logoGlow 4s ease-in-out infinite;
}
@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(108, 92, 231, 0.30), 0 0 22px rgba(56, 189, 248, 0.16); }
  50% { box-shadow: 0 0 18px rgba(108, 92, 231, 0.50), 0 0 36px rgba(56, 189, 248, 0.30); }
}
.brand img {
  height: 50px;
  width: auto;
  transition: height 0.4s var(--ease-out);
}
.site-header.scrolled .brand img { height: 46px; }

.main-nav {
  display: flex;
  gap: clamp(14px, 1.8vw, 28px);
  margin-left: auto;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 2px;
  position: relative;
  white-space: nowrap;
  transition: color 0.3s;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--amber);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a:hover::after, .main-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-cta { padding: 11px 24px; font-size: 0.9rem; flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px; height: 48px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: transparent;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero-copy h1 { margin-bottom: 22px; }
.hero-copy .lead { margin-bottom: 36px; max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-media { position: relative; }
.hero-photo {
  position: relative;
  border-radius: 46% 54% 52% 48% / 44% 46% 54% 56%;
  overflow: hidden;
  aspect-ratio: 4 / 4.6;
  box-shadow: var(--shadow-lg);
  animation: blobMorph 14s ease-in-out infinite alternate;
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}
@keyframes blobMorph {
  0%   { border-radius: 46% 54% 52% 48% / 44% 46% 54% 56%; }
  50%  { border-radius: 54% 46% 44% 56% / 52% 56% 44% 48%; }
  100% { border-radius: 48% 52% 56% 44% / 46% 44% 56% 54%; }
}

/* decorative blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
.blob-amber {
  background: radial-gradient(circle, rgba(108, 92, 231, 0.20) 0%, rgba(108, 92, 231, 0.08) 45%, transparent 70%);
  width: 560px; height: 560px;
}
.blob-sage {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(56, 189, 248, 0.07) 45%, transparent 70%);
  width: 620px; height: 620px;
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 3vw, 38px); }

.service-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
  display: block;
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.service-card .card-img { overflow: hidden; aspect-ratio: 16 / 10.5; }
.service-card .card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}
.service-card:hover .card-img img { transform: scale(1.07); }
.service-card .card-body {
  padding: 26px 30px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.service-card h3 { font-size: 1.5rem; }
.service-card .card-arrow {
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: background 0.35s, color 0.35s, transform 0.45s var(--ease-out), border-color 0.35s;
}
.service-card:hover .card-arrow {
  background: var(--amber);
  border-color: var(--amber);
  transform: rotate(-45deg);
}

/* ---------- Page cards (home explore grid) ---------- */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.6vw, 32px);
}
.page-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 34px 30px;
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.35s;
}
.page-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--amber), #38BDF8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.page-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-md); border-color: transparent; }
.page-card:hover::before { transform: scaleX(1); }
.page-card .card-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-deep);
}
.page-card .card-tag .tag-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--sage);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}
.page-card h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.015em; }
.page-card p {
  color: var(--ink-soft);
  font-size: 0.96rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.page-card .card-go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}
.page-card .card-go .arrow { transition: transform 0.35s var(--ease-out); }
.page-card:hover .card-go { color: var(--amber-deep); }
.page-card:hover .card-go .arrow { transform: translateX(5px); }

/* ---------- Split feature (detail pages) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
}
.split-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  aspect-ratio: 4 / 4.4;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(46,48,37,0.28));
}
.split-copy .eyebrow { margin-bottom: 18px; }
.split-copy h1, .split-copy h2 { margin-bottom: 20px; }
.split-copy p + p { margin-top: 16px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--sage);
  color: var(--ink);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 26px;
}
.pill .pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--amber-deep);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(75, 63, 212, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(75, 63, 212, 0); }
}

/* ---------- Contact rows on detail pages ---------- */
.info-rows { margin-top: 34px; display: grid; gap: 14px; }
.info-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 22px;
  font-weight: 600;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.info-row:hover { transform: translateX(6px); box-shadow: var(--shadow-sm); }
.info-row .icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--sage);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.info-row small {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  font-weight: 700;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding: calc(var(--header-h) + clamp(50px, 9vw, 110px)) 0 clamp(46px, 7vw, 90px);
  overflow: hidden;
}
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero h1 { margin-bottom: 18px; max-width: 18ch; }
.page-hero .lead { max-width: 58ch; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(46px, 6vw, 80px) clamp(30px, 6vw, 90px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.cta-band h2 { color: #fff; max-width: 22ch; }
.cta-band p { color: rgba(255, 255, 255, 0.72); max-width: 48ch; margin-top: 12px; }
.cta-band::before {
  content: "";
  position: absolute;
  top: -120px; right: -80px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.45), transparent 65%);
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(30px, 4vw, 52px);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }

.field { position: relative; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 24px 18px 10px;
  outline: none;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field label {
  position: absolute;
  left: 18px; top: 17px;
  color: var(--ink-faint);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.25s var(--ease-out);
}
.field input:focus, .field textarea:focus {
  border-color: var(--amber);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-deep);
}

.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  background: var(--sage);
  border-radius: var(--radius-sm);
  padding: 16px 22px;
  font-weight: 700;
}
.form-success.show { display: flex; animation: popIn 0.5s var(--ease-out); }
@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ---------- Article / blog ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--amber), var(--amber-deep));
  z-index: 300;
}

.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(36px, 5vw, 70px);
  align-items: start;
}
.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  border-left: 2px solid var(--line);
  padding-left: 22px;
  font-size: 0.9rem;
}
.toc-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.toc a {
  display: block;
  padding: 6px 0;
  color: var(--ink-soft);
  font-weight: 600;
  position: relative;
  transition: color 0.3s, padding-left 0.3s var(--ease-out);
}
.toc a::before {
  content: "";
  position: absolute;
  left: -24px; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px; height: 70%;
  background: var(--amber-deep);
  transition: transform 0.3s var(--ease-out);
}
.toc a.active { color: var(--amber-deep); padding-left: 6px; }
.toc a.active::before { transform: translateY(-50%) scaleY(1); }

.article h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: clamp(44px, 6vw, 64px) 0 18px;
  scroll-margin-top: calc(var(--header-h) + 30px);
}
.article h2:first-of-type { margin-top: 0; }
.article h3 {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  margin: 34px 0 12px;
}
.article p { margin-bottom: 18px; color: var(--ink-soft); }
.article p strong, .article li strong { color: var(--ink); }
.article ul, .article ol { margin: 0 0 20px 4px; display: grid; gap: 12px; }
.article li {
  position: relative;
  padding-left: 30px;
  color: var(--ink-soft);
}
.article li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--amber);
  transform: rotate(45deg);
}
.article ol { counter-reset: item; }
.article ol li { padding-left: 42px; counter-increment: item; }
.article ol li::before {
  content: counter(item);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
  transform: none;
  top: 0.15em;
}

.dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 4.1em;
  float: left;
  line-height: 0.82;
  padding: 6px 14px 0 0;
  color: var(--amber-deep);
}

.article-divider {
  border: none;
  height: 1px;
  background: var(--line);
  margin: clamp(40px, 6vw, 60px) 0;
}

/* ---------- About page ---------- */
.quote-mark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.6;
  color: var(--amber);
  display: block;
  margin-bottom: 18px;
}
.signature {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.signature .sig-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
}
.signature .sig-role {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.badge-float {
  position: absolute;
  bottom: 24px; left: 24px;
  right: 24px;
  background: rgba(250, 247, 240, 0.95);
  border-radius: 16px;
  padding: 16px 22px;
  z-index: 2;
  box-shadow: var(--shadow-md);
}
.badge-float .sig-name { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }

/* ---------- Values strip ---------- */
.values-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.5vw, 30px);
}
.value-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--amber);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.value-card .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--amber-deep);
  display: block;
  margin-bottom: 12px;
}
.value-card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  margin-top: clamp(60px, 9vw, 120px);
  overflow: hidden;
  position: relative;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(30px, 5vw, 70px);
  padding: clamp(56px, 7vw, 90px) 0 50px;
}
.footer-brand img {
  height: 64px;
  width: auto;
  margin-bottom: 20px;
}
.footer-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 18px;
}
.footer-links { display: grid; gap: 10px; }
.footer-links a { transition: color 0.3s, padding-left 0.3s var(--ease-out); }
.footer-links a:hover { color: #fff; padding-left: 6px; }
.footer-contact { display: grid; gap: 10px; font-style: normal; }
.footer-contact a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer-word {
  position: absolute;
  bottom: -0.28em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(6rem, 18vw, 15rem);
  color: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
}

/* ---------- Back to top ---------- */
.back-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: #fff;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s var(--ease-out), background 0.3s;
  z-index: 150;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { background: var(--amber); color: var(--ink); }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* Capture/testing escape hatch: ?noanim in the URL disables entrance animations */
html.no-anim .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
html.no-anim .hero { min-height: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile ---------- */
@media (max-width: 1060px) {
  .main-nav {
    position: fixed;
    inset: 0;
    background: var(--cream);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transform: translateY(-100%);
    transition: transform 0.5s var(--ease-out);
    z-index: -1;
    margin: 0;
  }
  .main-nav.open { transform: none; }
  .main-nav a {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    font-weight: 560;
    color: var(--ink);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
    transition-delay: calc(var(--i) * 0.055s + 0.15s);
  }
  .main-nav.open a { opacity: 1; transform: none; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 4px); }
  .hero-grid, .split, .card-grid { grid-template-columns: 1fr; }
  .split-media { aspect-ratio: 4 / 3; order: -1; }
  .hero-media { max-width: 480px; margin-inline: auto; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .values-strip { grid-template-columns: 1fr; }
  .explore-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .display-xl { font-size: clamp(2.35rem, 10.5vw, 2.9rem); }
  h1, h2, h3, .display { overflow-wrap: break-word; }
}
