/* =====================================================================
   Demo Company - Live Photometrics demo site
   Styling for the static front page.
   Kept simple and readable - no build step, no framework.
   ===================================================================== */

:root {
    --color-bg: #ffffff;
    --color-surface: #f6f7f9;
    --color-text: #1a2230;
    --color-muted: #64707d;
    --color-primary: #243140;      /* graphite navy */
    --color-primary-dark: #18222d;
    --color-accent: #b08d57;       /* restrained brass accent */
    --color-border: #e4e8ed;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 10px 30px rgba(16, 24, 40, 0.10);
    --radius: 8px;
    --max-width: 1160px;
    --header-height: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img {
    max-width: 100%;
    display: block;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ----------------------------- Buttons ----------------------------- */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); }
.btn--ghost { border-color: #fff; color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.15); }

/* ----------------------------- Header ------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand__mark { color: var(--color-accent); font-size: 1.4em; line-height: 1; }
.brand__accent { color: var(--color-primary); }
.brand--footer { color: #fff; }
.brand--footer .brand__accent { color: var(--color-accent); }

/* ----------------------------- Navigation -------------------------- */
.main-nav { display: flex; align-items: center; }

.main-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav__list > li > a {
    display: block;
    padding: 10px 14px;
    font-weight: 600;
    color: var(--color-text);
    border-radius: 8px;
}

.main-nav__list > li > a:hover { color: var(--color-primary); background: var(--color-surface); }

/* Dropdown */
.has-dropdown { position: relative; }

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    list-style: none;
    margin: 6px 0 0;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--color-text);
    font-weight: 500;
}

.dropdown li a:hover { background: var(--color-surface); color: var(--color-primary); }

/* Mobile menu toggle (hidden on desktop) */
.main-nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
}

.main-nav__toggle span {
    display: block;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
}

/* ----------------------------- Hero -------------------------------- */
.hero {
    color: #fff;
    background:
        linear-gradient(120deg, rgba(24, 34, 45, 0.96), rgba(36, 49, 64, 0.90)),
        radial-gradient(circle at 82% 18%, rgba(176, 141, 87, 0.28), transparent 46%);
    background-color: var(--color-primary-dark);
}

.hero__inner { padding: 96px 20px; max-width: 760px; }
.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 12px;
}
.hero__title { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 18px; }
.hero__lead { font-size: 1.15rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 28px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ----------------------------- Features ---------------------------- */
.features { padding: 64px 0; background: var(--color-surface); }
.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.feature__icon { font-size: 2rem; margin-bottom: 12px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--color-muted); margin: 0; }

/* ----------------------------- Sections ---------------------------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: 2rem; }
.section-head p { color: var(--color-muted); margin: 0; }

/* ----------------------------- Products ---------------------------- */
.products { padding: 72px 0; }

.products__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: 999px;
    font-weight: 600;
    color: var(--color-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.products__empty { grid-column: 1 / -1; text-align: center; color: var(--color-muted); }

.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.product-card__media {
    aspect-ratio: 4 / 3;
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }

.product-card__body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card__category {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    font-weight: 700;
}
.product-card__name { font-size: 1.05rem; margin: 0; }
.product-card__desc { color: var(--color-muted); font-size: 0.92rem; margin: 0; flex: 1; }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.product-card__sku { font-size: 0.8rem; color: var(--color-muted); }
.product-card__more { font-size: 0.85rem; font-weight: 700; color: var(--color-primary); }
.product-card__link { display: flex; flex-direction: column; flex: 1; color: inherit; }

/* ----------------------------- About ------------------------------- */
.about { padding: 72px 0; background: var(--color-surface); }
.about__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: center;
}
.about__text h2 { font-size: 2rem; }
.about__text p { color: var(--color-muted); }
.about__stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.about__stats li {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px 22px;
    box-shadow: var(--shadow-sm);
}
.about__stats strong { display: block; font-size: 1.6rem; color: var(--color-primary); }
.about__stats span { color: var(--color-muted); }

/* ----------------------------- Photometrics ------------------------ */
.photometrics { padding: 72px 0; text-align: center; }
.photometrics__inner { max-width: 680px; margin: 0 auto; }
.photometrics h2 { font-size: 2rem; }
.photometrics p { color: var(--color-muted); }

