/* ==========================================================================
   Cabinet Care of Oregon — Design Sweep ROUND 2
   Section identity, richer hero, deeper polish — and the round-1 hover
   defect is fixed (see the reveal rules at the bottom).

   This sheet is a COMPLETE replacement for design-sweep.css: it carries
   every round-1 rule forward, so applying round 2 is just swapping the
   stylesheet link in <head> from design-sweep.css to
   design-sweep-round2.css. reveal.js is unchanged.

   Fonts (already in <head>): Fraunces (display serif) + Inter (body).
   ========================================================================== */

:root {
    /* Color — refined, same family as the original tokens */
    --navy: #0d2133;            /* was #0f2537 — deeper, richer */
    --navy-dark: #081826;       /* was #091824 */
    --ink: #071524;             /* new: deepest navy, footer + hero base */
    --amber: #a8651a;           /* was #c97a24 — white text on it is ~4.6:1 (was ~3.4:1) */
    --amber-hover: #8f5514;     /* was #b16516 */
    --amber-bright: #d98a2b;    /* decorative accent only, never small text */
    --gold: #d9a441;            /* brass accent for rules, stars, checks */
    --gold-deep: #b98a2e;       /* new: deeper brass for gradients */
    --forest: #234a2a;          /* was #285127 — deeper green */
    --cream: #f7f4ee;           /* was #f8f6f2 — a touch warmer */
    --cream-deep: #f3eee1;      /* new: deeper warm tint for section bands */
    --white: #ffffff;
    --text: #1c2733;            /* was #1f2937 */
    --muted: #55606e;           /* was #5b6472 */
    --border: #e7e2d8;          /* was #e5e7eb — warmer, matches cream */
    --radius: 14px;             /* was 12px */
    --shadow: 0 12px 28px rgba(13, 33, 51, 0.10);
    --shadow-lg: 0 22px 44px rgba(13, 33, 51, 0.16);

    /* Type */
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Motion */
    --ease-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
}

/* --- Typography: fluid scale, tighter headings -------------------------- */
html {
    font-family: var(--font-body);
    line-height: 1.65;
}

h1, h2, h3,
.section-title h2,
.about-box h2,
.card h3,
.door-banner h3 {
    font-family: var(--font-display);
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.hero h1 {
    font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem);
    line-height: 1.06;
    font-weight: 700;
}

/* Gradient brass rule under the hero headline — pure CSS, no HTML change. */
.hero h1::after {
    content: "";
    display: block;
    width: 72px;
    height: 4px;
    margin-top: 18px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold), var(--amber-bright));
}

.hero p {
    font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.15rem);
}

.section-title h2 {
    font-size: clamp(1.65rem, 1.2rem + 1.6vw, 2.25rem);
    line-height: 1.15;
}

/* Small brass rule above every section title — section identity, no HTML. */
.section-title::before {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin: 0 auto 16px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold), var(--amber-bright));
}

.section-title p {
    font-size: 1.05rem;
    max-width: 62ch;
    margin-left: auto;
    margin-right: auto;
}

.about-box h2 {
    font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.9rem);
    line-height: 1.2;
}

h3 {
    font-size: 1.18rem;
    line-height: 1.3;
}

/* Optional eyebrow label above a section title — styled now so it renders
   the moment the HTML is added:
   <span class="section-eyebrow">Our Services</span> */
.section-eyebrow {
    display: block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 10px;
}

/* --- Spacing: one scale, more air -------------------------------------- */
section {
    padding: clamp(56px, 7vw, 88px) 0;
    scroll-margin-top: 84px; /* sticky header offset for anchor jumps */
}

.section-title {
    margin-bottom: 40px;
}

.container {
    max-width: 1180px;
}

/* --- Header: shadow deepens once you scroll (JS adds .scrolled) -------- */
header {
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

header.scrolled {
    box-shadow: 0 8px 24px rgba(13, 33, 51, 0.14);
    background: linear-gradient(180deg, #ffffff, #fdfbf7);
}

/* Nav links: brass underline sweeps in on hover. */
.nav-links a {
    position: relative;
    transition: color 0.25s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease-spring);
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-links a:hover {
    color: var(--amber);
}

/* --- Hero: richer gradient, warm glow, dot texture, glass card --------- */
.hero {
    background: linear-gradient(140deg, #071524 0%, var(--navy) 55%, #17384f 100%);
    position: relative;
    overflow: hidden;
    padding: clamp(52px, 6vw, 84px) 0 clamp(60px, 7vw, 92px);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(720px 320px at 85% -10%, rgba(217, 164, 65, 0.30), transparent 60%),
        radial-gradient(560px 300px at -10% 110%, rgba(35, 74, 42, 0.5), transparent 60%),
        radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1.4px);
    background-size: auto, auto, 26px 26px;
    pointer-events: none;
}

.hero > .container {
    position: relative;
}

.hero-bullets li {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    padding: 6px 14px 6px 10px;
}

.hero-bullets li::before {
    color: var(--gold);
}

.hero-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(217, 164, 65, 0.35);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 18px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.5s var(--ease-spring), box-shadow 0.5s ease;
}

.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 0 1px rgba(217, 164, 65, 0.45), 0 26px 48px rgba(0, 0, 0, 0.32);
}

.hero-card img {
    transition: transform 0.8s var(--ease-spring);
}

.hero-card:hover img {
    transform: scale(1.04);
}

