/* ===========================================================
   Aviva — Home Health Administration Services
   Shared stylesheet
   Design goals: calm, modern, simple, high-contrast, accessible.
   No flashy motion — many visitors manage health conditions.
   =========================================================== */

:root {
  /* Brand colors, sampled from the Aviva logo gradient */
  --navy: #2b2f7c;
  --indigo: #4a2f8a;
  --purple: #6e2f8f;
  --purple-light: #9a5fb8;
  --ink: #1c1c28;
  --body-text: #33333f;
  --muted: #5d5d6b;
  --bg: #ffffff;
  --bg-soft: #f6f4fb;
  --bg-soft-2: #eee9f7;
  --border: #e1ddee;
  --focus: #1454c9;
  --success-bg: #eef7ee;

  --gradient-brand: linear-gradient(135deg, var(--navy) 0%, var(--purple) 100%);

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1120px;
  --radius: 14px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 3px rgba(28, 28, 40, 0.08);
  --shadow-md: 0 8px 24px rgba(28, 28, 40, 0.10);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--body-text);
  background: var(--bg);
  font-size: 18px;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: var(--indigo); text-decoration: underline; text-decoration-thickness: 1px; }
a:hover { color: var(--purple); }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.5em; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Visible, generous focus rings — important for keyboard & low-vision users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

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

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

section { padding: 64px 0; }
.section-tight { padding: 40px 0; }

.section-head { max-width: 680px; margin: 0 0 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 10px;
}

.bg-soft { background: var(--bg-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}
.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
}
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--bg-soft-2); color: var(--navy); }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 8px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.25rem;
}
.brand img { width: auto; height: 38px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--purple); }
.nav-links a[aria-current="page"] { border-bottom: 2px solid var(--purple); }

.nav-cta { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: none;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
  color: var(--ink);
}

.nav-links li.nav-cta-mobile { display: none; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 4px; width: 100%; }
  .nav-links li.nav-cta-mobile { display: block; margin-top: 8px; }
  .nav-links li.nav-cta-mobile a { display: inline-flex; width: auto; padding: 10px 20px; }
  .nav-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-soft);
  padding: 72px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero p.lede { font-size: 1.15rem; color: var(--muted); margin-bottom: 28px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-art {
  background: var(--gradient-brand);
  border-radius: var(--radius);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
}
.hero-art img { width: 100%; max-width: 220px; }
.hero-art svg { max-width: 100%; height: auto; }
.hero-art.hero-photo {
  padding: 0;
  background: var(--bg-soft-2);
}
.hero-art.hero-photo img {
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: 320px;
  object-fit: cover;
  display: block;
}

.photo-frame {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 260px;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; min-height: 220px; }
  .hero-art.hero-photo img { min-height: 220px; }
}

.page-hero {
  background: var(--gradient-brand);
  color: #fff;
  padding: 56px 0;
}
.page-hero h1 { color: #fff; }
.page-hero p { color: #ece7f7; font-size: 1.1rem; max-width: 640px; }

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat strong {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--purple);
}
.stat span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr; }
}

/* ---------- Cards / grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
@media (max-width: 820px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.card .icon-badge {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #fff;
  font-size: 1.4rem;
}
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }
.card a.card-link { font-weight: 700; }

/* ---------- Who we serve / audience tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0; }
.tag-list li {
  background: var(--bg-soft-2);
  color: var(--indigo);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Process steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 8px; }
.step .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
}

/* ---------- Testimonial ---------- */
.testimonial {
  background: var(--bg-soft-2);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.testimonial blockquote {
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 18px;
  font-style: italic;
}
.testimonial cite { font-weight: 700; font-style: normal; color: var(--muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--gradient-brand);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-banner h2 { color: #fff; margin-bottom: 8px; }
.cta-banner p { color: #ece7f7; margin: 0; }
.cta-banner .btn-primary { background: #fff; color: var(--navy); }
.cta-banner .btn-primary:hover { background: #f1ecfb; }

/* ---------- FAQ / accordion ---------- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 22px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--purple);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--muted); }

/* ---------- Embedded application forms ---------- */
.form-embed {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.form-embed h3 { margin-bottom: 6px; }
.form-embed > p { color: var(--muted); margin-bottom: 18px; }
.form-embed iframe {
  display: block;
  width: 100%;
  height: 1400px;
  max-width: 760px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft-2);
}
.form-embed .form-fallback {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 20px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }

label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.req { color: var(--purple); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--indigo); }
.field-hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }

fieldset { border: none; padding: 0; margin: 0; }
fieldset legend { font-weight: 700; margin-bottom: 10px; color: var(--ink); padding: 0; width: 100%; }

.checkbox-group { display: grid; gap: 10px; }
.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  margin-bottom: 0;
}
.checkbox-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--indigo);
}
.checkbox-option.acknowledge { font-weight: 700; color: var(--ink); }

input[type="file"] {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 10px 12px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--muted);
}
input[type="file"]:focus { border-color: var(--indigo); }

.application-form .form-note {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.92rem;
  color: var(--muted);
}
.application-form .form-note strong { color: var(--ink); }

.contact-info-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-info-card dt { font-weight: 700; color: var(--ink); margin-top: 18px; }
.contact-info-card dt:first-child { margin-top: 0; }
.contact-info-card dd { margin: 4px 0 0; color: var(--muted); }

.placeholder-note {
  background: #fff7e6;
  border: 1px solid #f0d999;
  color: #6b5400;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

/* ---------- Contractor portal embed ---------- */
.connect-embed {
  padding: 0;
}
.connect-embed iframe {
  display: block;
  width: 100%;
  height: calc(100vh - 148px);
  min-height: 640px;
  border: 0;
}
.connect-fallback {
  text-align: center;
  padding: 18px 24px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #d8d6e6;
  padding: 56px 0 32px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.site-footer .brand { color: #fff; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: #d8d6e6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #3a3a4a;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: #a6a4b8;
}
