/* ==========================================================================
   Clips Landscaping — public landing page
   Design direction: "Cut & Canopy"

   Standalone. Shares nothing with static/style.css (the admin/portal system)
   and loads no framework — all layout here is hand-written grid/flex.

   §1  Tokens
   §2  Reset & base
   §3  Type scale
   §4  Buttons
   §5  Nav
   §6  Hero
   §7  Services (bento)
   §8  Gallery
   §9  Reviews
   §10 Quote
   §11 Footer
   §12 Flash messages
   §13 Responsive
   §14 Reduced motion
   ========================================================================== */

/* §1 ── Tokens ─────────────────────────────────────────────────────────── */
:root {
    /* Palette: a lawn is a dark canopy over bright new growth. */
    --canvas:       #f4f6ee;   /* warm off-white, faint grass cast */
    --canvas-deep:  #e9eddf;   /* alternating band */
    --ink:          #12190f;   /* near-black, green undertone */
    --canopy:       #14532d;   /* deep forest — brand continuity with the admin app */
    --canopy-deep:  #0d3a1f;   /* footer, pressed states */
    --clipping:     #c7e356;   /* fresh-cut chartreuse — the accent */
    --stone:        #5c6459;   /* secondary text on light — 5.7:1 on canvas,
                                  5.2:1 on canvas-deep, 6.1:1 on white */
    --line:         rgba(18, 25, 15, 0.10);
    --line-strong:  rgba(18, 25, 15, 0.16);

    /* Secondary text on the dark panels. Two steps only — every muted colour
       on canopy/canopy-deep uses one of these so the ratios can't drift.
       On --canopy: 6.7:1 and 5.2:1. On --canopy-deep: 7.8:1 and 6.3:1. */
    --on-dark-2:    rgba(255, 255, 255, 0.82);   /* body copy */
    --on-dark-3:    rgba(255, 255, 255, 0.68);   /* labels, eyebrows, fine print */

    --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono:    'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --r-sm:  10px;
    --r-md:  16px;
    --r-lg:  24px;
    --r-xl:  32px;
    --r-pill: 999px;

    --shell:   1180px;   /* outer container */
    --measure:  680px;   /* readable text column */

    --band:   clamp(4.5rem, 9vw, 7.5rem);   /* vertical rhythm between sections */
    --gutter: clamp(1.25rem, 4vw, 2.5rem);

    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* §2 ── Reset & base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    /* Anchored sections must clear the fixed nav. */
    scroll-padding-top: 6.5rem;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;   /* full-bleed bands must never widen the page */
}

img { max-width: 100%; display: block; }

a { color: inherit; }

/* One focus treatment, everywhere. */
:where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--clipping);
    outline-offset: 3px;
    border-radius: 4px;
}

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.band { padding-block: var(--band); }
.band--deep { background: var(--canvas-deep); }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* §3 ── Type scale ─────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.05;
    margin: 0;
    text-wrap: balance;
}

.t-display {
    font-size: clamp(2.75rem, 6vw, 4.75rem);
}

.t-section {
    font-size: clamp(2rem, 4vw, 3rem);
}

.t-sub {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Eyebrows and data read as instrument readings, not decoration. */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stone);
    margin: 0 0 1rem;
}

.lede {
    font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
    color: var(--stone);
    max-width: var(--measure);
    margin: 1.25rem 0 0;
    text-wrap: pretty;
}

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head .lede { margin-top: 0.875rem; }

