/* ==========================================================================
   JUSTIN TIME INSURANCE: website styles
   --------------------------------------------------------------------------
   Brand values come from the Developer Kit (tokens/brand.css and
   design-tokens.json). Values labelled "derived" were added for the website
   (mostly for readable contrast) and need sign-off with the rest of the
   palette. The kit marks all colors as provisional until calibrated.
   ========================================================================== */

/* ---------- Fonts (self-hosted Montserrat, SIL Open Font License) ---------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-wght-italic.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  /* Brand tokens (from the kit) */
  --jt-navy: #0B2D5B;
  --jt-orange: #FF7A00;
  --jt-slate: #62676C;
  --jt-white: #FFFFFF;
  --jt-cloud: #F3F4F6;
  --jt-ink: #17212F;
  --jt-font: "Montserrat", Arial, sans-serif;
  --jt-radius-button: 12px;
  --jt-radius-card: 16px;

  /* Derived (website only; confirm at palette sign-off) */
  --jt-orange-display: #E06500; /* large orange headline text on white: 3.5:1 */
  --jt-orange-hover: #FF8C26;   /* button hover */
  --jt-night: #06162D;          /* dark-theme page background */
  --jt-night-2: #0A2140;        /* dark-theme raised surface */

  /* Semantic roles (light theme is primary) */
  --bg: var(--jt-white);
  --bg-alt: var(--jt-cloud);
  --surface: var(--jt-white);
  --heading: var(--jt-navy);
  --text: var(--jt-navy);
  --text-muted: var(--jt-slate);
  --border: #E3E6EB;
  --border-strong: #C9CFD7;
  --accent-text: var(--jt-orange-display);
  --logo-primary: var(--jt-navy);
  --logo-accent: var(--jt-orange);
  --logo-sub: var(--jt-slate);
  --focus: var(--jt-navy);
  --shadow-sm: 0 1px 2px rgba(11, 45, 91, .05);
  --shadow-md: 0 1px 2px rgba(11, 45, 91, .05), 0 18px 40px -22px rgba(11, 45, 91, .28);

  /* Layout */
  --header-h: 76px;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 32px);
  --section-y: clamp(40px, 4.5vw + 22px, 80px); /* kit: 40px mobile, 80px desktop */

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: var(--jt-night);
  --bg-alt: #081D3A;
  --surface: var(--jt-night-2);
  --heading: #FFFFFF;
  --text: #E8EDF4;
  --text-muted: #B4BDC9;
  --border: rgba(255, 255, 255, .12);
  --border-strong: rgba(255, 255, 255, .24);
  --accent-text: var(--jt-orange);
  --logo-primary: #FFFFFF;
  --logo-sub: #C9CED4;
  --focus: var(--jt-orange);
  --shadow-sm: none;
  --shadow-md: 0 18px 40px -22px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* Navy panels (footer, call-to-action band) in either theme */
.on-dark {
  --heading: #FFFFFF;
  --text: #E8EDF4;
  --text-muted: #C3CAD4;
  --border: rgba(255, 255, 255, .16);
  --border-strong: rgba(255, 255, 255, .4);
  --accent-text: var(--jt-orange);
  --logo-primary: #FFFFFF;
  --logo-sub: #C9CED4;
  --focus: var(--jt-orange);
  color: var(--text);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--jt-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--heading);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem); letter-spacing: -.03em; line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 1.25rem + 2vw, 2.65rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.3; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }
strong { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
main:focus { outline: none; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 100;
  padding: .75rem 1rem;
  border-radius: 10px;
  background: var(--jt-navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* Text links inside copy */
.link,
.prose a,
.footer-legal a {
  color: var(--heading);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--jt-orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.link:hover, .prose a:hover, .footer-legal a:hover { text-decoration-thickness: 3px; }

/* ---------- Placeholder & draft markers ---------- */
/* Every unverified item uses .ph so it is easy to find (search "Placeholder"). */
.ph {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .12em .6em;
  border: 1.5px dashed var(--jt-orange);
  border-radius: 999px;
  color: var(--heading);
  font-size: .7rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: .08em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: .1em;
}
.ph::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--jt-orange);
}
.ph-draft { border-color: var(--text-muted); }
.ph-draft::before { background: var(--text-muted); }

.ph-block {
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border: 2px dashed var(--border-strong);
  border-radius: var(--jt-radius-card);
  background: var(--bg-alt);
}
.ph-block > .ph { margin-bottom: .7rem; }
.ph-block h3 { margin-bottom: .35rem; }
.ph-block p { color: var(--text-muted); }

.ph-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: .95rem;
}

/* ---------- Preview bar ---------- */
.preview-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.45;
}
.preview-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding-block: .5rem;
  text-align: center;
}
.preview-bar strong { color: var(--heading); }
.preview-bar .ph { font-size: .62rem; }
.preview-dot {
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--jt-orange);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--heading);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  padding: .75rem 1.4rem;
  border: 2px solid var(--btn-bd);
  border-radius: var(--jt-radius-button);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn .icon { width: 20px; height: 20px; stroke-width: 2.25; transition: transform .2s ease; }
