/* Ridgeline Home Services — "confident craftsman warmth"
   Cream base · warm ink · one committed amber accent · Fraunces + Work Sans */

:root {
  --cream: #faf6ef;
  --cream-deep: #f3ecdf;
  --ink: #1c1917;
  --ink-soft: #2b2622;
  --body: #57534e;
  --accent: #d97706;
  --accent-deep: #b45309;
  --line: #e5dccb;
  --radius-card: 6px;
  --shadow-lift: 0 14px 30px -12px rgba(28, 25, 23, .28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--ink);
  line-height: 1.08;
  font-weight: 600;
}

h2 { font-size: clamp(2.1rem, 4.5vw, 3.25rem); margin: .5rem 0 1.25rem; }
h2 em { font-style: italic; color: var(--accent); }
h3 { font-size: 1.3rem; margin-bottom: .5rem; }

img { max-width: 100%; display: block; }
a { color: inherit; }
svg { width: 22px; height: 22px; flex: none; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.kicker {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker-light { color: #fbbf77; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  padding: 16px 34px;
  border: none;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(217, 119, 6, .65); }
.btn-accent:hover { background: var(--accent-deep); box-shadow: 0 14px 28px -10px rgba(180, 83, 9, .7); }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px #fff; background: rgba(255, 255, 255, .08); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-full { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: "Fraunces", serif; font-weight: 700; font-size: 1.25rem;
  color: var(--ink); text-decoration: none; line-height: 1.1;
}
.brand em { display: block; font-family: "Work Sans", sans-serif; font-style: normal; font-weight: 600; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.brand-mark { width: 30px; height: 30px; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-soft);
  position: relative;
}
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 2px; width: 0;
  background: var(--accent); transition: width .2s ease;
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta {
  background: var(--ink); color: #fff !important; padding: 11px 22px; border-radius: 3px;
  transition: background .18s ease, transform .18s ease;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: none; color: var(--ink); cursor: pointer; padding: 6px; }
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20, 15, 10, .88) 0%, rgba(20, 15, 10, .68) 45%, rgba(20, 15, 10, .25) 100%);
}
.hero-inner { position: relative; max-width: 1140px; margin: 0 auto; padding: 120px 24px; width: 100%; }
.hero h1 {
  color: #fff; font-size: clamp(2.9rem, 7vw, 5.2rem); font-weight: 700; margin: .6rem 0 1.2rem;
}
.hero h1 span { color: var(--accent); font-style: italic; }
.hero-sub { color: rgba(255, 255, 255, .85); font-size: 1.2rem; max-width: 34rem; margin-bottom: 2.2rem; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-proof { list-style: none; display: flex; gap: 28px; flex-wrap: wrap; }
.hero-proof li { display: flex; align-items: center; gap: 9px; color: rgba(255, 255, 255, .9); font-size: .92rem; font-weight: 500; }
.hero-proof svg { width: 19px; height: 19px; color: var(--accent); }

/* ---------- services ---------- */
.services { padding: 110px 0; }
.service-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 3rem;
  grid-auto-rows: minmax(180px, auto);
}
.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 30px 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: var(--accent); }
.service-card svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 16px; }
.service-card p { font-size: .96rem; }
.card-tall { grid-row: span 2; background: var(--ink); border-color: var(--ink); display: flex; flex-direction: column; justify-content: center; }
.card-tall h3 { color: #fff; font-size: 1.55rem; }
.card-tall p { color: rgba(255, 255, 255, .78); }
.card-tall:hover { border-color: var(--accent); }
.card-note { margin-top: auto; padding-top: 22px; font-size: .84rem !important; color: var(--accent) !important; font-weight: 600; }
.card-wide { grid-column: span 2; display: flex; gap: 24px; align-items: center; background: var(--cream-deep); }
.card-wide svg { margin-bottom: 0; }

/* ---------- split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.why { padding: 110px 0; background: var(--cream-deep); }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius-card); aspect-ratio: 4 / 5; object-fit: cover; }
.badge-years {
  position: absolute; right: -18px; bottom: 34px;
  background: var(--accent); color: #fff; border-radius: var(--radius-card);
  padding: 18px 22px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lift);
}
.badge-years strong { font-family: "Fraunces", serif; font-size: 2.6rem; font-weight: 700; line-height: 1; }
.badge-years span { font-size: .8rem; line-height: 1.25; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.check-list { list-style: none; margin-top: 1.8rem; display: grid; gap: 1.1rem; }
.check-list li { display: flex; gap: 14px; }
.check-list svg { width: 24px; height: 24px; color: var(--accent); margin-top: 2px; }
.check-list strong { color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; padding: 130px 0; overflow: hidden; text-align: center; }
.band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band-scrim { position: absolute; inset: 0; background: rgba(24, 17, 9, .82); }
.band-inner { position: relative; }
.cta-band h2 { color: #fff; margin-bottom: 2.2rem; }

/* ---------- process ---------- */
.process { padding: 110px 0; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 3.2rem; counter-reset: step; }
.steps li { position: relative; padding-top: 18px; border-top: 3px solid var(--line); transition: border-color .25s ease; }
.steps li:hover { border-top-color: var(--accent); }
.step-num { font-family: "Fraunces", serif; font-size: 3.4rem; font-weight: 700; color: var(--accent); opacity: .35; line-height: 1; display: block; margin-bottom: .6rem; }
.steps p { font-size: .96rem; }

/* ---------- reviews ---------- */
.reviews { padding: 110px 0; background: var(--ink); }
.reviews .kicker { color: #fbbf77; }
.reviews h2 { color: #fff; }
.reviews h2 em { color: var(--accent); }
.review-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-top: 3rem; }
.review {
  background: var(--ink-soft); border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius-card); padding: 34px;
  transition: transform .2s ease, border-color .2s ease;
}
.review:hover { transform: translateY(-4px); border-color: rgba(217, 119, 6, .6); }
.review-feature { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
.review-feature p { font-size: 1.25rem; font-family: "Fraunces", serif; color: #f5efe5; line-height: 1.5; }
.review p { color: rgba(255, 255, 255, .82); margin: 14px 0 18px; }
.stars { color: var(--accent); letter-spacing: 4px; font-size: 1.05rem; }
.review footer { color: rgba(255, 255, 255, .55); font-size: .88rem; }
.review footer strong { color: #fff; }

/* ---------- contact ---------- */
.contact { padding: 110px 0; background: var(--cream-deep); }
.contact-lines { list-style: none; margin-top: 2rem; display: grid; gap: 1.1rem; }
.contact-lines li { display: flex; align-items: center; gap: 13px; font-weight: 500; color: var(--ink-soft); }
.contact-lines svg { color: var(--accent); }
.contact-lines a { text-decoration: none; }
.contact-lines a:hover { color: var(--accent); }
.quote-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 40px; box-shadow: 0 24px 50px -24px rgba(28, 25, 23, .25);
}
.quote-form label { display: block; font-weight: 600; font-size: .88rem; color: var(--ink); margin-bottom: 18px; }
.quote-form input, .quote-form textarea {
  width: 100%; margin-top: 7px; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 3px;
  font: inherit; color: var(--ink); background: var(--cream);
  transition: border-color .15s ease;
}
.quote-form input:focus, .quote-form textarea:focus { outline: none; border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-success { margin-top: 16px; font-weight: 600; color: #15803d; text-align: center; }

/* ---------- footer ---------- */
.footer { background: var(--ink); padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .88rem; color: rgba(255, 255, 255, .55); }
.credit a { color: #fbbf77; text-decoration: none; font-weight: 600; }
.credit a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- motion: native CSS scroll-driven first, JS fallback second ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 45%;
    }
  }
  @supports not (animation-timeline: view()) {
    .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
    .reveal.in-view { opacity: 1; transform: none; }
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .service-grid { grid-template-columns: 1fr 1fr; }
  .card-tall { grid-row: auto; }
  .card-wide { grid-column: span 2; flex-direction: column; align-items: flex-start; }
  .split { grid-template-columns: 1fr; gap: 46px; }
  .badge-years { right: 12px; }
  .review-layout { grid-template-columns: 1fr; }
  .review-feature { grid-row: auto; }
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    display: none; padding: 8px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 4px; border-bottom: 1px solid var(--line); }
  .nav-links a:not(.nav-cta)::after { display: none; }
  .nav-cta { text-align: center; margin-top: 14px; border-bottom: none !important; }
}

@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .service-grid { grid-template-columns: 1fr; }
  .card-wide { grid-column: span 1; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .hero-inner { padding: 90px 24px; }
  .quote-form { padding: 28px 22px; }
  .footer-inner { justify-content: center; text-align: center; }
}
