/* Hero: split card. Ivory panel with a wavy edge on the left, photo on the right.
   Theme colours (navy + gold). Loads after elegant.css. Remove its <link> to undo. */

.hero {
  display: flex;
  align-items: stretch;
  min-height: 560px;
  padding: 56px var(--pad) 100px;
}

.hero-image {
  inset: auto;
  top: 56px;
  bottom: 100px;
  left: var(--pad);
  right: var(--pad);
  border-radius: 14px;
  background: url("../assets/hero-clinic.png") no-repeat right center / cover;
  -webkit-mask-image: none;
  mask-image: none;
  animation: none;
  will-change: auto;
  box-shadow: 0 30px 70px #02082a88;
}

.hero-image::before,
.hero-image::after {
  content: none;
}

/* ivory panel, wavy right edge */
.hero-copy {
  flex: 0 0 60%;
  max-width: 60%;
  padding: 56px 40px 56px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(160deg, #ffffff, #f6f1e6);
  box-shadow: -2px 0 0 #d9b26a55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H80C96 18 66 38 82 60S76 88 84 100H0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H80C96 18 66 38 82 60S76 88 84 100H0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

/* soft shadow ribbon following the wave, like the reference */
.hero-copy::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: 14px 0 0 14px;
  background: #d9b26a40;
  transform: translateX(16px);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H80C96 18 66 38 82 60S76 88 84 100H0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H80C96 18 66 38 82 60S76 88 84 100H0Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

/* dark text on the light panel */
.hero-copy .eyebrow { color: #a9803a; }
.hero-copy .eyebrow i { background: #d9b26a; }

.hero-copy h1 {
  color: #0f1b4d;
  font-size: clamp(34px, 3.6vw, 56px);
  white-space: normal;
}

.hero-copy h1 em {
  background: linear-gradient(100deg, #a9803a, #d9b26a 60%, #a9803a);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy .hero-intro { color: #4a5578; max-width: 460px; }

.hero-copy .button-outline {
  color: #0f1b4d;
  border-color: #0f1b4d55;
  background: transparent;
}

.hero-copy .button-outline:hover { background: #0f1b4d0d; border-color: #0f1b4d; }

@media (max-width: 900px) {
  .hero { flex-direction: column; padding: 32px 22px 120px; min-height: 0; }
  .hero-copy { flex: none; max-width: 100%; padding: 36px 26px 150px; }
  .hero-copy::before, .hero-copy::after { border-radius: 14px 14px 0 0; -webkit-mask: none; mask: none; transform: none; }
  .hero-copy::after { display: none; }
  .hero-image { position: relative; top: auto; bottom: auto; left: auto; right: auto; height: 280px; margin-top: -120px; z-index: 2; background-position: 70% center; }
}

/* ---- full-width: no card box, panel and photo run edge to edge ---- */
.hero { padding: 0; min-height: 620px; }
.hero-image { inset: 0; top: 0; bottom: 0; left: 0; right: 0; border-radius: 0; box-shadow: none; }
.hero-copy { flex: 0 0 62%; max-width: 62%; padding: 90px 40px 130px var(--pad); }
.hero-copy::before, .hero-copy::after { border-radius: 0; }
.hero-copy::before { box-shadow: none; }

@media (max-width: 900px) {
  .hero { padding: 0 0 120px; }
  .hero-copy { flex: none; max-width: 100%; padding: 48px 22px 150px; }
  .hero-image { position: relative; inset: auto; height: 300px; margin-top: -120px; }
}

/* ---- theme colours instead of white: navy panel, light text ---- */
.hero-copy::before {
  background: radial-gradient(ellipse at 0 100%, #7a4cf055, transparent 45%), radial-gradient(ellipse at 40% 0, #1a56d066, transparent 60%), linear-gradient(160deg, #0b1d5a, #07123a);
}
.hero-copy .eyebrow { color: #e6eeff; }
.hero-copy .eyebrow i { background: #ffffff80; }
.hero-copy h1 { color: #fff; }
.hero-copy h1 em {
  background: var(--gtext);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-copy .hero-intro { color: #e4ecfb; }
.hero-copy .button-outline { color: #fff; border-color: #ffffff66; }
.hero-copy .button-outline:hover { background: #ffffff1a; border-color: #fff; }

/* ---- reference shape: big S-curve, panel sweeps under the photo, offset shadow ribbon ---- */
.hero-copy { flex: 0 0 100%; max-width: 100%; padding: 90px 48% 150px var(--pad); }

.hero-copy::before,
.hero-copy::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H55C51 18 47 34 47 50C47 68 51 84 60 89C74 96 87 86 100 81V100H0Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0H55C51 18 47 34 47 50C47 68 51 84 60 89C74 96 87 86 100 81V100H0Z'/%3E%3C/svg%3E");
}
.hero-copy::after { background: #ffffff26; transform: translate(14px, 10px); }

/* progress row */
.hero-steps { display: flex; gap: 34px; margin-top: 44px; font-size: 12.5px; color: #ffffffb3; }
.hero-steps span { position: relative; display: flex; align-items: center; gap: 8px; }
.hero-steps i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #ffffff99; display: block; }
.hero-steps span:not(:last-child)::after { content: ""; position: absolute; left: calc(100% + 8px); top: 50%; width: 18px; height: 1px; background: #ffffff55; }
.hero-steps .on { color: var(--gold-soft, #f3dfae); }
.hero-steps .on i { background: #d9b26a; border-color: #d9b26a; }

@media (max-width: 900px) {
  .hero-copy { padding: 48px 22px 150px; }
  .hero-steps { margin-top: 28px; }
}
@media (max-width: 900px) {
  .hero-copy::before, .hero-copy::after { -webkit-mask-image: none; mask-image: none; }
}

/* ribbon sits on the photo side of the curve and above the bottom edge */
.hero-copy::after { transform: translate(20px, -12px); background: #ffffff2e; }
.hero-copy { padding-right: 54%; }
@media (max-width: 900px) { .hero-copy::after { transform: none; } .hero-copy { padding-right: 22px; } }

/* ---- image highlight: brighter photo, gold light wash, one soft light sweep on load ---- */
.hero-image {
  filter: saturate(1.15) contrast(1.06) brightness(1.08);
  overflow: hidden;
}

/* gold light from the upper right + edge glow toward the curve + bottom vignette */
.hero-image::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  width: auto;
  height: auto;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 45% 55% at 85% 12%, #f3dfae55, transparent 70%),
    radial-gradient(ellipse 30% 70% at 38% 50%, #d9b26a33, transparent 70%),
    linear-gradient(0deg, #02082a66 0%, transparent 30%);
  animation: none;
  pointer-events: none;
}

/* a single light sweep across the photo */
.hero-image::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 26%;
  background: linear-gradient(100deg, transparent, #ffffff3d, transparent);
  transform: translateX(-120%) skewX(-16deg);
  animation: heroSweep 2.4s ease-out 1.4s 1 both;
  pointer-events: none;
}

@keyframes heroSweep {
  from { transform: translateX(-120%) skewX(-16deg); opacity: 1; }
  to { transform: translateX(520%) skewX(-16deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image::after { animation: none; opacity: 0; }
}

/* ---- curve highlighter: glowing gold line along the wavy edge ---- */
.hero-curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
  animation: curveIn 1.4s ease .3s both;
}
.hero-curve path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.hc-glow { stroke: #d9b26a; stroke-width: 10; opacity: .35; filter: blur(6px); }
.hc-line { stroke: url(#hcg); stroke-width: 2.5; filter: drop-shadow(0 0 6px #d9b26acc); }

@keyframes curveIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) { .hero-curve { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-curve { animation: none; } }

/* ---- curve animation: line draws itself, a light runs along it, ribbon drifts ---- */
.hero-curve { animation: none; }

.hc-line {
  stroke-dasharray: 4000;
  stroke-dashoffset: 4000;
  animation: curveDraw 2.2s cubic-bezier(.3, .6, .2, 1) .3s forwards;
}
.hc-glow {
  opacity: 0;
  animation: curveGlowIn 1.6s ease 1.4s forwards;
}

/* short bright segment travelling along the curve */
.hc-run {
  stroke: #fff;
  stroke-width: 4;
  stroke-dasharray: 90 4000;
  stroke-dashoffset: 0;
  opacity: 0;
  filter: drop-shadow(0 0 8px #f7e6b8) drop-shadow(0 0 14px #d9b26a);
  animation: curveRun 6s ease-in-out 2.8s infinite;
}

@keyframes curveDraw { to { stroke-dashoffset: 0; } }
@keyframes curveGlowIn { to { opacity: .35; } }
@keyframes curveRun {
  0% { stroke-dashoffset: 0; opacity: 0; }
  8% { opacity: 1; }
  55% { stroke-dashoffset: -1500; opacity: 1; }
  65%, 100% { stroke-dashoffset: -1600; opacity: 0; }
}

/* ribbon along the curve drifts slowly */
@media (min-width: 901px) {
  .hero-copy::after { animation: ribbonDrift 9s ease-in-out infinite alternate; }
}
@keyframes ribbonDrift {
  from { transform: translate(14px, -8px); }
  to { transform: translate(34px, -18px); }
}

@media (prefers-reduced-motion: reduce) {
  .hc-line { animation: none; stroke-dashoffset: 0; }
  .hc-glow { animation: none; opacity: .35; }
  .hc-run { animation: none; opacity: 0; }
  .hero-copy::after { animation: none; }
}

/* ---- amoeba motion: panel edge, ribbon and gold line all wobble together like a blob ---- */
.hero-curve { z-index: 2; }
.hc-rib { opacity: .2; stroke: none; filter: none; }
.hc-panel { stroke: none; filter: none; }
.hc-run { display: none; }
.hc-line { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
.hc-glow { animation: none; opacity: .35; }

@media (min-width: 901px) {
  .hero-copy::before, .hero-copy::after { display: none; }
}
.hero-curve .hc-panel { fill: url(#hcp); }
.hero-curve .hc-rib { fill: #fff; }

/* ---- background image motion: slow zoom + pan (desktop) ---- */
@media (min-width: 901px) {
  .hero-image {
    background-size: 108% auto;
    background-position: 70% 25%;
    animation: heroBgDrift 26s ease-in-out infinite alternate;
  }
}
@keyframes heroBgDrift {
  from { background-size: 108% auto; background-position: 70% 22%; }
  to { background-size: 122% auto; background-position: 95% 78%; }
}
@media (prefers-reduced-motion: reduce) { .hero-image { animation: none; } }

/* ---- trust strip animation: rises in, items stagger in, soft light sweeps across ---- */
.trust-strip {
  overflow: hidden;
  animation: stripRise .9s cubic-bezier(.2, .75, .25, 1) .5s both;
}

.trust-strip>div {
  animation: stripItem .7s cubic-bezier(.2, .75, .25, 1) both;
}
.trust-strip>div:nth-child(1) { animation-delay: .8s; }
.trust-strip>div:nth-child(2) { animation-delay: .95s; }
.trust-strip>div:nth-child(3) { animation-delay: 1.1s; }
.trust-strip>div:nth-child(4) { animation-delay: 1.25s; }
.trust-strip>div:nth-child(5) { animation-delay: 1.4s; }

.trust-strip::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 22%;
  background: linear-gradient(100deg, transparent, #ffffff26, transparent);
  transform: translateX(-130%) skewX(-18deg);
  animation: stripSweep 7s ease-in-out 2.5s infinite;
  pointer-events: none;
}

.trust-strip .ic { transition: transform .4s ease; }
.trust-strip>div:hover .ic { transform: translateY(-4px) scale(1.08); }

@keyframes stripRise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes stripItem { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes stripSweep {
  0% { transform: translateX(-130%) skewX(-18deg); }
  35%, 100% { transform: translateX(560%) skewX(-18deg); }
}

@media (prefers-reduced-motion: reduce) {
  .trust-strip, .trust-strip>div, .trust-strip::before { animation: none; }
}

/* ---- sketch-drawing icons: every icon traces itself when it scrolls into view ---- */
svg.ic.sketch {
  stroke-dasharray: 90;
  stroke-dashoffset: 90;
}

svg.ic.sketch.is-drawn {
  animation: iconSketch 2s cubic-bezier(.45, .05, .25, 1) forwards;
}

@keyframes iconSketch {
  from { stroke-dashoffset: 90; }
  to { stroke-dashoffset: 0; }
}

/* ---- button hover: gold fill rises from the bottom, text turns navy, icon slides ---- */
.button::after,
.button:hover::after { display: none; }

.button,
.button.button-grad,
.button.button-outline {
  transition: color .35s ease, border-color .35s ease, box-shadow .4s ease, transform .3s ease;
}

.button.button::before,
.button.button-grad::before,
.button.button-outline::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(100deg, #f7e6b8, #d9b26a 60%, #f3dfae);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform .45s cubic-bezier(.2, .75, .25, 1);
  animation: none;
}

.button:hover::before { transform: scaleY(1); }

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  filter: none;
  color: #0f1b4d;
  border-color: #f3dfae;
  box-shadow: 0 12px 28px #d9b26a66;
}

.button:hover .ic { transform: translateX(6px); }
.button:active { transform: translateY(0) scale(.98); }

/* ---- icon hover: springy pop with a small tilt and gold glow ---- */
:is(article, li, .trust-strip > div) svg.ic {
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), filter .4s ease, color .3s ease;
}

:is(article, li, .trust-strip > div):hover svg.ic {
  transform: translateY(-5px) scale(1.14) rotate(-7deg) !important;
  filter: drop-shadow(0 6px 10px #d9b26a88);
  color: #f7e6b8;
}

/* ---- brush-script headings (Dancing Script, like the reference) + clean DM Sans text ---- */
:root {
  --head: "Dancing Script", "Brush Script MT", cursive;
  --sans: "DM Sans", Arial, sans-serif;
}

body, button, input, select, textarea {
  font-family: "DM Sans", Arial, sans-serif;
}

h1, h2, h3, h4, strong, .brand {
  font-family: "Dancing Script", "Brush Script MT", cursive;
  font-weight: 700;
  letter-spacing: 0;
}

/* script runs small: scale headings up */
h1 { font-size: clamp(46px, 5vw, 80px); line-height: 1.05; }
h2 { font-size: clamp(38px, 3.8vw, 58px); line-height: 1.1; }
h3 { font-size: 1.35em; }
.hero-copy h1 { font-size: clamp(46px, 4.6vw, 74px); }

/* small spaced caps labels, like 'A MODERN HANDWRITTEN FONT' in the reference */
.eyebrow {
  font-family: "DM Sans", Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 4px;
}

/* make sure the larger script sizes win over older per-section sizes */
main h2 { font-size: clamp(38px, 3.8vw, 58px) !important; line-height: 1.1 !important; }
main h3 { font-size: 24px !important; line-height: 1.15 !important; }
.hero-copy h1 { font-size: clamp(46px, 4.6vw, 74px) !important; line-height: 1.05 !important; }
.trust-strip strong { font-size: 26px; }
@media (max-width: 650px) {
  main h2 { font-size: 36px !important; }
  .hero-copy h1 { font-size: 44px !important; }
}

/* ---- final fonts: Pacifico headings; Dancing Script (reference font) for paragraphs and buttons ---- */
:root {
  --head: "Pacifico", "Dancing Script", cursive;
  --sans: "Dancing Script", "DM Sans", cursive;
}

h1, h2, h3, h4, strong, .brand {
  font-family: "Pacifico", "Dancing Script", cursive;
  font-weight: 400;
  letter-spacing: 0;
}

/* Pacifico is wide: bring heading sizes back down */
main h2 { font-size: clamp(30px, 3vw, 44px) !important; line-height: 1.25 !important; }
main h3 { font-size: 20px !important; line-height: 1.25 !important; }
.hero-copy h1 { font-size: clamp(38px, 3.8vw, 60px) !important; line-height: 1.2 !important; }
.trust-strip strong { font-size: 22px; }

body, p, li, input, select, textarea, summary, .hero-intro, .section-lead {
  font-family: "Dancing Script", "DM Sans", cursive;
  font-weight: 500;
}
main p { font-size: 18px !important; line-height: 1.45 !important; }
.journey-steps p, .trust-strip b, .advantage-grid p { font-size: 16px !important; }
.hero-intro { font-size: 21px !important; }

.button, button {
  font-family: "Dancing Script", "DM Sans", cursive;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .3px;
}

@media (max-width: 650px) {
  main h2 { font-size: 28px !important; }
  .hero-copy h1 { font-size: 36px !important; }
}

/* ---- school-handwriting look (Dash to School is a paid font): Fredoka headings, Quicksand text ---- */
:root {
  --head: "Fredoka", "Quicksand", sans-serif;
  --sans: "Quicksand", "DM Sans", sans-serif;
}

h1, h2, h3, h4, strong, .brand {
  font-family: "Fredoka", "Quicksand", sans-serif;
  font-weight: 600;
  letter-spacing: .3px;
}

body, p, li, input, select, textarea, summary, .hero-intro, .section-lead, .button, button {
  font-family: "Quicksand", "DM Sans", sans-serif;
  font-weight: 500;
}

main h2 { font-size: clamp(34px, 3.4vw, 50px) !important; line-height: 1.15 !important; }
main h3 { font-size: 21px !important; line-height: 1.2 !important; }
.hero-copy h1 { font-size: clamp(42px, 4.4vw, 68px) !important; line-height: 1.1 !important; }
.trust-strip strong { font-size: 22px; }

main p { font-size: 16px !important; line-height: 1.6 !important; }
.journey-steps p, .trust-strip b, .advantage-grid p { font-size: 14px !important; }
.hero-intro { font-size: 18px !important; }

.button, button { font-size: 15px; font-weight: 700; letter-spacing: .3px; }

@media (max-width: 650px) {
  main h2 { font-size: 30px !important; }
  .hero-copy h1 { font-size: 38px !important; }
}

/* ---- new heading style: Cormorant Garamond, refined bold serif with true italics ---- */
:root { --head: "Cormorant Garamond", Georgia, serif; }

h1, h2, h3, h4, strong, .brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  letter-spacing: .2px;
}

h1 em, h2 em { font-style: italic; font-weight: 600; }

main h2 { font-size: clamp(40px, 4vw, 60px) !important; line-height: 1.08 !important; }
main h3 { font-size: 25px !important; line-height: 1.15 !important; }
.hero-copy h1 { font-size: clamp(50px, 5.2vw, 82px) !important; line-height: 1.02 !important; }
.trust-strip strong { font-size: 26px; }

@media (max-width: 650px) {
  main h2 { font-size: 34px !important; }
  .hero-copy h1 { font-size: 44px !important; }
}

/* ---- heading font: Cinzel, classical engraved capitals (academy look) ---- */
:root { --head: "Cinzel", Georgia, serif; }

h1, h2, h3, h4, strong, .brand {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  letter-spacing: .6px;
  font-synthesis: none;
}

h1 em, h2 em { font-style: normal; font-weight: 700; }

main h2 { font-size: clamp(28px, 2.9vw, 42px) !important; line-height: 1.25 !important; }
main h3 { font-size: 18px !important; line-height: 1.25 !important; }
.hero-copy h1 { font-size: clamp(34px, 3.6vw, 56px) !important; line-height: 1.15 !important; }
.trust-strip strong { font-size: 20px; }

@media (max-width: 650px) {
  main h2 { font-size: 26px !important; }
  .hero-copy h1 { font-size: 32px !important; }
}

/* ---- heading font: Gaegu bold, chunky marker handwriting like the 'School Crush' reference ---- */
:root { --head: "Gaegu", "Comic Sans MS", cursive; }

h1, h2, h3, h4, strong, .brand {
  font-family: "Gaegu", "Comic Sans MS", cursive;
  font-weight: 700;
  letter-spacing: .5px;
  font-synthesis: none;
}

h1 em, h2 em { font-style: normal; font-weight: 700; }

main h2 { font-size: clamp(42px, 4.2vw, 64px) !important; line-height: 1.05 !important; }
main h3 { font-size: 28px !important; line-height: 1.05 !important; }
.hero-copy h1 { font-size: clamp(52px, 5.4vw, 86px) !important; line-height: 1 !important; }
.trust-strip strong { font-size: 28px; }

@media (max-width: 650px) {
  main h2 { font-size: 38px !important; }
  .hero-copy h1 { font-size: 46px !important; }
}

/* ---- headings use the paragraph family (Quicksand), in bold ---- */
:root { --head: "Quicksand", "DM Sans", sans-serif; }

h1, h2, h3, h4, strong, .brand {
  font-family: "Quicksand", "DM Sans", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1 em, h2 em { font-style: normal; font-weight: 700; }

main h2 { font-size: clamp(34px, 3.4vw, 50px) !important; line-height: 1.15 !important; }
main h3 { font-size: 21px !important; line-height: 1.2 !important; }
.hero-copy h1 { font-size: clamp(42px, 4.4vw, 68px) !important; line-height: 1.1 !important; }
.trust-strip strong { font-size: 21px; }

@media (max-width: 650px) {
  main h2 { font-size: 30px !important; }
  .hero-copy h1 { font-size: 38px !important; }
}

/* ---- mouse effects ---- */
.tilt-card { transition: transform .25s ease-out, box-shadow .4s ease, border-color .35s ease; will-change: transform; }

/* ---- headings: Poppins semibold with italic accent, like the reference ---- */
:root { --head: "Poppins", "DM Sans", sans-serif; }

h1, h2, h3, h4, strong, .brand {
  font-family: "Poppins", "DM Sans", sans-serif;
  font-weight: 600;
  letter-spacing: -.3px;
}

h1 em, h2 em { font-style: italic; font-weight: 600; }

main h2 { font-size: clamp(22px, 2vw, 28px) !important; line-height: 1.15 !important; }
main h3 { font-size: 16px !important; line-height: 1.25 !important; }
.hero-copy h1 { font-size: clamp(32px, 3.4vw, 52px) !important; line-height: 1.12 !important; }
.trust-strip strong { font-size: 17px; }

@media (max-width: 650px) {
  main h2 { font-size: 20px !important; }
  .hero-copy h1 { font-size: 30px !important; }
}

/* ---- heading animation: gold bar draws under section titles; words lift on hover ---- */
main h2::after {
  content: "";
  display: block;
  height: 3px;
  width: 0;
  margin-top: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, #f7e6b8, #d9b26a);
  transition: width 1s cubic-bezier(.2, .75, .25, 1) .7s;
}
main h2:has(.is-launched)::after { width: 72px; }

h1 w-r, h2 w-r {
  transition: translate .35s cubic-bezier(.34, 1.56, .64, 1);
}
h1 w-r:hover, h2 w-r:hover {
  translate: 0 -6px;
}

/* ---- accent words: reference gradient (cyan > blue > violet), continuous across the phrase ---- */
.hero h1 em .rivan-word-launch,
.section-heading em .rivan-word-launch,
.journey em .rivan-word-launch,
.faq-intro em .rivan-word-launch,
.lab-copy h2 em .rivan-word-launch,
.foundation-cta em .rivan-word-launch,
h1 em .rivan-word-launch,
h2 em .rivan-word-launch {
  background-image: linear-gradient(100deg, #22d3ee 0%, #4da3ff 50%, #8b7cf8 100%);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 em .rivan-word-launch.is-launched,
.section-heading em .rivan-word-launch.is-launched,
.journey em .rivan-word-launch.is-launched,
.faq-intro em .rivan-word-launch.is-launched,
.lab-copy h2 em .rivan-word-launch.is-launched,
.foundation-cta em .rivan-word-launch.is-launched,
h1 em .rivan-word-launch.is-launched,
h2 em .rivan-word-launch.is-launched {
  animation: rivanWordLaunch .82s cubic-bezier(.2, .75, .25, 1) var(--wd, 0ms) both;
}

/* mouse trail canvas: flat shapes only, no glow or gradient */
.mouse-trail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
  pointer-events: none;
}
