/* ═══════════════════════════════════════════════════════════════════════
   HOME PAGE SECTIONS (index.html)
   Insurance checker, services cards, family reviews, team faces, parent
   FAQ, hand-drawn underlines and the photo badge. Entrance motion lives in
   motion.css / motion.js; the insurance checker logic is in home.js.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Hand-drawn underline on a key phrase ───────────────────────────── */
.scribble { position: relative; display: inline-block; white-space: nowrap; z-index: 0; }
.scribble > svg {
  position: absolute; left: -.42em; top: -.12em; width: calc(100% + .84em); max-width: none; height: calc(100% + .38em);
  overflow: visible; pointer-events: none;
}
.scribble path { fill: none; stroke: var(--sky-400); stroke-width: 2.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* ── Insurance and town ticker under the hero ───────────────────────── */
.ticker {
  position: relative; z-index: 2; background: #fff; padding: 22px 0 20px;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 18px 40px -30px rgba(12,35,65,.35); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px;
}
.tk-row { min-width: 0; display: flex; align-items: center; gap: 22px; padding-inline: max(16px, var(--pad-x)); }
.tk-label {
  flex: 0 0 auto; width: 118px; font-size: .7rem; font-weight: 700; letter-spacing: .12em; line-height: 1.35;
  text-transform: uppercase; color: var(--sky-500); padding-left: 12px; border-left: 2px solid var(--sky-400);
}
.tk-view {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 92%, transparent);
}
.tk-track { display: flex; width: max-content; animation: tk-slide 96s linear infinite; }
.tk-row--rev .tk-track { animation-duration: 180s; animation-direction: reverse; }
.ticker:hover .tk-track { animation-play-state: paused; }
.tk-group { display: flex; align-items: center; gap: 12px; padding-right: 12px; }
@keyframes tk-slide { to { transform: translateX(-50%); } }
.tk-logo {
  height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 16px; box-shadow: var(--e1);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.tk-logo img { height: 28px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: .7;
  transition: filter .3s var(--ease), opacity .3s var(--ease); }
.tk-logo:hover { border-color: var(--sky-200); box-shadow: var(--e2); transform: translateY(-2px); }
.tk-logo:hover img { filter: none; opacity: 1; }
.tk-town {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 9px 18px 9px 13px;
  border-radius: var(--r-pill); background: var(--mist); color: var(--navy-700); font-size: .9rem; font-weight: 700;
}
.tk-town svg { width: 16px; height: 16px; color: var(--sky-500); }
@media (max-width: 640px) {
  .ticker { padding: 16px 0 14px; gap: 10px; }
  .tk-row { gap: 12px; }
  .tk-label { width: 92px; font-size: .62rem; padding-left: 9px; }
  .tk-logo { height: 46px; padding: 0 16px; border-radius: 13px; }
  .tk-logo img { height: 22px; max-width: 110px; }
  .tk-town { font-size: .82rem; padding: 7px 14px 7px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-track { animation: none; }
  .tk-view { overflow-x: auto; }
}

/* Side-aligned section labels keep their leading dash */
.ins-copy .ed-kicker, .rv-score .ed-kicker, .qa-head .ed-kicker { justify-content: flex-start; }
.ins-copy .ed-kicker::before, .rv-score .ed-kicker::before, .qa-head .ed-kicker::before { display: block; }

/* ── Badge on the "Where you are right now" photo ───────────────────── */
.ed-media { position: relative; }
.ed-chip {
  position: absolute; z-index: 2; left: -26px; bottom: 36px;
  display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px;
  border-radius: 18px; line-height: 1.25; font-size: .9rem; font-weight: 700; color: var(--ink);
  background: rgba(255,255,255,.86); backdrop-filter: blur(14px) saturate(170%); -webkit-backdrop-filter: blur(14px) saturate(170%);
  border: 1px solid rgba(255,255,255,.9); box-shadow: 0 22px 44px -18px rgba(12,35,65,.42);
  animation: home-bob 7s ease-in-out infinite;
}
.ed-chip span { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.ed-chip > i {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy-700); color: #fff;
}
.ed-chip > i svg { width: 19px; height: 19px; }
@keyframes home-bob { 50% { translate: 0 -8px; } }

/* ── Insurance checker ──────────────────────────────────────────────── */
.ins { overflow: hidden; }
.ins::before {
  content: ''; position: absolute; width: 560px; height: 560px; right: -160px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(127,182,220,.28), transparent 68%); pointer-events: none;
}
.ins-wrap {
  position: relative; max-width: var(--maxw); margin: 0 auto; display: grid;
  grid-template-columns: .82fr 1.18fr; gap: clamp(34px,5vw,80px); align-items: center;
}
.ins-copy h2 { font-size: clamp(2rem,4vw,3.1rem); letter-spacing: -.03em; margin-bottom: 18px; }
.ins-copy p { font-size: 1.05rem; line-height: 1.72; max-width: 42ch; }
.ins-note {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px;
  padding: 9px 16px 9px 10px; border-radius: var(--r-pill); background: #fff; box-shadow: var(--e1);
  font-size: .9rem !important; font-weight: 700; color: var(--navy-700);
}
.ins-note svg {
  width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--sky-100); color: var(--sky-500);
}
.ins-board {
  background: #fff; border: 1px solid var(--line-soft); border-radius: 30px;
  padding: clamp(18px,2.6vw,30px); box-shadow: var(--e3);
}
.ins-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.ins-opt {
  position: relative; appearance: none; font: inherit; cursor: pointer; height: 78px; padding: 14px 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 18px; border: 1.5px solid var(--line-soft); background: #fff;
  transition: transform .3s var(--ease-out), border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.ins-opt img {
  max-height: 34px; max-width: 100%; width: auto; height: auto; object-fit: contain;
  filter: grayscale(1); opacity: .72; transition: filter .3s var(--ease), opacity .3s var(--ease);
}
.ins-opt--text { font-family: Fraunces, Georgia, serif; font-size: 1.02rem; color: var(--navy-700); }
.ins-more { gap: 8px; text-decoration: none; font-weight: 600; background: var(--sky-100); border-color: var(--sky-200); }
.ins-more svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.ins-more:hover svg { transform: translateX(4px); }
.ins-opt:hover, .ins-opt:focus-visible {
  transform: translateY(-3px); background: #fff; border-color: var(--sky-200); box-shadow: var(--e2);
}
.ins-opt:hover img, .ins-opt:focus-visible img, .ins-opt[aria-pressed="true"] img { filter: none; opacity: 1; }
.ins-opt[aria-pressed="true"] {
  background: #fff; border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(74,144,217,.15), var(--e2);
}
.ins-opt[aria-pressed="true"]::after {
  content: ''; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--sky-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
  box-shadow: 0 0 0 3px #fff; animation: ins-pop .4s var(--ease-out);
}
@keyframes ins-pop { from { transform: scale(0); } }
.ins-other {
  appearance: none; font: inherit; cursor: pointer; width: 100%; margin-top: 10px; padding: 14px 18px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 16px; border: 1.5px dashed var(--line); background: transparent;
  font-size: .92rem; font-weight: 700; color: var(--navy-600);
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.ins-other svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.ins-other:hover, .ins-other[aria-pressed="true"] { border-color: var(--sky-400); background: var(--mist-2); color: var(--navy-800); }
.ins-other:hover svg { transform: translateX(3px); }
.ins-result {
  display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; padding: 20px 22px;
  border-radius: 20px; background: var(--sky-100); color: var(--body);
}
.ins-result.is-new { animation: ins-in .5s var(--ease-out); }
@keyframes ins-in { from { opacity: 0; transform: translateY(10px); } }
.ins-result strong { display: block; font-family: Fraunces, Georgia, serif; font-weight: 600; font-size: 1.12rem; color: var(--ink); margin-bottom: 4px; letter-spacing: -.01em; }
.ins-result p { font-size: .95rem; line-height: 1.6; }
.ins-result p a { color: var(--navy-600); font-weight: 700; }
.ins-ic {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: #fff; color: var(--sky-500); box-shadow: var(--e1);
}
.ins-ic svg { width: 22px; height: 22px; }
.ins-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.ins-act .btn-primary { padding: 12px 22px; font-size: .92rem; }
.ins-act .btn-primary svg { width: 17px; height: 17px; }
.ins-act a:not(.btn-primary) { font-size: .9rem; font-weight: 700; color: var(--navy-600); }

/* ── Services cards ─────────────────────────────────────────────────── */
.svc-grid {
  max-width: var(--maxw); margin: 0 auto; display: grid;
  grid-template-columns: 1.2fr 1fr 1fr; gap: 18px;
}
.svc {
  position: relative; display: flex; flex-direction: column; overflow: hidden; text-decoration: none;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 26px; padding: 30px 28px;
  box-shadow: var(--e1);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .45s var(--ease-out);
}
.svc:hover { transform: translateY(-6px); box-shadow: var(--e3); border-color: var(--line); }
.svc-ic {
  width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--sky-100); color: var(--navy-700);
  transition: background .35s var(--ease), color .35s var(--ease), transform .5s var(--ease-out);
}
.svc-ic svg { width: 24px; height: 24px; }
.svc:hover .svc-ic { background: var(--navy-700); color: #fff; transform: rotate(-8deg) scale(1.06); }
.svc h3 { font-size: 1.3rem; letter-spacing: -.016em; margin-bottom: 8px; }
.svc p { font-size: .96rem; line-height: 1.64; color: var(--body); margin-bottom: 22px; }
.svc-more {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px;
  font-size: .88rem; font-weight: 700; color: var(--navy-600);
}
.svc-more svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.svc:hover .svc-more svg { transform: translateX(4px); }
.svc figure { margin: 0; overflow: hidden; position: relative; }
.svc figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.svc:hover figure img { transform: scale(1.05); }
.svc-body { display: flex; flex-direction: column; flex: 1; }
.svc--tall { grid-row: span 2; padding: 0; }
.svc--tall figure { flex: 1 1 auto; min-height: 240px; }
.svc--tall figure img { position: absolute; inset: 0; object-position: 40% 60%; }
.svc--tall .svc-body { flex: 0 0 auto; padding: 26px 28px 30px; }
.svc--wide { grid-column: 1 / -1; flex-direction: row; padding: 0; }
.svc--wide figure { flex: 0 0 38%; min-height: 250px; }
.svc--wide figure img { position: absolute; inset: 0; object-position: 50% 35%; }
.svc--wide .svc-body { padding: 36px clamp(28px,4vw,56px); justify-content: center; }
.svc--wide h3 { font-size: clamp(1.4rem,2.4vw,1.8rem); }
.svc--wide p { max-width: 52ch; }

/* ── Family reviews ─────────────────────────────────────────────────── */
.rv { background: linear-gradient(180deg, #fff, var(--mist-2)); }
.rv-wrap {
  max-width: var(--maxw); margin: 0 auto; display: grid;
  grid-template-columns: .62fr 1.38fr; gap: clamp(34px,5vw,72px); align-items: center;
}
.rv-big {
  font-family: Fraunces, Georgia, serif; font-size: clamp(4.6rem,9vw,7rem); line-height: .9;
  letter-spacing: -.05em; color: var(--navy-800); margin: 4px 0 14px;
}
.rv-score .stars svg { width: 26px; height: 26px; }
.rv-score p { font-size: 1rem; line-height: 1.66; margin: 16px 0 22px; max-width: 30ch; }
.rv-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.rv-card {
  position: relative; margin: 0; background: #fff; border: 1px solid var(--line-soft); border-radius: 26px;
  padding: 30px 28px 26px; box-shadow: 0 24px 54px -28px rgba(12,35,65,.32);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.rv-card:nth-child(2) { margin-top: 48px; }
.rv-card::before {
  content: '\201C'; position: absolute; right: 22px; top: 2px;
  font-family: Fraunces, Georgia, serif; font-size: 6rem; line-height: 1; color: var(--sky-100);
}
.rv-card:hover { transform: translateY(-6px); box-shadow: 0 32px 64px -28px rgba(12,35,65,.4); }
.rv-card .stars svg { width: 17px; height: 17px; }
.rv-card blockquote {
  position: relative; margin: 14px 0 22px; font-family: Fraunces, Georgia, serif;
  font-size: 1.04rem; line-height: 1.6; color: var(--ink); letter-spacing: -.008em;
}
.rv-card figcaption { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--ink); font-size: .94rem; }
.rv-card figcaption span:not(.rv-av) { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
.rv-av {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(140deg, var(--sky-400), var(--navy-600)); color: #fff;
  font-family: Fraunces, Georgia, serif; font-size: 1.1rem;
}

/* ── Team cards get faces ───────────────────────────────────────────── */
.tcard figcaption { display: flex; align-items: center; gap: 14px; }
.tc-av {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; object-fit: cover; object-position: 50% 16%;
  background: var(--sky-100); box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--sky-200);
}

/* ── Parent FAQ ─────────────────────────────────────────────────────── */
:root { interpolate-size: allow-keywords; }
.qa-wrap {
  max-width: var(--maxw); margin: 0 auto; display: grid;
  grid-template-columns: .85fr 1.15fr; gap: clamp(34px,6vw,96px); align-items: start;
}
.qa-head { position: sticky; top: 120px; }
.qa-head h2 { font-size: clamp(2rem,4vw,3.1rem); letter-spacing: -.03em; margin-bottom: 18px; }
.qa-head p { font-size: 1.05rem; line-height: 1.72; max-width: 40ch; margin-bottom: 26px; }
.qa-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qa-actions .btn-quiet { color: var(--navy-600); padding-left: 14px; padding-right: 14px; }
.qa-actions .btn-quiet:hover { color: var(--navy-900); }
.qa { border-top: 1px solid var(--line); }
.qa-item { border-bottom: 1px solid var(--line); }
.qa-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 4px; font-family: Fraunces, Georgia, serif; font-size: clamp(1.1rem,1.8vw,1.3rem);
  color: var(--ink); letter-spacing: -.014em; transition: color .25s var(--ease);
}
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary:hover { color: var(--navy-600); }
.qa-item summary i {
  position: relative; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); transition: background .3s var(--ease), border-color .3s var(--ease), transform .4s var(--ease-out);
}
.qa-item summary i::before, .qa-item summary i::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 13px; height: 1.8px; margin: -.9px 0 0 -6.5px;
  border-radius: 2px; background: var(--navy-700); transition: background .3s var(--ease);
}
.qa-item summary i::after { transform: rotate(90deg); }
.qa-item[open] summary i { transform: rotate(45deg); background: var(--navy-700); border-color: var(--navy-700); }
.qa-item[open] summary i::before, .qa-item[open] summary i::after { background: #fff; }
.qa-item::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size .45s var(--ease-out), content-visibility .45s allow-discrete;
}
.qa-item[open]::details-content { block-size: auto; }
.qa-a p { padding: 0 60px 26px 4px; font-size: 1rem; line-height: 1.74; color: var(--body); }
.qa-a a { color: var(--navy-600); font-weight: 700; }

/* ── Narrower screens ───────────────────────────────────────────────── */
@media (max-width: 980px) {
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .svc--tall { grid-column: 1 / -1; grid-row: auto; flex-direction: row; }
  .svc--tall figure { flex: 0 0 44%; min-height: 280px; }
  .svc--tall .svc-body { flex: 1; justify-content: center; }
  .rv-wrap { grid-template-columns: 1fr; }
  .rv-score { text-align: center; }
  .rv-score .ed-kicker { justify-content: center; }
  .rv-score .ed-kicker::before { display: none; }
  .rv-score p { margin-left: auto; margin-right: auto; }
}
@media (max-width: 900px) {
  .ins-wrap, .qa-wrap { grid-template-columns: 1fr; }
  .qa-head { position: static; }
  .ed-chip { left: 14px; bottom: -22px; }
  .ed-media { margin-bottom: 18px; }
}
@media (max-width: 640px) {
  .svc-grid { grid-template-columns: 1fr; }
  .svc--tall, .svc--wide { flex-direction: column; }
  .svc--tall figure, .svc--wide figure { flex: none; min-height: 0; aspect-ratio: 16 / 11; }
  .svc { padding: 22px 20px; }
  .svc:not(.svc--tall):not(.svc--wide) { display: grid; grid-template-columns: 46px 1fr; column-gap: 16px; align-items: start; }
  .svc:not(.svc--tall):not(.svc--wide) .svc-ic { grid-row: span 2; width: 46px; height: 46px; margin: 2px 0 0; }
  .svc:not(.svc--tall):not(.svc--wide) h3 { font-size: 1.14rem; margin-bottom: 4px; }
  .svc:not(.svc--tall):not(.svc--wide) p { font-size: .93rem; margin: 0; }
  .svc:not(.svc--tall):not(.svc--wide) .svc-more { display: none; }
  .svc-grid { gap: 12px; }
  .svc--tall, .svc--wide { padding: 0; }
  .svc--tall .svc-body, .svc--wide .svc-body { padding: 24px 24px 28px; }
  .rv-cards { grid-template-columns: 1fr; }
  .rv-card:nth-child(2) { margin-top: 0; }
  .ins-grid { gap: 8px; }
  .ins-opt { height: 62px; padding: 8px 7px; border-radius: 14px; }
  .ins-opt img { max-height: 30px; }
  /* Team cards: straight and evenly spaced when stacked */
  .floatgrid { gap: 18px; }
  .floatgrid .tcard, .floatgrid .tcard:nth-child(n) { transform: none; margin-top: 0; }
  .tcard { padding: 26px 24px; }
  /* Shorter map so it doesn't fill the whole screen */
  .ed-media iframe { height: 300px !important; }
  .ins-opt--text { font-size: .9rem; }
  .ins-result { padding: 18px; gap: 12px; }
  .ins-ic { width: 36px; height: 36px; }
  .qa-a p { padding-right: 8px; }
  .ed-chip { font-size: .82rem; padding: 9px 14px 9px 9px; }
  .ed-chip > i { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .ed-chip, .ins-result.is-new, .ins-opt[aria-pressed="true"]::after { animation: none !important; }
  .qa-item::details-content { transition: none; }
}

/* Touch screens have no hover, so show logos in full colour */
@media (hover: none) {
  .ins-opt img, .tk-logo img { filter: none; opacity: 1; }
}
