/* ============================================================
   Ryan Finance Group - styles.css
   Palette: Primary #062159 (navy) · Secondary #ffffff (white)
   Fonts:   Montserrat (stand-in for Gotham Bold / Montserrat SemiBold)
   ============================================================ */

:root {
  --navy:        #062159;
  --navy-900:    #041640;
  --navy-700:    #0c2f73;
  --navy-500:    #1c47a0;
  --white:       #ffffff;
  --paper:       #f6f8fc;   /* soft off-white section bg */
  --paper-2:     #eef2f9;
  --ink:         #0d1b34;   /* body text */
  --muted:       #5b6b86;   /* secondary text */
  --line:        #dde4f0;   /* thin borders */
  --line-strong: #c4d0e6;
  --gold:        #c9a227;   /* subtle premium accent */

  --radius:      14px;
  --radius-sm:   10px;
  --maxw:        1180px;
  --ease:        cubic-bezier(.22,.61,.36,1);
  --shadow-sm:   0 2px 10px rgba(6,33,89,.06);
  --shadow-md:   0 14px 40px rgba(6,33,89,.12);

  --ff: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--navy);
  --btn-fg: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.5rem;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1.5px solid var(--btn-bg);
  border-radius: 999px;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-lg { padding: 1rem 2rem; font-size: 1.02rem; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--navy-700); border-color: var(--navy-700); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy); transform: translateY(-2px); }
.btn-invert { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-invert:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,.25); }
.btn-outline { background: transparent; color: inherit; border-color: currentColor; }
.btn-outline:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.brand { display: flex; align-items: center; gap: .7rem; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-logo-dark { display: none; }
.site-header.scrolled .brand-logo-light { display: none; }
.site-header.scrolled .brand-logo-dark { display: block; }
.brand-fallback { display: none; align-items: center; gap: .7rem; }
.brand.logo-missing .brand-logo { display: none; }
.brand.logo-missing .brand-fallback { display: flex; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 9px;
  background: var(--navy); color: var(--white);
  font-weight: 800; letter-spacing: .02em; font-size: .95rem;
}
.brand-text { font-weight: 700; color: var(--navy); font-size: 1.02rem; letter-spacing: -0.01em; }
.site-header:not(.scrolled) .brand-text { color: var(--white); }
.site-header:not(.scrolled) .brand-mark { background: var(--white); color: var(--navy); }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { font-weight: 600; font-size: .95rem; color: var(--navy); position: relative; }
.site-header:not(.scrolled) .nav a { color: rgba(255,255,255,.92); }
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: currentColor; transition: width .25s var(--ease);
}
.nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  padding: .5rem 1.25rem; border-radius: 999px;
  background: var(--navy); color: var(--white) !important;
  border: 1.5px solid var(--navy);
}
.site-header:not(.scrolled) .nav-cta { background: var(--white); color: var(--navy) !important; border-color: var(--white); }
.nav-cta:hover { transform: translateY(-1px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--navy); transition: .25s var(--ease); }
.site-header:not(.scrolled) .nav-toggle span { background: var(--white); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, 1fr);
  place-items: start center; text-align: center;
  color: var(--white); overflow: hidden;
  padding: 22vh 0 80px;
}

