﻿:root {
    --ink: #2A2420;
    --cedar: #8C4A2F;
    --cedar-dark: #6E3A24;
    --weathered: #C7B299;
    --moss: #566B3B;
    --paper: #F2ECE0;
    --paper-dim: #E8DFCC;
    --iron: #23221F;
    --white: #FFF9F0;
    --font-display: "Fraunces", serif;
    --font-body: "Inter", sans-serif;
    --font-mono: "IBM Plex Mono", monospace;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); line-height: 1.5; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--moss); outline-offset: 3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* NAV */
header.site { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid rgba(42,36,32,.12); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; position: relative; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: .01em; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 30px; height: 30px; flex-shrink: 0; }
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 28px; list-style: none; font-size: .95rem; font-weight: 500; }
.nav-links a { text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid transparent; transition: border-color .15s ease; }
.nav-links a:hover { border-color: var(--cedar); }
.nav-cta { display: inline-block; text-decoration: none; background: var(--cedar); color: var(--white); border: none; padding: 10px 18px; border-radius: 3px; font-weight: 600; font-size: .9rem; transition: background .15s ease; text-align: center; }
.nav-cta:hover { background: var(--cedar-dark); }

/* Mobile Hamburger */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; padding: 6px; cursor: pointer; z-index: 60; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* HERO */
.hero { position: relative; overflow: hidden; background: repeating-linear-gradient(90deg,rgba(42,36,32,.045) 0 3px,transparent 3px 64px), linear-gradient(180deg,var(--paper) 0%,var(--paper-dim) 100%); padding: 88px 0 0; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-bottom: 56px; }
.eyebrow { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; color: var(--cedar-dark); font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--moss); display: inline-block; }
h1.hero-head { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem,4.6vw,3.8rem); line-height: 1.04; letter-spacing: -.01em; color: var(--ink); }
h1.hero-head em { font-style: italic; color: var(--cedar); }
.hero-sub { margin-top: 20px; font-size: 1.1rem; color: #4a4038; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.btn-primary { background: var(--ink); color: var(--white); border: none; padding: 14px 26px; border-radius: 3px; font-weight: 600; font-size: .98rem; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn-primary:hover { background: var(--cedar-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); padding: 13px 24px; border-radius: 3px; font-weight: 600; font-size: .98rem; text-decoration: none; display: inline-flex; align-items: center; }
.btn-ghost:hover { border-color: var(--cedar); color: var(--cedar-dark); }
.hero-stats { display: flex; gap: 28px; margin-top: 40px; font-family: var(--font-mono); }
.stat b { display: block; font-size: 1.5rem; color: var(--cedar-dark); }
.stat span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #6b6156; }
.fence-line { display: block; width: 100%; height: auto; }

/* SECTIONS */
section { padding: 78px 0; }
.section-head { margin-bottom: 40px; max-width: 60ch; }
.kicker { font-family: var(--font-mono); text-transform: uppercase; font-size: .76rem; letter-spacing: .14em; color: var(--moss); font-weight: 600; margin-bottom: 10px; }
h2.section-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem,3vw,2.3rem); letter-spacing: -.01em; }
.section-desc { margin-top: 12px; color: #5a5048; font-size: 1.02rem; }

/* SERVICES */
.services { background: var(--white); border-top: 1px solid rgba(42,36,32,.1); border-bottom: 1px solid rgba(42,36,32,.1); }
.svc-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; }
.svc-card { background: var(--paper); border: 1px solid rgba(42,36,32,.12); border-radius: 6px; padding: 26px 22px; transition: transform .15s ease, box-shadow .15s ease; }
.svc-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(42,36,32,.08); }
.svc-icon { width: 40px; height: 40px; margin-bottom: 16px; color: var(--cedar); }
.svc-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; margin-bottom: 8px; }
.svc-card p { font-size: .92rem; color: #6b6156; }

/* GALLERY */
.gallery-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.gcard { position: relative; border-radius: 6px; overflow: hidden; border: 1px solid rgba(42,36,32,.12); background: var(--white); cursor: pointer; }
.gphoto { height: 190px; position: relative; }
.gcard figcaption { padding: 14px 16px; }
.gcard figcaption .gtype { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--moss); font-weight: 600; }
.gcard figcaption .gloc { font-size: .88rem; color: #6b6156; margin-top: 2px; }
.gcard:hover .gphoto { filter: brightness(1.06); }
.gcard:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(42,36,32,.14); transition: transform .18s ease, box-shadow .18s ease; }

