/* GMIG Health Passport, self-guided site
   Brand: navy #002147, teal #009999, Fraunces + IBM Plex Sans */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --navy: #002147;
  --teal: #009999;
  --teal-deep: #006b6b;
  --tint: #e9f4f4;
  --paper: #ffffff;
  --ink: #0d2238;
  --muted: #47596b;
  --line: #c4d2db;
  --gold: #c8a951;
  --alert: #8f1d1d;
  --serif: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; }
a { color: var(--teal-deep); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.05rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 62ch; }
.lede { font-size: 1.3rem; color: var(--muted); }
.small { font-size: 1rem; color: var(--muted); }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(680px, 100% - 2.5rem); margin-inline: auto; }
main { padding-block: 2.5rem 4rem; }

/* Header and navigation */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 0.9rem; }
.brand { text-decoration: none; color: var(--navy); line-height: 1.15; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.brand span { display: block; font-size: 0.9rem; color: var(--muted); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 0.4rem; }
.site-nav a { padding: 0.55rem 0.8rem; border-radius: 8px; text-decoration: none; color: var(--navy); font-weight: 500; font-size: 1.05rem; }
.site-nav a:hover { background: var(--tint); }
.site-nav a[aria-current="page"] { background: var(--navy); color: #fff; }

.preview-flag { background: #fff4c9; color: #4a3a00; text-align: center; font-size: 1rem; padding: 0.5rem 1rem; border-bottom: 1px solid #e6d27a; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0.7rem 1.5rem;
  font: 600 1.15rem var(--sans); text-decoration: none; cursor: pointer;
  border-radius: 10px; border: 2px solid var(--navy);
  background: var(--navy); color: #fff;
}
.btn:hover { background: #00306b; color: #fff; }
.btn.secondary { background: #fff; color: var(--navy); }
.btn.secondary:hover { background: var(--tint); color: var(--navy); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--teal-deep); min-height: 44px; padding-inline: 0.6rem; text-decoration: underline; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-block: 1.5rem 1rem; }

/* Home */
.hero { display: grid; grid-template-columns: 1.25fr 0.9fr; gap: 3rem; align-items: center; }
.hero-art { display: flex; justify-content: center; padding-block: 1rem; }
.cover-stack { position: relative; width: 250px; height: 345px; }
.cover-page {
  position: absolute; inset: 14px -22px -6px 26px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; transform: rotate(5deg);
  padding: 2.2rem 1.2rem; box-shadow: 0 10px 24px rgba(0, 33, 71, 0.14);
}
.cover-page i { display: block; height: 10px; border-radius: 5px; background: var(--tint); margin-bottom: 14px; }
.cover-page i:nth-child(3n) { width: 60%; }
.cover {
  position: absolute; inset: 0; transform: rotate(-4deg);
  background: var(--navy); color: var(--gold); border-radius: 12px;
  box-shadow: 0 18px 34px rgba(0, 33, 71, 0.32);
  display: flex; flex-direction: column; justify-content: space-between; text-align: center;
  padding: 2.4rem 1.2rem 1.6rem;
}
.cover::after { content: ""; position: absolute; inset: 12px; border: 1.5px solid rgba(200, 169, 81, 0.75); border-radius: 6px; pointer-events: none; }
.cover b { font-family: var(--serif); font-weight: 600; font-size: 2rem; line-height: 1.1; }
.cover small { font-size: 0.82rem; line-height: 1.3; }

.facts { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; color: var(--muted); font-size: 1.05rem; }
.facts li { padding-left: 1.3rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }

.band { background: var(--tint); padding-block: 3rem; margin-top: 3.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.plain-list { margin: 0; padding-left: 1.2rem; }
.plain-list li { margin-bottom: 0.45rem; }

/* How it works */
.steps { list-style: none; padding: 0; margin: 2rem 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 1.6rem 4rem; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  background: var(--navy); color: #fff; font: 600 1.25rem var(--serif);
  display: grid; place-items: center;
}
.steps h3, .steps .step-title { margin-bottom: 0.25rem; }
.step-title { font-size: 1.3rem; }
.steps p { margin: 0; }

/* Guided form */
.progress { margin-bottom: 1.5rem; }
.progress p { margin: 0 0 0.4rem; font-weight: 500; color: var(--muted); font-size: 1rem; }
.progress-track { height: 10px; background: var(--tint); border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--teal); border-radius: 5px; transition: width 0.25s ease; }

.tip { background: var(--tint); border-left: 5px solid var(--teal); border-radius: 0 10px 10px 0; padding: 1rem 1.2rem; margin: 1rem 0 1.6rem; }
.tip strong { display: block; color: var(--navy); margin-bottom: 0.2rem; }
.tip p { margin: 0; }

.field { margin-bottom: 1.3rem; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 0.3rem; padding: 0; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: 1rem; margin-bottom: 0.35rem; }
input[type="text"], input[type="tel"], textarea {
  width: 100%; font: 400 1.15rem var(--sans); color: var(--ink);
  padding: 0.8rem 0.9rem; border: 2px solid #7f93a3; border-radius: 10px; background: #fff;
}
input[type="text"]:focus, input[type="tel"]:focus, textarea:focus { border-color: var(--teal-deep); outline: 3px solid rgba(0, 153, 153, 0.3); outline-offset: 0; }
textarea { min-height: 6.5rem; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }

.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.check { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; }
/* Stated again with .field so the general label rule above cannot flatten the tick boxes. */
.field .check { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; font-weight: 400; margin-bottom: 0; min-height: 48px; }
.check:has(input:checked) { border-color: var(--teal-deep); background: var(--tint); }
.check input { width: 1.5rem; height: 1.5rem; accent-color: var(--teal-deep); flex: none; }

.row-card { border: 2px solid var(--line); border-radius: 12px; padding: 1rem 1rem 0.2rem; margin-bottom: 1rem; position: relative; }
.row-card .row-title { font-weight: 600; color: var(--navy); margin: 0 0 0.6rem; }
.row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row-remove { position: absolute; top: 0.5rem; right: 0.5rem; }

.error { color: var(--alert); font-weight: 600; margin: 0.3rem 0 0; }
.saved-note { color: var(--muted); font-size: 1rem; margin-top: 1.5rem; }
.wizard-nav { display: flex; justify-content: space-between; gap: 0.8rem; margin-top: 2rem; flex-wrap: wrap; }

/* Review */
.review-block { border-top: 1px solid var(--line); padding: 1rem 0; display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.review-block h2 { font-family: var(--sans); font-size: 1.1rem; margin-bottom: 0.2rem; }
.review-block p { margin: 0; color: var(--muted); }

.locked {
  margin-top: 2rem; border-radius: 14px; background: var(--navy); color: #fff; padding: 1.6rem;
  display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem; align-items: center;
}
.locked h2 { color: #fff; margin-bottom: 0.4rem; }
.locked p { color: #d6e2ee; }
.locked-sheet { background: #fff; border-radius: 8px; padding: 0.9rem 0.8rem; height: 190px; overflow: hidden; }
.locked-sheet b { display: block; font: 600 0.85rem var(--serif); color: var(--navy); margin-bottom: 0.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.locked-sheet i { display: block; height: 8px; border-radius: 4px; background: #9fb3c2; margin-bottom: 9px; filter: blur(2.5px); }
.locked-sheet i:nth-child(3n) { width: 55%; }
.locked .btn { background: #fff; color: var(--navy); border-color: #fff; }
.locked .btn:hover { background: var(--tint); }
.locked .check { border-color: #5b7594; color: #fff; align-items: flex-start; margin: 1rem 0; font-size: 1rem; }
.locked .check:has(input:checked) { background: rgba(255, 255, 255, 0.08); border-color: #fff; }
.locked .check input { accent-color: var(--teal); }

/* After payment */
.panel { border: 2px solid var(--line); border-radius: 14px; padding: 1.5rem; margin-bottom: 1.5rem; }
.panel.good { border-color: var(--teal-deep); background: var(--tint); }
.panel.bad { border-color: var(--alert); }

/* Footer */
.site-footer { background: var(--navy); color: #d6e2ee; padding-block: 2.5rem; font-size: 1rem; }
.site-footer a { color: #fff; }
.site-footer p { margin-bottom: 0.6rem; max-width: 75ch; }
.site-footer strong { color: #fff; font-family: var(--serif); font-size: 1.15rem; }

@media (max-width: 760px) {
  .hero, .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .cover-stack { width: 190px; height: 262px; }
  .cover b { font-size: 1.55rem; }
  .checks, .row-grid { grid-template-columns: 1fr; }
  .locked { grid-template-columns: 1fr; }
  .locked-sheet { display: none; }
  .btn { width: 100%; }
  .btn.quiet { width: auto; }
}
@media (prefers-reduced-motion: reduce) { .progress-fill { transition: none; } }

/* Headings that receive focus when a new step loads should not show a ring */
h1[tabindex="-1"]:focus { outline: none; }
body[data-page="home"] main { padding-bottom: 0; }

/* Home illustration and sections added 3 Dec */
.band h3 { font-family: var(--sans); font-size: 1.15rem; margin: 1.1rem 0 0.2rem; }
.band h3 + p { margin-bottom: 0; }
.elders { padding-block: 3rem 3.5rem; }

/* Home photo: a real photograph with the Passport cover tucked into its corner */
.hero-art { position: relative; }
.hero-photo { margin: 0; width: 100%; max-width: 430px; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; box-shadow: 0 18px 34px rgba(0, 33, 71, 0.22); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-art:has(.hero-photo) { padding-bottom: 2.5rem; }
.hero-art:has(.hero-photo) .cover-stack { position: absolute; right: 0; bottom: 0; width: 118px; height: 163px; }
.hero-art:has(.hero-photo) .cover-page { display: none; }
.hero-art:has(.hero-photo) .cover { padding: 1.1rem 0.5rem 0.8rem; border-radius: 8px; }
.hero-art:has(.hero-photo) .cover::after { inset: 6px; border-width: 1px; }
.hero-art:has(.hero-photo) .cover b { font-size: 1rem; }
.hero-art:has(.hero-photo) .cover small { font-size: 0.45rem; }
@media (max-width: 760px) { .hero-photo { max-width: 320px; } }

/* Keyboard users can jump past the menu. Hidden until it has focus. */
.skip { position: absolute; left: 0.5rem; top: -4rem; z-index: 50; background: #fff; color: var(--navy); padding: 0.6rem 1rem; border: 2px solid var(--navy); border-radius: 6px; font-weight: 600; }
.skip:focus { top: 0.5rem; }
main:focus { outline: none; }

/* Common answers people can tap instead of spelling them. */
.quick-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.quick { min-height: 44px; padding: 0.45rem 0.95rem; border: 2px solid var(--navy); border-radius: 999px; background: #fff; color: var(--navy); font: inherit; font-weight: 500; cursor: pointer; }
.quick[aria-pressed="true"] { background: var(--navy); color: #fff; }
.quick[aria-pressed="true"]::before { content: "\2713\00a0"; }

/* "Already made one?" on the first step. */
.returning { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 2px solid var(--line); }
.returning h2 { font-size: 1.3rem; }

/* A button that reads as a link, for "Save a copy". */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--teal-deep, #007a7a); text-decoration: underline; cursor: pointer; }
.linkish:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
/* "Welcome back" on the home page. */
#resume { padding-top: 1.5rem; }
.resume h2 { margin-top: 0; }
.count { font-size: 1.25rem; }
