/* =====================================================================
   Belmont's Flooring: site styles
   Linked from index.php. Images are referenced relative to this file
   (../img/...). Colors and fonts are set at the top in :root.
   ===================================================================== */

/* =====================================================================
   DESIGN SETTINGS: colors and fonts (change the whole look here)
   Colors are sampled from the Belmont's logo.
   ===================================================================== */
:root {
    --ink:        #231f20;   /* logo black: main text */
    --slate:      #455560;   /* logo slate blue: buttons, links */
    --slate-dark: #34414a;
    --brown:      #5a4529;   /* logo brown */
    --rust:       #69321f;   /* logo red-brown */
    --red:        #8e2420;   /* product titles (as on the old site) */
    --paper:      #faf8f5;   /* warm off-white sections */
    --line:       #e6e1da;
    --muted:      #645e58;
    --footer:     #121011;
    --white:      #ffffff;

    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
    --sans:  system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --header-h: 84px;
    --wrap: 1140px;
    --radius: 3px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--slate); text-underline-offset: .18em; }
a:hover { color: var(--rust); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid #c58a3a; outline-offset: 3px; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
section[id], [id="about"], #care-maintenance { scroll-margin-top: var(--header-h); }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
    position: absolute; left: 1rem; top: -100px; z-index: 200;
    background: var(--ink); color: var(--white); padding: .6rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--white); }

/* Section heading: serif title with a thin rule, as on the old site */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--paper { background: var(--paper); }
.section-head { text-align: center; max-width: 46rem; margin: 0 auto clamp(2rem, 5vw, 3.25rem); }
.section-head h2 {
    font-size: clamp(1.75rem, 3.6vw, 2.5rem);
    color: var(--slate);
    padding-bottom: .55em;
    margin-bottom: .55em;
    border-bottom: 1px solid var(--line);
}
.section-head p { color: var(--muted); margin: 0; }
.eyebrow {
    display: block; font-family: var(--sans); font-size: .78rem; font-weight: 600;
    letter-spacing: .16em; text-transform: uppercase; color: var(--brown); margin-bottom: .6rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    font: 600 .95rem/1 var(--sans); letter-spacing: .03em;
    padding: .95em 1.6em; border-radius: var(--radius);
    border: 2px solid transparent; text-decoration: none; cursor: pointer;
    transition: background-color .25s var(--ease), color .25s var(--ease),
                border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--slate); color: var(--white); box-shadow: 0 2px 0 var(--slate-dark); }
