/* ---- Copied from ../shared/tokens.css (generic scaffolding only) ----
   Copied in, not linked: once this folder is its own Vercel project with
   Root Directory set to it, it can't reach files outside the folder. */
:root {
  --step--1: 0.875rem; --step-0: 1rem; --step-1: 1.25rem; --step-2: 1.75rem; --step-3: 2.5rem; --step-4: 3.5rem;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 16px; --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06); --shadow-md: 0 4px 12px rgba(0,0,0,0.08); --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --ease: cubic-bezier(0.4,0,0.2,1); --speed-fast: 0.15s; --speed-base: 0.25s;
  --font-display: 'Space Grotesk', sans-serif; --font-body: 'Inter', system-ui, sans-serif; --font-mono: 'JetBrains Mono', monospace;
}

/* ---- O'Donnell Joinery theme: warm heritage craft — pine green led, bone paper, one honey-amber accent ---- */
:root {
  --demo-bg: #F3EFE6;          /* warm bone paper */
  --demo-surface: #FBFAF4;     /* near-white card */
  --demo-surface-2: #EAE4D6;   /* sunken / inset */
  --demo-border: rgba(28,36,30,0.12);
  --demo-border-strong: rgba(28,36,30,0.22);
  --demo-ink: #1C241E;         /* deep pine near-black */
  --demo-ink-muted: #5C6258;   /* green-grey */

  --demo-green: #2F4237;       /* primary brand green */
  --demo-green-deep: #22302A;  /* footer / hero panel */
  --demo-green-wash: rgba(47,66,55,0.08);
  --demo-amber: #C68A34;       /* single accent — used sparingly */
  --demo-amber-soft: rgba(198,138,52,0.16);
  --demo-danger: #B5482F;

  /* project display fonts override the generic tokens above */
  --font-display: 'Bricolage Grotesque', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* stronger custom easing than the default CSS ease-* (Emil curves) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--demo-bg);
  color: var(--demo-ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--demo-green); outline-offset: 2px; border-radius: var(--radius-sm); }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--space-5); }
main { display: block; }
section { padding: var(--space-8) 0; }
@media (max-width: 640px) { section { padding: var(--space-7) 0; } }

.muted { color: var(--demo-ink-muted); }
.eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 600;
  font-size: var(--step--1); letter-spacing: 0.02em; color: var(--demo-green);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  white-space: nowrap; border-radius: var(--radius-full);
  padding: 13px 24px; font-weight: 600; font-size: var(--step--1);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--demo-green); color: #F6F3EA; }
.btn-primary:hover { background: var(--demo-green-deep); }
.btn-outline { background: transparent; color: var(--demo-ink); border-color: var(--demo-border-strong); }
.btn-outline:hover { border-color: var(--demo-ink); background: var(--demo-green-wash); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Brand / logo ---------- */
.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word .name { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); letter-spacing: -0.02em; }
.brand-word .sub { font-family: var(--font-body); font-weight: 600; font-size: 10px; letter-spacing: 0.28em; color: var(--demo-ink-muted); margin-top: 3px; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 100; height: 74px; display: flex; align-items: center;
  background: rgba(243,239,230,0.82);
  backdrop-filter: blur(10px) saturate(130%); -webkit-backdrop-filter: blur(10px) saturate(130%);
  border-bottom: 1px solid transparent; transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.site-nav.is-stuck { border-bottom-color: var(--demo-border); box-shadow: 0 6px 20px rgba(28,36,30,0.05); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-links { display: flex; align-items: center; gap: var(--space-6); }
.nav-links a { text-decoration: none; color: var(--demo-ink-muted); font-size: var(--step--1); font-weight: 500; transition: color 160ms var(--ease-out); }
.nav-links a:hover { color: var(--demo-ink); }
.nav-links .btn { color: #F6F3EA; }
.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-links {
    /* absolute (not fixed): the nav's backdrop-filter is the containing block
       for fixed descendants, which would trap the panel inside the 74px bar. */
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - 74px); height: calc(100dvh - 74px);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--demo-bg); padding: var(--space-4) var(--space-5);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out);
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: var(--space-4) 0; border-bottom: 1px solid var(--demo-border); font-size: var(--step-1); }
  .nav-links .btn { margin-top: var(--space-4); }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center; width: 42px; height: 42px;
    background: none; border: none; cursor: pointer; color: var(--demo-ink);
  }
  .nav-toggle svg { width: 24px; height: 24px; }
}