.btn:hover .icon { transform: translateX(3px); }

/* Orange button with navy text: 5.2:1 contrast */
.btn-primary { --btn-bg: var(--jt-orange); --btn-fg: var(--jt-navy); --btn-bd: var(--jt-orange); }
.btn-primary:hover { --btn-bg: var(--jt-orange-hover); --btn-bd: var(--jt-orange-hover); transform: translateY(-1px); }
.btn-primary:active { transform: none; }

.btn-secondary { --btn-fg: var(--heading); --btn-bd: var(--border-strong); }
.btn-secondary:hover { --btn-bd: var(--heading); }

.btn-lg { min-height: 54px; padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn[aria-disabled="true"] {
  --btn-bg: var(--bg-alt);
  --btn-fg: var(--text-muted);
  --btn-bd: var(--border-strong);
  border-style: dashed;
  cursor: not-allowed;
  transform: none;
}
.btn[aria-disabled="true"] .icon { transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

/* Logo lockup: kit mark + live Montserrat wordmark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex: none;
  color: var(--logo-primary);
  text-decoration: none;
}
.brand .jt-mark { width: auto; height: 50px; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.bw-top {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.bw-justin { color: var(--logo-primary); }
.bw-time { color: var(--logo-accent); }
.bw-ins {
  display: flex;
  align-items: center;
  gap: .55em;
  margin-top: .45em;
  color: var(--logo-sub);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .48em;
}
.bw-ins span { margin-right: -.48em; }
.bw-ins::before, .bw-ins::after {
  content: "";
  flex: 1 1 0;
  min-width: 6px;
  height: 2px;
  background: currentColor;
}

/* Logo mark colors (switch with the theme) */
.jt-mark .m-p { fill: var(--logo-primary); }
.jt-mark .m-a, .art .m-a { fill: var(--logo-accent); }
.jt-mark .m-s, .art .m-s { stroke: var(--logo-primary); }
.art .m-p { fill: var(--logo-primary); }
.art .art-ground { stroke: var(--border-strong); }

/* Navigation */
.primary-nav { display: flex; align-items: center; }
.nav-toggle { display: none; }
.nav-panel { display: flex; align-items: center; gap: 1.25rem; }
.nav-list {
  display: flex;
  gap: .15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a {
  display: block;
  padding: .6rem .8rem;
  border-radius: 10px;
  color: var(--heading);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease;
}
.nav-list a:hover { background: var(--bg-alt); }
.nav-list a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--jt-orange); border-radius: 10px 10px 2px 2px; }

.nav-actions { display: flex; align-items: center; gap: .6rem; }
.btn-header { min-height: 44px; padding: .6rem 1.2rem; font-size: .95rem; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--heading);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.theme-toggle:hover { border-color: var(--border-strong); background: var(--bg-alt); }
.theme-toggle .icon { width: 20px; height: 20px; }
.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mobile navigation (below 960px) */
@media (max-width: 959.98px) {
  :root { --header-h: 66px; }
  .brand .jt-mark { height: 40px; }
  .bw-top { font-size: 1.2rem; }
  .bw-ins { font-size: .5rem; }

  .js .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--heading);
    cursor: pointer;
  }
  .nav-toggle .icon-close,
  .nav-open .nav-toggle .icon-open { display: none; }
  .nav-open .nav-toggle .icon-close { display: block; }

  .js .nav-panel {
    position: fixed;
    top: var(--panel-top, var(--header-h));
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    padding: 1rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--bg);
    border-top: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .js.nav-open .nav-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .js .nav-list { flex-direction: column; gap: 0; }
  .js .nav-list a {
    padding: 1.05rem .25rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: 1.3rem;
    font-weight: 700;
  }
  .js .nav-list a:hover { background: none; }
  .js .nav-list a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--jt-orange); padding-left: 1rem; border-radius: 0; }
  .js .nav-actions { flex-direction: column; align-items: stretch; gap: .75rem; }
  .js .theme-toggle { width: 100%; height: 50px; justify-content: flex-start; padding: 0 1rem; }
  .js .theme-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .js .btn-header { min-height: 54px; font-size: 1.05rem; }
  .nav-open { overflow: hidden; }

  /* Without JavaScript the menu simply wraps under the logo */
  html:not(.js) .header-inner { flex-wrap: wrap; padding-block: .75rem; }
  html:not(.js) .primary-nav, html:not(.js) .nav-panel { width: 100%; flex-wrap: wrap; }
  html:not(.js) .nav-list { flex-wrap: wrap; }
  html:not(.js) .theme-toggle { display: none; }
}

