/* Retaining Walls Spanish Fork — site styles
   Earthy stone / slate palette, system fonts, mobile-first. */

:root {
  --bg: #F3EEE6;
  --bg-warm: #E9E1D4;
  --surface: #FFFBF6;
  --ink: #1A2228;
  --ink-soft: #3E4A52;
  --muted: #5C6770;
  --slate: #2F3C46;
  --slate-deep: #1E2A32;
  --stone: #8A7458;
  --sand: #C9B697;
  --line: #D5CBBB;
  --cta: #9C2F12;
  --cta-hover: #7A240D;
  --cta-text: #FFF8F4;
  --link: #1F4E3D;
  --link-hover: #9C2F12;
  --focus: #9C2F12;
  --ok: #2D5A3D;
  --err: #8B1E0E;
  --shadow: 0 1px 2px rgba(28, 34, 40, 0.06), 0 10px 28px rgba(28, 34, 40, 0.07);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --max: 1120px;
  --prose: 44rem;
  --header: 4.25rem;
  --sticky-cta: 4.15rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}
a:hover { color: var(--link-hover); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
label.nav-burger:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--cta);
  color: var(--cta-text);
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
}
.skip:focus { top: 0; color: var(--cta-text); }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 238, 230, 0.96);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  flex: 0 0 auto;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 2.15rem; height: 2.15rem; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.01em; }
.brand-place { font-size: 0.72rem; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger {
  margin-left: auto;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.nav-burger span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--slate);
  border-radius: 1px;
}

.site-nav { display: none; }
.nav-toggle:checked ~ .site-nav,
.nav-toggle:focus ~ .site-nav { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav > ul {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0 0.25rem;
}
.site-nav a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--bg-warm);
  color: var(--ink);
}
.site-nav .sub {
  margin: 0 0 0.25rem 0.7rem;
  padding: 0;
  border-left: 2px solid var(--sand);
}
.site-nav .sub a { font-weight: 550; font-size: 0.9rem; color: var(--ink-soft); }
.nav-cta { margin-top: 0.35rem; }
.nav-cta .btn { width: 100%; text-align: center; }
.site-nav a.btn-cta,
.site-nav a.btn-cta:hover,
.site-nav a.btn-cta[aria-current="page"] {
  color: var(--cta-text);
  background: var(--cta);
  border-color: var(--cta);
}
.site-nav a.btn-cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.site-header .header-call {
  display: none;
}

