/* ==========================================================================
   Waymark Builders & Remodelers
   Premium residential construction / remodeling. Mobile-first.
   Palette: warm off-white, charcoal, restrained bronze.
   System fonts only. No frameworks, no external assets.
   ========================================================================== */

:root {
  --bg:          #FAF8F5;   /* warm off-white */
  --bg-alt:      #F2EEE8;   /* slightly deeper warm tone */
  --surface:     #FFFFFF;
  --charcoal:    #2A2A28;
  --ink:         #1B1B19;
  --body:        #46443F;
  --muted:       #75716A;
  --bronze:      #8A6539;   /* restrained accent */
  --bronze-soft: #A98253;
  --line:        #E4DED4;
  --line-strong: #D3CABC;

  --wrap:  1180px;
  --radius: 3px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --step-h1:  clamp(2.6rem, 8.2vw, 5.4rem);
  --step-h2:  clamp(1.85rem, 4.4vw, 2.9rem);
  --step-h3:  clamp(1.12rem, 2vw, 1.3rem);
  --step-lede: clamp(1.05rem, 2.1vw, 1.3rem);

  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(4.5rem, 10vw, 8.5rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.021em;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

a { color: var(--bronze); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--charcoal);
  color: #fff;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  text-decoration: none;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Shared type ---------- */
.eyebrow {
  margin-bottom: 1.1rem;
  color: var(--bronze);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}
.eyebrow-light { color: var(--bronze-soft); }

.lede,
.section-intro,
.contact-lede {
  font-size: var(--step-lede);
  line-height: 1.6;
  color: var(--body);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease,
              border-color .2s ease, transform .2s ease;
}
.btn-sm { padding: 0.62rem 1.15rem; font-size: 0.83rem; }

.btn-solid {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: #fff;
}
.btn-solid:hover { background: var(--bronze); border-color: var(--bronze); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--charcoal); background: rgba(42,42,40,.045); }

.btn:active { transform: translateY(1px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { color: var(--bronze); flex: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.16; }
.brand-text strong {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: 0.012em;
  color: var(--ink);
}
.brand-text span {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Mobile nav toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle-bars { display: block; width: 22px; }
.nav-toggle-bars i {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle-bars i + i { margin-top: 5px; }

[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile-first: nav collapses into a panel.
   Uses display rather than opacity/visibility so the open state is immediate
   and never depends on a transition completing. */
.site-nav {
  position: absolute;
  inset: 100% 0 auto 0;
  display: none;
  gap: 0.35rem;
  padding: 0.75rem var(--pad) 1.6rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 28px -18px rgba(27, 27, 25, .35);
}
.nav-open .site-nav { display: grid; }

.site-nav ul { display: grid; gap: 0.15rem; }
.site-nav a {
  display: block;
  padding: 0.7rem 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 550;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.site-nav a:hover { color: var(--bronze); }
/* Header CTA button.
   Scoped as `.site-nav a.nav-cta` (0,2,1) so it outranks `.site-nav a` (0,1,1),
   which would otherwise strip the CTA's colour, padding and border. */
.nav-cta { justify-self: start; margin-top: 0.9rem; }

.site-nav a.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.6rem;
  border: 1px solid var(--charcoal);   /* present in both states: no layout shift */
  border-radius: var(--radius);
  background: var(--charcoal);
  color: var(--bg);                    /* warm off-white on charcoal */
  font-size: 0.83rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.035em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;   /* never wrap to a second line */
  flex: none;            /* never get squeezed by the flex row */
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.site-nav a.nav-cta:hover,
.site-nav a.nav-cta:focus-visible,
.site-nav a.nav-cta:active {
  background: var(--bg);               /* inverted */
  color: var(--charcoal);
  border-color: var(--charcoal);
}

.site-nav a.nav-cta:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-block: clamp(4rem, 13vw, 9.5rem) clamp(4rem, 11vw, 8rem);
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 2; max-width: 46rem; }

.hero h1 {
  font-size: var(--step-h1);
  font-weight: 600;
  letter-spacing: -0.033em;
  margin-bottom: 1.5rem;
}

.hero .lede { max-width: 34rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.4rem;
}

/* Architectural line motif — subtle, not decorative clutter */
.hero-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-frame span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-strong) 28%, transparent);
}
.hero-frame span:nth-child(1) { right: 12%; }
.hero-frame span:nth-child(2) { right: 26%; opacity: .6; }
.hero-frame span:nth-child(3) { right: 4%;  opacity: .45; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section-y); }

.section-head { max-width: 42rem; margin-bottom: clamp(2.5rem, 5vw, 3.8rem); }
.section-head h2 { font-size: var(--step-h2); margin-bottom: 1.1rem; }

/* ---------- Services ---------- */
.services { background: var(--surface); border-block: 1px solid var(--line); }

.service-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  position: relative;
  padding: clamp(1.9rem, 4vw, 2.75rem);
  background: var(--surface);
  transition: background-color .25s ease;
}
.service-card:hover { background: var(--bg); }

.service-num {
  display: block;
  margin-bottom: 1.4rem;
  color: var(--bronze-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.service-card h3 {
  font-size: var(--step-h3);
  margin-bottom: 0.75rem;
}
.service-card p { color: var(--body); font-size: 0.97rem; }

/* Top hairline accent that fills on hover */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 0;
  height: 2px;
  background: var(--bronze);
  transition: width .32s ease;
}
.service-card:hover::before { width: 100%; }

/* ---------- Approach ---------- */
.approach-inner { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }

.approach-copy h2 { font-size: var(--step-h2); margin-bottom: 1.4rem; }
.approach-copy p + p { margin-top: 1.1rem; }
.approach-copy p { font-size: 1.02rem; }

.approach-list { display: grid; gap: 0; }
.approach-list li {
  padding-block: 1.6rem;
  border-top: 1px solid var(--line-strong);
}
.approach-list li:last-child { border-bottom: 1px solid var(--line-strong); }
.approach-list h3 {
  font-size: 1.04rem;
  font-weight: 650;
  margin-bottom: 0.45rem;
}
.approach-list p { font-size: 0.96rem; color: var(--muted); }

/* ---------- Contact CTA ---------- */
.contact {
  background: var(--charcoal);
  color: #D9D5CE;
}
.contact-inner { max-width: 44rem; }
.contact h2 {
  color: #FFFFFF;
  font-size: var(--step-h2);
  margin-bottom: 1.2rem;
}
.contact-lede { color: #C6C1B8; }

.contact-card {
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 4vw, 2.2rem);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 2px solid var(--bronze-soft);
  border-radius: var(--radius);
}
.contact-card-note {
  color: #B9B4AB;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); }

.footer-inner {
  display: grid;
  gap: 2rem;
  padding-block: clamp(2.75rem, 6vw, 4rem) 2rem;
}

.footer-brand .brand-text strong { font-size: 1.05rem; }
.footer-tag {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-nav ul { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-nav a {
  display: inline-block;
  padding-block: 0.3rem;   /* keeps the hit area >= 24px tall */
  color: var(--body);
  font-size: 0.92rem;
  font-weight: 550;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--bronze); }

.footer-base {
  padding-block: 1.4rem;
  border-top: 1px solid var(--line-strong);
}
.footer-base p { color: var(--muted); font-size: 0.83rem; }

/* ==========================================================================
   Breakpoints
   ========================================================================== */

/* --- 600px: services go two-up --- */
@media (min-width: 600px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- 768px: tablet / desktop nav --- */
@media (min-width: 768px) {
  .nav-toggle { display: none; }

  /* Both selectors, so an open mobile panel cannot leak into desktop layout. */
  .site-nav,
  .nav-open .site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .site-nav ul { display: flex; gap: 2rem; }
  .site-nav a {
    padding: 0.45rem 0;   /* keeps the hit area >= 24px tall */
    border: 0;
    font-size: 0.92rem;
    font-weight: 550;
    color: var(--body);
  }
  .nav-cta { margin-top: 0; }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

/* --- 900px: editorial two-column layouts --- */
@media (min-width: 900px) {
  .service-grid { grid-template-columns: repeat(4, 1fr); }

  .approach-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .approach-copy { position: sticky; top: 7rem; }
}

/* --- 1440px+: let it breathe, never sprawl --- */
@media (min-width: 1440px) {
  :root { --wrap: 1240px; }
}

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .site-header, .hero-frame, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
}
