/* ============================================================
   HH Flooring — Luxury Design System
   Ultra-premium, editorial, architectural aesthetic.
   Palette: warm ivory, pure white, rich charcoal, soft graphite,
   warm oak-gold accent. Serif display headings + Inter body.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
    --ivory:        #F7F5F2;   /* primary background */
    --white:        #FFFFFF;   /* secondary background */
    --charcoal:     #111111;   /* primary text / dark sections */
    --charcoal-soft:#1C1C1C;
    --graphite:     #555555;   /* secondary text */
    --graphite-light:#7A7A7A;
    --oak:          #B89968;   /* accent — warm oak gold */
    --oak-dark:     #9A7E52;
    --oak-light:    #CBB088;
    --line:         #E5E0D8;   /* hairline borders */
    --line-dark:    rgba(255,255,255,0.14);

    /* legacy aliases (kept so existing markup resolves to the luxury palette) */
    --primary-blue: var(--charcoal);
    --primary-blue-dark: #000000;
    --primary-blue-light: var(--graphite);
    --accent-wood: var(--oak);
    --accent-wood-dark: var(--oak-dark);
    --neutral-white: var(--white);
    --neutral-charcoal: var(--charcoal);
    --neutral-slate: var(--graphite);
    --neutral-dark: var(--charcoal);
    --neutral-gray: var(--ivory);
    --bg-subtle: var(--ivory);
    --border-light: var(--line);
    --text-primary: var(--charcoal);
    --text-secondary: var(--graphite);
    --btn-primary-bg: var(--charcoal);
    --btn-primary-hover: #000000;
    --btn-secondary-border: var(--oak);
    --btn-secondary-hover: var(--oak);
    --btn-secondary-text: var(--oak);
}

/* ---------- Base ---------- */
* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--ivory);
    color: var(--charcoal);
    font-weight: 400;
    line-height: 1.65;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    color: var(--charcoal);
    font-weight: 500;
    letter-spacing: 0.005em;
    line-height: 1.08;
}
h1 { font-weight: 500; }
h2 { font-weight: 500; }

p { font-family: 'Inter', sans-serif; }

/* small uppercase eyebrow label */
.eyebrow {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--oak);
    display: inline-block;
}
.eyebrow-light { color: var(--oak-light); }

.serif { font-family: 'Cormorant Garamond', Georgia, serif !important; }
.tracking-luxe { letter-spacing: 0.04em; }

/* ---------- Color utility classes (luxury) ---------- */
.text-primary, .text-charcoal, .text-slate, .text-neutral-charcoal { color: var(--charcoal) !important; }
.text-secondary, .text-graphite, .text-neutral-slate { color: var(--graphite) !important; }
.text-oak, .text-accent-wood, .text-wood, .text-primary-blue, .text-logo-blue { color: var(--oak) !important; }
.text-accent-wood-dark, .text-oak-dark { color: var(--oak-dark) !important; }
.text-wood-light { color: var(--oak-light) !important; }

.bg-ivory, .bg-neutral-warm-gray, .bg-neutral-off-white, .bg-subtle, .bg-gray-50 { background-color: var(--ivory) !important; }
.bg-white, .bg-neutral-white { background-color: var(--white) !important; }
.bg-charcoal, .bg-slate, .bg-neutral-charcoal, .bg-neutral-dark, .bg-primary-blue, .bg-primary-blue-dark, .bg-wood { background-color: var(--charcoal) !important; }
.bg-slate-light, .bg-neutral-slate { background-color: var(--graphite) !important; }
.bg-oak { background-color: var(--oak) !important; }

.border-light, .border-line { border-color: var(--line) !important; }

/* ---------- Geometry: crisp, architectural ---------- */
.rounded-lg { border-radius: 2px !important; }
.rounded { border-radius: 2px !important; }
.rounded-full { border-radius: 9999px !important; }
.rounded-xl, .rounded-2xl { border-radius: 3px !important; }

/* ============================================================
   Navigation — ultra-minimal, floats & frosts on scroll
   ============================================================ */
