/* Axiom Residential Contracting site styles. One family (Archivo) with its width axis. */

/* ---------- font (self-hosted Archivo, SIL Open Font License) ---------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  --paper: #f5f2ec;
  --paper-2: #ece7de;
  --card: #fffdf9;
  --ink: #141311;
  --ink-2: #3b3833;
  --muted: #6a645b;
  --line: #ddd5c8;
  --night: #141311;
  --night-2: #1f1d1a;
  --night-line: #34312c;
  --on-night: #f2eee7;
  --on-night-muted: #b3ab9e;
  --brick: #a5401f;
  --brick-hover: #8c3519;
  --brick-light: #e8825c;

  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;

  /* type scale: 8 sizes */
  --t-xs: 0.8125rem;   /* 13 */
  --t-sm: 0.9375rem;   /* 15 */
  --t-base: 1.0625rem; /* 17 */
  --t-md: 1.25rem;     /* 20 */
  --t-lg: 1.625rem;    /* 26 */
  --t-xl: clamp(1.75rem, 1.2rem + 1.8vw, 2.375rem);  /* 28 to 38 */
  --t-2xl: clamp(2.125rem, 1.4rem + 2.9vw, 3.25rem); /* 34 to 52 */
  --t-hero: clamp(2.5rem, 1.6rem + 3.6vw, 4rem);     /* 40 to 64 */

  --wrap: 1200px;
  --gutter: 20px;
  --radius: 10px;
  --speed: 180ms;
  --shadow: 0 1px 2px rgba(20, 19, 17, 0.06), 0 8px 24px rgba(20, 19, 17, 0.08);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.6;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brick); text-underline-offset: 3px; }
a[href^="tel:"] { white-space: nowrap; }
.lbl-short { display: none; }
a:hover { color: var(--brick-hover); }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ink); color: var(--paper); }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
section { scroll-margin-top: 76px; }
.section { padding-block: clamp(64px, 9vw, 120px); }

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 800;
  font-stretch: 112%;
  font-variation-settings: 'wdth' 112;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-md); font-weight: 700; line-height: 1.2; }
p { margin: 0; }

