/* ==========================================================================
   Affordable Handyman NWA — Design tokens
   Veteran-owned identity: bold, patriotic, color/typography-led (no real
   project photos exist yet — the design carries the trust signal instead).
   Display: Bebas Neue (bold impact, distinct from HandyPro's Barlow Condensed)
   Body: system-ui stack (fast, zero font-load cost)
   ========================================================================== */

:root {
  --font-display: 'Bebas Neue', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --navy-900: #0a1730;
  --navy-800: #12234a;
  --navy-700: #1c3266;
  --red-600: #c8102e;
  --red-700: #a30d26;
  --white: #ffffff;
  --paper: #f7f7f5;
  --ink: #16202e;
  --ink-soft: #4b5768;
  --border: #dde1e8;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  --radius: 6px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0 0 var(--sp-3);
  color: var(--navy-900);
  text-transform: uppercase;
}

h1 { font-size: clamp(2.75rem, 7vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
h3 { font-size: 1.5rem; }

p { margin: 0 0 var(--sp-4); color: var(--ink-soft); }
a { color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--sp-5); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--red-600); color: #fff;
  padding: var(--sp-2) var(--sp-4); z-index: 100;
}
.skip-link:focus { left: var(--sp-3); top: var(--sp-3); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 14px 28px; border-radius: var(--radius);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  min-height: 48px; text-transform: uppercase; letter-spacing: 0.03em;
  transition: transform 0.15s ease;
}
.btn:focus-visible { outline: 3px solid var(--red-600); outline-offset: 2px; }
.btn-primary { background: var(--red-600); color: #fff; }
.btn-primary:hover { background: var(--red-700); transform: translateY(-1px); }
.btn-secondary { background: transparent; border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-secondary:hover { border-color: #fff; }
.btn-outline { background: transparent; border-color: var(--navy-900); color: var(--navy-900); }
.btn-outline:hover { background: var(--paper); }

/* ---------- Header / Nav ---------- */

.site-header { background: var(--white); border-bottom: 3px solid var(--navy-900); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) var(--sp-5); }
.brand { font-family: var(--font-display); font-size: 1.6rem; color: var(--navy-900); text-decoration: none; letter-spacing: 0.02em; }
.brand span { color: var(--red-600); }
.nav-toggle { display: none; background: none; border: 2px solid var(--border); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); min-height: 44px; min-width: 44px; }
.main-nav ul { display: flex; gap: var(--sp-6); list-style: none; margin: 0; padding: 0; align-items: center; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 700; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.02em; }
.main-nav a[aria-current="page"] { color: var(--red-600); }
.header-cta { display: flex; align-items: center; gap: var(--sp-4); }
.header-phone { font-weight: 700; color: var(--navy-900); text-decoration: none; white-space: nowrap; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: var(--sp-4) var(--sp-5); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: var(--sp-4); }
  .header-phone { display: none; }
}

/* ---------- Hero — diagonal patriotic color-block, no photography ---------- */

.hero {
  position: relative;
  background: var(--navy-900);
  color: #fff;
  padding: var(--sp-9) 0 var(--sp-8);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, var(--navy-900) 0%, var(--navy-900) 55%, var(--red-600) 55.5%, var(--red-700) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; max-width: 760px; }
.hero .eyebrow { color: #ffd166; }
.hero h1 { color: #fff; }
.hero .lede { color: rgba(255,255,255,0.9); font-size: 1.15rem; max-width: 52ch; }
.hero-actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-5); }
.hero-badges { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-6); }
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
  padding: var(--sp-2) var(--sp-4); border-radius: 999px; font-size: 0.85rem; font-weight: 600;
}

/* ---------- Sections ---------- */