/* ----------------------------- Footer ------------------------------ */
.site-footer { background: #10202b; color: #cbd5e1; padding: 56px 0 24px; }
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-footer h4 { color: #fff; margin-bottom: 12px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.site-footer__tagline { margin-top: 12px; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__bottom { padding-top: 20px; font-size: 0.85rem; color: #8ea0b0; }

/* ----------------------------- Product page ------------------------ */
.product-page { padding: 32px 0 72px; }

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 28px;
}
.breadcrumb a:hover { color: var(--color-primary); }

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 64px;
}

.product-detail__media {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: start;
}

.product-detail__image {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
}
.product-detail__image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-detail__category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    font-weight: 700;
    margin-bottom: 6px;
}
.product-detail__title { font-size: 2.2rem; }
.product-detail__desc { color: var(--color-muted); }

.variant-selector { margin: 0; }
.variant-selector__label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}
.variant-selector__buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* Variant buttons and the report download on one row */
.product-detail__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.product-detail__controls .product-detail__actions { margin: 0; }
/* Match the download button height to the variant buttons */
.product-detail__controls .btn {
    padding: 12px 18px;
    font-size: 1.05rem;
    line-height: 1.2;
    border-width: 2px;
}

.variant-btn {
    min-width: 72px;
    padding: 12px 18px;
    border: 2px solid var(--color-border);
    background: #fff;
    border-radius: var(--radius);
    font-size: 1.05rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.15s ease;
}
.variant-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.variant-btn.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.product-detail__actions { margin: 0; }

/* Photometric parameters grid */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 8px 0 24px;
    transition: opacity 0.15s ease;
}
.spec-grid.is-updating { opacity: 0.55; }
.spec-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px 14px;
}
.spec-item dt.spec-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--color-muted);
}
.spec-item dd.spec-value {
    margin: 4px 0 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
}
.spec-item .spec-unit { font-size: 0.8rem; font-weight: 600; color: var(--color-muted); }


.product-detail__meta { margin: 0; font-size: 0.85rem; color: var(--color-muted); }
.product-detail__meta dt { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem; }
.product-detail__meta dd { margin: 4px 0 0; word-break: break-all; }

/* Photometric graphics grid */
.photometric-graphics { margin-top: 24px; }
.graphics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.graphic-card {
    margin: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.graphic-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.graphic-card__img { width: 100%; height: 100%; object-fit: contain; }

/* Loading + error states for the on-demand SVGs */
.graphic-card__media.is-loading::after {
    content: "Loading\2026";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    background: var(--color-surface);
}
.graphic-card__media.is-error::after {
    content: "Preview unavailable";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    background: var(--color-surface);
}

.graphic-card__caption {
    padding: 12px 16px;
    font-weight: 600;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

/* ----------------------------- Responsive -------------------------- */
@media (max-width: 860px) {
    .features__grid { grid-template-columns: 1fr; }
    .about__inner { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; }
    .product-detail__image { aspect-ratio: 4 / 3; max-height: 55vh; }

    .main-nav__toggle { display: flex; }

    .main-nav__list {
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
        padding: 8px;
        display: none;
    }
    .main-nav__list.is-open { display: flex; }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        margin: 0 0 0 12px;
        padding: 0;
    }
}

/* ------------------------- Helper hints ---------------------------- */
/* Little animated arrows that guide the user to the primary actions.  */
.helper-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.helper-hint__arrow {
    font-size: 1.5rem;
    line-height: 1;
    animation: helper-bounce 1.2s ease-in-out infinite;
}

.helper-hint__text { white-space: nowrap; }

/* Call-to-action hint next to the "Explore products" hero button. */
.helper-hint--cta {
    order: -1;
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 2px;
}

.helper-hint--cta .helper-hint__arrow {
    /* Point down towards the button that sits below the hint. */
    animation-name: helper-bounce-down;
}

/* Hint at the bottom of each product card. */
.helper-hint--card {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--color-border);
    font-size: 0.82rem;
}

.helper-hint--card .helper-hint__arrow { font-size: 1.25rem; }

@keyframes helper-bounce {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(5px); }
}

@keyframes helper-bounce-down {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(5px); }
}

@media (prefers-reduced-motion: reduce) {
    .helper-hint__arrow { animation: none; }
}