/* Hero trust badge (sits above the Begin button) */
.hero-trust {
  margin: 1.7rem auto 0; text-align: center; color: var(--white);
  text-shadow: 0 2px 14px rgba(4, 16, 40, .6);
}
.trust-label {
  font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  font-size: 1.2rem; margin: 0 auto .85rem; opacity: .98;
  line-height: 1.3; max-width: 100%;
}
.trust-rating { display: inline-flex; align-items: center; gap: .7rem; }
.trust-score { font-size: 1.7rem; font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.trust-stars { display: inline-flex; gap: 3px; }
.trust-stars svg { width: 23px; height: 23px; fill: #FBBC04; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.trust-divider { opacity: .55; font-size: 1.2rem; }
.trust-source { display: inline-flex; align-items: center; gap: .42rem; font-weight: 600; font-size: 1.05rem; }
.trust-source .g-logo { width: 20px; height: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
@media (max-width: 640px) {
  .hero { place-items: start center; padding: 15vh 0 72px; }
  .hero-inner { justify-self: stretch; width: 100%; }
  .hero .hero-title { font-size: 1.95rem; }
  .hero .br-mobile { display: inline; }
  .hero-badge { width: 180px; bottom: 7vh; }
  .trust-rating { flex-wrap: wrap; justify-content: center; gap: .4rem .55rem; }
  .trust-divider { display: none; }
}
/* Navy gradient = fallback, sits at the very back */
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--navy-500) 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 110%, var(--navy-700) 0%, transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
}
/* Background media (image/video) sits above the gradient fallback */
.hero-media {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
}
.hero-media.is-missing { display: none; }
/* Navy tint over the media so white text stays legible */
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(180deg, rgba(4,22,64,.55) 0%, rgba(6,33,89,.45) 45%, rgba(4,22,64,.75) 100%);
}
.hero .container { max-width: 1280px; }
.hero-inner { position: relative; z-index: 3; max-width: 1200px; }
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: .26em; font-size: .82rem; font-weight: 600;
  color: rgba(255,255,255,.88); margin-bottom: 1.4rem;
  text-shadow: 0 1px 14px rgba(0,0,0,.35);
}
.hero-title { font-size: clamp(2.3rem, 5.6vw, 4.4rem); font-weight: 800; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.br-mobile { display: none; }
.hero-tagline {
  margin-top: 1.2rem; font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 500;
  color: rgba(255,255,255,.9); text-shadow: 0 1px 16px rgba(0,0,0,.35);
}
.hero-actions { margin-top: 2.4rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-badge {
  position: absolute; left: 50%; bottom: 8vh; transform: translateX(-50%);
  z-index: 3; width: 230px; height: auto;
  filter: drop-shadow(0 3px 16px rgba(4,16,40,.55));
}
.hero .btn-primary { background: var(--white); color: var(--navy); border-color: var(--white); }
.hero .btn-primary:hover { background: var(--paper); border-color: var(--paper); }

/* ============================================================
   LENDER WHEEL (marquee)
   ============================================================ */
.lenders { background: var(--white); padding: 44px 0 48px; border-bottom: 1px solid var(--line); }
.lenders-label {
  text-align: center; text-transform: uppercase; letter-spacing: .2em;
  font-size: .74rem; font-weight: 600; color: var(--muted); margin-bottom: 26px;
}
.marquee {
  position: relative;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee::-webkit-scrollbar { display: none; }
.marquee.dragging { cursor: grabbing; }
.marquee-track {
  display: flex; align-items: center; gap: 24px; width: max-content;
}

.lender-chip {
  flex: 0 0 auto;
  display: grid; place-items: center;
  height: 80px; min-width: 180px; padding: 0 30px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(6,33,89,.05), 0 8px 24px rgba(6,33,89,.06);
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.lender-chip img { max-height: 48px; max-width: 156px; width: auto; object-fit: contain; }
.lender-chip:hover { box-shadow: 0 4px 10px rgba(6,33,89,.1), 0 16px 34px rgba(6,33,89,.12); transform: translateY(-3px); }

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.help { background: var(--paper); }
.process { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-900) 100%); color: var(--white); }
.process .section-title { color: var(--white); }
.reviews { background: var(--paper); }

.section-head { max-width: 640px; margin: 0 auto clamp(38px, 5vw, 60px); text-align: center; }
.section-eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: .76rem; font-weight: 700;
  color: var(--navy-500); margin-bottom: 1rem;
}
.section-title { font-size: clamp(2rem, 4.4vw, 3.1rem); color: var(--navy); }
.section-lead { margin-top: 1.1rem; color: var(--muted); font-size: 1.06rem; font-weight: 500; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   HOW WE CAN HELP - card grid
   ============================================================ */
.card-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(4, 1fr);
}
.tile {
  position: relative; display: flex; flex-direction: column;
  min-height: 210px; padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
  cursor: default; overflow: hidden;
}
.tile::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--navy), var(--navy-500));
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
  outline: none;
}
.tile:hover::before, .tile:focus-visible::before { transform: scaleX(1); }
.tile-title { font-size: 1.16rem; color: var(--navy); font-weight: 700; }
.tile-desc {
  margin-top: .55rem; color: var(--muted); font-size: .92rem; font-weight: 500;
  opacity: 0; max-height: 0; transform: translateY(6px);
  transition: opacity .3s var(--ease), max-height .35s var(--ease), transform .3s var(--ease);
}
.tile:hover .tile-desc, .tile:focus-visible .tile-desc { opacity: 1; max-height: 140px; transform: none; }
.tile-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; }
.tile-icon { color: var(--navy); }
.tile-icon svg { width: 34px; height: 34px; }
.tile-icon svg [stroke] { stroke-linecap: round; stroke-linejoin: round; }
.tile-num { font-size: .8rem; font-weight: 700; color: var(--line-strong); letter-spacing: .05em; }

