/* =====================================================================
   EliteCraft Cabinets — site styles
   Colours --green and --dark are injected per-page from the CMS.
   ===================================================================== */

:root {
    --green: #7ba23f;
    --dark: #1a1a1a;
    --text: #333333;
    --muted: #7a7a7a;
    --light: #f5f5f4;
    --light-2: #efefee;
    --border: #e6e6e4;
    --white: #ffffff;
    --container: 1160px;
    --radius: 4px;
    --shadow: 0 12px 30px rgba(0, 0, 0, .08);
    --head: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--body);
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--head); margin: 0; color: var(--dark); line-height: 1.15; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--head);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 14px 26px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, filter .15s ease, background .15s ease, color .15s ease;
    line-height: 1;
}
.btn:hover { transform: translateY(-2px); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { filter: brightness(.92); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-outline:hover { background: #fff; color: var(--dark); border-color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { filter: brightness(1.25); }

/* ---------- brand / logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand--img { gap: 0; }
.brand-img { height: 50px; width: auto; display: block; transition: height .3s ease; }
.site-header.scrolled .brand-img { height: 40px; }
.site-footer .brand-img { height: 56px; }
.brand-mark { width: 46px; height: 46px; flex: 0 0 auto; }
.brand-mark svg { width: 100%; height: 100%; }
.mark-ring-bg { fill: transparent; }
.mark-arc-green { stroke: var(--green); }
.mark-arc-dark { stroke: var(--dark); }
.mark-text { font-family: var(--head); font-weight: 800; font-size: 20px; fill: var(--dark); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--head); font-weight: 800; font-size: 21px; letter-spacing: .5px; }
.brand-dark { color: var(--dark); }
.brand-green { color: var(--green); }
.brand-sub { font-family: var(--head); font-weight: 500; font-size: 9.5px; letter-spacing: 5px; color: var(--muted); margin-top: 4px; }

/* footer variant on light bg keeps same colours */
.site-footer .brand-sub { color: var(--muted); }

/* ---------- header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav > a {
    font-family: var(--head);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--dark);
    padding: 6px 0;
    position: relative;
    transition: color .15s ease;
}
.main-nav > a:not(.btn):hover { color: var(--green); }
.main-nav > a.active:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--green);
}
/* ---------- header CTA button ---------- */
.nav-cta {
    position: relative;
    overflow: hidden;
    padding: 11px 27px;
    margin-left: 10px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1px;
    gap: 9px;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 78%, #000));
    box-shadow: 0 7px 18px rgba(123, 162, 63, .32), inset 0 1px 0 rgba(255, 255, 255, .22);   /* fallback */
    box-shadow: 0 7px 18px color-mix(in srgb, var(--green) 36%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .2s ease, box-shadow .25s ease, filter .2s ease, padding .3s ease;
}
/* trim slightly once the header shrinks on scroll */
.site-header.scrolled .nav-cta { padding: 11px 27px; }
/* moving sheen */
.nav-cta::before {
    content: "";
    position: absolute;
    top: 0; left: -130%;
    width: 55%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .38), transparent);
    transform: skewX(-22deg);
    transition: left .6s ease;
    pointer-events: none;
}
.nav-cta:hover::before { left: 150%; }
.nav-cta .icon { width: 15px; height: 15px; transition: transform .25s ease; }
.nav-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 12px 26px rgba(123, 162, 63, .44), inset 0 1px 0 rgba(255, 255, 255, .25);   /* fallback */
    box-shadow: 0 12px 26px color-mix(in srgb, var(--green) 48%, transparent), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.nav-cta:hover .icon { transform: translateX(4px); }
.nav-cta:active { transform: translateY(0); box-shadow: 0 4px 10px color-mix(in srgb, var(--green) 40%, transparent); }
.nav-cta.active { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), 0 6px 15px color-mix(in srgb, var(--green) 36%, transparent); }

/* mobile nav toggle */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; border-radius: 2px; background: var(--dark); transition: transform .3s ease, opacity .2s ease, background .2s ease; transform-origin: center; }
/* morph into an X when the menu is open */
.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 { padding: 0; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 0; }
.hero-copy { padding: 92px 60px 92px 0; align-self: center; }
.hero-eyebrow { font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: 3px; color: var(--green); text-transform: uppercase; margin-bottom: 22px; }
.hero-title { font-size: 58px; font-weight: 800; letter-spacing: .5px; line-height: 1.05; margin-bottom: 24px; }
.hero-title .t-dark { color: var(--dark); }
.hero-title .t-green { color: var(--green); }
.hero-sub { font-size: 18px; color: var(--muted); margin: 0 0 34px; max-width: 380px; }
.hero-media { position: relative; min-height: 480px; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* ---------- feature bar ---------- */
.feature-bar { background: var(--dark); color: #fff; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.feature-item { display: flex; align-items: center; gap: 16px; padding: 30px 26px; position: relative; }
.feature-item + .feature-item::before {
    content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 1px; background: rgba(255, 255, 255, .16);
}
.feature-item .icon { width: 40px; height: 40px; color: #fff; flex: 0 0 auto; }
.feature-title { font-family: var(--head); font-weight: 800; font-size: 20px; color: #fff; line-height: 1.1; }
.feature-sub { font-family: var(--head); font-weight: 500; font-size: 11px; letter-spacing: 1.2px; color: rgba(255, 255, 255, .62); text-transform: uppercase; margin-top: 3px; }

/* ---------- section shells ---------- */
.section { padding: 78px 0; }
.section-light { background: var(--light); }
.section-light-2 { background: var(--light-2); }
.section-head { text-align: center; margin-bottom: 54px; }
.section-head h2 { font-size: 30px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.section-head h2::after { content: ""; display: block; width: 52px; height: 3px; background: var(--green); margin: 16px auto 0; }
.section-head p { color: var(--muted); margin: 14px auto 0; max-width: 620px; }

/* ---------- services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.service-card { text-align: center; padding: 8px; }
.service-card .icon { width: 52px; height: 52px; color: var(--green); margin: 0 auto 20px; }
.service-card h3 { font-size: 17px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.service-card p { color: var(--muted); font-size: 15px; margin: 0; }
a.service-card { display: block; transition: transform .18s ease; }
a.service-card:hover { transform: translateY(-4px); }
a.service-card:hover h3 { color: var(--green); }

/* ---------- process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.process-step { text-align: center; position: relative; }
.process-num {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--green); color: #fff;
    font-family: var(--head); font-weight: 800; font-size: 19px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 22px; position: relative; z-index: 2;
}
/* dashed connector line between steps */
.process-step:not(:last-child)::after {
    content: ""; position: absolute; top: 24px; left: 60%; width: 80%; height: 0;
    border-top: 2px dashed #cfcfca; z-index: 1;
}
.process-step h3 { font-size: 15px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; margin-bottom: 10px; }
.process-step p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- banner ---------- */
.banner { display: grid; grid-template-columns: 1fr 1fr; background: var(--dark); }
.banner-media { position: relative; min-height: 340px; }
.banner-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.banner-copy { padding: 66px 60px; color: #fff; align-self: center; }
.banner-copy h2 { color: #fff; font-size: 27px; font-weight: 800; line-height: 1.25; text-transform: uppercase; margin-bottom: 20px; max-width: 420px; }
.banner-copy p { color: rgba(255, 255, 255, .72); margin: 0 0 28px; max-width: 440px; }

/* ---------- cta strip ---------- */
.cta-strip { background: var(--light); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 46px 0; }
.cta-inner h2 { font-size: 26px; font-weight: 800; text-transform: uppercase; margin-bottom: 6px; }
.cta-inner p { color: var(--muted); margin: 0; }

/* ---------- footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--border); padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1.1fr 1.2fr; gap: 40px; padding-bottom: 46px; }
.footer-contact { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.footer-contact a, .footer-contact .fc-line { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 15px; }
.footer-contact a:hover { color: var(--green); }
.fc-icon { width: 30px; height: 30px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(123, 162, 63, .12); color: var(--green); }
.fc-icon .icon { width: 16px; height: 16px; }
.footer-links h4 { font-family: var(--head); font-weight: 700; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 18px; }
.footer-links-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.footer-links-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-links-cols li { margin-bottom: 10px; }
.footer-links-cols a { color: var(--muted); font-size: 15px; }
.footer-links-cols a:hover { color: var(--green); }
.footer-bottom { border-top: 1px solid var(--border); padding: 22px 0; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ---------- inner page hero ---------- */
.page-hero { position: relative; background: var(--dark); color: #fff; overflow: hidden; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.page-hero .container { position: relative; padding-top: 92px; padding-bottom: 92px; text-align: center; }
.page-hero h1 { color: #fff; font-size: 44px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.page-hero h1::after { content: ""; display: block; width: 56px; height: 3px; background: var(--green); margin: 18px auto 0; }
.page-hero p { color: rgba(255, 255, 255, .8); margin: 16px auto 0; max-width: 620px; font-size: 17px; }

/* ---------- service / about content ---------- */
.content-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.content-split .media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.content-copy h2 { font-size: 28px; font-weight: 800; margin-bottom: 18px; }
.content-copy > p { color: var(--muted); margin: 0 0 24px; }
.point-list { list-style: none; margin: 0 0 30px; padding: 0; }
.point-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; font-size: 15.5px; }
.point-list .icon { width: 22px; height: 22px; color: var(--green); flex: 0 0 auto; margin-top: 2px; }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-grid figure { margin: 0; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-grid figure:hover img { transform: scale(1.06); }

/* ---------- contact ---------- */
.contact-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: start; }
.contact-info h2 { font-size: 26px; font-weight: 800; margin-bottom: 16px; }
.contact-info > p { color: var(--muted); margin: 0 0 28px; }
.contact-info .footer-contact { gap: 18px; }
.contact-form { background: var(--light); padding: 34px; border-radius: var(--radius); }
.form-row { margin-bottom: 18px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-row label { display: block; font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: .5px; margin-bottom: 7px; color: var(--dark); }
.form-row input, .form-row select, .form-row textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
    font-family: var(--body); font-size: 15px; background: #fff; color: var(--text);
}
.form-row textarea { min-height: 130px; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(123, 162, 63, .15); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 22px; font-size: 15px; }
.alert-success { background: rgba(123, 162, 63, .12); border: 1px solid var(--green); color: #4e6b25; }
.alert-error { background: #fdecea; border: 1px solid #e0736a; color: #9c352c; }

/* ---------- placeholder image look ---------- */
.ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #d8cfc2, #b9ae9c); }

/* =====================================================================
   ENHANCEMENTS — preloader, scroll-aware header, reveal animations
   ===================================================================== */

/* ---- preloader ---- */
.preloader {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: var(--dark);
    transition: opacity .6s ease, visibility .6s ease;
}
.preloader.loaded { opacity: 0; visibility: hidden; }
.preloader-box { position: relative; width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; }
.preloader-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .16); border-top-color: var(--green); animation: ec-spin .8s linear infinite; }
.preloader-ec { font-family: var(--head); font-weight: 800; font-size: 22px; letter-spacing: 1px; color: #fff; }
@keyframes ec-spin { to { transform: rotate(360deg); } }
/* stop the page scrolling underneath while loading */
body.loading { overflow: hidden; }

/* ---- scroll-aware header ---- */
.site-header { transition: box-shadow .3s ease, background .3s ease; }
.site-header .header-inner { transition: min-height .3s ease; }
.site-header .brand-mark { transition: width .3s ease, height .3s ease; }
.site-header.scrolled { box-shadow: 0 8px 26px rgba(0, 0, 0, .08); background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-header.scrolled .header-inner { min-height: 60px; }
.site-header.scrolled .brand-mark { width: 38px; height: 38px; }

/* ---- animated nav underline (grow from centre) ---- */
.main-nav > a:not(.btn)::after {
    content: ""; position: absolute; left: 50%; right: 50%; bottom: -2px;
    height: 2px; background: var(--green);
    transition: left .28s ease, right .28s ease;
}
.main-nav > a:not(.btn):hover::after { left: 0; right: 0; }

/* ---- hero motion (subtle ken-burns) ---- */
.hero-media img { animation: ken-burns 20s ease-in-out infinite alternate; }
@keyframes ken-burns { from { transform: scale(1.03); } to { transform: scale(1.13) translate(-1.5%, -1%); } }

/* ---- micro-interactions ---- */
.feature-item { transition: transform .25s ease; }
.feature-item:hover { transform: translateY(-4px); }
.feature-item .icon { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.feature-item:hover .icon { transform: scale(1.14) rotate(-5deg); }

.service-card .icon { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), color .2s ease; }
a.service-card:hover .icon { transform: translateY(-5px) scale(1.1); }

.process-num { transition: transform .3s ease, box-shadow .3s ease; }
.process-step:hover .process-num { transform: scale(1.12) translateY(-2px); box-shadow: 0 10px 20px rgba(123, 162, 63, .45); box-shadow: 0 10px 20px color-mix(in srgb, var(--green) 48%, transparent); }

.content-split .media img { transition: transform .5s ease, box-shadow .4s ease; }
.content-split .media:hover img { transform: translateY(-4px) scale(1.01); }

.gallery-grid figure { position: relative; }
.gallery-grid figure::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 26, .35), transparent 55%);
    opacity: 0; transition: opacity .35s ease;
}
.gallery-grid figure:hover::after { opacity: 1; }

/* ---- reveal-on-scroll (only active when JS is present, so it degrades
   gracefully and never hides content for search engines / no-JS users) ---- */
.js .section-head,
.js .service-card,
.js .process-step,
.js .feature-item,
.js .content-copy,
.js .content-split .media,
.js .gallery-grid figure,
.js .banner-copy,
.js .cta-inner {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
    will-change: opacity, transform;
}
.js .content-copy { transform: translateX(-30px); }
.js .content-split .media { transform: translateX(30px); }
.js .is-in { opacity: 1 !important; transform: none !important; }

/* ---- respect reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .hero-media img { animation: none; }
    .js .section-head, .js .service-card, .js .process-step, .js .feature-item,
    .js .content-copy, .js .content-split .media, .js .gallery-grid figure,
    .js .banner-copy, .js .cta-inner { opacity: 1 !important; transform: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .hero-title { font-size: 46px; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-item:nth-child(3)::before { display: none; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
    .process-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
    .process-step:not(:last-child)::after { display: none; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .content-split, .contact-split { grid-template-columns: 1fr; gap: 34px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute; top: 74px; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--border);
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px 24px 20px;
        display: none;
        box-shadow: var(--shadow);
    }
    .main-nav.open { display: flex; }
    .main-nav > a { padding: 13px 0; border-bottom: 1px solid var(--light-2); }
    .main-nav > a.active::after { display: none; }
    .nav-cta { text-align: center; justify-content: center; margin-top: 12px; }

    .hero-inner { grid-template-columns: 1fr; }
    .hero-copy { padding: 54px 0 40px; text-align: center; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-media { min-height: 320px; }
    .banner { grid-template-columns: 1fr; }
    .banner-media { min-height: 260px; }
    .cta-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
    .hero-title { font-size: 38px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-item::before { display: none !important; }
    .services-grid { grid-template-columns: 1fr; }
    .process-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
    .form-row.two { grid-template-columns: 1fr; }
    .section { padding: 56px 0; }
}