/* --- Trust bar: dark strip with gold checks ---------------------------- */
.trust-bar {
    background: var(--ink);
    border-top: 1px solid rgba(217, 164, 65, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #dbe4ec;
    padding: 16px 0;
}

.trust-grid > div {
    font-size: 0.95rem; color: #dbe4ec;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.trust-grid > div::first-letter {
    color: var(--gold);
}

/* --- Buttons: gradient amber, shine sweep, lift, press ----------------- */
.btn {
    transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease, background 0.25s ease;
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--amber-bright);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, #c07a20, var(--amber) 55%, var(--amber-hover));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 16px rgba(168, 101, 26, 0.30);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.btn-primary:hover::after {
    left: 130%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 22px rgba(168, 101, 26, 0.45);
}

.btn-secondary {
    border: 2px solid var(--gold);
    color: var(--navy);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: #fdf6e3;
    border-color: var(--gold-deep);
}

/* --- Service cards: gradient top bar, lift, image zoom ----------------- */
#services {
    background: #fbf9f4;
}

.card {
    position: relative;
    overflow: hidden;
    transition: transform 0.45s var(--ease-spring), box-shadow 0.45s ease, border-color 0.3s ease;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--amber-bright), var(--gold-deep));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease-spring);
    z-index: 2;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #d8cdb8;
}

.card-img {
    transition: transform 0.7s var(--ease-spring);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-link {
    color: var(--amber);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.25s ease, color 0.25s ease;
}

.card-link:hover {
    color: var(--amber-hover);
    border-bottom-color: var(--gold);
}

/* --- Process: brass step discs, lift on hover -------------------------- */
.process-step {
    transition: transform 0.45s var(--ease-spring), box-shadow 0.45s ease;
    border-radius: var(--radius);
    padding: 20px 16px;
}

.process-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    background: #fffdf8;
}

.step-num {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(185, 138, 46, 0.4);
}

/* --- Gallery: warmer band, deeper zoom, serif captions ----------------- */
#gallery {
    background: var(--cream);
}

.gallery-item {
    transition: transform 0.45s var(--ease-spring), box-shadow 0.45s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    transition: transform 0.7s var(--ease-spring);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Wide before/after tile (added with the photo swap) — natural height so
   the split image is never cropped. */
.gallery-item--wide img {
    height: auto;
}

.gallery-caption {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

/* --- Door banner: warm tint + brass edge ------------------------------- */
.door-banner {
    border: 1px solid #e3d3ac;
    border-left: 4px solid var(--gold);
    background: linear-gradient(120deg, #fdf6e3, #f7f4ee 65%, #f3eee1);
    box-shadow: var(--shadow);
}

/* --- About & testimonials: serif quotes, brass stars, gold panel ------- */
.about-box {
    box-shadow: var(--shadow);
}

.testimonial-card {
    background: #fdf8ec;
    border-left: 4px solid var(--gold);
}

.testimonial-card p {
    font-family: var(--font-display);
    font-size: 1.06rem;
    line-height: 1.55;
}

.testimonial-author {
    font-weight: 700;
    color: var(--navy);
}

.stars {
    color: var(--gold);
    letter-spacing: 0.12em;
}

/* --- FAQ: open state gets emphasis ------------------------------------- */
details {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

details[open] {
    border-color: #d8cdb8;
    box-shadow: var(--shadow);
    background: #fffdf8;
}

summary {
    cursor: pointer;
    font-weight: 650;
}

/* --- Estimate form section: deeper gradient, warmer inputs ------------- */
.form-section {
    background: linear-gradient(160deg, var(--navy-dark), var(--navy) 60%, #14334a);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--amber-bright);
    outline: 2px solid rgba(217, 138, 43, 0.5);
    outline-offset: 1px;
    box-shadow: 0 0 0 4px rgba(217, 138, 43, 0.15);
    background: #fffdf6;
}

.form-note {
    color: #c9d4de;
}

/* --- Footer: deep ink, brass accents ----------------------------------- */
footer {
    background: var(--ink);
    color: #b8c6d2;
    border-top: 3px solid var(--gold);
    padding: 48px 0 40px;
}

footer a {
    color: #e8d9b0;
    transition: color 0.25s ease;
}

footer a:hover {
    color: var(--gold);
}

footer strong,
footer b {
    color: #ffffff;
}

/* --- Mobile sticky call bar: frosted, softer shadow -------------------- */
.mobile-sticky-bar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -6px 20px rgba(13, 33, 51, 0.14);
}

/* --- Scroll reveal (JS adds .reveal + .visible; see reveal.js) ---------
   ROUND 2 FIX — the round-1 defect: `.reveal.visible { transform: none }`
   overrode the hover `transform: translateY(...)` rules at equal
   specificity, so cards never lifted on hover (measured 0 px). The reveal
   now animates the standalone `translate` property instead, leaving
   `transform` free for hovers. `translate` and `transform` compose, so a
   revealed card still lifts on hover. Supported in all modern browsers.
   2026-11-28 FIX (clouded-text report): the 0.7 s fade + up to 320 ms
   stagger left the third explainer card ("Hardware Contrast") washed-out
   and unreadable for ~1 s after scrolling to it. The fade is now 0.3 s
   with a smaller 10 px rise, and reveal.js no longer staggers siblings —
   cards reveal together, promptly. */
.reveal {
    opacity: 0;
    translate: 0 10px;
    transition: opacity 0.3s ease, translate 0.3s var(--ease-spring);
}

.reveal.visible {
    opacity: 1;
    translate: 0 0;
}

/* --- Small screens: roomier touch targets, stacked CTAs ---------------- */
@media (max-width: 640px) {
    .hero h1 {
        font-size: clamp(2rem, 8.5vw, 2.4rem);
    }

    .hero-ctas .btn {
        width: 100%;
        text-align: center;
    }

    .hero-bullets li {
        display: inline-block;
        margin-bottom: 6px;
    }

    .nav-links a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .trust-grid > div {
        font-size: 0.88rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        translate: 0 0;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }

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