/* ==========================================================================
   Suffolk Injury Clinic — global styles
   Design tokens, reset, shared components, global header + footer.
   Per-section styles live in sections.css.
   ========================================================================== */

/* ---------- Fonts -------------------------------------------------------- */
/* Ivy Presto is licensed and not on Google Fonts, so it is self-hosted from
   assets/fonts/. Poppins is linked from Google Fonts in includes/head.php. */
@font-face {
  font-family: 'Ivy Presto Headline';
  src: url('../fonts/ivy-presto-headline-semi-bold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ivy Presto Text';
  src: url('../fonts/ivy-presto-text.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ------------------------------------------------ */
:root {
  /* Brand — sampled from the Figma export */
  --navy:          #011E3C;
  --navy-line:     rgba(255, 255, 255, 0.14);
  --navy-panel:    rgba(255, 255, 255, 0.06);
  --orange:        #F77507;
  --orange-from:   #EC4806;
  --orange-to:     #FDAB10;
  --orange-grad:   linear-gradient(90deg, #EC4806 0%, #FDAB10 100%);
  --amber:         #FFAF2E;

  /* Neutrals */
  --white:         #ffffff;
  --ink:           #1E1E20;
  --gray-bg:       #F5F5F5;
  --gray-card:     #EEEEF0;
  --cream:         #FBF6EC;
  --line:          #D9DCE2;

  /* Type */
  --font-display: 'Ivy Presto Headline', 'Ivy Presto Text', Georgia, serif;
  --font-body: 'Poppins', Arial, sans-serif;

  /* Layout — the Figma frame is 1600px: 1472px content + 64px gutters.
     Every length is authored in rem at 1rem = 16px, so the numbers still read
     as the Figma pixels (1472 / 16 = 92rem). */
  --container: 92rem;
  --gutter: 4rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
}

/* --------------------------------------------------------------------------
   Design scale

   The Figma frame is 1600px wide; the site renders it at 1440px on desktop.
   Because every length is in rem that is one number — the root font size.
   1600 -> 1440 is 16px * 1440 / 1600 = 14.4px, and the whole page (type,
   spacing, cards, artwork) scales together, exactly as in the Figma.

   To render at a different width change 1440 below (1600 = 1:1 with Figma).
   -------------------------------------------------------------------------- */
html { font-size: calc(16px * 1440 / 1600); }

/* Between 1200px and the 1440px design width the same scale simply follows the
   viewport, so the desktop layout never has to break. */
@media (max-width: 1440px) {
  html { font-size: calc(100vw * 16 / 1600); }
}

/* Below 1200px the layout re-flows for tablet/mobile, so type returns to its
   natural size instead of continuing to shrink. */
@media (max-width: 1200px) {
  html { font-size: 16px; }
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

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

/* width/height attributes are on every <img> for layout stability; without
   this the attribute height wins whenever only the width is set in CSS. */
img { height: auto; }

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

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

p, figure, blockquote, dl, dd { margin: 0; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; }

button { font: inherit; }

/* ---------- Layout ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Shared typography -------------------------------------------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 3.125rem;
  line-height: 1.2;
  color: var(--navy);
}

.section-lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
}

/* Every orange accent line in the Figma is the brand gradient, not a flat
   colour — sampled left-to-right across each one. */
.text-gradient {
  background: var(--orange-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* without this a wrapped line restarts mid-ramp instead of at the start */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}


/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  height: 3.375rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: filter .2s ease, background-color .2s ease, color .2s ease;
}

.btn__icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

.btn__icon svg,
.btn__icon img { width: 100%; height: 100%; }

/* Solid orange — the primary "CALL NOW" action */
.btn--orange {
  background: var(--orange-grad);
  color: var(--white);
}

.btn--orange:hover { filter: brightness(1.06); }

/* Outlined on dark — the header "BOOK FREE EVALUATION" */
.btn--ghost {
  background: transparent;
  border: 0.0625rem solid rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Outlined on light — sits over the hero artwork, so it stays see-through */
.btn--outline {
  background: transparent;
  border: 0.0625rem solid var(--navy);
  color: var(--navy);
}

.btn--outline:hover { background: var(--navy); color: var(--white); }

/* Small link-style button used inside the service cards */
.btn--link {
  height: 3.375rem;
  padding: 0 1.375rem;
  gap: 0.75rem;
  border: 0.0625rem solid var(--navy);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9375rem;
  text-transform: none;
  letter-spacing: 0;
}

.btn--link:hover { background: var(--navy); color: var(--white); }

.btn--link:hover .icon-arrow path { stroke: currentColor; }

.icon-arrow { width: 1.1875rem; height: 0.875rem; }

/* ==========================================================================
   Global header
   ========================================================================== */
.site-header {
  position: relative;
  z-index: 60;
  background: var(--navy);
}

.site-header__inner {
  display: flex;
  align-items: center;
  height: 5rem;
}

.site-header__logo {
  display: block;
  flex: none;
  height: 4.625rem;
  margin-left: -0.25rem;
}

.site-header__logo img { height: 100%; width: auto; }

.main-nav { margin-left: 8.5rem; }

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav__list a {
  position: relative;
  display: block;
  padding: 0.375rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--white);
}

/* The active item carries the orange rule underneath. Which one is active is
   decided by the page's body class, so header.php itself stays static. */
.page-home     .nav-home::after,
.page-about    .nav-about::after,
.page-services .nav-services::after,
.page-faqs     .nav-faqs::after,
.page-contact  .nav-contact::after,
.main-nav__list a:hover::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.125rem;
  height: 0.25rem;
  border-radius: 0.125rem;
  background: var(--orange-grad);
}

/* --- Services dropdown --------------------------------------------------
   Opens on hover and on keyboard focus; the parent "Services" link still goes
   to /our-services/, so the menu is an addition and never the only way in.
   Below 1200 the panel becomes a nested list inside the drawer (see the media
   query) and the caret button toggles it.
   ---------------------------------------------------------------------- */
.main-nav__list .has-sub { position: relative; }

.nav-caret {
  display: inline-block;
  width: 0.625rem;
  height: 0.375rem;
  margin-left: 0.4375rem;
  vertical-align: middle;
  transition: transform 0.25s ease;
}

.has-sub:hover .nav-caret,
.has-sub:focus-within .nav-caret { transform: rotate(180deg); }

.nav-sub-toggle { display: none; }

.nav-sub {
  position: absolute;
  top: 100%;
  left: -1rem;
  z-index: 5;
  width: 24.5rem;
  margin-top: 1.0625rem;
  padding: 0.75rem;
  border: 0.0625rem solid var(--navy-line);
  border-radius: 0.875rem;
  background: var(--navy);
  box-shadow: 0 1.5rem 3rem rgba(1, 30, 60, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.625rem);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

/* bridges the gap between the link and the panel so the pointer can travel
   down without the menu closing under it */
.nav-sub::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1.0625rem;
  height: 1.0625rem;
}

.has-sub:hover .nav-sub,
.has-sub:focus-within .nav-sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-sub__list a {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem;
  border-radius: 0.625rem;
  color: var(--white);
  transition: background-color 0.2s ease;
}

/* the orange rule belongs to the top-level items only */
.nav-sub a::after { content: none; }

.nav-sub__list img {
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.5rem;
  object-fit: cover;
}

.nav-sub__list strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.nav-sub__list em {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.6);
}

.nav-sub__list a:hover,
.page-chiropractic       .sub-chiropractic,
.page-physical-therapy   .sub-physical-therapy,
.page-acupuncture        .sub-acupuncture,
.page-medical-evaluation .sub-medical-evaluation { background: rgba(255, 255, 255, 0.09); }

/* the row for the page you are on carries the brand gradient, like every
   other orange run on the site */
.page-chiropractic       .sub-chiropractic strong,
.page-physical-therapy   .sub-physical-therapy strong,
.page-acupuncture        .sub-acupuncture strong,
.page-medical-evaluation .sub-medical-evaluation strong {
  background: var(--orange-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.site-header__actions .btn--ghost { min-width: 15.625rem; }

.site-header__actions .btn--orange { min-width: 9.25rem; }

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.375rem;
  height: 0.125rem;
  margin: 0.3125rem auto;
  border-radius: 0.125rem;
  background: var(--white);
}

/* ==========================================================================
   Global footer
   ========================================================================== */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding-top: 3.75rem;
}

/* the hover picks up the brand gradient rather than a flat amber */
.site-footer a:hover,
.footer-contact__phone {
  background: var(--orange-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.site-footer__top {
  display: grid;
  /* The four columns start at 64, 720, 988 and 1291 in the Figma and the
     container ends at 1536, which with the 40px gap gives 616/228/263/245.
     The first is written as 1fr so it absorbs the scrollbar: fixed tracks
     summing to the full container overflow the moment one appears, and the
     about paragraph is the one thing here that reflows without harm. */
  /* 16.5rem on the last track, not the 15.3125 the Figma columns imply: the
     address line needs 236px and the icon and gap take 28, so anything tighter
     drops "109" onto a line of its own. The slack comes off the first track,
     which has room to spare. */
  grid-template-columns: 1fr 14.25rem 16.4375rem 17.25rem;
  gap: 0 2.5rem;
}

.site-footer__logo { display: block; height: 3.5rem; margin-bottom: 1.5rem; }

.site-footer__logo img { height: 100%; width: auto; }

/* 30rem is the box that turns the copy in three lines, as the Figma has it */
.site-footer__about {
  max-width: 30rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}

/* the footer shows the partner strip knocked out to white on the navy */
.site-footer__partners {
  margin-top: 1.875rem;
  width: 23.875rem;
  max-width: 100%;
  filter: brightness(0) invert(1);
}

.footer-col__title {
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--white);
}

.footer-col__list li + li { margin-top: 0.8125rem; }

.footer-col__list a {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
}

/* the link firms up under the pointer as well as picking up the gradient.
   Only the stacked columns: the legal links in the bottom bar sit in a row,
   where a wider word would nudge its neighbours. */
.footer-col__list a:hover,
.footer-contact__row a:hover,
.footer-contact__phone:hover { font-weight: 600; }

/* --- Contact column ------------------------------------------------------ */
.footer-contact__phone {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
  font-size: 1.1875rem;
  font-weight: 700;
}

.footer-contact__phone img { width: 1rem; height: 1rem; flex: none; }

.footer-contact__row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.footer-contact__row > img {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1875rem;
  flex: none;
}

.footer-contact__row strong {
  display: block;
  font-weight: 700;
  color: var(--white);
}

/* --- Reassurance strip --------------------------------------------------- */
.site-footer__features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2.75rem 0 0;
  padding-top: 2.75rem;
  border-top: 0.0625rem solid var(--navy-line);
}

.footer-feature {
  display: flex;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  border: 0.0625rem solid var(--navy-line);
  border-radius: var(--radius);
  background: var(--navy-panel);
}

.footer-feature img { width: 2.875rem; height: 2.875rem; flex: none; }

.footer-feature h3 {
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--white);
}

.footer-feature p {
  /* 13px is what lets the first card keep its line: it needs 357 of the 368
     the card allows, where 14px asks for 384 */
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

/* --- Bottom bar ---------------------------------------------------------- */
.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 0.0625rem solid var(--navy-line);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
}

.site-footer__legal {
  display: flex;
  gap: 1.75rem;
}

.site-footer__disclaimer {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 1rem 0 0;
  padding: 0.625rem 1rem 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.6);
}

.site-footer__disclaimer svg { width: 0.875rem; height: 0.875rem; flex: none; }

/* ==========================================================================
   Responsive

   Above 1200px the whole design scales with the root font size, so the
   desktop layout never needs to be broken up. Below 1200px it re-flows, in
   the same three steps sections.css uses: 1200 -> 900 -> 600.
   ========================================================================== */
@media (max-width: 1200px) {
  :root { --gutter: 2.5rem; }

  .section-title { font-size: 2.25rem; }

  /* --- Header ------------------------------------------------------------ */
  .site-header__inner { height: 4.5rem; }
  .site-header__logo { height: 3.25rem; margin-left: 0; }

  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 4.5rem);
    margin: 0;
    padding: 1.25rem var(--gutter) 1.5rem;
    overflow-y: auto;
    background: var(--navy);
    border-top: 0.0625rem solid var(--navy-line);
  }

  .main-nav.is-open { display: block; }

  .main-nav__list { flex-direction: column; align-items: flex-start; gap: 1rem; }

  /* the underline is a desktop affordance; in the drawer it reads as an
     underlined link, so the active item is marked with colour instead */
  .main-nav__list a::after { display: none; }
  .page-home .nav-home,
  .page-about .nav-about,
  .page-services .nav-services,
  .page-faqs .nav-faqs,
  .page-contact .nav-contact { color: var(--amber); }

  /* --- Services dropdown becomes a nested list inside the drawer --------- */
  .main-nav__list .has-sub { display: block; width: 100%; }

  .main-nav__list .has-sub > a { display: inline-block; }

  .nav-caret { display: none; }

  .nav-sub-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 2.5rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  /* the caret is drawn on the button so the link keeps its own hit area */
  .nav-sub-toggle::after {
    content: '';
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    margin: 0 auto;
    border-right: 0.125rem solid var(--white);
    border-bottom: 0.125rem solid var(--white);
    transform: translateY(-0.125rem) rotate(45deg);
    transition: transform 0.25s ease;
  }

  .nav-sub-toggle[aria-expanded="true"]::after {
    transform: translateY(0.0625rem) rotate(-135deg);
  }

  .nav-sub,
  .has-sub:hover .nav-sub,
  .has-sub:focus-within .nav-sub {
    position: static;
    width: auto;
    margin: 0.875rem 0 0;
    padding: 0.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .nav-sub::before { content: none; }

  .has-sub.is-open > .nav-sub { display: block; }

  .nav-sub__list a { padding: 0.5rem; color: var(--white); }
  .nav-sub__list a:hover { background: transparent; }

  .nav-sub__list img { width: 2.5rem; height: 2.5rem; }
  .nav-sub__list strong { font-size: 0.9375rem; font-weight: 500; }
  .nav-sub__list em { color: rgba(255, 255, 255, 0.6); }

  .page-chiropractic       .sub-chiropractic,
  .page-physical-therapy   .sub-physical-therapy,
  .page-acupuncture        .sub-acupuncture,
  .page-medical-evaluation .sub-medical-evaluation { background: transparent; }

  /* main.js moves the buttons into the drawer below 1200 and back out above */
  .site-header__actions { display: none; }

  .main-nav .site-header__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 1.5rem 0 0;
  }

  .main-nav .site-header__actions .btn {
    width: 100%;
    min-width: 0;
    height: 3rem;
  }

  /* --- Footer ------------------------------------------------------------ */
  .site-footer { padding-top: 2.75rem; }

  .site-footer__top {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .site-footer__about { max-width: none; }
  .site-footer__partners { width: 100%; max-width: 23.875rem; }

  .site-footer__features {
    grid-template-columns: 1fr 1fr;
    margin-top: 2.25rem;
    padding-top: 2.25rem;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 2.25rem;
  }

  .site-footer__legal { flex-wrap: wrap; gap: 1rem; }
}