.btn--primary:hover { background: var(--slate-dark); color: var(--white); box-shadow: 0 8px 18px -8px rgba(35, 31, 32, .55); }
.btn--small { padding: .7em 1.15em; font-size: .85rem; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* =====================================================================
   HEADER (sticky)
   ===================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .3s var(--ease);
}
@supports (backdrop-filter: blur(8px)) {
    .site-header { background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); }
}
.site-header.is-scrolled { box-shadow: 0 6px 20px -12px rgba(35, 31, 32, .45); }
.header-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    height: var(--header-h); transition: height .3s var(--ease);
}
.site-header.is-scrolled .header-inner { height: 68px; }
.brand img { width: 200px; height: auto; transition: width .3s var(--ease); }
.site-header.is-scrolled .brand img { width: 170px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.site-nav a {
    display: block; padding: .5rem .9rem; font-size: .9rem; letter-spacing: .03em;
    color: var(--ink); text-decoration: none; position: relative;
}
.site-nav li + li a::before {             /* thin dividers, as on the old menu */
    content: ""; position: absolute; left: 0; top: 50%; height: 1em; transform: translateY(-50%);
    border-left: 1px solid var(--line);
}
.site-nav a::after {                      /* underline for hover and the current section */
    content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .2rem; height: 2px;
    background: var(--rust); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }
.site-nav a.is-active { color: var(--slate); }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-phone {
    font-weight: 600; font-size: .95rem; color: var(--slate); text-decoration: none; white-space: nowrap;
    display: inline-flex; align-items: center; gap: .4em;
}
.header-phone svg { width: 18px; height: 18px; }
.nav-toggle {
    display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 1060px) {
    .header-phone span { display: none; }
    .header-phone { width: 42px; height: 42px; justify-content: center; border: 1px solid var(--line); border-radius: 50%; }
}
@media (max-width: 900px) {
    :root { --header-h: 70px; }
    .brand img { width: 156px; }
    .site-header.is-scrolled .header-inner { height: 62px; }
    .site-header.is-scrolled .brand img { width: 140px; }
    .nav-toggle { display: inline-flex; }
    .header-actions .btn { display: none; }
    .site-nav {
        position: absolute; left: 0; right: 0; top: 100%;
        background: var(--white); border-bottom: 1px solid var(--line);
        box-shadow: 0 14px 24px -16px rgba(35, 31, 32, .5);
        max-height: 0; overflow: hidden; visibility: hidden;
        transition: max-height .35s var(--ease), visibility .35s;
    }
    .site-nav.is-open { max-height: 24rem; visibility: visible; }
    .site-nav ul { flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1.25rem; }
    .site-nav a { padding: .85rem .25rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
    .site-nav li + li a::before { display: none; }
    .site-nav a::after { left: .25rem; right: auto; width: 2.5rem; bottom: -1px; }
    .site-nav .nav-cta { display: block; margin-top: 1rem; }
    .site-nav .nav-cta a { border: 0; text-align: center; color: var(--white); }
    .site-nav .nav-cta a::after { display: none; }
}
@media (min-width: 901px) { .site-nav .nav-cta { display: none; } }

/* =====================================================================
   WELCOME (hero + Our Commitment)
   ===================================================================== */
.hero {
    position: relative; color: var(--white); text-align: center;
    min-height: 450px;   /* matches the 1920 x 450 wood image */
    display: grid; place-items: center;
    background: #3b2a1b url("../img/hero-wood.jpg") center / cover no-repeat;
}
.hero::before {                           /* gradient so white text reads cleanly on the wood */
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, rgba(20, 14, 9, .38) 0%, rgba(20, 14, 9, .12) 70%, rgba(20, 14, 9, .2) 100%);
}
.hero-inner { position: relative; padding: 3rem 0; }
@media (max-width: 600px) { .hero { min-height: 380px; } }
.hero h1 {
    font-size: clamp(2.4rem, 6.4vw, 4.4rem);
    letter-spacing: .01em; margin-bottom: .3em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}
.hero h1 small {
    display: block; font-family: var(--sans); font-size: .3em; font-weight: 600;
    letter-spacing: .3em; text-transform: uppercase; margin-bottom: .9em; opacity: .9;
}
.hero-tagline {
    font-family: var(--serif); font-style: italic;
    font-size: clamp(1.15rem, 2.3vw, 1.5rem); margin-bottom: 0;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}
.hero-since {
    display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
    border-top: 1px solid rgba(255, 255, 255, .5); padding-top: .9rem; margin-top: 2rem; opacity: .9;
}

.commitment { padding: clamp(3rem, 7vw, 5rem) 0; background: var(--white); }
.commitment h2 { text-align: center; color: var(--slate); font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 1.75rem; }
.commitment ul {
    list-style: none; margin: 0 auto; padding: 0; max-width: 62rem;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 3rem;
}
.commitment li {
    position: relative; padding-left: 1.6rem;
    font-family: var(--sans); font-size: 1.02rem; line-height: 1.6; color: #3a3436;
}
.commitment li::before {
    content: ""; position: absolute; left: 0; top: .5em; width: .6rem; height: .6rem;
    background: var(--slate); box-shadow: 3px 3px 0 var(--brown);
}
@media (max-width: 760px) { .commitment ul { grid-template-columns: 1fr; } }

/* =====================================================================
   PRODUCTS
   ===================================================================== */
.products-grid {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem;
}
.product-card {
    flex: 1 1 190px; max-width: 220px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 1rem 1rem 0;
    scroll-margin-top: calc(var(--header-h) + 1rem);
}
.product-card img { width: 125px; height: 125px; object-fit: cover; margin-bottom: 1.1rem; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .55); }
.product-card h3 { color: var(--red); font-size: 1.4rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .1em; }
.product-card .product-sub { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.product-card .product-items { font-size: .95rem; line-height: 1.55; color: #46403b; margin-bottom: 0; }
.product-card h3 + .product-items { margin-top: .5rem; }
@media (max-width: 520px) {
    .products-grid { gap: .9rem; }
    .product-card { max-width: none; flex: 0 1 calc(50% - .45rem); padding: .75rem .5rem 0; }
    .product-card img { width: 96px; height: 96px; }
    .product-card h3 { font-size: 1.15rem; }
    .product-card .product-items { font-size: .88rem; }
}

/* =====================================================================
   OUR WORK
   ===================================================================== */
.work-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem;
}
@media (max-width: 900px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .work-grid { grid-template-columns: 1fr; } }
.work-grid figure { margin: 0; }
.work-open {
    display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
    position: relative; overflow: hidden; border-radius: var(--radius);
}
.work-open img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s var(--ease); }
.work-open:hover img { transform: scale(1.05); }
.work-open::after {
    content: "View larger"; position: absolute; left: 0; right: 0; bottom: 0;
    padding: .65rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--white); background: linear-gradient(transparent, rgba(0, 0, 0, .6));
    opacity: 0; transition: opacity .3s var(--ease);
}
.work-open:hover::after, .work-open:focus-visible::after { opacity: 1; }