/* §4 ── Buttons ────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9375rem 1.75rem;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 150ms var(--ease), background-color 150ms var(--ease),
                border-color 150ms var(--ease), color 150ms var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
    background: var(--canopy);
    color: #fff;
}
.btn--primary:hover { background: var(--canopy-deep); }

.btn--accent {
    background: var(--clipping);
    color: var(--ink);
}
.btn--accent:hover { background: #d3ec6d; }

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); background: rgba(18, 25, 15, 0.04); }

.btn--sm { padding: 0.625rem 1.25rem; font-size: 0.875rem; }

/* §5 ── Nav ────────────────────────────────────────────────────────────── */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding-block: 1rem;
    transition: background-color 250ms var(--ease), box-shadow 250ms var(--ease),
                padding 250ms var(--ease);
}
/* .is-stuck is toggled from the page's inline scroll handler */
.nav.is-stuck {
    padding-block: 0.625rem;
    background: rgba(244, 246, 238, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(18, 25, 15, 0.06);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.nav__logo { display: flex; align-items: center; flex-shrink: 0; }
.nav__logo img { height: 40px; width: auto; }

.nav__links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__links a:not(.btn) {
    display: inline-block;
    padding: 0.5rem 0.875rem;
    border-radius: var(--r-pill);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    transition: background-color 150ms var(--ease);
}
.nav__links a:not(.btn):hover { background: rgba(18, 25, 15, 0.06); }

.nav__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    color: var(--ink);
    cursor: pointer;
}

/* §6 ── Hero ───────────────────────────────────────────────────────────── */
.hero {
    padding-top: clamp(8rem, 16vw, 11rem);
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
}

.hero__title {
    margin-inline: auto;
    max-width: 15ch;
    /* Overrides the `balance` set on all headings: balance splits this line as
       "A lawn you'll / love living on.", ending on a dangling auxiliary.
       Greedy wrapping breaks after "love", which reads far better — and that is
       exactly what browsers without `pretty` fall back to. */
    text-wrap: pretty;
}

.hero__lede {
    margin-inline: auto;
    margin-top: 1.5rem;
    max-width: 46ch;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.25rem;
}

.hero__note {
    margin-top: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stone);
}

/* Full-bleed rounded photo band under the headline. */
.hero__media {
    max-width: 1320px;
    margin: clamp(2.5rem, 5vw, 4rem) auto 0;
    padding-inline: var(--gutter);
}
.hero__media img {
    width: 100%;
    height: clamp(260px, 45vw, 560px);
    object-fit: cover;
    border-radius: var(--r-xl);
}

/* §7 ── Services (bento) ───────────────────────────────────────────────── */
.bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.tile {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: #fff;
    overflow: hidden;
    transition: transform 200ms var(--ease), border-color 200ms var(--ease);
}
.tile:hover { transform: translateY(-3px); border-color: var(--line-strong); }

/* Base element styles come before the variants. `.tile p` and `.tile--statement p`
   have equal specificity, so if these sat below the variant block they would
   silently win and paint --stone onto the dark statement tile. */
.tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1.125rem;
    border-radius: 12px;
    background: var(--canvas-deep);
    color: var(--canopy);
}
.tile__icon svg { width: 22px; height: 22px; }

.tile h3 { font-size: 1.1875rem; margin-bottom: 0.5rem; }

.tile p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--stone);
    line-height: 1.6;
}

/* Two photo-led tiles carry the section; the rest stay quiet. */
.tile--feature {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
}
.tile--feature img {
    width: 100%;
    height: clamp(200px, 24vw, 280px);
    object-fit: cover;
}
.tile--feature .tile__body { padding: 1.75rem; }

/* The statement tile balances the photo tile without a second photo. */
.tile--statement {
    background: var(--canopy);
    border-color: var(--canopy);
    color: #fff;
    justify-content: center;
}
.tile--statement .tile__body { padding: clamp(1.75rem, 3vw, 2.5rem); }
.tile--statement .eyebrow { color: var(--clipping); margin-bottom: 0.75rem; }
.tile--statement h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); margin-bottom: 0.875rem; }
.tile--statement p { color: var(--on-dark-2); }

.tile--compact {
    grid-column: span 2;
    padding: 1.75rem;
}

/* §8 ── Gallery ────────────────────────────────────────────────────────── */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.shot {
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--canvas-deep);
}
.shot img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
    transition: transform 500ms var(--ease);
}
.shot:hover img { transform: scale(1.04); }

/* Asymmetric: one tall anchor, then a run of squares.
   Declared after `.shot img` — equal specificity, so source order decides. */
.shot--wide { grid-column: span 2; grid-row: span 2; }
.shot--wide img { min-height: 100%; }

/* §9 ── Reviews ────────────────────────────────────────────────────────── */
.reviews {
    columns: 3;
    column-gap: 1rem;
}

.review {
    break-inside: avoid;
    margin: 0 0 1rem;
    padding: 1.75rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

/* The first review runs as a pull quote so the block has a focal point. */
.review--lead {
    background: var(--canopy);
    border-color: var(--canopy);
    color: #fff;
}
.review--lead .review__text {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    /* `.review__text` sets --ink directly, which beats the #fff inherited from
       .review--lead — without this the pull quote is near-black on canopy. */
    color: #fff;
}
.review--lead .review__where { color: var(--clipping); }
.review--lead .review__who { color: #fff; }

.review__where {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stone);
    margin: 0 0 0.875rem;
}

.review__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--ink);
}