/* Very small phones */
@media (max-width: 359.98px) {
  .brand .jt-mark { height: 34px; }
  .bw-top { font-size: 1.02rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); }
.section-tight-top { padding-top: 0; }

.section-head { max-width: 720px; margin-bottom: clamp(1.75rem, 3.5vw, 3rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.eyebrow::before, .center .eyebrow::after {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--jt-orange);
}

.lead {
  color: var(--text-muted);
  font-size: clamp(1.075rem, 1rem + .35vw, 1.25rem);
  line-height: 1.6;
}

/* ---------- Home hero ---------- */
.hero { padding-block: clamp(2.25rem, 5vw, 5rem) clamp(3rem, 6vw, 6rem); }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.hero h1 {
  max-width: 13ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2.6rem, 1.6rem + 4.4vw, 4.75rem);
  font-style: italic;
  line-height: 1.02;
}
.hero h1 em { color: var(--accent-text); font-style: italic; }
.hero .lead { max-width: 34rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--heading);
  font-size: .95rem;
  font-weight: 600;
}
.hero-points li { display: inline-flex; align-items: center; gap: .55rem; }

.check {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--jt-orange);
  color: var(--jt-navy);
}
.check .icon { width: 15px; height: 15px; stroke-width: 3; }

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 28px;
  background: var(--bg-alt);
}
.hero-mark { display: grid; flex: 1; place-items: center; padding: clamp(.5rem, 3vw, 2rem) 0; }
.hero-mark .jt-mark { width: 100%; max-width: 480px; height: auto; }

/* Two real shortcut buttons under the logo */
.hero-links { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.hero-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 64px;
  padding: .65rem .85rem .65rem .65rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--heading);
  line-height: 1.25;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.hero-link:hover { border-color: var(--heading); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero-link-text strong { display: block; font-size: 1rem; }
.hero-link-text small { display: block; color: var(--text-muted); font-size: .8rem; font-weight: 500; }
.hero-link-arrow { width: 20px; height: 20px; margin-left: auto; color: var(--jt-orange); stroke-width: 2.25; transition: transform .2s ease; }
.hero-link:hover .hero-link-arrow { transform: translateX(3px); }
.chip-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--jt-navy);
  color: #fff;
}
[data-theme="dark"] .chip-icon { background: var(--jt-orange); color: var(--jt-navy); }
.chip-icon .icon { width: 22px; height: 22px; }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; }
}
@media (max-width: 479.98px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-link { gap: .55rem; padding: .55rem .6rem .55rem .55rem; }
  .hero-link-text small { display: none; }
  .chip-icon { width: 36px; height: 36px; }
}

/* ---------- Inner-page hero ---------- */
.page-hero {
  padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--border);
}
.page-hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.page-hero h1 { max-width: 17ch; margin-bottom: 1.1rem; }
.page-hero .lead { max-width: 38rem; margin-bottom: 1.75rem; }
.page-hero-art {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 24px;
  background: var(--bg-alt);
}
.page-hero-art svg { width: 100%; max-width: 420px; height: auto; }
@media (min-width: 960px) {
  .page-hero-grid { grid-template-columns: 1.15fr .85fr; }
}
@media (max-width: 959.98px) {
  .page-hero-art { aspect-ratio: 16 / 7; }
  .page-hero-art svg { max-width: 300px; }
}