/* ============================================================
   CATEGORY SQUARES (homepage) - Residential / Commercial / Complex
   ============================================================ */
/* Hand-drawn connectors fanning from the heading to each card */
.help-connectors {
  display: block; width: 100%; height: auto; overflow: visible;
  margin: -34px auto 2px;
}
.connector, .connector-tip {
  fill: none; stroke: var(--navy); stroke-width: 4.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.connector { transition: stroke-dashoffset 1.1s var(--ease); }
.connector-tip { transition: stroke-dashoffset .35s var(--ease); }
.c-comm { transition-delay: .1s; }
.c-complex { transition-delay: .2s; }
.help-connectors.drawn .connector { stroke-dashoffset: 0; }
.help-connectors.drawn .connector-tip { stroke-dashoffset: 0; transition-delay: 1s; }
@media (prefers-reduced-motion: reduce) {
  .connector, .connector-tip { stroke-dashoffset: 0; transition: none; }
}

.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.category-card {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center;
  aspect-ratio: 1 / 1; padding: 30px; text-align: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--navy); overflow: hidden;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease);
}
.category-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--navy), var(--navy-500));
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.category-card:hover::before { transform: scaleX(1); }
.category-body { display: flex; flex-direction: column; align-items: center; width: 100%; }
.category-num { font-size: .8rem; font-weight: 700; color: var(--line-strong); letter-spacing: .08em; margin-bottom: .5rem; }
.category-body h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); color: var(--navy); }
.category-reveal {
  display: grid; grid-template-rows: 0fr; opacity: 0; width: 100%;
  transition: grid-template-rows .4s var(--ease), opacity .3s var(--ease);
}
.category-reveal-inner { overflow: hidden; min-height: 0; }
.category-card:hover .category-reveal,
.category-card:focus-within .category-reveal { grid-template-rows: 1fr; opacity: 1; }
.cat-desc { margin: .85rem auto 0; color: var(--muted); font-weight: 500; font-size: .98rem; max-width: 32ch; }
.category-go { margin-top: 18px; display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--navy-500); }
.category-go svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.category-card:hover .category-go svg { transform: translateX(5px); }
/* Touch devices (no hover): always show the description */
@media (hover: none) { .category-reveal { grid-template-rows: 1fr; opacity: 1; } }