.kicker {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 14px;
}
.lead { font-size: var(--t-md); line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 + .lead { margin-top: 16px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px;
  font: inherit; font-size: var(--t-base); font-weight: 700; letter-spacing: 0.01em;
  border-radius: 999px; border: 2px solid transparent; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background var(--speed), color var(--speed), border-color var(--speed), transform var(--speed);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brick); color: #fff; }
.btn-primary:hover { background: var(--brick-hover); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: var(--t-sm); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 242, 236, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--speed), box-shadow var(--speed);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 2px 12px rgba(20, 19, 17, 0.06); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: block; flex-shrink: 0; padding-block: 8px; }
.brand img { height: 40px; width: auto; }
.site-nav { display: flex; gap: 28px; margin-left: auto; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); font-weight: 600; }
.site-nav a:hover { color: var(--brick); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 700; font-size: var(--t-sm); text-decoration: none; white-space: nowrap;
}
.header-phone svg, .call-fab svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round;
}

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; background: var(--night); overflow: hidden; }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 12% 55%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(14, 13, 11, 0.86) 0, rgba(14, 13, 11, 0.72) calc(50% - 80px), rgba(14, 13, 11, 0.14) calc(50% + 260px), rgba(14, 13, 11, 0) calc(50% + 440px)),
    linear-gradient(0deg, rgba(14, 13, 11, 0.35) 0%, rgba(14, 13, 11, 0) 30%);
}
.hero-inner {
  position: relative; z-index: 1;
  min-height: min(84vh, 780px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: 96px 88px;
}
.hero .kicker { color: #f3b79d; }
.hero h1 { max-width: 13ch; }
.hero-sub { font-size: var(--t-md); line-height: 1.5; max-width: 46ch; margin-top: 22px; color: rgba(255, 255, 255, 0.9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-call { margin-top: 18px; font-size: var(--t-sm); color: rgba(255, 255, 255, 0.82); }
.hero-call a { color: #fff; font-weight: 700; display: inline-block; padding-block: 12px; }

/* ---------- quick facts ---------- */
.facts { background: var(--night); color: var(--on-night); border-top: 1px solid var(--night-line); }
.facts-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 22px 24px; border-left: 1px solid var(--night-line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact-label { display: block; font-size: var(--t-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-night-muted); }
.fact-value { display: block; color: inherit; text-decoration: none; font-weight: 700; font-size: var(--t-base); margin-top: 2px; }

/* ---------- services ---------- */
/* Five cards: two wide over three, so no row sits half empty */
.services-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.service-card { grid-column: span 2; }
.service-card:nth-child(-n+2) { grid-column: span 3; }
.service-card:nth-child(-n+2) img { aspect-ratio: 16 / 10; }
.service-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform var(--speed), box-shadow var(--speed);
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.service-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.service-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.service-body p { color: var(--ink-2); margin-top: 8px; font-size: var(--t-sm); line-height: 1.55; }
.service-link { margin-top: auto; padding-top: 8px; min-height: 44px; display: inline-flex; align-items: flex-end; gap: 6px; font-weight: 700; font-size: var(--t-sm); text-decoration: none; }
.service-link:hover { text-decoration: underline; }

.photo-note { margin-top: 20px; font-size: var(--t-sm); color: var(--muted); }

/* ---------- process ---------- */
.process { background: var(--paper-2); }
.process-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.process-media img { border-radius: 14px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.steps { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: s; display: grid; gap: 22px; }
.steps li { counter-increment: s; position: relative; padding-left: 64px; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: -2px;
  font-weight: 800; font-size: var(--t-lg); font-variation-settings: 'wdth' 112; color: var(--brick);
}
.steps p { margin-top: 4px; color: var(--ink-2); }
.process-note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-2); }

/* ---------- contact / intake ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 502px); gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: grid; gap: 2px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.contact-info .lead { margin-top: 16px; }
.contact-list a { display: inline-block; padding-block: 8px; margin-block: -8px; }
.cl-label { font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.cl-big { font-size: var(--t-lg); font-weight: 800; font-variation-settings: 'wdth' 112; color: var(--ink); text-decoration: none; }
.cl-big:hover { color: var(--brick); }

.lead-form { scroll-margin-top: 84px; }
/* The form runs a little wider than its frame, so the last 18px of the iframe are clipped to hide a sideways scrollbar */
.lead-form-frame { position: relative; height: 800px; overflow: hidden; margin-inline: -15px; }
/* The form takes a few seconds to load; this sits behind it until it covers the line */
.lead-form-frame::before { content: "Loading the form..."; position: absolute; top: 24px; left: 15px; color: var(--muted); }
.lead-form-frame iframe { position: relative; display: block; width: 100%; height: 818px; border: 0; background: transparent; }
.form-fine { margin-bottom: 12px; font-size: var(--t-xs); color: var(--muted); }

/* Brick focus rings are too faint on dark backgrounds */
.hero a:focus-visible, .facts a:focus-visible, .site-footer a:focus-visible { outline-color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--night); color: var(--on-night-muted); padding-block: 64px 32px; font-size: var(--t-sm); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-logo { width: 200px; height: auto; }
.footer-col { display: grid; gap: 0; }
.footer-col a, .footer-col span { padding-block: 10px; }
.footer-h { font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-night); margin-bottom: 4px; }
.site-footer a { color: var(--on-night); text-decoration: none; }
.site-footer a:hover { color: var(--brick-light); text-decoration: underline; }
.footer-legal:only-child { margin-top: 0; border-top: 0; padding-top: 0; }
.site-footer:has(> .footer-legal:only-child) { padding-block: 28px; }
/* short pages: footer sits at the bottom of the screen */
body:has(> main.section) { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body:has(> main.section) > main { flex: 1; }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--night-line); display: grid; gap: 8px; font-size: var(--t-xs); }

/* ---------- 404 + privacy ---------- */
.thanks { max-width: 760px; }
.thanks .hero-actions { margin-top: 32px; }
.prose { max-width: 70ch; }
.prose h1 { font-size: var(--t-2xl); }
.prose .lead { margin-top: 12px; }
.prose h2 { font-size: var(--t-lg); margin-top: 40px; }
.prose p { margin-top: 12px; color: var(--ink-2); }
.prose .kicker { color: var(--brick); margin-top: 0; }

/* mobile call button */
.call-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: none; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px;
  background: var(--brick); color: #fff; border-radius: 999px; font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 24px rgba(20, 19, 17, 0.3);
}
.call-fab:hover { color: #fff; background: var(--brick-hover); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card, .service-card:nth-child(-n+2) { grid-column: auto; }
  .service-card:nth-child(-n+2) img { aspect-ratio: 4 / 3; }
  .service-card:last-child { grid-column: 1 / -1; }
  .service-card:last-child img { aspect-ratio: 21 / 9; }
  body.form-in-view .call-fab, body.hero-in-view .call-fab { display: none; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .header-row { min-height: 62px; gap: 12px; }
  .brand img { height: 30px; }
  .header-phone { display: none; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  .hero-media img { position: static; height: auto; aspect-ratio: 4 / 3; }
  .hero::after { display: none; }
  .hero-inner { min-height: 0; padding-block: 32px 44px; }
  .hero h1 { max-width: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .facts-row { grid-template-columns: 1fr 1fr; }
  .fact { padding: 16px 0 16px 16px; border-top: 1px solid var(--night-line); }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact:nth-child(-n+2) { border-top: 0; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card:last-child { grid-column: auto; }
  .service-card:last-child img { aspect-ratio: 4 / 3; }
  .process-grid, .contact-grid { grid-template-columns: 1fr; }
  /* Phone: every Request an Estimate button lands on the heading with the form right under it */
  .contact-grid { gap: 16px; }
  .contact-info { display: contents; }
  .lead-form { order: 1; }
  .contact-list { order: 2; margin-top: 16px; }
  .process-media img { aspect-ratio: 16 / 10; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-logo { grid-column: 1 / -1; width: 160px; }
  .call-fab { display: inline-flex; }
  .site-footer { padding-bottom: 96px; }
}

@media (max-width: 340px) {
  .btn-sm { padding: 0 14px; }
}
