/* True Access Health: two-page site (Home + Contact). Brand navy + teal. */

:root {
  --navy-950: #041a33;
  --navy-900: #061f3d;
  --navy: #0b3a6e;
  --teal: #1a9fb0;
  --teal-btn: #0e7f8c;      /* AA contrast with white text */
  --teal-btn-hover: #0b6c77;
  --teal-bright: #4fd6df;
  --mint: #eaf7f6;
  --mint-2: #d6f0ee;
  --ink: #14243a;
  --muted: #4f6075;
  --line: #cfe3e6;
  --white: #fff;
  --radius: 16px;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-btn); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--white); color: var(--navy); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 3px; border-radius: 4px; }

/* ---------- Header (sits on top of each page's navy hero) ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .96); border-bottom: 1px solid #e3edf0; backdrop-filter: saturate(1.4) blur(8px); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand img { width: 290px; height: auto; }
.nav { display: flex; align-items: center; }
.nav-link {
  position: relative;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .95rem;
  color: var(--navy);
  text-decoration: none;
  padding: 8px 18px;
  transition: color .2s;
}
.nav-link + .nav-link { border-left: 1px solid #c9d8de; }
.nav-link::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 2px; height: 2px;
  background: var(--teal); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--navy-900); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- Hero (animated canvas behind; CSS gradient is the fallback) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  margin: 14px 16px 0;
  border-radius: 24px;
  isolation: isolate; /* keeps the canvas clipped to the rounded corners in Safari */
  color: var(--white);
  background:
    radial-gradient(70% 90% at 85% 30%, rgba(26, 159, 176, .55), transparent 60%),
    linear-gradient(120deg, var(--navy-950) 0%, var(--navy-900) 45%, #0b4a6e 100%);
}
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero-canvas.ready { opacity: 1; }
/* keeps text readable where the ribbons pass behind it */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(4, 26, 51, .55) 0%, rgba(4, 26, 51, .2) 45%, transparent 70%);
}
.hero-inner { position: relative; z-index: 1; }