.breadcrumb { margin-bottom: clamp(1.25rem, 3vw, 2rem); font-size: .85rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; color: var(--text-muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: var(--border-strong); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--heading); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--heading); font-weight: 600; }

/* ---------- Cards & grids ---------- */
.card-grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
@media (min-width: 720px) {
  .card-grid.cols-2, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  position: relative;
  padding: clamp(1.35rem, 2.5vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--jt-radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--text-muted); font-size: 1rem; }

.icon-chip {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 1.1rem;
  border: 1px solid var(--border);
  flex: none;
  border-radius: 13px;
  background: var(--bg-alt);
  color: var(--heading);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.card:hover .icon-chip { background: var(--jt-navy); border-color: var(--jt-navy); color: #fff; }
[data-theme="dark"] .card:hover .icon-chip { background: var(--jt-orange); border-color: var(--jt-orange); color: var(--jt-navy); }

/* Service cards (home page) */
.service-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.service-art {
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 1;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(2rem, 6vw, 4rem);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.service-art svg { width: 100%; max-width: 360px; height: auto; transition: transform .35s ease; }
.service-card:hover .service-art svg { transform: scale(1.03); }
.service-body { display: flex; flex: 1; flex-direction: column; gap: .5rem; padding: clamp(1.35rem, 3vw, 2rem); }
.service-body h3 { margin: 0; font-size: clamp(1.35rem, 1.2rem + .6vw, 1.65rem); }
.service-body h3 a { color: inherit; text-decoration: none; }
.service-body h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card is clickable */
.service-body p { margin: 0; }
.service-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: auto;
  padding-top: .9rem;
  color: var(--heading);
  font-weight: 700;
}
.service-more .icon { width: 20px; height: 20px; color: var(--jt-orange); stroke-width: 2.25; transition: transform .2s ease; }
.service-card:hover .service-more .icon { transform: translateX(4px); }
.service-card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.service-card h3 a:focus-visible { outline: none; }

/* Coverage explainer cards (service pages) */
.coverage-card h3::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 1rem;
  border-radius: 2px;
  background: var(--jt-orange);
}

/* Steps */
.steps { display: grid; gap: clamp(1rem, 2vw, 1.5rem); margin: 0; padding: 0; list-style: none; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: var(--jt-navy);
  color: var(--jt-orange);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 800;
}
[data-theme="dark"] .step-num { background: var(--jt-orange); color: var(--jt-navy); }

/* Life moments */
.moment { display: flex; align-items: flex-start; gap: 1rem; }
.moment .icon-chip { margin: 0; }
.moment h3 { margin-bottom: .3rem; font-size: 1.075rem; }
.moment p { margin: 0; font-size: .95rem; }

/* Two-column split */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; } }

.checklist { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: flex-start; gap: .85rem; }
.checklist .check { margin-top: .1rem; }
.checklist strong { display: block; color: var(--heading); }
.checklist span.desc { color: var(--text-muted); font-size: .98rem; }

.callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--border);
  border-left: 4px solid var(--jt-orange);
  border-radius: 12px;
  background: var(--surface);
}
.callout .icon { color: var(--heading); margin-top: .15rem; }
.callout p { color: var(--text-muted); font-size: .98rem; }
.callout strong { color: var(--heading); }

.fine-print { margin-top: 1.5rem; color: var(--text-muted); font-size: .88rem; }

