/* Coastal Valet Trash Services — site design system.
   Tokens and components per docs/brand-brief.md. Flat 2-color brand (navy + red),
   Montserrat for display/UI, Inter for body. No framework, no build step. */

:root {
  --navy: #0B3F8C;
  --navy-deep: #072A5E;
  --navy-ink: #0A1F3F;
  --red: #D7141E;
  --red-hover: #B80F18;
  --red-soft: #FDECEC;
  --wave: #2F8FD6;
  --paper: #FFFFFF;
  --sky: #EEF3FB;
  --sky-2: #DCE6F5;
  --line: #D5DEEC;
  --ink: #16233A;
  --muted: #5A6A85;
  --sand: #F6F1E7;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --container: 1200px;
  --gutter: 16px;
  --section-pad: 96px;
  --section-pad-mobile: 64px;
  --card-gap: 24px;

  --shadow-card: 0 1px 2px rgba(10, 31, 63, 0.04), 0 8px 24px rgba(10, 31, 63, 0.06);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; color: var(--navy-deep); margin: 0; }
h1 { font-size: 36px; font-weight: 800; line-height: 1.08; letter-spacing: -0.01em; }
h2 { font-size: 28px; font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.2; }
p { margin: 0 0 1em; max-width: 65ch; }
@media (min-width: 768px) {
  h1 { font-size: 56px; }
  h2 { font-size: 40px; }
  h3 { font-size: 24px; }
  body { font-size: 18px; }
}

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

section { padding: var(--section-pad-mobile) 0; }
@media (min-width: 768px) { section { padding: var(--section-pad) 0; } }

