:root {
  --navy: #00234d;
  --navy-deep: #001530;
  --teal: #00bab7;
  --teal-dark: #049a97;
  --teal-tint: #e7f7f6;
  --red: #de211b;
  --red-dark: #b81812;
  --warning: #e8a33d;
  --bg: #f6f7f5;
  --card: #ffffff;
  --text: #16201f;
  --muted: #5c6b69;
  --border: #dde3e1;
  --font-display: "Space Grotesk", "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Generic show/hide utility -- toggled via classList.add/remove('hidden') throughout the
   quote-flow JS. Was previously only defined per-element (.result.hidden etc), which meant
   #describe-step/#quote-form never actually hid, they just relied on scroll position. Uses
   !important because .form and other rules also set display: and share the same specificity,
   so plain source order would otherwise decide the winner instead of the hidden state. */
.hidden { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 640px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; color: var(--navy); margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }

/* ---------- header / nav ---------- */
.site-header {
  background: rgba(0, 35, 77, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner { display: flex; align-items: center; gap: 28px; padding: 10px 24px; }
.brand-plate {
  display: inline-flex; align-items: center;
  background: #fff; border-radius: 10px; padding: 6px 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.brand-logo { height: 40px; width: auto; display: block; }
.main-nav { display: flex; gap: 24px; margin-right: auto; }
.main-nav a { color: #b7c6d6; text-decoration: none; font-weight: 500; font-size: 0.92rem; letter-spacing: 0.01em; }
.main-nav a:hover { color: #fff; }
.btn-nav { padding: 9px 18px; font-size: 0.88rem; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer; }

@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav {
    order: 3; width: 100%; margin-right: 0; flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 240px; }
  .main-nav a { padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.1); }
  .nav-toggle { display: block; order: 2; }
  .btn-nav { order: 1; margin-left: auto; }
}

/* ---------- hero (no photo -- CSS grid + glow, "digital" treatment) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  padding: 130px 0 100px;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 20%, #000 40%, transparent 90%);
}
.hero-glow {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35;
  animation: pulse-glow 8s ease-in-out infinite alternate;
}
.hero-glow-amber { width: 420px; height: 420px; background: var(--red); top: -120px; right: -80px; }
.hero-glow-teal { width: 460px; height: 460px; background: var(--teal); bottom: -180px; left: -120px; animation-delay: 2s; }
@keyframes pulse-glow {
  0% { opacity: 0.2; transform: scale(1); }
  100% { opacity: 0.38; transform: scale(1.12); }
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero-logo-plate {
  display: inline-flex; background: #fff; border-radius: 18px;
  padding: 16px 22px; margin-bottom: 28px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}
.hero-logo-plate img { height: 64px; width: auto; display: block; }
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
  font-weight: 600; color: var(--red); margin: 0 0 14px;
}
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero .lead { font-size: 1.15rem; color: #c9d7e6; max-width: 560px; }
.hero-actions { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }

.page-hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: #fff; padding: 76px 0 60px;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 100% at 0% 0%, #000 30%, transparent 85%);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero .eyebrow { color: var(--red); }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: #c9d7e6; max-width: 640px; font-size: 1.08rem; }
.page-hero .btn { margin-top: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 0 0 rgba(222,33,27,0); }
.btn-primary:hover { background: var(--red-dark); box-shadow: 0 6px 24px rgba(222,33,27,0.35); }
.btn-secondary { background: var(--teal); color: #00251f; }
.btn-secondary:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.35); }
.btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.06); }
.btn-lg { padding: 15px 32px; font-size: 1.02rem; }

/* ---------- sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--teal-tint); }
.section-head { max-width: 620px; margin-bottom: 36px; }
.section-head .eyebrow { color: var(--red-dark); }
.lead-narrow { max-width: 680px; font-size: 1.08rem; color: var(--muted); }

/* ---------- service grid (home) -- flat, sleek tiles ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.service-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  background: var(--navy);
  border: 1px solid rgba(0,35,77,0.12);
  isolation: isolate;
}
.service-card img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.5; mix-blend-mode: luminosity;
  transition: opacity 0.2s ease, transform 0.35s ease;
}
.service-card-icon {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; opacity: 0.55;
}
.service-card-svg {
  width: 100%; height: 100%; object-fit: contain;
  padding: 22%; box-sizing: border-box;
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.35s ease;
}
.service-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(0,35,77,0.35), rgba(0,21,48,0.9));
}
.service-card:hover img { opacity: 0.65; transform: scale(1.06); }
.service-card:hover .service-card-svg { opacity: 1; transform: scale(1.06); }
.service-card:hover { border-color: var(--teal); }
.service-card span {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 14px 14px 12px;
  color: #fff; font-weight: 600; font-size: 0.9rem; font-family: var(--font-display);
  text-align: center;
}

/* ---------- history strip -- dark glass cards ---------- */
.history-strip { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.stat-block { display: grid; gap: 16px; }
.stat {
  background: var(--navy); border-radius: 14px; padding: 22px 26px;
  border: 1px solid rgba(255,255,255,0.08);
}
.stat strong { display: block; font-family: var(--font-display); font-size: 2.1rem; color: var(--teal); }
.stat span { color: #b7c6d6; font-size: 0.88rem; }

@media (max-width: 780px) {
  .history-strip { grid-template-columns: 1fr; }
}

/* ---------- cta band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 100% at 100% 100%, #000 30%, transparent 85%);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #c9d7e6; margin: 0; }
.cta-band-inner { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }

/* ---------- timeline (about) ---------- */
.timeline { border-left: 2px solid var(--red); padding-left: 28px; display: grid; gap: 26px; max-width: 720px; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -35px; top: 4px;
  width: 11px; height: 11px; border-radius: 50%; background: var(--navy);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--red);
}
.timeline-year { display: block; font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: 1.1rem; margin-bottom: 4px; }

/* ---------- services page detail rows ---------- */
.service-detail {
  display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: center;
  padding: 36px 0; border-bottom: 1px solid var(--border);
}
.service-detail:last-child { border-bottom: none; }
.service-detail.reverse { grid-template-columns: 1fr 340px; }
.service-detail.reverse img { order: 2; }
.service-detail img { border-radius: 14px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.service-detail h2 { margin-bottom: 10px; }
.service-detail p { color: var(--muted); }

@media (max-width: 780px) {
  .service-detail, .service-detail.reverse { grid-template-columns: 1fr; }
  .service-detail.reverse img { order: 0; }
}

/* ---------- contact page ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 40px; }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.contact-card h3 { font-family: var(--font-display); margin-bottom: 8px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--red-dark); }
.map-embed iframe { display: block; width: 100%; border-radius: 14px; }

/* ---------- quote-flow forms ---------- */
.quote-flow { padding: 56px 0; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}
.card h1 { font-size: 1.6rem; }

.form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.form input, .form select, .form textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 400;
  resize: vertical;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

#describe-text {
  font-size: 1.05rem;
  line-height: 1.5;
  min-height: 140px;
}
.describe-actions { text-align: center; margin-top: 4px; }
.describe-actions .btn { display: inline-block; }
.describe-actions .fine-print { margin-top: 10px; }

.flash { background: #fff3e0; border: 1px solid var(--warning); padding: 12px 16px; border-radius: 10px; margin: 20px 0; }
.flash p { margin: 4px 0; }
.fine-print { color: var(--muted); font-size: 0.85rem; margin-top: 10px; }

.result, #contact-only { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.result.hidden, #contact-only.hidden { display: none; }
.price-range { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; color: var(--navy); }
.price-line { font-size: 0.95rem; color: var(--muted); margin: 4px 0; }
.price-total { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--navy); margin-top: 8px; }
.price-total.rush { color: var(--red-dark); }

.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-weight: 500; font-size: 0.92rem; cursor: pointer;
}
.checkbox-row input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; accent-color: var(--teal); }
.checkbox-row .checkbox-sub { display: block; font-weight: 400; color: var(--muted); font-size: 0.82rem; margin-top: 2px; }

.quote-summary { background: var(--bg); border-radius: 10px; padding: 16px 20px; margin-bottom: 20px; }
.spec-recap { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--border); font-size: 0.9rem; }
.spec-recap li { margin-bottom: 4px; }
.spec-recap span { color: var(--muted); font-weight: 600; margin-right: 4px; }
.field-hint { margin-top: -8px; color: var(--muted); }
.limit-notice { background: #fdecec; border: 1px solid #e08a8a; padding: 16px 20px; border-radius: 10px; }

.file-warning {
  background: #fff3e0;
  border: 1px solid var(--warning);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
}
.file-warning.hidden { display: none; }

/* ---------- app-like quote calculator: cards, steppers, sticky price bar ---------- */
.quote-app { padding-bottom: 100px; }

.field-block { margin-bottom: 4px; }
.field-block-label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 10px; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 10px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.tile-image { width: 56px; height: 80px; object-fit: contain; }
.tile:hover { border-color: var(--teal); }
.tile:active { transform: scale(0.97); }
.tile.selected {
  border-color: var(--teal);
  background: var(--teal-tint);
  box-shadow: 0 0 0 1px var(--teal);
}
.tile-icon { font-size: 1.8rem; line-height: 1; }
.tile-label { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.25; }
.tile-price { font-size: 0.78rem; color: var(--muted); font-weight: 500; }

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
  width: fit-content;
}
.stepper-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--teal-tint);
  color: var(--navy);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.stepper-btn:hover { background: var(--teal); color: #fff; }
.stepper-btn:active { transform: scale(0.94); }
.stepper-input {
  width: 64px;
  height: 44px;
  border: none;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-body);
  -moz-appearance: textfield;
}
.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-input:focus { outline: none; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: -8px; }
.chip {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.chip:hover { border-color: var(--teal); }
.chip.selected { background: var(--teal); border-color: var(--teal); color: #fff; }

.price-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
  padding: 14px 0;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}
.price-bar.hidden { display: none; }
.price-bar-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.price-bar-text { display: flex; flex-direction: column; min-width: 0; }
.price-bar-label { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: #9fb3c8; }
.price-bar-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.price-bar .btn { flex-shrink: 0; }

@media (max-width: 480px) {
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
  .tile { padding: 12px 6px; }
  .tile-icon { font-size: 1.5rem; }
  .tile-label { font-size: 0.78rem; }
  .price-bar-value { font-size: 1rem; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #b7c6d6; padding: 56px 0 24px; margin-top: 0; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.footer-brand { display: inline-block; margin-bottom: 10px; }
.site-footer h3 { font-family: var(--font-display); color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 10px; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: #b7c6d6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.copyright { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.8rem; color: #7f92a3; }

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .hero { padding: 90px 0 64px; }
}