/* checkbox hack needs the nav in the flow under the header on mobile */
@media (max-width: 879px) {
  .header-inner { flex-wrap: wrap; }
  .site-nav {
    flex-basis: 100%;
    width: 100%;
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
}

@media (min-width: 880px) {
  .nav-burger { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .site-nav {
    display: block;
    margin-left: auto;
  }
  .site-nav > ul {
    flex-direction: row;
    align-items: center;
    gap: 0.1rem;
    padding: 0;
  }
  .site-nav a { padding: 0.4rem 0.55rem; }
  .has-sub { position: relative; }
  .has-sub > .sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 12rem;
    margin: 0;
    padding: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 20;
  }
  .has-sub:hover > .sub,
  .has-sub:focus-within > .sub { display: block; }
  .nav-cta { margin-top: 0; margin-left: 0.4rem; }
  .nav-cta .btn { width: auto; }
  .site-header .header-call {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    text-decoration: none;
    color: var(--ink-soft);
    font-weight: 650;
    font-size: 0.88rem;
    white-space: nowrap;
    padding: 0.35rem 0.4rem;
    border-bottom: none;
  }
  .site-header .header-call:hover { color: var(--cta); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.btn-cta {
  background: var(--cta);
  color: var(--cta-text);
  border-color: var(--cta);
}
.btn-cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-text); }
.btn-ghost {
  background: transparent;
  color: var(--cta-text);
  border-color: rgba(255, 248, 244, 0.7);
}
.btn-ghost:hover { background: rgba(255, 248, 244, 0.12); color: var(--cta-text); }
.btn-secondary {
  background: var(--surface);
  color: var(--cta);
  border-color: var(--cta);
}
.btn-secondary:hover { background: #F8EBE6; color: var(--cta-hover); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.15rem; }

/* Phone token */
.phone-token, .contractor-token {
  font-weight: 750;
  letter-spacing: 0.01em;
}
.call-phone {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.call-phone.is-placeholder:not(.btn) {
  cursor: default;
  border-bottom: 1px dashed currentColor;
}
.btn.call-phone.is-placeholder {
  cursor: default;
}
.call-phone[href^="tel:"] { text-decoration: underline; text-underline-offset: 0.15em; }
.phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem 0.2rem;
  border-radius: 999px;
  background: #F8EBE6;
  color: var(--cta);
  font-weight: 750;
  border: 1px solid #E8C9BC;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  color: #F6F1EA;
  min-height: 28rem;
  display: flex;
  align-items: flex-end;
  background: var(--slate-deep);
}
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 45%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 22, 26, 0.15) 0%, rgba(16, 22, 26, 0.35) 40%, rgba(16, 22, 26, 0.82) 100%),
    linear-gradient(90deg, rgba(16, 22, 26, 0.45) 0%, rgba(16, 22, 26, 0.1) 55%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1rem 2rem;
  width: 100%;
}
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #E8D3C6;
  margin: 0 0 0.65rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 650;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  max-width: 18ch;
  color: #FFFBF6;
}
.hero .lede {
  max-width: 40rem;
  font-size: 1.05rem;
  color: #E9E2D8;
  margin: 0;
}
.hero-caption {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.45rem 1rem 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Page header (inner pages) */
.page-hero {
  background:
    linear-gradient(180deg, #E9E1D4 0%, #F3EEE6 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1rem 1.5rem;
}
.crumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.crumbs li:not(:last-child)::after {
  content: " / ";
  margin-left: 0.35rem;
  color: var(--sand);
}
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--cta); text-decoration: underline; }
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 650;
  font-size: clamp(1.65rem, 3.4vw, 2.45rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
  max-width: 22ch;
}
.page-hero .lede { margin: 0; max-width: 42rem; color: var(--ink-soft); }

/* ---- Layout ---- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1rem 3rem;
}
.prose { max-width: var(--prose); }
.prose h2, .page-hero + .wrap h2, article h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 2rem 0 0.7rem;
}
.prose h3, article h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}
.prose p, article p { margin: 0 0 1rem; }
.prose ul, .prose ol, article ul, article ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose li, article li { margin: 0 0 0.35rem; }
.prose strong, article strong { font-weight: 750; }
article > h1 { display: none; } /* H1 is in the page hero / home hero */

.honesty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cta);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.85rem 1rem;
  margin: 0 0 1.4rem;
  color: var(--ink-soft);
}
.honesty p { margin: 0; }

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
  box-shadow: var(--shadow);
}
.callout-cost { border-top: 4px solid var(--cta); }
.callout .figure {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--cta);
  font-weight: 650;
  margin: 0 0 0.25rem;
  line-height: 1.2;
}
.callout .figure-note { margin: 0; color: var(--muted); font-size: 0.92rem; }