.hero-home .hero-inner { padding-top: 100px; padding-bottom: 112px; }
.hero-contact .hero-inner { padding-top: 88px; padding-bottom: 88px; }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .01em;
  color: var(--teal-bright);
  margin-bottom: 18px;
}
.eyebrow span { color: rgba(255, 255, 255, .45); margin: 0 .5em; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 700; max-width: 15ch; }
.hero-home h1 { max-width: 20ch; }
.accent { color: var(--teal-bright); }
.hero-copy { max-width: 560px; margin-top: 24px; display: grid; gap: 14px; color: rgba(255, 255, 255, .84); font-size: 1.1rem; }
.hero .btn { margin-top: 34px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 14px 26px; border-radius: 10px; border: 0; cursor: pointer;
  text-decoration: none;
  transition: background-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn-primary { background: var(--teal-btn); color: var(--white); box-shadow: 0 6px 18px -8px rgba(14, 127, 140, .7); }
.btn-primary:hover { background: var(--teal-btn-hover); transform: translateY(-1px); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn:disabled { opacity: .7; cursor: progress; transform: none; }

/* ---------- Services ---------- */
.services { padding: 96px 0 230px; background: linear-gradient(180deg, var(--white), #f6fbfb); }
.section-title { text-align: center; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; color: var(--navy-900); }
.accent-dark { color: var(--teal-btn); }
.service-list { display: grid; gap: 22px; margin-top: 52px; max-width: 980px; margin-left: auto; margin-right: auto; }
.service {
  display: grid; grid-template-columns: 132px 1fr; gap: 32px; align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 34px 28px 28px;
  box-shadow: 0 1px 2px rgba(6, 31, 61, .04), 0 12px 32px -20px rgba(6, 31, 61, .18);
  transition: border-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.service:hover { border-color: #9fd6db; transform: translateY(-2px); box-shadow: 0 1px 2px rgba(6, 31, 61, .04), 0 20px 40px -22px rgba(6, 31, 61, .28); }
.service-icon {
  position: relative;
  width: 132px; aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--mint) 0%, var(--mint-2) 100%);
}
.service-icon::after { /* divider line, as in the mockup */
  content: ""; position: absolute; right: -17px; top: 14%; bottom: 14%; width: 1px; background: var(--line);
}
.service-icon svg { width: 80px; height: 80px; overflow: visible; transition: transform .5s var(--ease); }
.service:hover .service-icon svg { transform: translateY(-3px) scale(1.04); }
.service h3 { font-size: 1.3rem; font-weight: 700; color: var(--navy-900); margin-bottom: 8px; }
.service p { color: var(--muted); }

/* Icon pieces (two-tone line icons) */
.i-line { fill: none; stroke: var(--navy); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.i-soft { fill: #fff; }
.i-soft.i-line { fill: #fff; }
.i-fill { fill: var(--teal); stroke: var(--navy); stroke-width: 2.2; stroke-linejoin: round; }
.i-hole { fill: #fff; stroke: var(--navy); stroke-width: 2.2; }
.i-check { fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.i-route { fill: none; stroke: var(--teal); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 2 4.5; }
.i-ring { fill: rgba(26, 159, 176, .14); stroke: var(--teal); stroke-width: 1.6; stroke-dasharray: 3 4; }

/* ---------- Contact ---------- */
.contact {
  position: relative; overflow: hidden;
  padding: 80px 0 230px;
  background: linear-gradient(180deg, #f7fcfc 0%, var(--mint) 100%);
}
.contact .container { position: relative; z-index: 1; }

.form {
  max-width: 600px; margin: 0 auto;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 24px 60px -36px rgba(6, 31, 61, .35);
  display: grid; gap: 22px;
}
.field { display: grid; gap: 8px; }
.field label { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--navy-900); }
.req { color: #c62f3b; }
.opt { font-weight: 400; font-style: italic; color: var(--muted); }
input, textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: var(--white);
  border: 1px solid #b9cfd6;
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 140px; resize: vertical; }
input:hover, textarea:hover { border-color: #8fb3bd; }
input:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(26, 159, 176, .18); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile:empty { display: none; }
.form .btn { justify-self: start; }
.form-status:empty { display: none; }
.form-status { padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.form-status.ok { background: #e3f6ea; color: #1c6b3e; }
.form-status.err { background: #fdecee; color: #a3222d; }
.form-note { font-size: .9rem; font-style: italic; color: var(--muted); }

/* ---------- Simple inner pages (Privacy, Terms, 404) ---------- */
.page-head {
  position: relative; color: var(--white);
  margin: 14px 16px 0; border-radius: 24px;
  padding: 72px 0 64px;
  background:
    radial-gradient(60% 120% at 90% 0%, rgba(26, 159, 176, .5), transparent 60%),
    linear-gradient(120deg, var(--navy-950), var(--navy-900) 55%, #0b4a6e);
}
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
.page-head p { margin-top: 10px; color: rgba(255, 255, 255, .8); }
.legal { max-width: 820px; padding-top: 56px; padding-bottom: 200px; }
.legal h2 { font-size: 1.3rem; color: var(--navy-900); margin: 36px 0 10px; }
.legal p, .legal ul { margin: 0 0 14px; color: var(--muted); }
.legal .updated { font-size: .95rem; }
.draft-banner { background: #fff6e0; border: 1px solid #f0d58a; color: #6b4e00; border-radius: 10px; padding: 12px 16px; margin-bottom: 24px; }
.page-404 main { background: linear-gradient(120deg, var(--navy-950), var(--navy-900) 55%, #0b4a6e); color: var(--white); }
.section-tall { padding: 120px 0 240px; text-align: center; }
.section-tall h1 { font-size: clamp(2rem, 4vw, 3rem); }
.section-tall .eyebrow { margin-bottom: 12px; }
.section-tall .lead { margin: 14px 0 30px; color: rgba(255, 255, 255, .8); }

/* ---------- Footer ---------- */
/* Waves overlap the bottom of the last section, then run into the footer colour */
.site-footer { --footer-bg: #dfecef; position: relative; margin-top: -120px; color: var(--muted); text-align: center; font-size: .95rem; }
.footer-waves { display: block; width: 100%; height: 120px; }
.footer-waves .w1 { fill: rgba(26, 159, 176, .16); }
.footer-waves .w2 { fill: rgba(11, 58, 110, .10); }
.footer-waves .w3 { fill: var(--footer-bg); }
.footer-body { background: var(--footer-bg); padding: 28px 0 40px; margin-top: -1px; }
.footer-inner { display: grid; justify-items: center; gap: 14px; }
.footer-logo img { width: 280px; height: auto; }
.footer-tagline { font-family: var(--font-head); font-weight: 500; color: var(--navy); }
.footer-tagline span { color: #9bb3bd; margin: 0 .4em; }
.footer-copy { margin-top: -6px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; font-size: .85rem; color: #8aa0ad; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--navy); text-decoration: underline; }

/* ---------- Scroll reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease) var(--d, 0s), transform .8s var(--ease) var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .header-row { padding-top: 10px; padding-bottom: 10px; }
  .brand img { width: 172px; }
  .nav-link { padding: 6px 10px; font-size: .88rem; }
  .nav-link::after { left: 10px; right: 10px; }
  .hero-home .hero-inner { padding-top: 56px; padding-bottom: 72px; }
  .hero-contact .hero-inner { padding-top: 52px; padding-bottom: 60px; }
  .hero::after { background: rgba(4, 26, 51, .35); }
  .hero-copy { font-size: 1.02rem; }
  .eyebrow { font-size: .9rem; letter-spacing: 0; }
  .eyebrow span { margin: 0 .3em; }
  .services { padding: 64px 0 140px; }
  .hero, .page-head { margin: 10px 10px 0; border-radius: 18px; }
  .site-footer { margin-top: -72px; }
  .footer-waves { height: 72px; }
  .service-list { margin-top: 36px; gap: 16px; }
  .service { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .service-icon { width: 88px; }
  .service-icon svg { width: 56px; height: 56px; }
  .service-icon::after { display: none; }
  .contact { padding: 48px 0 140px; }
  .legal { padding-bottom: 130px; }
  .form { padding: 26px 20px; }
  .form .btn { justify-self: stretch; justify-content: center; }
  .page-head { padding: 52px 0 48px; }
}
@media (max-width: 380px) {
  .brand img { width: 140px; }
  .nav-link { padding: 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