nav {
    background-color: rgba(247, 245, 242, 0.0);
    transition: background-color .5s ease, box-shadow .5s ease, backdrop-filter .5s ease;
    box-shadow: none !important;
}
nav.nav-scrolled {
    background-color: rgba(247, 245, 242, 0.82) !important;
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    box-shadow: 0 1px 0 var(--line) !important;
}
/* On interior pages the nav sits over light content — keep it readable from load */
nav.nav-solid {
    background-color: rgba(247, 245, 242, 0.82) !important;
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    box-shadow: 0 1px 0 var(--line) !important;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--charcoal);
    text-transform: uppercase;
    position: relative;
    transition: color .3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 1px;
    background: var(--oak);
    transition: width .35s ease;
}
.nav-link:hover { color: var(--oak); }
.nav-link:hover::after { width: 100%; }
.nav-link-active { color: var(--oak); }
.nav-link-active::after { width: 100%; }

/* nav rendered over a dark hero (homepage) */
.nav-over-hero .nav-link { color: rgba(255,255,255,0.88); }
.nav-over-hero .nav-link:hover, .nav-over-hero .nav-link-active { color: #fff; }
.nav-over-hero.nav-scrolled .nav-link { color: var(--charcoal); }
.nav-over-hero.nav-scrolled .nav-link:hover,
.nav-over-hero.nav-scrolled .nav-link-active { color: var(--oak); }

/* ---------- Logo sizing (unchanged behaviour) ---------- */
.logo { transition: all 0.3s ease; }
.logo:hover { transform: scale(1.04); }

@media (min-width: 1024px) {
    .navbar-extra-tall { height: 104px; }
    .navbar-logo-desktop { height: 64px; width: auto; }
}
@media (max-width: 1023px) {
    .navbar-extra-tall { height: 84px; }
    .navbar-logo-desktop { height: 52px; width: auto; }
}
.logo-container { display: flex; align-items: center; justify-content: flex-start; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; }
#mobile-menu { transition: all 0.3s ease-in-out; }

/* ============================================================
   Buttons — understated, elegant
   ============================================================ */
/* ONE unified button system — the homepage hero CTA is the global standard.
   Every button shares identical typography, sizing, padding, radius & hover. */
.btn-primary,
.btn-primary-light,
.btn-secondary,
.btn-ghost,
.btn-accent,
.btn-hero {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 1.15rem 2.7rem;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all .4s cubic-bezier(.22,.61,.36,1);
}

/* PRIMARY — oak filled (the homepage hero standard, used site-wide) */
.btn-primary,
.btn-primary-light,
.btn-accent {
    background-color: var(--oak);
    color: #fff;
    border: 1px solid var(--oak);
}
.btn-primary:hover,
.btn-primary-light:hover,
.btn-accent:hover {
    background-color: var(--oak-dark);
    border-color: var(--oak-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* SECONDARY — charcoal outline (on light backgrounds) */
.btn-secondary {
    background-color: transparent;
    color: var(--charcoal);
    border: 1px solid var(--charcoal);
}
.btn-secondary:hover {
    background-color: var(--charcoal);
    color: #fff;
    transform: translateY(-2px);
}

/* GHOST — light outline (on dark backgrounds) */
.btn-ghost {
    background-color: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.6);
}
.btn-ghost:hover {
    background-color: #fff;
    color: var(--charcoal);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Arrow micro-interaction on any primary CTA that contains an <svg> */
.btn-primary svg,
.btn-primary-light svg,
.btn-accent svg { transition: transform .4s cubic-bezier(.22,.61,.36,1); }
.btn-primary:hover svg,
.btn-primary-light:hover svg,
.btn-accent:hover svg { transform: translateX(5px); }

/* Mobile: tighten buttons so labels sit on one clean line (desktop unchanged) */
@media (max-width: 640px) {
    .btn-primary,
    .btn-primary-light,
    .btn-secondary,
    .btn-ghost,
    .btn-accent,
    .btn-hero {
        font-size: 0.72rem;
        letter-spacing: 0.1em;
        padding: 1.05rem 1.4rem;
        gap: 0.55rem;
        white-space: nowrap;
    }
    .btn-primary svg,
    .btn-primary-light svg,
    .btn-accent svg { width: 0.95rem; height: 0.95rem; flex: none; }
}

/* text link with arrow */
.link-arrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--oak);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: gap .3s ease, color .3s ease;
}
.link-arrow:hover { gap: .85rem; color: var(--oak-dark); }

/* ============================================================
   Sections, dividers, decorative
   ============================================================ */
.section-divider { width: 56px; height: 1px; background: var(--oak); }
.section-divider-center { margin-left: auto; margin-right: auto; }

.hairline-top { border-top: 1px solid var(--line); }
.hairline-bottom { border-bottom: 1px solid var(--line); }

/* ============================================================
   Cards — service / editorial
   ============================================================ */
.lux-card {
    background: var(--white);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform .5s cubic-bezier(.22,.61,.36,1), box-shadow .5s ease;
}
.lux-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px -28px rgba(17,17,17,0.35);
}
.lux-card img { transition: transform 1.1s cubic-bezier(.22,.61,.36,1); }
.lux-card:hover img { transform: scale(1.06); }