@media (max-width: 900px) {
  .site-footer__features { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --gutter: 1.25rem; }

  .section-title { font-size: 1.75rem; }

  .btn { padding: 0 1rem; font-size: 0.8125rem; }

  .site-header__logo { height: 2.75rem; }

  .site-footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .site-footer__logo { height: 3rem; }
  .site-footer__disclaimer { align-items: flex-start; line-height: 1.5; }
}


/* ==========================================================================
   Cursor ring

   A ring in the brand gradient that trails the pointer. It stretches along
   the direction of travel while the pointer is moving quickly, snaps onto
   buttons and links as a rounded box, and pops on click.

   The native cursor stays visible on purpose — the ring lags by design, so
   hiding the real pointer would make clicking feel imprecise. It reads as a
   halo around the cursor, not a replacement for it.
   ========================================================================== */
@media (pointer: fine) {
  .cursor-ring,
  .cursor-pop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    /* px, not rem: the ring is an overlay, not part of the design scale */
    border: 2px solid transparent;
    border-radius: 50%;
    /* paint the gradient on the border only: two masks, the inner one
       subtracted, which leaves a gradient ring at any border-radius */
    background: var(--orange-grad) border-box;
    -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
            mask-composite: exclude;
  }

  .cursor-ring {
    width: 2.25rem;
    height: 2.25rem;
    opacity: 0;
    filter: drop-shadow(0 0 0.375rem rgba(247, 117, 7, 0.45));
    transition: opacity 0.25s ease, width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                border-radius 0.28s ease, border-width 0.2s ease;
    will-change: transform;
  }

  .cursor-ring.is-awake { opacity: 1; }

  /* over something clickable */
  .cursor-ring.is-hot { width: 3.25rem; height: 3.25rem; }

  /* snapped onto a button: the size is written in from the element's own box */
  .cursor-ring.is-magnet { border-radius: 0.625rem; }

  /* while the button is down */
  .cursor-ring.is-down { border-width: 3px; }

  /* the click ripple */
  .cursor-pop {
    width: 2.25rem;
    height: 2.25rem;
    animation: cursor-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  @keyframes cursor-pop {
    from { opacity: 0.9; }
    to   { opacity: 0; }
  }
}

/* Anyone who asked for less motion keeps a plain pointer. */
@media (prefers-reduced-motion: reduce) {
  .cursor-ring,
  .cursor-pop { display: none; }
}

/* ==========================================================================
   Hover and reveal

   Two quiet effects, kept deliberately small: a box lifts a little under the
   pointer, and content fades up the first time it comes into view. Anyone
   who asked for reduced motion gets neither.
   ========================================================================== */
.btn,
.footer-feature {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease, border-color 0.25s ease,
              background-color 0.25s ease;
}

.btn:hover { transform: translateY(-0.125rem); box-shadow: 0 0.5rem 1rem rgba(1, 30, 60, 0.16); }
.btn:active { transform: translateY(0); box-shadow: none; }

.footer-feature:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

/* The reveal starts hidden, which is only safe once we know scripts run — the
   inline check in head.php adds .js, and drops it again if main.js never
   arrives, so a broken script can never leave the page blank. */
.js .reveal {
  opacity: 0;
  transform: translateY(0.875rem);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .btn:active { transform: none; }
}