/* Blurb below the cards, with a hand-drawn underline on "nationwide" */
.help-blurb {
  text-align: center; max-width: 620px; margin: clamp(34px, 4.5vw, 52px) auto 0;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem); font-weight: 600; color: var(--navy); line-height: 1.5;
}
.squiggle-word { position: relative; white-space: nowrap; font-weight: 800; }
.word-underline {
  position: absolute; left: 0; bottom: -.34em; width: 100%; height: .5em; overflow: visible;
}
.word-underline path {
  fill: none; stroke: var(--navy); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ============================================================
   CATEGORY PAGE - page header + about
   ============================================================ */
.page-hero {
  position: relative; overflow: hidden; color: var(--white);
  min-height: 44vh; display: grid; align-items: center;
  padding: 150px 0 70px;
}
.page-hero .container { position: relative; z-index: 1; }
/* Optional per-page background photo.
   Drop a file into /assets named hero-residential.jpg / hero-commercial.jpg / hero-complex.jpg
   and it appears automatically. A navy tint sits over it so white text stays legible.
   If the file is missing, the navy gradient below shows instead. */
.page-hero-residential .hero-bg,
.page-hero-commercial .hero-bg,
.page-hero-complex .hero-bg {
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat;
}
.page-hero-residential .hero-bg {
  background-image:
    linear-gradient(155deg, rgba(6,33,89,.80), rgba(2,12,38,.88)),
    url("assets/hero-residential.jpg"),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
  background-position: center, center 30%, center;
}
.page-hero-commercial .hero-bg {
  background-image:
    linear-gradient(155deg, rgba(6,33,89,.80), rgba(2,12,38,.88)),
    url("assets/hero-commercial.jpg"),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
}
.page-hero-complex .hero-bg {
  background-image:
    linear-gradient(155deg, rgba(6,33,89,.80), rgba(2,12,38,.88)),
    url("assets/hero-complex.jpg"),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
}
.page-eyebrow {
  text-transform: uppercase; letter-spacing: .26em; font-size: .8rem; font-weight: 600;
  color: rgba(255,255,255,.8); margin-bottom: 1.1rem;
}
.page-title { font-size: clamp(2.2rem, 5vw, 3.7rem); color: var(--white); }
.page-lead { margin-top: 1.2rem; max-width: 640px; color: rgba(255,255,255,.85); font-weight: 500; font-size: 1.1rem; }

.about-inner { max-width: 820px; }
.about h2 { color: var(--navy); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.1rem; }
.about p { color: var(--muted); font-weight: 500; margin-bottom: 1.1rem; font-size: 1.06rem; line-height: 1.75; }
.about-points { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .8rem; }
.about-points li { position: relative; padding-left: 1.9rem; color: var(--ink); font-weight: 600; }
.about-points li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--navy-500); font-weight: 800; }

/* ============================================================
   OUR PROCESS
   ============================================================ */
.process-scroll {
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent;
  scroll-snap-type: x proximity; padding-bottom: 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.process-scroll::-webkit-scrollbar { height: 8px; }
.process-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 999px; }
.process-track { position: relative; width: max-content; margin: 0 auto; padding-top: 4px; }
.process-steps { list-style: none; margin: 0; padding: 0; display: flex; }
.flow-line {
  position: absolute; top: 32px; left: 125px; right: 125px; height: 3px; transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.5) 0 12px, transparent 12px 26px);
  background-size: 26px 100%; animation: flow-march 1s linear infinite; z-index: 0;
}
@keyframes flow-march { to { background-position: 26px 0; } }