.section { padding: var(--sp-8) 0; }
.section-alt { background: var(--paper); }
.section-head { max-width: 62ch; margin-bottom: var(--sp-6); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { font-family: var(--font-display); color: var(--red-600); letter-spacing: 0.08em; text-transform: uppercase; font-size: 1rem; }

/* ---------- Trust strip (color/typography-led, no photos) ---------- */

.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.trust-card {
  border-top: 4px solid var(--red-600);
  background: var(--navy-900); color: #fff;
  padding: var(--sp-6); border-radius: var(--radius);
}
.trust-card h3 { color: #fff; font-size: 1.75rem; margin-bottom: var(--sp-2); }
.trust-card p { color: rgba(255,255,255,0.8); margin-bottom: 0; }

@media (max-width: 860px) { .trust-grid { grid-template-columns: 1fr; } }

/* ---------- Fleet / brand asset section ---------- */

.fleet-section { background: var(--navy-900); color: #fff; }
.fleet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-7); align-items: center; }
.fleet-section h2 { color: #fff; }
.fleet-section .eyebrow { color: #ffd166; }
.fleet-image { border-radius: var(--radius); overflow: hidden; border: 3px solid var(--red-600); }
.fleet-image img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.fleet-caption { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-top: var(--sp-2); }

@media (max-width: 860px) { .fleet-grid { grid-template-columns: 1fr; } .fleet-image { order: -1; } }

/* ---------- Services grid ---------- */

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.service-card { border: 2px solid var(--navy-900); border-radius: var(--radius); padding: var(--sp-5); }
.service-card h3 { font-size: 1.25rem; margin-bottom: var(--sp-2); color: var(--navy-900); }
.service-card p { margin-bottom: 0; font-size: 0.95rem; }

@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

.service-list-secondary { margin-top: var(--sp-6); padding-top: var(--sp-6); border-top: 2px solid var(--border); }
.service-list-secondary ul { columns: 2; gap: var(--sp-6); padding-left: var(--sp-5); color: var(--ink-soft); }
@media (max-width: 560px) { .service-list-secondary ul { columns: 1; } }

/* ---------- Selectable service cards (hover-to-reveal + build-your-estimate) ---------- */

.service-select-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
@media (max-width: 860px) { .service-select-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .service-select-grid { grid-template-columns: 1fr; } }

.service-select-card {
  border: 2px solid var(--navy-900); border-radius: var(--radius); padding: var(--sp-5);
  cursor: pointer; transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.service-select-card:hover,
.service-select-card:focus-within,
.service-select-card.is-expanded { box-shadow: 0 6px 20px rgba(15,23,42,0.12); }
.service-select-card.is-selected { border-color: var(--red-600); background: rgba(200,16,46,0.04); }

.service-select-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.service-select-card-head h3 { font-size: 1.1rem; margin-bottom: 0; color: var(--navy-900); }

.service-select-btn {
  flex-shrink: 0; font-family: var(--font-body); font-weight: 700; font-size: 0.8rem;
  padding: 6px 12px; border-radius: 999px; border: 2px solid var(--navy-900);
  background: transparent; color: var(--navy-900); cursor: pointer; white-space: nowrap;
  transition: all 0.15s ease;
}
.service-select-btn:hover { background: var(--paper); }
.service-select-btn:focus-visible { outline: 3px solid var(--red-600); outline-offset: 2px; }
.service-select-btn[aria-pressed="true"] { background: var(--red-600); border-color: var(--red-600); color: #fff; }

.service-select-desc {
  margin: 0; max-height: 0; opacity: 0; overflow: hidden; font-size: 0.9rem;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.25s ease;
}
.service-select-card:hover .service-select-desc,
.service-select-card:focus-within .service-select-desc,
.service-select-card.is-expanded .service-select-desc { max-height: 200px; opacity: 1; margin-top: var(--sp-3); }

.service-select-hint { font-size: 0.8rem; color: var(--ink-soft); margin-top: var(--sp-2); font-style: italic; }

/* Sticky selection bar */
.service-selection-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--navy-900); color: #fff; padding: var(--sp-4) 0;
  transform: translateY(100%); transition: transform 0.25s ease;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
}
.service-selection-bar.is-visible { transform: translateY(0); }
.service-selection-bar .container { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.service-selection-summary strong { color: #ffd166; }
@media (max-width: 560px) { .service-selection-bar .container { flex-direction: column; align-items: stretch; text-align: center; } }

/* ---------- CTA banner ---------- */

.cta-banner { background: var(--red-600); color: #fff; padding: var(--sp-7) 0; text-align: center; }
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.9); }
.cta-banner .btn-row { display: flex; justify-content: center; gap: var(--sp-4); flex-wrap: wrap; }
.cta-banner .btn-secondary { border-color: #fff; }

/* ---------- Owner-facing Stripe section (visually distinct from customer content) ---------- */

.owner-cta { background: var(--paper); border-top: 2px dashed var(--border); border-bottom: 2px dashed var(--border); }
.owner-cta-row { display: flex; align-items: center; gap: var(--sp-7); }
.owner-cta-logo { flex: 0 0 200px; }
.owner-cta-logo img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 14px rgba(22, 32, 46, 0.22)) drop-shadow(0 2px 4px rgba(22, 32, 46, 0.15));
}
.owner-cta-copy { flex: 1; }
.owner-cta-copy .eyebrow { margin: 0 0 var(--sp-2); }
.owner-cta-copy h2 { margin: 0 0 var(--sp-3); }
.owner-cta-copy p { margin: 0 0 var(--sp-4); }
.owner-cta-copy p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .owner-cta-row { flex-direction: column; align-items: flex-start; }
  .owner-cta-logo { flex-basis: auto; width: 150px; }
}


/* ---------- Breadcrumbs ---------- */

.breadcrumbs { font-size: 0.85rem; color: var(--ink-soft); padding: var(--sp-4) 0 0; }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- About page ---------- */

.area-list { display: flex; flex-wrap: wrap; gap: var(--sp-3); list-style: none; padding: 0; margin: 0; }
.area-list li { background: var(--navy-900); color: #fff; padding: var(--sp-2) var(--sp-4); border-radius: 999px; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; }

/* ---------- Contact page ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-7); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
label { font-weight: 700; font-size: 0.85rem; display: block; margin-bottom: var(--sp-1); text-transform: uppercase; letter-spacing: 0.02em; }
input, textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius); font-family: inherit; font-size: 1rem; }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--red-600); outline-offset: 1px; }
textarea { resize: vertical; min-height: 120px; }
.form-status { font-size: 0.9rem; min-height: 1.2em; }
.form-status.success { color: #157a3d; }
.form-status.error { color: #b3261e; }
.map-embed { border: 0; width: 100%; aspect-ratio: 4/3; border-radius: var(--radius); }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.75); padding: var(--sp-7) 0 var(--sp-5); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-6); margin-bottom: var(--sp-6); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-display); font-size: 1.1rem; margin-bottom: var(--sp-3); }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: var(--sp-4); font-size: 0.85rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
