/* ==========================================================================
   Solstad Exteriors — site styles
   Brand: red / charcoal / white · Type: Lexend (display) + Source Sans 3 (body)
   ========================================================================== */

:root {
  --red: #c8102e;
  --red-dark: #a30d26;
  --red-tint: #fdf2f4;
  --ink: #16181d;
  --charcoal: #22252b;
  --slate: #4b4f57;
  --paper: #ffffff;
  --stone: #f6f6f5;
  --line: #e6e6e4;
  --focus: #1d4ed8;

  --font-display: "Lexend", "Segoe UI", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(22, 24, 29, 0.06), 0 8px 24px rgba(22, 24, 29, 0.07);
  --container: 72rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 600; }

p { margin: 0 0 var(--space-4); }

a {
  color: var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--red-dark); }

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  min-height: 48px;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-dark);
  color: #fff;
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.btn-outline-light:hover {
  background: #fff;
  color: var(--ink);
}

.btn-light {
  background: #fff;
  color: var(--red);
}

.btn-light:hover {
  background: var(--stone);
  color: var(--red-dark);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  max-width: 88rem;
}

.header-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-block: 0.65rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}

.brand img {
  width: 46px;
  height: auto;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--red);
  white-space: nowrap;
}

.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--slate);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1.4rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

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

.site-nav a[aria-current="page"] {
  color: var(--red);
  border-bottom-color: var(--red);
}

.header-cta {
  margin-left: var(--space-2);
  flex: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle svg {
  display: block;
}

@media (max-width: 1299px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    display: none;
  }

  .site-nav.open { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
  }

  .site-nav a {
    display: block;
    padding: 0.8rem 0.25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }

  .site-nav li:last-child a { border-bottom: none; }

  .site-nav a[aria-current="page"] {
    border-bottom-color: var(--line);
  }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(340px, 55vh, 560px);
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}

.hero-home { min-height: clamp(460px, 72vh, 680px); }

.hero img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 18, 22, 0.35) 0%, rgba(16, 18, 22, 0.72) 100%);
  z-index: -1;
}

.hero-inner {
  width: 100%;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.hero .eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #ffd7de;
  margin-bottom: var(--space-3);
}

.hero h1 {
  max-width: 18ch;
  margin-bottom: var(--space-3);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero .lede {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 46ch;
  margin-bottom: var(--space-6);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* --- Trust bar ----------------------------------------------------------- */

.trust-bar {
  background: var(--charcoal);
  color: #fff;
}

.trust-bar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.trust-bar li {
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: center;
}

.trust-bar svg {
  flex: none;
  color: var(--red);
  background: #fff;
  border-radius: 50%;
  padding: 3px;
  width: 22px;
  height: 22px;
}

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

.section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.section-stone { background: var(--stone); }

.section-head {
  max-width: 42rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section-head .kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: var(--space-2);
}

.section-head p { color: var(--slate); }

/* --- Service cards -------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

/* 2-up: cards span 2 of 4 tracks so the odd last card can center */
@media (min-width: 620px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
  .card-grid .service-card { grid-column: span 2; }
  .card-grid .service-card:nth-child(5) { grid-column: 2 / span 2; }
}

/* 3-up: cards span 2 of 6 tracks; the last two center under the first row */
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(6, 1fr); }
  .card-grid .service-card { grid-column: span 2; }
  .card-grid .service-card:nth-child(4) { grid-column: 2 / span 2; }
  .card-grid .service-card:nth-child(5) { grid-column: 4 / span 2; }
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.service-card:hover {
  border-color: var(--red);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
  color: var(--ink);
}

.service-card img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

.service-card .card-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.service-card h3 { margin: 0; }

.service-card p {
  margin: 0;
  color: var(--slate);
  font-size: 0.98rem;
}

.service-card .card-link {
  margin-top: auto;
  padding-top: var(--space-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.service-card:hover .card-link { color: var(--red-dark); }

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

.about-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 820px) {
  .about-grid { grid-template-columns: 1.4fr 1fr; }
}

.about-figure {
  background: var(--stone);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  place-items: center;
}

.about-figure img {
  max-width: min(260px, 60%);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-6);
}

.stat .stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--red);
  line-height: 1;
}

.stat .stat-label {
  font-size: 0.92rem;
  color: var(--slate);
}

/* --- CTA band ------------------------------------------------------------- */

.cta-band {
  background: var(--red);
  color: #fff;
  text-align: center;
}

.cta-band .container {
  padding-block: clamp(3rem, 7vw, 4.5rem);
  display: grid;
  justify-items: center;
  gap: var(--space-3);
}