.review__who {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    font-weight: 600;
}

/* §10 ── Quote ─────────────────────────────────────────────────────────── */
.quote-panel {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(2rem, 5vw, 4rem);
    padding: clamp(2rem, 5vw, 3.5rem);
    background: var(--canopy);
    color: #fff;
    border-radius: var(--r-xl);
}

.quote-panel h2 { color: #fff; }
.quote-panel .lede { color: var(--on-dark-2); }
.quote-panel .eyebrow { color: var(--clipping); }

.contact-list {
    list-style: none;
    margin: 2.5rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}
.contact-list dt {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--on-dark-3);
    margin-bottom: 0.25rem;
}
.contact-list dd { margin: 0; font-size: 1.0625rem; font-weight: 500; }
.contact-list a { color: #fff; text-decoration: none; }
.contact-list a:hover { color: var(--clipping); }

.quote-form {
    display: grid;
    gap: 1rem;
    align-content: start;
}
.quote-form .field--pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--on-dark-2);
    margin-bottom: 0.375rem;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.8125rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--r-sm);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--on-dark-3); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, 0.4); }

.field input:focus,
.field select:focus,
.field textarea:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--clipping);
}

.field textarea { resize: vertical; min-height: 88px; }

/* Native select popups render on white; keep the options readable. */
.field select option { background: var(--canopy); color: #fff; }

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.field--trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.quote-form .btn { margin-top: 0.5rem; justify-self: start; }

.form-note {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--on-dark-3);
}

/* §11 ── Footer ────────────────────────────────────────────────────────── */
.footer {
    background: var(--canopy-deep);
    color: var(--on-dark-2);
    padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
    font-size: 0.875rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 2.5rem;
}

.footer__brand img { height: 44px; width: auto; margin-bottom: 1rem; }
.footer__brand p { margin: 0; max-width: 30ch; line-height: 1.6; }

.footer h2 {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--on-dark-3);
    margin: 0 0 1rem;
}

.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.625rem; }
.footer a { color: var(--on-dark-2); text-decoration: none; }
.footer a:hover { color: var(--clipping); }

.footer__base {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: clamp(2.5rem, 5vw, 4rem);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8125rem;
    color: var(--on-dark-3);
}
.footer__base p { margin: 0; }

/* §12 ── Flash messages ────────────────────────────────────────────────── */
.flash-stack {
    position: fixed;
    z-index: 200;
    top: 5.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 2rem));
    display: grid;
    gap: 0.5rem;
}

.flash {
    padding: 0.9375rem 1.25rem;
    border-radius: var(--r-md);
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(18, 25, 15, 0.16);
}
.flash--success { background: var(--clipping); color: var(--ink); }
.flash--danger  { background: #fee2e2; color: #7f1d1d; }
.flash--info,
.flash--warning { background: #fff; color: var(--ink); border: 1px solid var(--line-strong); }

/* §13 ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .bento { grid-template-columns: repeat(4, 1fr); }
    .tile--feature { grid-column: span 4; }
    .tile--compact { grid-column: span 2; }

    .gallery { grid-template-columns: repeat(2, 1fr); }
    .shot--wide { grid-column: span 2; grid-row: auto; }
    .shot--wide img { min-height: 240px; }

    .reviews { columns: 2; }

    .quote-panel { grid-template-columns: 1fr; }

    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .nav__toggle { display: inline-flex; }

    /* Collapsed drawer, opened by toggling .is-open from the page script. */
    .nav__links {
        display: none;
        position: absolute;
        inset: calc(100% + 0.5rem) var(--gutter) auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 0.75rem;
        background: var(--canvas);
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        box-shadow: 0 12px 40px rgba(18, 25, 15, 0.12);
    }
    .nav__links.is-open { display: flex; }
    .nav__links a:not(.btn) { padding: 0.75rem 1rem; }
    .nav__links .btn { width: 100%; }

    .bento { grid-template-columns: 1fr; }
    .tile--feature,
    .tile--compact { grid-column: span 1; }

    .reviews { columns: 1; }

    .quote-form .field--pair { grid-template-columns: 1fr; }

    .hero__media img { border-radius: var(--r-lg); }
}

@media (max-width: 520px) {
    .gallery { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .hero__actions .btn { width: 100%; }
}

/* §14 ── Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