/* FAQ */
.faq { display: grid; gap: .75rem; max-width: 860px; }
.faq details {
  padding: 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color .15s ease;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-right: 2.5px solid var(--jt-orange);
  border-bottom: 2.5px solid var(--jt-orange);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq .faq-body { padding-bottom: 1.25rem; color: var(--text-muted); }

/* ---------- Call-to-action band ---------- */
.cta-section { padding-top: 0; }
.cta-section.after-alt { padding-top: var(--section-y); }
.cta-band {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  border-radius: 24px;
  background: var(--jt-navy);
}
.cta-band h2 { margin-bottom: .6rem; }
.cta-band .lead { max-width: 36rem; }
.cta-copy, .cta-actions { position: relative; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.cta-roof {
  position: absolute;
  right: -40px;
  bottom: -30px;
  width: min(520px, 80%);
  fill: rgba(255, 255, 255, .06);
  pointer-events: none;
}
@media (min-width: 900px) {
  .cta-band { grid-template-columns: 1fr auto; }
  .cta-actions { flex-direction: column; }
}
@media (max-width: 479.98px) {
  .cta-actions .btn { flex: 1 1 100%; }
}

/* ---------- Quote page ---------- */
.quote-layout { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
@media (min-width: 1024px) { .quote-layout { grid-template-columns: 1.4fr .9fr; } }

.quote-panel {
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.quote-panel fieldset { margin: 0; padding: 0; border: 0; }
.quote-panel legend { margin-bottom: .35rem; padding: 0; color: var(--heading); font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); font-weight: 800; letter-spacing: -.01em; }
.quote-panel .hint { color: var(--text-muted); font-size: .95rem; }

.option-grid { display: grid; gap: .85rem; margin: 1.25rem 0 1.75rem; }
@media (min-width: 560px) { .option-grid { grid-template-columns: repeat(3, 1fr); } }
.option { position: relative; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option label {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  height: 100%;
  padding: 1.1rem 1.15rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--heading);
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.option label:hover { border-color: var(--border-strong); }
.option label small { color: var(--text-muted); font-size: .85rem; font-weight: 500; }
.option .opt-icons { display: flex; gap: .35rem; color: var(--heading); }
.option input:checked + label { border-color: var(--heading); background: var(--bg-alt); box-shadow: inset 0 0 0 1px var(--heading); }
.option input:checked + label .opt-icons { color: var(--accent-text); }
.option input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 3px; }

.quote-start { display: grid; gap: 1rem; }
.privacy-line { display: flex; align-items: center; gap: .6rem; color: var(--text-muted); font-size: .9rem; }
.privacy-line .icon { width: 20px; height: 20px; color: var(--heading); }

.side-stack { display: grid; gap: 1rem; }
.side-stack .card h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.mini-steps { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.mini-steps li { display: grid; grid-template-columns: auto 1fr; gap: .85rem; color: var(--text-muted); font-size: .97rem; counter-increment: s; }
.mini-steps li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--jt-navy);
  color: var(--jt-orange);
  font-size: .9rem;
  font-style: italic;
  font-weight: 800;
}
[data-theme="dark"] .mini-steps li::before { background: var(--jt-orange); color: var(--jt-navy); }
.mini-steps strong { display: block; color: var(--heading); }

/* ---------- Contact page ---------- */
.contact-card .icon-chip { margin-bottom: 1rem; }
.contact-card h2 { margin-bottom: .5rem; font-size: 1.15rem; letter-spacing: -.01em; }
.contact-card .ph { margin-bottom: .5rem; }

/* ---------- About page ---------- */
.agent-card { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 640px) { .agent-card { grid-template-columns: auto 1fr; } }
.agent-photo {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 2px dashed var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
}
.agent-photo .icon { width: 44px; height: 44px; stroke-width: 1.5; }
.agent-fields { display: grid; gap: .45rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.agent-fields li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: var(--text-muted); font-size: .97rem; }
.agent-fields strong { min-width: 7.5rem; color: var(--heading); font-size: .9rem; }

/* ---------- Legal page ---------- */
.legal-layout { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 960px) { .legal-layout { grid-template-columns: 250px 1fr; } }
.toc { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 959.98px) { .toc { position: static; } }
.toc h2 { margin-bottom: .75rem; color: var(--text-muted); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }
.toc ol { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--border); }
.toc a {
  display: block;
  margin-left: -2px;
  padding: .4rem 0 .4rem 1rem;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
}
.toc a:hover { border-left-color: var(--jt-orange); color: var(--heading); }

.prose { max-width: 72ch; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.legal-section { margin-bottom: 2.25rem; padding-bottom: 2.25rem; border-bottom: 1px solid var(--border); }
.legal-section:last-child { border-bottom: 0; }
.legal-section h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; font-size: clamp(1.35rem, 1.2rem + .6vw, 1.65rem); }
.legal-section .ph-block { margin-top: 1rem; }

/* ---------- 404 ---------- */
.not-found { display: grid; place-items: center; min-height: 55vh; text-align: center; }
.not-found .jt-mark { width: min(260px, 70%); height: auto; margin: 0 auto 2rem; }
.not-found .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  background: var(--jt-navy);
  font-size: .95rem;
}
[data-theme="dark"] .site-footer { background: #041125; border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.5fr .8fr .9fr 1.2fr; } }
.footer-tagline { margin: 1.4rem 0 .4rem; color: #fff; font-size: 1.1rem; font-style: italic; font-weight: 700; }
.footer-tagline em { color: var(--jt-orange); }
.footer-note { max-width: 30ch; color: var(--text-muted); }
.footer-col h2 { margin-bottom: 1rem; color: var(--text-muted); font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }
.footer-col ul { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.footer-col a { color: #fff; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; text-decoration-color: var(--jt-orange); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.footer-contact li { display: flex; align-items: center; gap: .65rem; color: #fff; }
.footer-contact .icon { width: 20px; height: 20px; color: var(--jt-orange); }
.footer-legal {
  display: grid;
  gap: .75rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .85rem;
}
.footer-legal p { max-width: 95ch; }
.footer-legal strong { color: #fff; }
.footer-legal a { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  margin-top: 1.75rem;
  color: var(--text-muted);
  font-size: .85rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Sticky mobile quote button ---------- */
.mobile-cta { display: none; }
@media (max-width: 959.98px) {
  .mobile-cta {
    display: block;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--bg);
    box-shadow: 0 -10px 28px -18px rgba(11, 45, 91, .35);
  }
  .nav-open .mobile-cta { display: none; }
  /* With JavaScript, the bar slides in once the top of the page is scrolled past */
  .js .mobile-cta { transform: translateY(110%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  .js.show-cta .mobile-cta { transform: none; visibility: visible; transition: transform .25s ease; }
  body.has-mobile-cta { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .preview-bar, .primary-nav, .mobile-cta, .cta-section, .skip-link { display: none !important; }
  .site-header { position: static; }
  .site-footer { background: none; color: #000; }
  body { padding: 0 !important; }
}

/* Quote button pressed while the quote flow is still a placeholder */
@keyframes jt-flash {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 0, 0); }
  30% { box-shadow: 0 0 0 5px rgba(255, 122, 0, .45); }
  100% { box-shadow: 0 0 0 0 rgba(255, 122, 0, 0); }
}
.is-flash { animation: jt-flash 1.2s ease; }
.h3-size { font-size: 1.2rem; letter-spacing: -.01em; }

/* ---------- Text with us (SMS) ---------- */
.section-alt + .cta-section { padding-top: var(--section-y); }
.small { font-size: .9rem; color: var(--text-muted); }
.hint { color: var(--text-muted); font-size: .95rem; }

.sms-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 960px) { .sms-grid { grid-template-columns: 1fr 1fr; } }
.sms-uses { display: grid; gap: 1rem; margin: 1.75rem 0 2rem; padding: 0; list-style: none; }
.sms-uses li { display: flex; align-items: center; gap: 1rem; }
.sms-uses .icon-chip { margin: 0; }
.sms-uses strong { display: block; color: var(--heading); }
.sms-uses span:not(.icon-chip) { color: var(--text-muted); font-size: .95rem; }
.sms-direct .btn .icon { transform: none; }
.sms-direct .ph-note { margin-top: 0; }

.sms-card { padding: clamp(1.4rem, 4vw, 2.25rem); border-radius: 24px; box-shadow: var(--shadow-md); }
.sms-card h3 { font-size: 1.4rem; margin-bottom: .3rem; }
.sms-form fieldset { display: grid; gap: 1rem; margin: 1.25rem 0 0; padding: 0; border: 0; min-width: 0; }
.sms-form fieldset[disabled] { opacity: .75; }
.field { display: grid; gap: .4rem; }
.field label { color: var(--heading); font-size: .92rem; font-weight: 700; }
.field input, .field select {
  width: 100%;
  min-height: 50px;
  padding: .7rem .9rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16px+ stops iPhones from zooming in on tap */
}
.field input::placeholder { color: var(--text-muted); opacity: .8; }
.field input:focus, .field select:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--heading); }
.sms-form [disabled] input, .sms-form [disabled] select { cursor: not-allowed; }

.consent { display: flex; align-items: flex-start; gap: .75rem; padding-top: .25rem; }
.consent input { flex: none; width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--jt-navy); }
[data-theme="dark"] .consent input { accent-color: var(--jt-orange); }
.consent label { color: var(--heading); font-size: .97rem; line-height: 1.45; }
.consent-text { padding: .9rem 1rem; border-radius: 12px; background: var(--bg-alt); color: var(--text-muted); font-size: .8rem; line-height: 1.55; }
.consent-text p { margin-bottom: .5rem; }
.consent-text a { color: var(--heading); font-weight: 600; text-decoration: underline; text-decoration-color: var(--jt-orange); text-underline-offset: 2px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sms-status { margin-top: 1rem; }

/* Text Messaging Terms: quick summary box */
.sms-summary { padding: 1.4rem; border: 1px solid var(--border); border-left: 4px solid var(--jt-orange); border-radius: 14px; background: var(--surface); align-self: start; }
@media (min-width: 960px) { .sms-summary { position: sticky; top: calc(var(--header-h) + 24px); } }
.sms-summary h2 { margin-bottom: .75rem; font-size: 1rem; }
.sms-summary ul { display: grid; gap: .5rem; margin: 0; padding-left: 1.1rem; color: var(--text-muted); font-size: .95rem; }
.sms-summary strong { color: var(--heading); }

/* Phone bar: "Text us" beside "Get a Quote" when a texting number is set */
.mobile-cta { gap: .6rem; }
@media (max-width: 959.98px) {
  .mobile-cta:has(> .btn + .btn) { display: grid; grid-template-columns: auto 1fr; }
}
.mobile-cta .btn-secondary { background: var(--surface); }

.footer-address { line-height: 1.5; }

/* ---------- Live mode (site.json "mode": "live") ----------
   Unfinished items are hidden from visitors instead of shown as placeholders. */
.live .ph,
.live [data-ph-section] { display: none !important; }

.sms-direct-terms { max-width: 34rem; margin-top: 1.25rem; }

/* ---------- Form options comparison page (temporary) ---------- */
.option-head { max-width: 760px; margin-bottom: 2rem; }
.option-head p { color: var(--text-muted); }
.opt-badge { display: inline-block; margin-bottom: .9rem; padding: .3rem .8rem; border-radius: 999px; background: var(--jt-orange); color: var(--jt-navy); font-size: .78rem; font-weight: 800; letter-spacing: .04em; }
.opt-badge.muted { background: var(--bg-alt); color: var(--heading); border: 1px solid var(--border-strong); }
.demo-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 960px) { .demo-grid { grid-template-columns: 1fr 1fr; } }
.demo-label { margin-bottom: .9rem; color: var(--text-muted); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.demo-note { margin-top: 1rem; }
.demo-done { display: flex; gap: .85rem; align-items: flex-start; padding: 1.1rem; border-radius: 14px; background: var(--bg-alt); }
.demo-done[hidden] { display: none; }
.demo-done .check { margin-top: .15rem; }

.wizard { padding: clamp(1.3rem, 4vw, 2rem); border-radius: 24px; box-shadow: var(--shadow-md); }
.wizard-top { margin-bottom: 1.4rem; }
.wizard-count { margin-bottom: .5rem; color: var(--text-muted); font-size: .85rem; font-weight: 700; }
.wizard-bar { height: 6px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.wizard-bar span { display: block; height: 100%; width: 25%; border-radius: inherit; background: var(--jt-orange); transition: width .3s ease; }
.wizard-step { display: grid; gap: 1rem; }
.wizard-step[hidden] { display: none; }
.wizard-step h3 { margin: 0; font-size: 1.35rem; }
.wizard-step h3:focus { outline: none; }
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
@media (min-width: 560px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
.tile-grid .option label { align-items: flex-start; gap: .55rem; padding: .95rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.field-row.three { grid-template-columns: .8fr 1fr 1fr; }
.wizard-nav { display: flex; gap: .75rem; margin-top: .5rem; }
.wizard-nav .btn-primary { flex: 1; }
.add-row { min-height: 44px; border-style: dashed; font-size: .95rem; }
.ez-shot { max-width: 360px; margin: 0 0 1.5rem; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-md); }
.ez-shot img { width: 100%; height: auto; }