.cta-band h2 { margin-bottom: 0; }

.cta-band p {
  max-width: 56ch;
  margin-bottom: var(--space-3);
  color: rgba(255, 255, 255, 0.92);
}

/* --- Service page layout --------------------------------------------------- */

.service-layout {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (min-width: 920px) {
  .service-layout { grid-template-columns: 1.6fr 1fr; }
  .service-aside { position: sticky; top: 92px; }
}

.service-intro p { color: var(--slate); font-size: 1.08rem; }
.service-intro p:first-of-type { color: var(--ink); }

.aside-card {
  background: var(--charcoal);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
}

.aside-card h2 {
  font-size: 1.35rem;
  color: #fff;
}

.aside-card ul {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.aside-card li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.98rem;
}

.aside-card li svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--red);
  background: #fff;
  border-radius: 50%;
  padding: 2px;
  margin-top: 2px;
}

.aside-card .btn { width: 100%; }

.aside-note {
  margin-top: var(--space-3);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.aside-note a { color: #fff; }

/* --- Feature checklist ------------------------------------------------------ */

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
}

.feature .check {
  width: 34px;
  height: 34px;
  flex: none;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: 2px;
}

.feature .check svg { width: 18px; height: 18px; }

.feature h3 { margin-bottom: var(--space-2); }

.feature p {
  margin: 0;
  color: var(--slate);
}

/* --- Inline CTA panel ------------------------------------------------------- */

.cta-panel {
  background: var(--stone);
  border-left: 5px solid var(--red);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.cta-panel h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }

.cta-panel p { color: var(--slate); max-width: 62ch; }

/* --- FAQ -------------------------------------------------------------------- */

.faq-list {
  display: grid;
  gap: var(--space-3);
  max-width: 56rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: 1.05rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  transition: background-color 160ms ease, color 160ms ease;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover { background: var(--red-tint); }

.faq-item[open] summary {
  background: var(--red);
  color: #fff;
}

.faq-item summary .faq-icon {
  flex: none;
  width: 22px;
  height: 22px;
  transition: transform 200ms ease;
}

.faq-item[open] summary .faq-icon { transform: rotate(45deg); }

.faq-item .faq-body {
  padding: 1.1rem 1.25rem 1.25rem;
  color: var(--slate);
}

.faq-item .faq-body p:last-child { margin-bottom: 0; }

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

.contact-layout {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (min-width: 920px) {
  .contact-layout { grid-template-columns: 1.5fr 1fr; }
}

.contact-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-card);
}

.form-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 560px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.field .req { color: var(--red); }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #c9c9c6;
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  min-height: 48px;
  transition: border-color 160ms ease;
}

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

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.field .error-msg {
  display: none;
  color: var(--red-dark);
  font-size: 0.88rem;
  margin-top: 0.3rem;
}

.field.invalid input,
.field.invalid textarea { border-color: var(--red); }

.field.invalid .error-msg { display: block; }

.form-status {
  margin-top: var(--space-4);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-weight: 600;
  display: none;
}

.form-status.success {
  display: block;
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbe7c8;
}

.form-status.error {
  display: block;
  background: var(--red-tint);
  color: var(--red-dark);
  border: 1px solid #f3c2cc;
}

.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-6);
}

.info-card h2 {
  font-size: 1.3rem;
  margin-bottom: var(--space-4);
}

.info-card dl {
  margin: 0;
  display: grid;
  gap: var(--space-4);
}

.info-card dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
}

.info-card dd {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
}

.info-card a { text-decoration: none; font-weight: 600; }
.info-card a:hover { text-decoration: underline; }

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

.site-footer {
  background: var(--ink);
  color: #d7d9dd;
}

.footer-grid {
  display: grid;
  gap: var(--space-8);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}

.site-footer h2 {
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.site-footer h2::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  background: var(--red);
  margin-top: 0.5rem;
  border-radius: 2px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-4);
}

.footer-brand img {
  width: 44px;
  filter: invert(1);
  opacity: 0.9;
}

.footer-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

.site-footer p { color: #b7bac1; font-size: 0.98rem; }

.footer-nav ul,
.footer-contact ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.site-footer a {
  color: #d7d9dd;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-contact li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.footer-contact .who {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: var(--space-4);
  font-size: 0.88rem;
  color: #9a9da5;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  justify-content: space-between;
}

.footer-bottom a { color: #b7bac1; }

/* --- Utilities ----------------------------------------------------------------- */

.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