.process-step {
  flex: 0 0 250px; width: 250px; padding: 0 18px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  scroll-snap-align: center;
}
.step-node {
  position: relative; z-index: 1;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.05rem; font-weight: 800; color: var(--white);
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.35);
  margin-bottom: 18px;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.process-step:hover .step-node, .process-step:focus-within .step-node {
  background: var(--white); color: var(--navy); border-color: var(--white); transform: scale(1.06);
}
.step-title { font-size: 1.1rem; color: var(--white); font-weight: 700; line-height: 1.3; }
.step-reveal {
  display: grid; grid-template-rows: 0fr; opacity: 0; width: 100%;
  transition: grid-template-rows .38s var(--ease), opacity .3s var(--ease);
}
.step-reveal-inner { overflow: hidden; min-height: 0; }
.process-step:hover .step-reveal, .process-step:focus-within .step-reveal { grid-template-rows: 1fr; opacity: 1; }
.step-reveal p { margin-top: .7rem; color: rgba(255,255,255,.78); font-size: .94rem; font-weight: 500; line-height: 1.5; }
@media (hover: none) { .step-reveal { grid-template-rows: 1fr; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .flow-line { animation: none; } }
.process-cta { text-align: center; margin-top: clamp(34px, 4vw, 52px); }

/* Desktop: fill the full width, no horizontal scroll */
@media (min-width: 981px) {
  .process-scroll { overflow-x: visible; padding-bottom: 0; -webkit-mask-image: none; mask-image: none; }
  .process-track { width: 100%; }
  .process-steps { width: 100%; }
  .process-step { flex: 1 1 0; width: auto; min-width: 0; }
  .flow-line { left: 8.333%; right: 8.333%; }
}

/* ============================================================
   REVIEWS
   ============================================================ */
.reviews-rating { margin-top: 1.2rem; display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.stars { color: var(--gold); letter-spacing: .12em; font-size: 1.05rem; }
.rating-text { color: var(--muted); font-weight: 500; }
.rating-text strong { color: var(--navy); }

.reviews-scroll {
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; cursor: grab;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.reviews-scroll.dragging { cursor: grabbing; }
.reviews-scroll::-webkit-scrollbar { height: 8px; }
.reviews-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.reviews-track { display: flex; gap: 20px; width: max-content; padding: 6px 2px 14px; align-items: stretch; }
.review-card {
  flex: 0 0 340px; width: 340px; scroll-snap-align: start;
  margin: 0; padding: 28px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-sm);
}
.review-card .stars { font-size: 1rem; }
.review-card blockquote {
  margin: 0; color: var(--ink); font-size: 1rem; font-weight: 500; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.review-card figcaption { display: flex; align-items: center; gap: .8rem; margin-top: auto; }
.rev-avatar {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--navy); color: var(--white); font-weight: 700;
}
.review-card figcaption strong { display: block; color: var(--navy); font-size: .96rem; }
.review-card figcaption small { color: var(--muted); font-size: .82rem; }

.review-card.is-truncated { cursor: pointer; }
.read-more { font-size: .84rem; font-weight: 700; color: var(--navy-500); }
.review-card.is-truncated:hover .read-more { text-decoration: underline; }

.review-modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s var(--ease);
}
.review-modal.open { opacity: 1; visibility: visible; }
.review-modal-backdrop { position: absolute; inset: 0; background: rgba(4,16,40,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.review-modal-panel {
  position: relative; z-index: 1; text-align: left;
  background: var(--white); border-radius: var(--radius);
  max-width: 560px; width: 100%; max-height: 82vh; overflow-y: auto;
  padding: 36px; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 16px;
  transform: scale(.96); transition: transform .2s var(--ease);
}
.review-modal.open .review-modal-panel { transform: scale(1); }
.review-modal-panel blockquote { margin: 0; color: var(--ink); font-size: 1.08rem; line-height: 1.65; font-weight: 500; }
.review-modal-author { display: flex; align-items: center; gap: .8rem; }
.review-modal-author strong { color: var(--navy); }
.review-modal-close { position: absolute; top: 8px; right: 14px; background: none; border: 0; font-size: 1.9rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.review-modal-close:hover { color: var(--navy); }

/* General Enquiry modal + form */
.enquiry-modal { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s var(--ease); }
.enquiry-modal.open { opacity: 1; visibility: visible; }
.enquiry-backdrop { position: absolute; inset: 0; background: rgba(4,16,40,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.enquiry-panel { position: relative; z-index: 1; text-align: left; background: var(--white); border-radius: var(--radius); width: 100%; max-width: 500px; max-height: 88vh; overflow-y: auto; padding: 36px; box-shadow: var(--shadow-md); transform: scale(.96); transition: transform .2s var(--ease); }
.enquiry-modal.open .enquiry-panel { transform: scale(1); }
.enquiry-close { position: absolute; top: 8px; right: 14px; background: none; border: 0; font-size: 1.9rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.enquiry-close:hover { color: var(--navy); }
.enquiry-title { font-size: 1.55rem; color: var(--navy); }
.enquiry-sub { color: var(--muted); margin: 6px 0 22px; }
.enquiry-form { display: flex; flex-direction: column; gap: 16px; }
.enquiry-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--navy); font-size: .9rem; }
.enquiry-row { display: flex; gap: 16px; }
.enquiry-row label { flex: 1; }
.enquiry-form input, .enquiry-form textarea { font: inherit; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); width: 100%; }
.enquiry-form textarea { resize: vertical; }
.enquiry-form input:focus, .enquiry-form textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(6,33,89,.12); }
.enquiry-submit { margin-top: 6px; align-self: flex-start; }
.enquiry-status:not(:empty) { color: var(--navy); font-weight: 600; font-size: .92rem; margin-top: 4px; }
@media (max-width: 520px) { .enquiry-row { flex-direction: column; } .enquiry-submit { align-self: stretch; } }

.reviews-actions { margin-top: 36px; text-align: center; }
.g-icon { width: 18px; height: 18px; }

/* ============================================================
   FINAL CTA
   ============================================================ */
.cta { position: relative; overflow: hidden; background: var(--navy); color: var(--white); text-align: center; padding: clamp(64px, 9vw, 110px) 0; }
.cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 380px at 50% 0%, var(--navy-500) 0%, transparent 60%);
  opacity: .8;
}
.cta-inner { position: relative; }
.cta-title { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.cta-sub { margin: 1.1rem auto 2.2rem; max-width: 520px; color: rgba(255,255,255,.82); font-weight: 500; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.72); padding: 56px 0 30px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-col { min-width: 240px; }
.footer-logo { height: 42px; width: auto; display: block; }
.footer-tag { color: rgba(255,255,255,.68); font-weight: 500; margin-top: 14px; max-width: 320px; }
.footer-badges { display: flex; align-items: center; gap: 26px; margin-top: 24px; }
.footer-badge { display: inline-flex; }
.footer-badge img { height: 26px; width: auto; display: block; opacity: .9; }
.footer-heading { color: var(--white); font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.footer-enquiry { max-width: 300px; }
.footer-enquiry-sub { color: rgba(255,255,255,.68); line-height: 1.5; margin-bottom: 18px; }
.footer-enquiry .btn-outline { width: 100%; }
.footer-office { margin-bottom: 12px; line-height: 1.5; }
.footer-office strong { color: var(--white); font-weight: 700; }
.footer-contact-links { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.footer-contact-links a { color: rgba(255,255,255,.85); font-weight: 600; }
.footer-contact-links a:hover { color: var(--white); }
.footer-bottom { padding-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.footer-legal { color: rgba(255,255,255,.72); font-weight: 600; font-size: .9rem; }
.footer-disclaimer { color: rgba(255,255,255,.42); font-size: .8rem; line-height: 1.55; max-width: 920px; }
.footer-copy { color: rgba(255,255,255,.42); font-size: .84rem; margin-top: 2px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .review-card { flex-basis: 82vw; width: 82vw; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { aspect-ratio: auto; min-height: 180px; }
  .help-connectors { display: none; }
}
@media (max-width: 720px) {
  .nav { position: fixed; inset: 74px 0 auto 0; flex-direction: column; gap: 0;
         background: var(--white); border-bottom: 1px solid var(--line);
         padding: 8px 24px 20px; transform: translateY(-140%); transition: transform .3s var(--ease); }
  .nav.open { transform: translateY(0); }
  .nav a { width: 100%; padding: 14px 0; color: var(--navy) !important; border-bottom: 1px solid var(--line); }
  .nav-cta { margin-top: 12px; text-align: center; border: 1.5px solid var(--navy) !important; }
  .nav-toggle { display: flex; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; gap: 30px; }
  /* On touch, reveal descriptions by default (no hover) */
  .tile-desc { opacity: 1; max-height: 140px; transform: none; }
}
@media (max-width: 460px) {
  .card-grid { grid-template-columns: 1fr; }
}

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