/* =========================================================
   LA. Maxwell Enterprise — shared styles for every page
   ========================================================= */

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

:root {
    --green: #11280a;
    --green-soft: #1c3a13;
    --grey: #e2e2e2;
    --light: #f4f5f1;
    --gold: #e6c564;
    --text: #1d231d;
    --muted: #5d665a;
    --line: #e3e6df;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(17, 40, 10, 0.06), 0 8px 24px rgba(17, 40, 10, 0.08);
    --gutter: clamp(16px, 5vw, 72px);
    --section: clamp(64px, 8vw, 112px);
    --font: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Section heading block */
.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto clamp(32px, 4vw, 56px);
}

.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7f2a;
    margin-bottom: 10px;
}

.section-head h2 {
    font-size: clamp(28px, 3.2vw, 44px);
    font-weight: 800;
    margin: 0;
}

.section-head p {
    font-size: clamp(16px, 1.2vw, 18px);
    color: var(--muted);
    margin: 14px 0 0;
}

/* ---------- Header ---------- */
.site-header {
    background-color: var(--green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px var(--gutter);
}

.site-header img {
    height: clamp(48px, 7vw, 80px);
    width: auto;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px clamp(18px, 2.6vw, 40px);
}

.site-header nav a {
    color: white;
    text-decoration: none;
    font-size: clamp(15px, 1.05vw, 17px);
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] { border-bottom-color: var(--gold); }

/* ---------- Page hero (Products & Contact) ---------- */
.hero {
    position: relative;
    min-height: clamp(300px, 52vh, 540px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 56px var(--gutter);
    background: var(--green) center / cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 24, 6, 0.35), rgba(10, 24, 6, 0.55));
}

.hero > * { position: relative; }

.hero h1 {
    font-size: clamp(32px, 4.2vw, 60px);
    font-weight: 800;
    margin: 0 0 14px;
}

.hero p {
    font-size: clamp(16px, 1.4vw, 21px);
    max-width: 640px;
    margin: 0;
    opacity: 0.95;
}

/* ---------- Footer ---------- */
.site-footer {
    background-color: var(--green);
    color: white;
    text-align: center;
    padding: 56px var(--gutter);
    overflow-wrap: anywhere;
}

.site-footer h2 {
    font-size: clamp(20px, 1.8vw, 24px);
    font-weight: 700;
    margin: 0 0 16px;
}

.site-footer address,
.site-footer p {
    font-style: normal;
    font-size: clamp(14px, 1.05vw, 16px);
    margin: 4px 0;
    color: rgba(255, 255, 255, 0.85);
}

.site-footer a { color: white; }

.site-footer .copyright {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* =========================================================
   HOMEPAGE
   ========================================================= */

/* ---------- Intro ---------- */
.intro {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    min-height: clamp(420px, 70vh, 700px);
}

.intro-text {
    background-color: var(--grey);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(40px, 5vw, 80px);
    text-align: center;
}

.intro-text h1 {
    font-size: clamp(32px, 3.6vw, 56px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
    max-width: 20ch;
    text-wrap: balance;
}

.intro-image {
    background: url("../images/home-intro.jpg") center / cover no-repeat;
}

/* ---------- Numbers strip ---------- */
.stats {
    background: white;
    padding: clamp(36px, 4vw, 56px) var(--gutter);
    border-bottom: 1px solid var(--line);
}

.stats-list {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stats-list li {
    padding: 8px clamp(12px, 2vw, 32px);
    text-align: center;
}

.stats-list li + li { border-left: 1px solid var(--line); }

.stat-value {
    display: block;
    font-size: clamp(24px, 2.4vw, 36px);
    font-weight: 800;
    color: var(--green);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.stat-label {
    display: block;
    margin-top: 6px;
    font-size: clamp(13px, 1vw, 15px);
    color: var(--muted);
    line-height: 1.45;
}

/* ---------- Building Blocks (cards) ---------- */
.blocks {
    background-color: var(--green);
    color: white;
    padding: var(--section) var(--gutter);
}

.blocks .section-head h2 { color: white; }
.blocks .eyebrow { color: var(--gold); }

.card-grid {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 28px);
}

.value-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    padding: clamp(24px, 2.6vw, 36px);
    transition: transform 0.25s, background-color 0.25s;
}

.value-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
}

.value-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--gold);
    color: var(--green);
    display: grid;
    place-items: center;
    margin-bottom: 22px;
}

.value-icon svg { width: 26px; height: 26px; }

.value-card h3 {
    font-size: clamp(19px, 1.5vw, 22px);
    font-weight: 700;
    margin: 0 0 10px;
}

.value-card p {
    margin: 0;
    font-size: clamp(15px, 1.1vw, 17px);
    color: rgba(255, 255, 255, 0.78);
}

/* ---------- Feature image ---------- */
.feature-image {
    height: clamp(260px, 42vw, 600px);
    background: url("../images/home-feature.jpg") center / cover no-repeat;
}

/* ---------- Tagline ---------- */
.tagline {
    background-color: var(--gold);
    padding: clamp(48px, 6vw, 80px) var(--gutter);
    text-align: center;
}

.tagline p {
    font-size: clamp(21px, 2.4vw, 34px);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
    max-width: 900px;
    margin: 0 auto;
    text-wrap: balance;
}

/* ---------- Results: drag to compare ---------- */
.results {
    background: var(--light);
    padding: var(--section) var(--gutter);
}

.result-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 24px;
}

