/* ==========================================================================
   Gillette Wheelchair Engineers — shared stylesheet
   Mobile-first: base styles target small screens; min-width queries enhance.
   Colors chosen for WCAG AA/AAA contrast on their backgrounds.
   ========================================================================== */

:root {
  --navy: #0b2e4f;        /* primary text/brand — 13.9:1 on white */
  --blue: #0a5a8c;        /* links/accents — 7.0:1 on white */
  --blue-dark: #07436a;
  --teal-bg: #e8f3f8;     /* soft section background */
  --sand-bg: #f7f4ee;
  --text: #1b1f24;        /* body text — 16:1 on white */
  --muted: #3f4a55;       /* secondary text — 9:1 on white */
  --white: #ffffff;
  --gold: #ffcc4d;        /* focus ring / highlight */
  --border: #c7d3dd;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(11, 46, 79, 0.08);
  --max: 72rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;       /* 18px base for readability */
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 0.75rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; margin-top: 0.5rem; }
h3 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); text-decoration-thickness: 2px; }

/* Visible, high-contrast focus for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--gold);
}

/* Skip link */
.skip-link {
  position: absolute; left: 0.5rem; top: -100px; z-index: 1000;
  background: var(--navy); color: var(--white); padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius); font-weight: 700;
}
.skip-link:focus { top: 0; color: var(--white); }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: var(--white); font-size: 1rem; }
.topbar .container { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.topbar a { color: var(--white); font-weight: 700; }

/* ---------- Header / nav ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: relative; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.85rem; padding-bottom: 0.85rem; }
.brand { color: var(--navy); text-decoration: none; display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.brand-tag { font-size: 0.95rem; color: var(--muted); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: inherit; font-weight: 700; color: var(--white); background: var(--navy);
  border: 0; border-radius: var(--radius); padding: 0.6rem 1rem; min-height: 48px; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

.site-nav { display: none; border-top: 1px solid var(--border); }
.site-nav.is-open { display: block; }
/* Without JS, keep the menu visible */
.no-js .site-nav { display: block; }
.no-js .nav-toggle { display: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0.5rem 1.25rem 1rem; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: 0.8rem 0.5rem; min-height: 48px;
  color: var(--navy); font-weight: 700; text-decoration: none; border-radius: 8px;
}
.site-nav a:hover { background: var(--teal-bg); }
.site-nav a[aria-current="page"] { background: var(--teal-bg); text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-weight: 700; text-decoration: none; text-align: center;
  padding: 0.85rem 1.4rem; min-height: 48px; border-radius: var(--radius);
  border: 2px solid var(--navy); background: var(--navy); color: var(--white);
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); }
.btn-outline { background: var(--white); color: var(--navy); }
.btn-outline:hover { background: var(--teal-bg); color: var(--navy); }
.btn-row { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.25rem; }

/* ---------- Sections ---------- */
main { display: block; }
.section { padding: 2.5rem 0; }
.section-alt { background: var(--teal-bg); }
.section-sand { background: var(--sand-bg); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }

.hero { background: linear-gradient(180deg, var(--teal-bg) 0%, var(--white) 100%); padding: 2.5rem 0 2rem; }
.hero .eyebrow { font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; margin-bottom: 0.5rem; }

.page-header { background: var(--teal-bg); padding: 2rem 0 1.75rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; gap: 0.25rem; font-size: 1rem; }
.breadcrumb li + li::before { content: "/"; margin: 0 0.4rem; color: var(--muted); }

.grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }

.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.5rem; }
.card p:last-child { margin-bottom: 0; }

.highlights { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.highlights li { background: var(--white); border-left: 5px solid var(--blue); padding: 0.85rem 1rem; border-radius: 6px; margin: 0; }

.callout {
  background: var(--sand-bg); border: 2px solid var(--navy); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.notice {
  background: #fff6d6; border-left: 6px solid #8a6100; padding: 1rem 1.2rem; border-radius: 6px; margin: 0 0 1.5rem;
}

.service { padding: 2rem 0; border-bottom: 1px solid var(--border); scroll-margin-top: 1rem; }
.service:last-of-type { border-bottom: 0; }
.service-nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.service-nav a {
  display: inline-block; padding: 0.5rem 0.9rem; border: 2px solid var(--blue); border-radius: 999px;
  text-decoration: none; font-weight: 700; min-height: 44px;
}
.service-nav a:hover { background: var(--teal-bg); }

.area { scroll-margin-top: 1rem; }

/* FAQ */
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); margin-bottom: 0.75rem; }
.faq summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 700; color: var(--navy); min-height: 48px; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .answer { padding: 1rem 1.2rem 0.25rem; }