.bg-white { background: var(--paper); }
.bg-sky { background: var(--sky); }
.bg-navy { background: var(--navy-deep); color: #fff; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy p { color: #C9D6EE; }
.bg-sand { background: var(--sand); }

/* ---------- Eyebrow (rationed — see component usage) ---------- */
.eyebrow {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.bg-navy .eyebrow { color: #FF8A8F; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  min-height: 48px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); }
.btn-secondary { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-secondary:hover { background: var(--sky); }
.bg-navy .btn-secondary, .hero .btn-secondary { border-color: #fff; color: #fff; }
.bg-navy .btn-secondary:hover, .hero .btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Ribbon badge (signature motif — use sparingly) ---------- */
.ribbon {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 18px;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
}
.ribbon-navy { background: var(--navy); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}
.card-grid { display: grid; gap: var(--card-gap); grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Icon ---------- */
.icon {
  width: 24px;
  height: 24px;
  stroke: var(--navy);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-red { stroke: var(--red); }
.icon-circle {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sky); border-radius: 50%;
  margin-bottom: 16px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.site-header .logo { display: flex; align-items: center; height: 40px; }
.site-header .logo img { height: 40px; width: auto; }
.site-nav { display: none; align-items: center; gap: 28px; }
.site-nav a {
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px;
  text-decoration: none; color: var(--ink);
}
.site-nav a:hover { color: var(--navy); }
.site-header .header-actions { display: flex; align-items: center; gap: 12px; }
@media (min-width: 1024px) {
  .site-nav { display: flex; }
}
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: none; background: none; cursor: pointer;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.mobile-nav {
  display: none; flex-direction: column; gap: 4px;
  background: #fff; border-top: 1px solid var(--line);
  padding: 12px var(--gutter) 20px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 15px;
  text-decoration: none; color: var(--ink); padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  color: #fff;
  padding: 56px 0 72px;
}
@media (min-width: 768px) { .hero { padding: 88px 0 96px; } }
.hero h1 { color: #fff; }
.hero .lede { color: #CFE0F7; font-size: 19px; max-width: 46ch; margin-top: 14px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(7,42,94,.55) 0%, rgba(7,42,94,.82) 100%);
}
.hero-wave {
  position: absolute; left: 0; right: 0; bottom: -2px; height: 90px;
  opacity: 0.6; z-index: 2;
}
.hero-inner { position: relative; z-index: 2; }

/* ---------- Trust row ---------- */
.trust-row {
  display: flex; flex-wrap: wrap; gap: 20px 32px;
  padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.trust-item { display: flex; align-items: center; gap: 10px; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px; color: var(--navy-deep); }
.trust-item .icon { width: 20px; height: 20px; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: var(--card-gap); grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-left: 52px; }
.step-num {
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 15px;
}

/* ---------- Property-type cards ---------- */
.ptype-card { display: flex; flex-direction: column; height: 100%; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; padding: 0; overflow: hidden; }
.ptype-card:hover { border-color: var(--navy); box-shadow: var(--shadow-card); }
.ptype-card .ptype-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.ptype-card .ptype-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.ptype-card h3 { margin-bottom: 6px; }
.ptype-card p { color: var(--muted); font-size: 15px; margin-bottom: 0; }
.ptype-card .ptype-link { margin-top: auto; padding-top: 16px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; color: var(--navy); }

/* ---------- Photo feature (service-area town cards, page feature images) ---------- */
.photo-card { padding: 0; overflow: hidden; }
.photo-card .photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-card .photo-body { padding: 20px 24px; }
.feature-photo { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; object-fit: cover; margin: 32px 0; }

/* ---------- Wave divider ---------- */
.wave-divider { display: block; width: 100%; height: 36px; }
.wave-divider path { fill: none; stroke: var(--wave); stroke-width: 2; opacity: 0.35; }

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 17px; color: var(--navy-deep);
}
.faq-q .icon { transition: transform .2s ease; }
.faq-item[open] .faq-q .icon { transform: rotate(45deg); }
.faq-a { padding: 0 0 20px; color: var(--muted); }
.faq-a p { margin: 0; }

/* ---------- Before/after gallery (placeholder-safe) ---------- */
.ba-grid { display: grid; gap: var(--card-gap); grid-template-columns: 1fr; }
@media (min-width: 768px) { .ba-grid { grid-template-columns: repeat(3, 1fr); } }
.ba-pair { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.ba-pair .ba-slot { height: 160px; display: flex; align-items: center; justify-content: center; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.ba-pair .ba-before { background: repeating-linear-gradient(135deg, #DCE6F5, #DCE6F5 10px, #EEF3FB 10px, #EEF3FB 20px); color: var(--muted); }
.ba-pair .ba-after { background: var(--sky); color: var(--navy); }
.ba-pair .ba-caption { padding: 14px 16px; font-size: 14px; color: var(--muted); }

/* ---------- Service-area tag grid ---------- */
.town-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.town-tag {
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px;
  border: 1px solid var(--sky-2); background: var(--sky); color: var(--navy-deep);
  border-radius: 20px; padding: 8px 18px; text-decoration: none;
}
.town-tag.base { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Request tiles ---------- */
.request-tile { text-align: center; }
.request-tile .icon-circle { margin-left: auto; margin-right: auto; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px; color: var(--navy-deep); }
.field input, .field select, .field textarea {
  font-family: 'Inter', sans-serif; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy);
}
.field .hint { font-size: 13px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-ink); color: #AFC3E6; padding: 56px 0 28px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; margin-bottom: 40px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: #AFC3E6; text-decoration: none; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-logo img { height: 36px; margin-bottom: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px;
  display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center;
}
.fg-credit { display: flex; justify-content: center; }
.fg-credit a { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #7E93B8; text-decoration: none; transition: color .2s; }
.fg-credit a:hover { color: #fff; }
.fg-credit img { height: 20px; width: auto; }

/* ---------- Sticky mobile CTA bar ---------- */
.mobile-cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(10,31,63,0.08);
}
.mobile-cta-bar a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 8px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px;
  text-decoration: none;
}
.mobile-cta-bar .call { background: var(--navy); color: #fff; }
.mobile-cta-bar .quote { background: var(--red); color: #fff; }
@media (min-width: 1024px) { .mobile-cta-bar { display: none; } }
body.has-mobile-cta { padding-bottom: 60px; }
@media (min-width: 1024px) { body.has-mobile-cta { padding-bottom: 0; } }

/* ---------- NOI calculator (apartments page) ---------- */
.noi-calc { display: grid; gap: var(--card-gap); grid-template-columns: 1fr; margin-top: 32px; }
@media (min-width: 768px) { .noi-calc { grid-template-columns: 1fr 1fr; align-items: start; } }
.noi-calc h3 { margin-bottom: 16px; }
.noi-field { margin-bottom: 16px; }
.noi-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.noi-field input, .noi-field select {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); font: inherit; color: inherit; background: #fff;
}
.noi-field input:focus-visible, .noi-field select:focus-visible { outline: 3px solid rgba(11,63,140,.35); border-color: var(--navy); }
.noi-help { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.noi-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.noi-row span { color: var(--muted); }
.noi-row strong { font-family: 'Montserrat', sans-serif; white-space: nowrap; }
.noi-row--total { border-bottom: 2px solid var(--navy); font-size: 18px; }
.noi-row--value { border-bottom: none; font-size: 20px; padding-top: 14px; }
.noi-row--value strong { color: var(--navy-deep); }
#noi-calculator.is-negative .noi-row--total strong,
#noi-calculator.is-negative .noi-row--value strong { color: var(--red); }
.noi-disclaimer { color: var(--muted); font-size: 13px; margin: 16px 0; }

/* ---------- Pull quote (founder voice, about page) ---------- */
.pull-quote {
  max-width: 680px; margin: 28px auto 0; padding: 4px 0 4px 24px;
  border-left: 4px solid var(--red); text-align: left;
}
.pull-quote p { font-style: italic; font-size: 19px; line-height: 1.5; color: var(--navy-deep); margin: 0 0 10px; }
.pull-quote cite { font-style: normal; font-weight: 600; font-size: 14px; color: var(--muted); }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.max-w-measure { max-width: 60ch; margin-left: auto; margin-right: auto; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head.text-center { margin-left: auto; margin-right: auto; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