/* Lightbox */
.lightbox {
    border: 0; padding: 0; background: transparent; max-width: min(94vw, 1100px); max-height: 92vh; overflow: visible;
}
.lightbox::backdrop { background: rgba(12, 10, 10, .88); }
.lightbox figure { margin: 0; }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: var(--radius); }
.lightbox figcaption { color: #eee; text-align: center; padding-top: .75rem; font-size: .95rem; }
.lightbox figcaption:empty { display: none; }
.lb-btn {
    position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 1.6rem; line-height: 1;
    display: grid; place-items: center; transition: background-color .2s, transform .2s;
}
.lb-btn:hover { background: var(--white); transform: scale(1.06); }
.lb-close { top: -16px; right: -16px; }
.lb-prev { left: -23px; top: 40%; }
.lb-next { right: -23px; top: 40%; }
@media (max-width: 640px) {
    .lb-close { top: -56px; right: 0; }
    .lb-prev { left: 4px; }
    .lb-next { right: 4px; }
}

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form-status {
    display: flex; gap: .8rem; align-items: flex-start;
    padding: 1rem 1.15rem; margin-bottom: 1.5rem; border-radius: var(--radius); border: 1px solid;
    font-size: 1rem; animation: status-in .45s var(--ease);
}
.form-status:focus { outline: none; }
.form-status svg { flex: 0 0 22px; width: 22px; height: 22px; margin-top: .1rem; }
.form-status p { margin: 0; }
.form-status--success { background: #edf6ee; border-color: #9cc9a3; color: #1e5129; }
.form-status--error { background: #fbeeec; border-color: #e0a59d; color: #7c2016; }
@keyframes status-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
@media (max-width: 560px) { .contact-form .row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
    padding: .75rem .85rem; background: var(--white);
    border: 1px solid #cfc8bf; border-radius: var(--radius);
    transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 9.5rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #a99f93; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px rgba(69, 85, 96, .2);
}
.field [aria-invalid="true"] { border-color: #b8372b; background: #fffafa; }
.field-error { color: #9a2a1f; font-size: .85rem; margin: .35rem 0 0; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.recaptcha-note { font-size: .78rem; color: var(--muted); margin: 0; flex: 1 1 16rem; }
.recaptcha-note a { color: inherit; }
.grecaptcha-badge { visibility: hidden; }   /* allowed because the note above is shown */

.contact-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.75rem; font-size: 1rem;
}
.contact-card h3 { font-size: 1.35rem; color: var(--slate); }
.contact-list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.contact-list li { display: flex; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: .25rem; color: var(--brown); }
.contact-list .label { display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-card .call-note { font-family: var(--serif); font-style: italic; font-size: 1.1rem; margin: 0; }

/* =====================================================================
   FOOTER (black pinstripe, as on the old site)
   ===================================================================== */
.site-footer {
    color: #bdb6ae; font-size: .95rem;
    background-color: var(--footer);
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 5px);
}
.footer-grid {
    display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 2.5rem;
    padding: clamp(3rem, 7vw, 4.5rem) 0;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.site-footer h2 {
    font-family: var(--sans); font-size: .82rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--white); display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem;
}
.site-footer h2::after { content: ""; flex: 1; border-top: 1px dotted rgba(255, 255, 255, .25); }
.site-footer a { color: #e2dcd5; text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-tagline { font-family: var(--serif); font-style: italic; color: #e2dcd5; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: .22rem 0; }
.footer-links li::before { content: "\203A"; color: #8a8178; margin-right: .55rem; }
.footer-links .sub { padding-left: 1.1rem; }
.footer-links .pdf { font-size: .72rem; letter-spacing: .08em; color: #8a8178; margin-left: .35rem; }
.footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-contact li { display: flex; gap: .7rem; padding: .3rem 0; }
.footer-contact svg { flex: 0 0 16px; width: 16px; height: 16px; margin-top: .3rem; color: #8a8178; }
.footer-bottom { background: rgba(0, 0, 0, .45); font-size: .82rem; color: #8a8178; }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 2rem; padding: 1.1rem 0; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #b6aea5; }
.to-top {
    width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25); color: #e2dcd5 !important;
    transition: background-color .2s, transform .2s;
}
.to-top:hover { background: rgba(255, 255, 255, .1); transform: translateY(-2px); text-decoration: none !important; }
.to-top svg { width: 16px; height: 16px; }

/* Gentle fade-in as sections scroll into view (only when JavaScript runs) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