/* Contact / form */
.contact-list { list-style: none; padding: 0; }
.contact-list li { margin-bottom: 0.75rem; }
.hours { border-collapse: collapse; width: 100%; max-width: 28rem; }
.hours th, .hours td { text-align: left; padding: 0.5rem 0.25rem; border-bottom: 1px solid var(--border); }
.hours th { font-weight: 700; color: var(--navy); }

form .field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 700; margin-bottom: 0.35rem; color: var(--navy); }
.hint { display: block; font-size: 1rem; color: var(--muted); font-weight: 400; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--white);
  border: 2px solid #6b7a88; border-radius: 8px; padding: 0.7rem 0.8rem; min-height: 48px;
}
textarea { min-height: 8rem; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
legend { font-weight: 700; color: var(--navy); margin-bottom: 0.35rem; }
.radio-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.radio-row input { width: 1.4rem; min-height: 1.4rem; height: 1.4rem; }
.radio-row label { font-weight: 400; margin: 0; color: var(--text); }
button.btn { font: inherit; font-weight: 700; cursor: pointer; }

.map-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 260px; background: var(--teal-bg); border: 2px dashed var(--blue);
  border-radius: var(--radius); padding: 1.5rem; color: var(--navy);
}

.map-embed {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--teal-bg);
  min-height: 260px;
}
.map-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 360px;
  border: 0;
}

