/* =========================================================
   Apex Home Care NJ — style.css
   Design tokens, base elements, layout and page sections.
   Components live in components.css, breakpoints in responsive.css.

   Brand colours (sampled from the Apex Home Care Service logo)
   Apex Navy   #0A3D85  "Apex" wordmark: trust, headings, primary buttons
   Home Blue   #0A5DB8  roof and caregiver: links, highlights
   Care Green  #1A8323  "HomeCare" wordmark: calls to action, ticks
   Leaf Green  #5CB218  heart and ring: decoration only (low contrast)
   White       #FFFFFF  page background
   ========================================================= */

:root {
  /* Brand */
  --navy: #0A3D85;
  --navy-deep: #072C61;
  --blue: #0A5DB8;
  --green: #1A8323;
  --green-dark: #136A1B;     /* green text and hover states */
  --leaf: #5CB218;
  --white: #FFFFFF;

  /* Tints */
  --sky: #EBF3FC;            /* soft blue section background */
  --mint: #EEF7EA;           /* soft green section background */
  --sky-line: #CFE0F3;

  /* Text */
  --ink: #10294F;
  --muted: #4A6285;
  --on-navy: #DCE7F6;
  --on-navy-muted: #B9CCE8;
  --green-on-navy: #A6DE86;
  --error: #B3261E;

  /* The logo ring runs blue to green */
  --brand-gradient: linear-gradient(90deg, #0A5DB8 0%, #1A8323 70%, #5CB218 100%);

  /* Type (larger base size: many readers are 50+) */
  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-base: 1.125rem;
  --fs-sm: 1rem;
  --fs-xs: 0.9rem;
  --fs-h3: 1.3rem;
  --fs-h2: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
  --fs-h1: clamp(2.3rem, 1.6rem + 3vw, 3.6rem);

  /* Shape and space */
  --radius-sm: 8px;
  --radius-lg: 20px;
  --container: 1180px;
  --header-h: 88px;
  --section-y: clamp(4rem, 8vw, 6.5rem);
  --shadow-navy: 0 30px 60px -30px rgba(10, 61, 133, 0.55);
}

/* ---------- Reset and base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.015em; }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 1em; max-width: 65ch; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 700; }

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

::selection { background: var(--green); color: var(--white); }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
}
.skip-link:focus { top: 1rem; color: var(--white); }

/* Spam trap field: hidden from people, visible to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.lead { font-size: 1.2rem; color: var(--muted); max-width: 55ch; }
.muted { color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-sky { background: var(--sky); }
.section-mint { background: var(--mint); }
.section-navy { background: var(--navy); color: var(--on-navy); }
.section-navy h2,
.section-navy h3 { color: var(--white); }
.section-navy a { color: var(--green-on-navy); }
.section-navy a:hover { color: var(--white); }

.section-head { max-width: 660px; margin-bottom: 3rem; }
.section-head p { font-size: 1.15rem; color: var(--muted); }
.section-navy .section-head p { color: var(--on-navy-muted); }
.section-head-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
}
.section-head-row .section-head { margin-bottom: 0; }

/* ---------- Layout helpers ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.two-col.wide-left { grid-template-columns: 1.2fr 0.8fr; }
.two-col.wide-right { grid-template-columns: 0.8fr 1.2fr; }

/* ---------- Home hero ---------- */
.hero {
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3.5rem, 7vw, 6rem);
  background: var(--white);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 { max-width: 16ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-block: 2rem; }

/* ---------- Inner page hero ---------- */
.page-hero {
  padding-block: clamp(3rem, 6vw, 5rem);
  background: var(--sky);
  border-bottom: 1px solid var(--sky-line);
}
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { margin-bottom: 0; }

/* ---------- Long-form text (about, legal) ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.6rem; margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1em; }
.prose li { margin-bottom: 0.4rem; }
.prose > :first-child { margin-top: 0; }

.legal-meta { font-size: var(--fs-sm); color: var(--muted); }