.result-tabs button {
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 18px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.result-tabs button:hover { border-color: var(--green); }

.result-tabs button[aria-pressed="true"] {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.compare {
    --pos: 50%;
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    aspect-ratio: 3 / 2;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #ccc;
    cursor: ew-resize;
    touch-action: pan-y;          /* sideways drag compares, up/down still scrolls the page */
    user-select: none;
    -webkit-user-select: none;
}

.compare img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.compare .compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.compare-label {
    position: absolute;
    top: 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: white;
    background: rgba(10, 24, 6, 0.65);
    padding: 6px 12px;
    border-radius: 999px;
    pointer-events: none;
}

.compare-label.before { left: 16px; }
.compare-label.after { right: 16px; }

.compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 3px;
    margin-left: -1.5px;
    background: white;
    pointer-events: none;
}

.compare-handle::after {
    content: "\2039 \203A";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    color: var(--green);
    font-size: 22px;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.compare input[type="range"] {
    /* kept for keyboard users; visually hidden */
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.compare:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }

.compare-caption {
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    margin: 18px auto 0;
    max-width: 640px;
}

/* ---------- Logo grids (accreditation & clients) ---------- */
.logos {
    background: white;
    padding: var(--section) var(--gutter);
}

.logo-grid {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 1240px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(28px, 4vw, 48px) clamp(16px, 4vw, 56px);
}

.logo-grid li {
    flex: 0 0 clamp(96px, 26vw, 180px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-grid img {
    width: 100%;
    height: clamp(60px, 8vw, 110px);
    object-fit: contain;
}

.logo-grid li.logo-wide { flex-basis: clamp(200px, 60vw, 260px); }
.logo-grid li.logo-wide img { height: clamp(36px, 4vw, 52px); }

.logo-grid--clients li { flex-basis: clamp(130px, 38vw, 190px); }
.logo-grid--clients img { height: clamp(44px, 6vw, 80px); }

.logo-caption {
    margin-top: 8px;
    font-size: clamp(11px, 1vw, 13px);
    line-height: 1.4;
    color: var(--muted);
}

/* =========================================================
   PRODUCTS PAGE
   ========================================================= */
.products {
    background: var(--light);
    padding: var(--section) var(--gutter);
}

.product-grid {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(16px, 2vw, 28px);
}

.product-grid > li {
    flex: 0 1 calc((100% - 2 * clamp(16px, 2vw, 28px)) / 3);
    display: flex;
}

.product-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(17, 40, 10, 0.06), 0 16px 36px rgba(17, 40, 10, 0.14);
}

.product-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: clamp(20px, 2vw, 28px);
}

.product-tag {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--green);
    background: #eef2e6;
    border-radius: 999px;
    padding: 5px 11px;
    margin-bottom: 14px;
}

.product-body h3 {
    font-size: clamp(19px, 1.6vw, 22px);
    font-weight: 800;
    margin: 0 0 8px;
}

.product-body p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 15.5px;
}

.product-more {
    margin-top: auto;
    align-self: flex-start;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    color: var(--green);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.product-more::after { content: " \2192"; transition: margin 0.2s; }
.product-more:hover::after { margin-left: 4px; }

/* Whole card is clickable via the button stretching over it */
.product-card { position: relative; }
.product-more::before { content: ""; position: absolute; inset: 0; }

.product-full { display: none; }

/* Product details pop-up */
.product-dialog {
    width: min(720px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    overflow: auto;
}

.product-dialog::backdrop { background: rgba(10, 24, 6, 0.6); }

.product-dialog img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    background: var(--light);
}

.dialog-body { padding: clamp(24px, 3vw, 36px); }

.dialog-body h2 {
    font-size: clamp(24px, 2.4vw, 30px);
    font-weight: 800;
    margin: 0 0 12px;
}

.dialog-body p {
    margin: 0;
    color: var(--muted);
    font-size: 16.5px;
}

.dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dialog-cta {
    display: inline-block;
    margin-top: 22px;
    background: var(--green);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 22px;
    border-radius: 999px;
}

.dialog-cta:hover { background: var(--green-soft); }

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact {
    background-color: var(--light);
    padding: var(--section) var(--gutter);
}

.contact form {
    max-width: 680px;
    margin: 0 auto;
    background: white;
    padding: clamp(24px, 4vw, 48px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.field { margin-bottom: 20px; }

.contact label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.contact input,
.contact textarea {
    width: 100%;
    padding: 13px 15px;
    font: inherit;
    font-size: 16px;          /* 16px+ stops iPhones zooming in on tap */
    border: 1px solid #d5d9d0;
    border-radius: 10px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contact textarea { resize: vertical; min-height: 150px; }

.contact input:focus,
.contact textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(17, 40, 10, 0.12);
}

.contact button {
    background-color: var(--green);
    color: white;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    padding: 13px 34px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
}

.contact button:hover { background-color: var(--green-soft); }

/* =========================================================
   Tablet & phone
   ========================================================= */
@media (max-width: 960px) {
    .card-grid { grid-template-columns: 1fr; max-width: 640px; }
    .product-grid > li { flex-basis: calc((100% - clamp(16px, 2vw, 28px)) / 2); }

    .stats-list { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
    .stats-list li:nth-child(3) { border-left: 0; }
}

@media (max-width: 768px) {
    .site-header { flex-direction: column; text-align: center; }
    .site-header nav { justify-content: center; }

    .intro { grid-template-columns: 1fr; min-height: 0; }
    .intro-image { aspect-ratio: 4 / 3; }
}

@media (max-width: 600px) {
    .product-grid > li { flex-basis: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .contact button { width: 100%; }
    .compare { aspect-ratio: 4 / 3; }
    .compare-handle::after { width: 40px; height: 40px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .value-card, .product-card { transition: none; }
}