.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform 1.2s cubic-bezier(.22,.61,.36,1); }
.img-zoom:hover img { transform: scale(1.07); }

/* ============================================================
   Portfolio (existing markup) — refined hover
   ============================================================ */
.portfolio-item { transition: all 0.4s ease-in-out; }
.portfolio-item .relative { border: 1px solid var(--line); }
.portfolio-item h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    letter-spacing: 0.01em;
}
/* category badges -> restrained oak/charcoal tone */
.portfolio-item .bg-wood,
.portfolio-item .bg-amber-600,
.portfolio-item .bg-red-600,
.portfolio-item .bg-blue-600,
.portfolio-item .bg-green-600,
.portfolio-item span[class*="bg-"][class*="-600"] {
    background-color: var(--charcoal) !important;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500 !important;
}

/* filter buttons */
.filter-btn {
    font-family: 'Inter', sans-serif !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem !important;
    font-weight: 500 !important;
    border: 1px solid var(--line);
    background-color: transparent !important;
    color: var(--graphite) !important;
    border-radius: 2px !important;
    padding: 0.6rem 1.4rem !important;
    transition: all .3s ease;
}
.filter-btn:hover { color: var(--charcoal) !important; border-color: var(--charcoal); }
.filter-btn.active {
    background-color: var(--charcoal) !important;
    color: #fff !important;
    border-color: var(--charcoal) !important;
}

/* ============================================================
   Forms — minimal, refined
   ============================================================ */
.lux-input,
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: 2px;
    color: var(--charcoal);
    transition: border-color .3s ease, box-shadow .3s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--oak) !important;
    box-shadow: 0 0 0 3px rgba(184,153,104,0.12) !important;
}
label { font-family: 'Inter', sans-serif; }

/* ============================================================
   File upload (contact form photo upload)
   ============================================================ */
.upload-zone {
    border: 1px dashed var(--line);
    background: var(--ivory);
    border-radius: 2px;
    transition: border-color .3s ease, background-color .3s ease;
}
.upload-zone:hover { border-color: var(--oak); }
.upload-zone.dragover { border-color: var(--oak); background-color: rgba(184,153,104,0.07); }
.upload-icon { color: var(--oak); }

.file-chip {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--charcoal);
    background: var(--white);
    border: 1px solid var(--line);
    padding: 0.6rem 0.9rem;
    border-radius: 2px;
}
.file-chip .file-size { color: var(--graphite); font-size: 0.74rem; }
.file-remove {
    background: none;
    border: none;
    color: var(--graphite);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 0.25rem;
    cursor: pointer;
    flex: none;
    transition: color .2s ease;
}
.file-remove:hover { color: #b91c1c; }

/* ============================================================
   Motion — slow, expensive reveals
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.fade-in { animation: fadeUp 1s cubic-bezier(.22,.61,.36,1) forwards; }
.fade-in { animation: fadeUp 0.9s cubic-bezier(.22,.61,.36,1); }

@keyframes slowZoom {
    from { transform: scale(1.0); }
    to   { transform: scale(1.12); }
}
.hero-kenburns { animation: slowZoom 18s ease-out forwards; }

/* ============================================================
   Misc
   ============================================================ */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ivory); }
::-webkit-scrollbar-thumb { background: var(--oak); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--oak-dark); }