.figure-block {
  margin: 1.4rem 0 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.figure-block img, .figure-block svg { width: 100%; }
.figure-block figcaption {
  padding: 0.65rem 0.9rem 0.8rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(28,34,40,0.04);
}
a.card:hover { border-color: var(--stone); color: inherit; }
.card img, .card svg { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-warm); }
.card-body { padding: 0.85rem 1rem 1rem; }
.card h3 { margin: 0 0 0.3rem; font-family: var(--serif); font-size: 1.15rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* Sources */
.sources {
  margin-top: 2.5rem;
  padding: 1rem 1.1rem;
  background: var(--bg-warm);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.sources h2, .sources h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.sources ul { margin: 0; }

/* Quote band / forms */
.quote-band {
  background: var(--slate-deep);
  color: #F3EEE6;
  margin: 2.5rem 0 0;
  padding: 2rem 1rem;
}
.quote-band-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 800px) {
  .quote-band-inner { grid-template-columns: 1fr 1fr; align-items: start; }
}
.quote-band h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin: 0 0 0.6rem;
  color: #FFFBF6;
}
.quote-band p { color: #D9D2C6; }
.quote-band a { color: #F0D2C6; }
.quote-band a:hover { color: #fff; }
.quote-band .form,
.quote-band .form p { color: var(--ink-soft); }
.quote-band .form h2,
.quote-band .form h3,
.quote-band .form label,
.quote-band .form .fieldset-legend { color: var(--ink); }
.quote-band .form .hint,
.quote-band .form .form-note { color: var(--muted); }
.quote-band .form a { color: var(--link); }
.quote-band .form a:hover { color: var(--link-hover); }
.quote-band .form input::placeholder,
.quote-band .form textarea::placeholder { color: #6B7280; opacity: 1; }

.form {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.2rem;
  border: 1px solid var(--line);
}
.form h2, .form h3 {
  font-family: var(--serif);
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.field { margin: 0 0 0.85rem; }
.field label, .fieldset-legend {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 0 0.3rem;
}
.req { color: var(--cta); font-weight: 750; }
.hint { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-top: 0.2rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid #C9BEae;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 7rem; resize: vertical; }
.checks { display: grid; gap: 0.35rem; }
.checks label, .consent label {
  display: flex;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  align-items: flex-start;
}
.checks input, .consent input { margin-top: 0.3rem; flex: 0 0 auto; accent-color: var(--cta); }
.consent {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.75rem 0.8rem;
  margin: 0 0 1rem;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-note { font-size: 0.82rem; color: var(--muted); margin: 0.6rem 0 0; }
.form-status { margin: 0.75rem 0 0; font-weight: 700; }
.form-status.is-error { color: #8B1E0E; }
.form-status.is-pending { color: var(--muted); font-weight: 600; }

/* Footer */
.site-footer {
  background: var(--slate-deep);
  color: #D9D2C6;
  padding: 2.5rem 1rem 5.5rem;
  margin-top: 0;
  font-size: 0.95rem;
}
@media (min-width: 880px) {
  .site-footer { padding-bottom: 2.5rem; }
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.75rem;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer h2 {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: #FFFBF6;
  margin: 0 0 0.6rem;
}
.site-footer a { color: #F0D2C6; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 0.35rem; }
.footer-honesty {
  margin: 0 0 0.8rem;
  max-width: 36rem;
}
.footer-meta {
  max-width: var(--max);
  margin: 1.5rem auto 0;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(201, 182, 151, 0.25);
  font-size: 0.82rem;
  color: #A8A197;
}
.footer-meta p { margin: 0 0 0.35rem; }

/* Sticky mobile CTA */
.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(30, 42, 50, 0.96);
  border-top: 1px solid rgba(201, 182, 151, 0.3);
  backdrop-filter: blur(8px);
}
.mobile-cta .btn { flex: 1 1 auto; padding: 0.8rem 0.6rem; }
.mobile-cta .btn-ghost { color: #FFF8F4; }
@media (min-width: 880px) {
  .mobile-cta { display: none; }
  body { padding-bottom: 0; }
}
@media (max-width: 879px) {
  body { padding-bottom: var(--sticky-cta); }
}

/* 404 / thank-you */
.simple-page { padding: 3rem 1rem 4rem; max-width: 40rem; margin: 0 auto; }
.simple-page h1 { font-family: var(--serif); font-size: 2rem; margin: 0 0 0.7rem; }

/* Tables if any remain */
article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0 0 1.2rem;
}
article th, article td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}
article th { background: var(--bg-warm); }

/* Print */
@media print {
  .site-header, .mobile-cta, .nav-burger, .quote-band, .btn-row { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  a { color: inherit; }
  .hero { min-height: 0; color: #000; }
  .hero-media { display: none; }
}

/* Utility */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
