/* Exterior Guys — design system (see docs/03-visual-system.md) */

:root {
  --navy: #0b1f3a;
  --navy-deep: #071526;
  --blue: #1e6fd9;
  --blue-hover: #1558b0;
  --blue-soft: #e8f1fc;
  --sky-mist: #f2f6fa;
  --white: #ffffff;
  --slate: #4a5568;
  --slate-muted: #6b7280;
  --border: #d5dee8;
  --success: #1b6b4a;
  --success-bg: #e8f5ef;
  --error: #b42318;
  --error-bg: #fef3f2;
  --header-h: 5.25rem;
  --sticky-cta-h: 4.25rem;
  --max: 70rem;
  --radius: 6px;
  --radius-media: 8px;
  --shadow-form: 0 1px 2px rgba(11, 31, 58, 0.06);
  --font-display: "Outfit", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

@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;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--blue-hover);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.05rem;
  padding: 0.85rem 1.35rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--blue-hover);
  color: var(--white);
}

.btn--primary:active {
  background: #114a96;
}

.btn--block {
  width: 100%;
}

.btn--header {
  min-height: 2.75rem;
  padding-inline: 1.1rem;
  font-size: 0.9375rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(11, 31, 58, 0.04);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo img {
  width: clamp(6.5rem, 20vw, 8.5rem);
  height: auto;
}

.nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--blue);
}

.header-cta {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}

.nav-toggle__bars {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  background: var(--white);
  padding: 1.5rem 1rem 2rem;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav a {
  display: block;
  padding: 0.9rem 0.5rem;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.mobile-nav .btn {
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .nav,
  .header-cta {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 42rem);
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background-color: var(--navy-deep);
  background-image: linear-gradient(
      105deg,
      rgba(7, 21, 38, 0.88) 0%,
      rgba(7, 21, 38, 0.72) 42%,
      rgba(7, 21, 38, 0.35) 100%
    ),
    url("../assets/hero.jpg");
  background-size: cover;
  background-position: center;
}

.hero__inner {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 5.5rem 0 4rem;
}

.hero__logo {
  width: clamp(10.5rem, 42vw, 15rem);
  margin-bottom: 1.5rem;
  border-radius: var(--radius-media);
  background: var(--white);
  padding: 0.65rem 0.85rem;
  box-shadow: 0 8px 28px rgba(7, 21, 38, 0.22);
}

.hero h1 {
  margin: 0 0 0.85rem;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--white);
}

.hero__sub {
  margin: 0 0 1.75rem;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

/* Sections */
.section {
  padding: 4rem 0;
  position: relative;
}

@media (min-width: 768px) {
  .section {
    padding: 5.5rem 0;
  }
}

.section--mist {
  background: var(--sky-mist);
}

.section__head {
  max-width: 38rem;
  margin-bottom: 2.5rem;
}

.section__eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.section h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.section__support {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--slate);
}

.section__cta {
  margin-top: 2.25rem;
}

/* Services */
.services-list {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .services-list {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.service h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
}

.service p {
  margin: 0;
  max-width: 32rem;
}

.service__rule {
  width: 2.5rem;
  height: 3px;
  margin: 0 0 1rem;
  background: var(--blue);
  border: none;
}

/* How it works */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
  counter-reset: step;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.step {
  counter-increment: step;
  position: relative;
  padding-top: 0.25rem;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.step h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
}

.step p {
  margin: 0;
  max-width: 26rem;
}

/* Service area — city scroller */
.city-scroller {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem 1rem;
  margin: 0 0 1.5rem;
  min-height: 3.5rem;
}

.city-scroller__label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--slate);
}

.city-scroller__viewport {
  position: relative;
  display: grid;
  align-items: center;
  min-width: min(100%, 14rem);
  min-height: 2.75rem;
  overflow: hidden;
}

.city-scroller__city {
  grid-area: 1 / 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
  opacity: 0;
  transform: translateY(0.55rem);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
  pointer-events: none;
}

.city-scroller__city.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.city-scroller__city.is-exit {
  opacity: 0;
  transform: translateY(-0.45rem);
}

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

.area-note {
  margin: 0;
  max-width: 36rem;
  color: var(--slate-muted);
}

@media (prefers-reduced-motion: reduce) {
  .city-scroller__city {
    transition: none;
  }
}

/* Why us */
.why-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .why-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: start;
  }
}

.why-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.why-points li {
  position: relative;
  padding-left: 1.35rem;
  max-width: 34rem;
}

.why-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--blue);
}

.placeholders {
  display: grid;
  gap: 1rem;
}

.placeholder-slot {
  border: 1px dashed var(--border);
  border-radius: var(--radius-media);
  background: var(--white);
  padding: 1.25rem;
  min-height: 6.5rem;
}

.placeholder-slot p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--slate-muted);
}

.placeholder-slot strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

/* Quote */
.quote {
  scroll-margin-top: calc(var(--header-h) + 0.5rem);
}

.quote__layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .quote__layout {
    grid-template-columns: 1fr 1.05fr;
    gap: 3.5rem;
    align-items: start;
  }
}

.trust-micro {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy);
}

.form-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-media);
  box-shadow: var(--shadow-form);
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .form-panel {
    padding: 2rem;
  }
}

.field {
  margin-bottom: 1.15rem;
}

.field-row {
  display: grid;
  gap: 0 1rem;
}

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
}

.field .optional {
  font-weight: 400;
  color: var(--slate-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%230B1F3A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.4rem;
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
  background: var(--error-bg);
}

.field-hint {
  margin: 0.4rem 0 0;
  font-size: 0.8125rem;
  color: var(--slate-muted);
}

.field-error {
  display: none;
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: var(--error);
}

.field-error.is-visible {
  display: block;
}

.form-status {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
}

.form-status[data-type="error"] {
  color: var(--error);
}

.quote-success {
  display: none;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius-media);
  background: var(--success-bg);
  border: 1px solid rgba(27, 107, 74, 0.25);
}

.quote-success.is-visible {
  display: block;
  animation: fade-in 0.35s ease;
}

.quote-success h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--success);
}

.quote-success p {
  margin: 0;
  color: var(--navy);
  max-width: 30rem;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quote-form.is-hidden {
  display: none;
}

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(11, 31, 58, 0.06);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}

.sticky-cta.is-visible {
  transform: translateY(0);
}

.sticky-cta .btn {
  width: 100%;
}

@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

body.has-sticky-cta {
  padding-bottom: var(--sticky-cta-h);
}

@media (min-width: 768px) {
  body.has-sticky-cta {
    padding-bottom: 0;
  }
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.82);
  padding: 3.5rem 0 2.5rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
  }
}

.footer__logo {
  width: 9.5rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-media);
  background: var(--white);
  padding: 0.45rem 0.55rem;
}

.footer h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.contact-placeholders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  font-size: 0.975rem;
}

.contact-placeholders .label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0.15rem;
}

.placeholder-text {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}