/* ---------- Hero ---------- */
.hero { padding-top: var(--space-7); padding-bottom: var(--space-8); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-8); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 1.3rem + 3.6vw, 3.9rem); }
.hero h1 .grain { color: var(--demo-green); position: relative; white-space: nowrap; }
.hero h1 .grain::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.12em;
  background: var(--demo-amber); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  animation: underline 700ms var(--ease-out) 0.5s both;
}
@keyframes underline { to { transform: scaleX(1); } }
.hero p.lede { margin-top: var(--space-5); font-size: var(--step-1); color: var(--demo-ink-muted); max-width: 44ch; }
.hero .cta-row { margin-top: var(--space-6); display: flex; gap: var(--space-4); flex-wrap: wrap; align-items: center; }
.hero .signoff { margin-top: var(--space-6); display: flex; align-items: center; gap: var(--space-3); font-size: var(--step--1); color: var(--demo-ink-muted); }
.hero .signoff svg { width: 22px; height: 22px; color: var(--demo-green); flex: none; }

.hero-visual {
  position: relative; aspect-ratio: 5 / 6; border-radius: var(--radius-lg); overflow: hidden;
  background:
    repeating-linear-gradient(96deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 22px),
    linear-gradient(160deg, #35493C, #22302A 70%);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.06);
}
.hero-visual .mark-lg { width: 62%; }
.hero-visual .sheen {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 40%, rgba(255,255,255,0.14) 50%, transparent 60%);
  transform: translateX(-100%); animation: sheen 1.8s var(--ease-in-out) 0.7s 1 both;
}
@keyframes sheen { to { transform: translateX(100%); } }
.hero-visual .stamp {
  position: absolute; left: var(--space-5); bottom: var(--space-5); color: rgba(246,243,234,0.9);
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-0); line-height: 1.25;
}
.hero-visual .stamp small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 12px; letter-spacing: 0.14em; color: var(--demo-amber); margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) {
  .hero-visual .sheen { animation: none; opacity: 0; }
  .hero h1 .grain::after { animation: none; transform: scaleX(1); }
}
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 360px; margin: 0 auto; aspect-ratio: 4 / 3; }
}

/* ---------- Trust strip ---------- */
.trust-strip { padding: var(--space-6) 0; border-top: 1px solid var(--demo-border); border-bottom: 1px solid var(--demo-border); }
.trust-strip .wrap { display: flex; flex-wrap: wrap; }
.trust-item { flex: 1 1 210px; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-5); border-left: 1px solid var(--demo-border); }
.trust-item:first-child { border-left: none; padding-left: 0; }
.trust-item svg { width: 22px; height: 22px; color: var(--demo-green); flex: none; }
.trust-item span { font-size: var(--step--1); color: var(--demo-ink-muted); }
@media (max-width: 720px) { .trust-item { flex: 1 1 44%; border-left: none; padding-left: 0; } }

/* ---------- Section header ---------- */
.section-head { max-width: 58ch; margin-bottom: var(--space-6); }
.section-head h2 { font-size: var(--step-3); }
.section-head .eyebrow { margin-bottom: var(--space-3); }
.section-head p { margin-top: var(--space-3); color: var(--demo-ink-muted); font-size: var(--step-1); }

/* ---------- Cards ---------- */
.card { background: var(--demo-surface); border: 1px solid var(--demo-border); border-radius: var(--radius-lg); padding: var(--space-5); }