::selection { background: var(--oak); color: #fff; }

.loading {
    display: inline-block; width: 20px; height: 20px;
    border: 3px solid rgba(255,255,255,0.3); border-radius: 50%;
    border-top-color: #fff; animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media print {
    nav, footer, .btn-primary, .btn-secondary { display: none; }
    body { font-size: 12pt; line-height: 1.4; color: #000; background: #fff; }
}

.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;
}
.focus-visible:focus { outline: 2px solid var(--oak); outline-offset: 2px; }

/* ============================================================
   HOMEPAGE HERO — bespoke above-the-fold treatment
   Scoped to .nav-over-hero / .hero-* so interior pages are untouched.
   ============================================================ */

/* --- Logo: larger, more present, with breathing room --- */
.nav-over-hero .navbar-extra-tall { height: 128px; transition: height .45s ease; }
.nav-over-hero .navbar-logo-desktop {
    height: 94px;
    filter: brightness(0) invert(1);            /* white artwork over the dark hero */
    transition: filter .55s ease, height .45s ease;
}
.nav-over-hero.nav-scrolled .navbar-extra-tall { height: 100px; }
.nav-over-hero.nav-scrolled .navbar-logo-desktop {
    height: 70px;
    filter: none;                                /* charcoal once the bar frosts */
}
@media (max-width: 1023px) {
    .nav-over-hero .navbar-extra-tall { height: 92px; }
    .nav-over-hero .navbar-logo-desktop { height: 62px; }
    .nav-over-hero.nav-scrolled .navbar-logo-desktop { height: 56px; }
}

/* --- Nav CTA pill --- */
.nav-cta {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 500;
    padding: 0.72rem 1.6rem;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.55);
    color: #fff;
    transition: all .4s cubic-bezier(.22,.61,.36,1);
}
.nav-cta:hover { background: var(--oak); border-color: var(--oak); color: #fff; transform: translateY(-1px); }
.nav-over-hero.nav-scrolled .nav-cta { border-color: var(--charcoal); color: var(--charcoal); }
.nav-over-hero.nav-scrolled .nav-cta:hover { background: var(--oak); border-color: var(--oak); color: #fff; }

/* --- Mobile dropdown menu: solid, readable panel (fixes white-on-light over hero) --- */
#mobile-menu {
    background-color: var(--ivory) !important;
    box-shadow: 0 18px 34px -18px rgba(17,17,17,0.40);
}
#mobile-menu .nav-link {
    display: block;
    padding: 0.85rem 0;
    font-size: 0.9rem;
    color: var(--charcoal);
}
#mobile-menu .nav-link::after { display: none; }      /* no underline animation in the dropdown */
#mobile-menu .nav-link:hover,
#mobile-menu .nav-link-active { color: var(--oak); }
/* override the over-the-hero white text specifically inside the dropdown */
.nav-over-hero #mobile-menu .nav-link { color: var(--charcoal); }
.nav-over-hero #mobile-menu .nav-link:hover,
.nav-over-hero #mobile-menu .nav-link-active { color: var(--oak); }

/* --- Hero typography --- */
.hero-eyebrow {
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.42em;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
}
.hero-display {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(2.75rem, 6.2vw, 5.5rem);
    line-height: 1.04;
    letter-spacing: -0.005em;
}
.hero-display .accent { font-style: italic; color: var(--oak-light); }
.hero-sub { font-size: clamp(1.05rem, 1.35vw, 1.3rem); line-height: 1.7; }
/* Refined serif lede — gives the supporting copy character that ties to the headline */
.hero-lede {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.3vw, 1.3rem);
    line-height: 1.6;
    letter-spacing: 0.006em;
    color: rgba(255,255,255,0.86);
}
.hero-rule { display: inline-block; width: 70px; height: 1px; background: var(--oak); flex: none; }

/* --- Hero CTAs: larger, premium, with arrow micro-interaction --- */
.btn-hero { padding: 1.15rem 2.7rem; font-size: 0.8rem; letter-spacing: 0.18em; }
.btn-hero-primary { display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem; }
.btn-hero-primary svg { transition: transform .4s cubic-bezier(.22,.61,.36,1); }
.btn-hero-primary:hover svg { transform: translateX(5px); }

/* --- Trust bar --- */
.trust-item {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(255,255,255,0.82);
}
.trust-sep { width: 1px; height: 13px; background: rgba(255,255,255,0.3); flex: none; }

/* --- Refined scroll cue --- */
.scroll-cue {
    writing-mode: vertical-rl;
    letter-spacing: 0.32em;
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 500;
}
.scroll-line {
    width: 1px; height: 56px;
    background: rgba(255,255,255,0.28);
    position: relative; overflow: hidden;
}
.scroll-line::after {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 45%;
    background: var(--oak);
    animation: scrollDrop 2.6s cubic-bezier(.6,0,.4,1) infinite;
}
@keyframes scrollDrop {
    0% { transform: translateY(-120%); }
    60%, 100% { transform: translateY(340%); }
}

/* --- Editorial corner caption --- */
.hero-caption {
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}