/* CTA band */
.cta-band { background: var(--navy); color: var(--white); padding: 2.5rem 0; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #e6eef5; }
.cta-band .btn { background: var(--white); color: var(--navy); border-color: var(--white); }
.cta-band .btn:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.cta-band .btn-outline { background: transparent; color: var(--white); }
.cta-band .btn-outline:hover { background: var(--white); color: var(--navy); }
.cta-band a:not(.btn) { color: var(--white); }

/* ---------- Footer ---------- */
.site-footer { background: #071f36; color: #e6eef5; padding: 2.5rem 0 1.5rem; font-size: 1rem; }
.site-footer h2 { color: var(--white); font-size: 1.15rem; }
.site-footer a { color: var(--white); }
.site-footer ul { list-style: none; padding: 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.footer-bottom { border-top: 1px solid #2b4a66; margin-top: 1.5rem; padding-top: 1rem; font-size: 0.95rem; }
address { font-style: normal; }

/* ==========================================================================
   Enhancements for larger screens
   ========================================================================== */
@media (min-width: 40em) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.85rem; }
  .btn-row { flex-direction: row; flex-wrap: wrap; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .highlights { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 3.25rem 0; }
}

@media (min-width: 60em) {
  body { font-size: 1.1875rem; }
  h1 { font-size: 2.9rem; }
  .hero { padding: 4rem 0 3.5rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .split { display: grid; grid-template-columns: 3fr 2fr; gap: 2.5rem; align-items: start; }
}

/* Expanded desktop navigation wraps; mobile keeps its existing Menu toggle. */
@media (min-width: 75em) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; border-top: 0; }
  .header-inner { flex-wrap: nowrap; }
  .site-header .container.header-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
  .site-nav { flex: 1 1 100%; }
  .site-nav ul { display: flex; flex-wrap: wrap; gap: 0.15rem; padding: 0; }
  .site-nav a { padding: 0.65rem 0.7rem; white-space: nowrap; }
}

@media print {
  .topbar, .site-nav, .nav-toggle, .skip-link, .cta-band, form { display: none !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; }
}

/* Photos: shown at native size (originals are small), never upscaled */
figure.photo { margin: 1.25rem 0; max-width: max-content; }
figure.photo img { display: block; max-width: 100%; height: auto; border-radius: 10px; box-shadow: 0 2px 10px rgba(16,42,67,.12); }
figure.photo figcaption { font-size: .95rem; color: #52606d; margin-top: .5rem; max-width: 34ch; }
.split figure.photo { justify-self: center; align-self: center; }

.hero-photo { margin: 1.5rem 0 0; max-width: 640px; }
.hero-photo img { width: 100%; height: auto; border-radius: 8px; display: block; }
.hero-photo figcaption { font-size: 0.95rem; color: #444; margin-top: 0.4rem; }

/* ATP guidance: readable trust messaging, without badge or certification seal. */
.atp-intro {
  max-width: 46rem;
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.2rem;
  background: var(--white);
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.atp-intro h2 { font-size: 1.3rem; }
.atp-intro p:last-child { margin-bottom: 0; }
.atp-note { max-width: 46rem; }
.atp-contact { margin-top: 0.9rem; }

/* Keep ATP guidance alongside the early Services menu, not product blurbs. */
.atp-menu { margin: 1.5rem 0 0; background: var(--teal-bg); }
#bathroom-rails { scroll-margin-top: 1rem; }

/* ==========================================================================
   Ramps page
   Styles used by ramps.html (video embed, photo placeholders, caption width).
   ========================================================================== */
.ramp-video {
  margin: 1.25rem 0;
  max-width: 36rem;
}
.ramp-video .fb-video-slot {
  position: relative;
  background: var(--teal-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 16rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.ramp-video .fb-video {
  width: 100%;
  max-width: 350px;
}
.ramp-video .fb-fallback {
  margin: 0;
  font-size: 1rem;
}
.ramp-video figcaption {
  font-size: 0.95rem;
  color: #52606d;
  margin-top: 0.5rem;
  max-width: 46rem;
}
.ramp-photos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.25rem 0;
}
.ramp-photos figure.photo {
  margin: 0;
  max-width: none;
}
.photo-placeholder-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 14rem;
  padding: 1.25rem;
  background: var(--sand-bg);
  border: 2px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}
.photo-placeholder-frame p {
  margin: 0;
  max-width: 28ch;
  font-size: 1rem;
}
.ramp-photos figure.photo figcaption {
  max-width: 40ch;
}
@media (min-width: 40em) {
  .ramp-photos { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Skeleton photo slots (all pages)
   Two-up on desktop, stacked on small screens. Placeholders are visible
   boxes — never a broken <img> — until Ron uncomments the real image tag.
   ========================================================================== */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.25rem 0;
}
.photo-grid figure.photo {
  margin: 0;
  max-width: none;
}
.photo-grid figure.photo img {
  width: 100%;
  height: auto;
}
.photo-placeholder-frame code {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  word-break: break-all;
  color: var(--navy);
}
@media (min-width: 40em) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Shorter main nav (six items) can sit in one row a little earlier. */
@media (min-width: 64em) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; border-top: 0; }
  .header-inner { flex-wrap: nowrap; }
  .site-header .container.header-wrap { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 1rem; }
  .site-nav { flex: 1 1 auto; }
  .site-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.15rem; padding: 0; }
  .site-nav a { padding: 0.65rem 0.7rem; white-space: nowrap; }
}

/* Ramps featured Facebook reel */
.fb-video-frame{max-width:350px;margin:0 auto;aspect-ratio:350/620;}
.fb-video-frame iframe{width:100%;height:100%;display:block;border-radius:8px;}
.ramp-video .fb-fallback{text-align:center;margin:.5rem 0;}

/* Header logo: storefront sign photo */
.brand { flex-direction: row; align-items: center; gap: .75rem; }
.brand-text { display: flex; flex-direction: column; }
.brand-logo { display: block; height: 44px; width: auto; flex-shrink: 0; }
.brand picture { display: block; line-height: 0; }
@media (min-width: 40em) { .brand-logo { height: 62px; } }
@media (max-width: 39.99em) { .brand { gap: .5rem; } .brand-name { font-size: 1.05rem; } .brand-tag { font-size: .8rem; } }
.brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 39.99em) { .brand-logo { height: 46px; } }
/* Header logo readability fix (Nov 21, 2026): bigger logo on all screens.
   Phones: logo fills most of the header width (max 360px, about 100px tall), Menu button on its own row below.
   Tablets and computers: logo about 80px tall; menu stays beside it on wide screens. */
@media (max-width: 39.99em) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .brand { width: 100%; }
  .brand picture { width: 100%; max-width: 360px; }
  .brand-logo { width: 100%; max-width: 360px; height: auto; }
  .nav-toggle { min-height: 44px; padding: .45rem .9rem; }
}
@media (min-width: 40em) { .brand-logo { height: 80px; } }

/* Low-resolution originals: show at natural size instead of stretching */
.photo-grid figure.photo img.photo-natural { width: auto; max-width: 100%; }

/* Ramps video: click-to-play cover */
.video-facade { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; width: 100%; height: 100%; border-radius: 8px; text-decoration: none; color: #fff; background: radial-gradient(circle at 50% 40%, #1d4f7a 0%, #0b2e4f 70%); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.video-facade .play-btn { display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; background: #c8102e; color: #fff; padding-left: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.3); transition: transform .15s ease; }
.video-facade:hover .play-btn, .video-facade:focus-visible .play-btn { transform: scale(1.08); }
.video-facade:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }
.video-facade-label { font-size: 1.35rem; font-weight: 800; }
.video-facade-sub { font-size: .95rem; opacity: .85; }