/* ---------- Services bento (asymmetric, exactly 3 cells) ---------- */
.services-bento { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--space-4); }
.svc {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
  border: 1px solid var(--demo-border); border-radius: var(--radius-lg); padding: var(--space-6);
  background: var(--demo-surface); transition: transform 220ms var(--ease-out), border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.svc:hover { transform: translateY(-3px); border-color: var(--demo-border-strong); box-shadow: var(--shadow-md); }
.svc-feature { grid-row: 1 / 3; min-height: 400px; color: #F1EEE4; border-color: transparent;
  background:
    repeating-linear-gradient(93deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 20px),
    linear-gradient(155deg, #35493C, #22302A);
}
.svc .svc-icon { position: absolute; top: var(--space-5); left: var(--space-6); width: 30px; height: 30px; color: var(--demo-amber); }
.svc h3 { font-size: var(--step-2); margin-bottom: var(--space-2); }
.svc-feature h3 { font-size: var(--step-3); }
.svc p { color: var(--demo-ink-muted); font-size: var(--step--1); max-width: 40ch; }
.svc-feature p { color: rgba(241,238,228,0.72); }
.svc .svc-list { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.svc .svc-list li { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: var(--radius-full); background: var(--demo-green-wash); color: var(--demo-green); }
.svc-feature .svc-list li { background: rgba(255,255,255,0.08); color: #E7E2D4; }
@media (max-width: 780px) {
  .services-bento { grid-template-columns: 1fr; grid-template-rows: auto; }
  .svc-feature { grid-row: auto; min-height: 300px; }
}

/* ---------- Portfolio ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-6); }
.filter-btn {
  border: 1px solid var(--demo-border-strong); background: transparent; color: var(--demo-ink-muted);
  border-radius: var(--radius-full); padding: 8px 16px; font-size: var(--step--1); font-weight: 600; cursor: pointer;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out), background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.filter-btn:active { transform: scale(0.97); }
.filter-btn:hover { color: var(--demo-ink); border-color: var(--demo-ink); }
.filter-btn.is-active { background: var(--demo-green); color: #F6F3EA; border-color: var(--demo-green); }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
@media (max-width: 880px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .work-grid { grid-template-columns: 1fr; } }
.work-item.is-hidden { display: none; }
.work-item.is-enter { animation: work-in 360ms var(--ease-out) both; }
@keyframes work-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .work-item.is-enter { animation: none; } }

.work-photo {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden;
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--demo-border);
}
.work-photo svg { width: 44%; color: rgba(255,255,255,0.82); }
.work-photo .ph {
  position: absolute; bottom: 10px; right: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7); background: rgba(0,0,0,0.22); padding: 3px 8px; border-radius: var(--radius-full);
}
/* wood-tone variety so tiles don't read as flat placeholders */
.tone-1 { background: linear-gradient(150deg, #6B4A2C, #3E2C1B); }
.tone-2 { background: linear-gradient(150deg, #35493C, #22302A); }
.tone-3 { background: linear-gradient(150deg, #A9793F, #6B4A2C); }
.tone-4 { background: linear-gradient(150deg, #7E6A4A, #4A3E2A); }
.tone-5 { background: linear-gradient(150deg, #43514A, #2C3A32); }
.tone-6 { background: linear-gradient(150deg, #9A6A38, #5E3F22); }
.work-cap { margin-top: var(--space-3); }
.work-cap .t { font-weight: 600; font-size: var(--step-0); }
.work-cap .m { color: var(--demo-ink-muted); font-size: var(--step--1); margin-top: 2px; }

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); counter-reset: step; }
@media (max-width: 760px) { .process-grid { grid-template-columns: 1fr; gap: var(--space-5); } }
.step { padding-top: var(--space-5); border-top: 2px solid var(--demo-border-strong); }
.step .n { font-family: var(--font-mono); font-size: var(--step--1); color: var(--demo-amber); font-weight: 600; }
.step h3 { font-size: var(--step-1); margin: var(--space-3) 0 var(--space-2); }
.step p { color: var(--demo-ink-muted); font-size: var(--step--1); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--space-8); align-items: center; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; gap: var(--space-6); } }
.about-portrait {
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; position: relative;
  background: linear-gradient(160deg, #43514A, #2C3A32); display: flex; align-items: flex-end; justify-content: center;
  border: 1px solid var(--demo-border);
}
.about-portrait svg { width: 70%; color: rgba(255,255,255,0.18); }
.about-portrait .ph { position: absolute; top: 12px; left: 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: rgba(255,255,255,0.75); background: rgba(0,0,0,0.22); padding: 3px 8px; border-radius: var(--radius-full); }
.about-copy h2 { font-size: var(--step-3); }
.about-copy p { margin-top: var(--space-4); color: var(--demo-ink-muted); }
.about-copy p.lead { color: var(--demo-ink); font-size: var(--step-1); }
.about-sign { margin-top: var(--space-5); font-family: var(--font-display); font-size: var(--step-2); color: var(--demo-green); }
.about-stats { display: flex; gap: var(--space-7); margin-top: var(--space-6); flex-wrap: wrap; }
.about-stats .stat .num { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; }
.about-stats .stat .lbl { font-size: var(--step--1); color: var(--demo-ink-muted); }

/* ---------- Quote form ---------- */
.quote { background: var(--demo-surface); border-top: 1px solid var(--demo-border); }
.quote-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-8); align-items: start; }
@media (max-width: 860px) { .quote-grid { grid-template-columns: 1fr; gap: var(--space-6); } }
.quote-aside h2 { font-size: var(--step-3); }
.quote-aside p { margin-top: var(--space-4); color: var(--demo-ink-muted); }
.quote-aside ul { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.quote-aside li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--step--1); }
.quote-aside li svg { width: 20px; height: 20px; color: var(--demo-green); flex: none; margin-top: 1px; }

.quote-card { background: var(--demo-bg); border: 1px solid var(--demo-border); border-radius: var(--radius-lg); padding: var(--space-6); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 520px) { .field-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: var(--space-2); }
.field.full { grid-column: 1 / -1; }
.field label { font-size: var(--step--1); font-weight: 600; }
.field input, .field select, .field textarea {
  background: var(--demo-surface); border: 1px solid var(--demo-border-strong); border-radius: var(--radius-md);
  padding: 12px 14px; color: var(--demo-ink); font: inherit; font-size: var(--step--1); width: 100%;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.field textarea { resize: vertical; min-height: 108px; }
.field input::placeholder, .field textarea::placeholder { color: #97917f; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--demo-green); box-shadow: 0 0 0 3px var(--demo-green-wash); }
.field input.is-invalid, .field select.is-invalid, .field textarea.is-invalid { border-color: var(--demo-danger); }
.field .error { color: var(--demo-danger); font-size: 12px; min-height: 15px; }
.quote-card .submit-row { margin-top: var(--space-5); }
.form-note { margin-top: var(--space-3); font-size: 12px; color: var(--demo-ink-muted); text-align: center; }

/* success state */
.quote-success { display: none; text-align: center; padding: var(--space-5) 0; }
.quote-success.is-shown { display: block; animation: work-in 360ms var(--ease-out) both; }
.quote-form.is-hidden { display: none; }
.success-badge {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto var(--space-4); display: flex; align-items: center; justify-content: center;
  background: var(--demo-green); color: #F6F3EA;
}
.success-badge svg { width: 28px; height: 28px; }
.quote-success h3 { font-size: var(--step-2); }
.quote-success p { margin-top: var(--space-3); color: var(--demo-ink-muted); }
.quote-success .ref {
  margin-top: var(--space-4); display: inline-block; font-family: var(--font-mono); letter-spacing: 0.05em;
  background: var(--demo-surface); border: 1px dashed var(--demo-border-strong); border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4); color: var(--demo-green);
}
.spinner { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 2px solid rgba(246,243,234,0.4); border-top-color: #F6F3EA; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1400ms; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--demo-green-deep); color: #DFE3DA; padding: var(--space-8) 0 var(--space-7); }
.site-footer a { color: inherit; text-decoration: none; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-7); }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; gap: var(--space-6); } }
.site-footer .brand-word .name { color: #F1EEE4; }
.site-footer .brand-word .sub { color: rgba(223,227,218,0.65); }
.footer-blurb { margin-top: var(--space-4); color: rgba(223,227,218,0.7); font-size: var(--step--1); max-width: 34ch; }
.footer-col h4 { font-family: var(--font-body); font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(223,227,218,0.6); margin: 0 0 var(--space-4); font-weight: 600; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); font-size: var(--step--1); }
.footer-col a:hover { color: #fff; }
.footer-col .contact-line { display: flex; gap: var(--space-3); align-items: center; }
.footer-col .contact-line svg { width: 18px; height: 18px; color: var(--demo-amber); flex: none; }
.footer-bottom { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; font-size: 12px; color: rgba(223,227,218,0.55); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .svc:hover { transform: none; }
}
@media (hover: none) { .svc:hover { transform: none; box-shadow: none; } }