/* LIGHTBOX */
.lb-overlay { position: fixed; inset: 0; z-index: 900; background: rgba(23,20,18,.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.lb-overlay.is-open { opacity: 1; pointer-events: auto; }
.lb-card { position: relative; background: var(--white); border-radius: 8px; overflow: hidden; max-width: 820px; width: 100%; box-shadow: 0 24px 64px rgba(0,0,0,.45); transform: scale(.94); transition: transform .25s ease; }
.lb-overlay.is-open .lb-card { transform: scale(1); }
.lb-img-wrap { position: relative; overflow: hidden; max-height: 70vh; display: flex; align-items: center; justify-content: center; background: var(--ink); }
.lb-img-wrap::before { content: ""; position: absolute; inset: -10%; background-image: var(--lb-src); background-size: cover; background-position: center; filter: blur(28px) brightness(.55) saturate(1.2); transform: scale(1.1); }
.lb-img { position: relative; max-width: 100%; max-height: 70vh; object-fit: contain; display: block; z-index: 1; }
.lb-img-bg { width: 100%; height: 420px; background-size: cover; background-position: center; }
.lb-meta { padding: 18px 22px; display: flex; align-items: baseline; gap: 12px; border-top: 1px solid rgba(42,36,32,.1); }
.lb-type { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--moss); font-weight: 600; }
.lb-loc { font-size: .9rem; color: #6b6156; }
.lb-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(23,20,18,.55); color: #fff; font-size: 1.1rem; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s ease, transform .15s ease; z-index: 10; }
.lb-close:hover { background: rgba(23,20,18,.85); transform: scale(1.08); }

/* REVIEWS */
.reviews { background: var(--iron); color: var(--paper); }
.reviews .kicker { color: var(--weathered); }
.reviews .section-desc { color: #cfc6b8; }
.review-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.rating-summary { background: rgba(242,236,224,.06); border: 1px solid rgba(242,236,224,.14); border-radius: 8px; padding: 28px; text-align: center; }
.rating-num { font-family: var(--font-display); font-size: 3.2rem; font-weight: 600; }
.stars { font-size: 1.3rem; color: #E0A84C; letter-spacing: 2px; margin: 8px 0; }
.rating-count { font-family: var(--font-mono); font-size: .8rem; color: var(--weathered); }
.review-list { display: flex; flex-direction: column; gap: 16px; max-height: 420px; overflow-y: auto; padding-right: 6px; }
.review-item { background: rgba(242,236,224,.05); border: 1px solid rgba(242,236,224,.12); border-radius: 6px; padding: 18px 20px; }
.review-item .rname { font-weight: 600; font-size: .95rem; }
.review-item .rstars { color: #E0A84C; font-size: .85rem; margin: 4px 0 8px; letter-spacing: 1px; }
.review-item p { font-size: .92rem; color: #dcd4c6; }
.review-form { margin-top: 22px; background: rgba(242,236,224,.06); border: 1px solid rgba(242,236,224,.14); border-radius: 8px; padding: 22px; }
.review-form h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 14px; }
.star-input { display: flex; gap: 6px; font-size: 1.6rem; margin-bottom: 14px; }
.star-input button { background: none; border: none; color: #6b6156; padding: 0; line-height: 1; transition: color .1s ease; }
.star-input button.active, .star-input button:hover { color: #E0A84C; }

/* FIELDS */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; color: var(--weathered); }
.field input, .field textarea, .field select { width: 100%; padding: 11px 12px; border-radius: 4px; border: 1px solid rgba(242,236,224,.25); background: rgba(242,236,224,.08); color: var(--paper); font-family: var(--font-body); font-size: .95rem; transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { min-height: 80px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a8172; }
.field input.is-invalid, .field textarea.is-invalid, .field select.is-invalid { border-color: #e08a6b !important; box-shadow: 0 0 0 2px rgba(224,138,107,.25); }
.review-form .btn-primary { background: var(--cedar); }
.review-form .btn-primary:hover { background: #a85a38; }
.form-msg { font-family: var(--font-mono); font-size: .82rem; margin-top: 10px; color: #8fd07a; min-height: 1em; }

/* ESTIMATE */
.estimate { background: var(--paper-dim); }
.ticket { background: var(--white); border: 1.5px solid var(--ink); border-radius: 4px; max-width: 720px; margin: 0 auto; position: relative; }
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 28px 18px; border-bottom: 2px dashed rgba(42,36,32,.25); }
.ticket-head .tlabel { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #8a7e70; }
.ticket-head h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-top: 4px; }
.ticket-num { font-family: var(--font-mono); font-size: .85rem; text-align: right; color: var(--cedar-dark); }
.ticket-body { padding: 26px 28px 30px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field.wide { grid-column: 1 / -1; }
.estimate .field label { color: #6b6156; }
.estimate .field input, .estimate .field select, .estimate .field textarea { background: var(--paper); border: 1px solid rgba(42,36,32,.22); color: var(--ink); }
.estimate .field input.is-invalid, .estimate .field select.is-invalid, .estimate .field textarea.is-invalid { border-color: #c0553a !important; box-shadow: 0 0 0 2px rgba(192,85,58,.2); }
.ticket-foot { border-top: 2px dashed rgba(42,36,32,.25); padding: 20px 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ticket-foot .hint { font-family: var(--font-mono); font-size: .78rem; color: #8a7e70; }

/* FOOTER */
footer { background: var(--ink); color: var(--paper); padding: 48px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 32px; margin-bottom: 32px; }
footer h4 { font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--weathered); margin-bottom: 12px; }
footer .brand { color: var(--paper); }
footer p, footer li { font-size: .92rem; color: #cfc6b8; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.foot-social { display: flex; gap: 14px; margin-top: 4px; margin-right: 200px; }
.foot-social a { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(242,236,224,.2); color: #cfc6b8; font-size: 1rem; transition: background .2s, color .2s, border-color .2s; text-decoration: none; }
.foot-social a:hover { background: var(--weathered); color: var(--bark); border-color: var(--weathered); }
.foot-bottom { border-top: 1px solid rgba(242,236,224,.14); padding-top: 20px; font-size: .82rem; color: #8a8172; font-family: var(--font-mono); }

/* RESPONSIVE */
@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .nav-menu { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid rgba(42,36,32,.15); box-shadow: 0 12px 24px rgba(42,36,32,.08); flex-direction: column; align-items: stretch; padding: 20px 24px; gap: 18px; display: none; }
    .nav-menu.open { display: flex; }
    .nav-links { flex-direction: column; gap: 16px; }
    .nav-links a { font-size: 1.05rem; padding: 6px 0; }
    .hero-inner { grid-template-columns: 1fr; }
    .svc-grid { grid-template-columns: repeat(2,1fr); }
    .gallery-grid { grid-template-columns: repeat(2,1fr); }
    .review-layout { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .foot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .svc-grid, .gallery-grid { grid-template-columns: 1fr; }
    .hero-stats { flex-wrap: wrap; }
}
