/* ==========================================================================
   SG Racking — site stylesheet
   Three device tiers:  mobile < 768px  ·  tablet 768–1023px  ·  desktop ≥ 1024px
   Font sizes are tokens (--fs-*) redefined per tier — never hard-code px sizes.
   Photos are never cropped: every <img> is height:auto + object-fit:contain.
   ========================================================================== */

/* -- Brand themes (set on <html data-theme>) ------------------------------ */
:root,
[data-theme="beam-orange"] {
    --ink: #14202e;          /* headings, header, dark panels */
    --ink-2: #22324a;
    --accent: #f26a21;       /* primary buttons, beams in the logo */
    --accent-strong: #d4540f;
    --accent-soft: #fff1e8;
    --on-accent: #ffffff;
    --link: #c2470a;
    --accent-text: #c2470a;   /* accent for text/icons on white */
}
[data-theme="safety-yellow"] {
    --ink: #1b1d22;
    --ink-2: #2b2f36;
    --accent: #ffbf1f;
    --accent-strong: #f0a800;
    --accent-soft: #fff7dc;
    --on-accent: #1b1d22;
    --link: #8a5a00;
    --accent-text: #9a6700;   /* yellow is unreadable on white; amber for text/icons */
}
[data-theme="steel-teal"] {
    --ink: #0d2e3a;
    --ink-2: #134454;
    --accent: #12a594;
    --accent-strong: #0c8577;
    --accent-soft: #e3f6f3;
    --on-accent: #ffffff;
    --link: #0b7568;
    --accent-text: #0b7568;
}
[data-theme="signal-red"] {
    --ink: #1c1e24;
    --ink-2: #2c2f37;
    --accent: #e0312a;
    --accent-strong: #bd231d;
    --accent-soft: #fdeceb;
    --on-accent: #ffffff;
    --link: #b3241e;
    --accent-text: #bd231d;
}

:root {
    --bg: #ffffff;
    --surface: #f4f6f8;
    --surface-2: #e9edf1;
    --line: #d9dfe5;
    --text: #263241;
    --muted: #5b6876;
    --success: #1c7c4a;
    --danger: #b42318;

    --logo-ink: var(--ink);
    --logo-accent: var(--accent);
    --logo-on-accent: var(--ink);

    --font-head: "Barlow Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
    --font-body: "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;

    /* Mobile type scale */
    --fs-xs: 0.8125rem;
    --fs-sm: 0.9375rem;
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.375rem;
    --fs-xl: 1.625rem;
    --fs-2xl: 2rem;
    --fs-3xl: 2.375rem;

    --space: 1rem;
    --section: 3rem;
    --gutter: 1rem;
    --radius: 6px;
    --radius-lg: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
    --header-h: 64px;
    --container: 1200px;
}

/* Tablet */
@media (min-width: 768px) {
    :root {
        --fs-sm: 0.9375rem;
        --fs-base: 1.0625rem;
        --fs-md: 1.1875rem;
        --fs-lg: 1.5rem;
        --fs-xl: 1.875rem;
        --fs-2xl: 2.375rem;
        --fs-3xl: 2.875rem;
        --section: 4rem;
        --gutter: 1.5rem;
        --header-h: 72px;
    }
}
/* Desktop */
@media (min-width: 1024px) {
    :root {
        --fs-base: 1.0625rem;
        --fs-md: 1.25rem;
        --fs-lg: 1.625rem;
        --fs-xl: 2.125rem;
        --fs-2xl: 2.75rem;
        --fs-3xl: 3.5rem;
        --section: 5.5rem;
        --gutter: 2rem;
        --header-h: 80px;
    }
}

/* -- Reset & base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    padding-bottom: 72px;            /* room for the mobile CTA bar */
}
@media (min-width: 1024px) { body { padding-bottom: 0; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

img, svg, video { max-width: 100%; }
img { display: block; height: auto; object-fit: contain; }   /* full photo, never cropped */

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.1; margin: 0 0 .5em; font-weight: 700; letter-spacing: .005em; }
h1 { font-size: var(--fs-3xl); font-weight: 800; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p, ul, ol, dl, table { margin: 0 0 1.1em; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
strong { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; color: #fff; }

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

/* -- Buttons ----------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-head); font-weight: 700; font-size: var(--fs-md); letter-spacing: .03em; text-transform: uppercase;
    line-height: 1; padding: .85rem 1.3rem; border-radius: var(--radius);
    border: 2px solid transparent; text-decoration: none; cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
    min-height: 48px; text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--dark:hover { background: var(--ink-2); color: #fff; }
.btn--lg { padding: 1rem 1.6rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn-row .btn { flex: 1 1 200px; }
@media (min-width: 768px) { .btn-row .btn { flex: 0 0 auto; } }

/* -- Top bar & header ---------------------------------------------------- */
.topbar { display: none; background: var(--ink); color: #cfd6de; font-size: var(--fs-xs); }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 38px; }
.topbar__msg { margin: 0; }
.topbar__msg strong { color: #fff; }
.topbar__links { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; }
.topbar a:hover { color: var(--accent); }
.topbar .icon { width: 15px; height: 15px; }
@media (min-width: 768px) { .topbar { display: block; } }
@media (max-width: 1023px) { .topbar__hours { display: none; } }

.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-header::after { content: ""; display: block; height: 4px; background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, var(--ink) 12px 24px); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }

.brand { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; }
.brand .logo { height: 40px; width: auto; }
@media (min-width: 768px) { .brand .logo { height: 46px; } }
@media (min-width: 1024px) { .brand .logo { height: 50px; } }

.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 24px; height: 3px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s, background .2s; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -8px; }
.nav-toggle__bars::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-8px) rotate(-45deg); }

/* Mobile/tablet drawer */
.site-nav {
    position: fixed; inset: calc(var(--header-h) + 4px) 0 0 0; background: #fff; overflow-y: auto;
    padding: 1rem var(--gutter) 6rem; transform: translateX(100%); transition: transform .25s ease; visibility: hidden;
}
.site-nav.is-open { transform: none; visibility: visible; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-item { border-bottom: 1px solid var(--line); }
.nav-link {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .4rem;
    padding: .95rem .25rem; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-lg);
    color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; text-transform: uppercase; letter-spacing: .02em;
}
.nav-item.is-active > .nav-link { color: var(--accent-text); }
.nav-link .icon { transition: transform .2s; }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav-menu { list-style: none; margin: 0 0 .75rem; padding: 0; display: none; }
.nav-menu.is-open { display: block; }
.nav-menu a { display: block; padding: .6rem .75rem; border-radius: var(--radius); text-decoration: none; color: var(--text); }
.nav-menu a:hover, .nav-menu a[aria-current] { background: var(--surface); }
.nav-menu__title { display: block; font-weight: 600; color: var(--ink); }
.nav-menu__sub { display: block; font-size: var(--fs-xs); color: var(--muted); }
.nav-cta { display: grid; gap: .75rem; margin-top: 1.5rem; }

@media (min-width: 1024px) {
    .nav-toggle { display: none; }
    .site-nav { position: static; transform: none; visibility: visible; padding: 0; overflow: visible; display: flex; align-items: center; gap: 1.25rem; background: none; }
    .nav-list { display: flex; gap: .25rem; }
    .nav-item { border: 0; position: relative; }
    .nav-link { font-size: var(--fs-md); padding: .5rem .6rem; border-radius: var(--radius); }
    .nav-link:hover { color: var(--accent-text); }
    .nav-menu {
        position: absolute; top: calc(100% + 8px); left: -.5rem; min-width: 290px; background: #fff; padding: .5rem;
        border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 60;
    }
    .nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
    .has-menu:hover > .nav-menu, .has-menu:focus-within > .nav-menu, .nav-menu.is-open { display: block; }
    .nav-cta { display: flex; margin: 0; gap: .5rem; }
    .nav-cta .btn { font-size: var(--fs-sm); padding: .7rem 1rem; min-height: 44px; }
}
@media (min-width: 1024px) and (max-width: 1180px) {
    .nav-link { padding: .5rem .4rem; }
    .nav-cta .btn--outline { display: none; }
}

/* Mobile sticky lead bar */
.mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: 1fr 1fr 56px; gap: .5rem;
    padding: .55rem .6rem calc(.55rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(16,24,40,.08);
}
.mobile-cta__btn, .mobile-cta__wa {
    display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: var(--radius);
    font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; font-size: var(--fs-sm); text-align: center; line-height: 1.1; padding: 0 .4rem;
}
.mobile-cta__btn--quote { background: var(--accent); color: var(--on-accent); }
.mobile-cta__btn--order { background: var(--ink); color: #fff; }
.mobile-cta__wa { background: #25d366; color: #fff; }
.mobile-cta__wa .icon { width: 26px; height: 26px; }
@media (min-width: 1024px) { .mobile-cta { display: none; } }

/* -- Breadcrumbs ----------------------------------------------------------- */
.breadcrumbs { background: var(--surface); border-bottom: 1px solid var(--line); font-size: var(--fs-xs); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 auto; padding-top: .6rem; padding-bottom: .6rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .3rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span { color: var(--ink); font-weight: 600; }

/* -- Sections ---------------------------------------------------------------- */
.section { padding: var(--section) 0; }
.section--tint { background: var(--surface); }
.section--dark { background: var(--ink); color: #d5dce4; }
.section--dark h2, .section--dark h3, .section--dark strong { color: #fff; }
.section--dark a { color: #fff; }
.section--tight { padding: calc(var(--section) * .6) 0; }
.section__head { max-width: 760px; margin-bottom: 2rem; }
.section__head--center { text-align: center; margin-left: auto; margin-right: auto; }
.lead { font-size: var(--fs-md); color: var(--muted); }
.section--dark .lead { color: #b9c3ce; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-head); font-weight: 700;
    text-transform: uppercase; letter-spacing: .14em; font-size: var(--fs-sm); color: var(--accent-text); margin: 0 0 .6rem;
}
.eyebrow::before { content: ""; width: 22px; height: 4px; background: var(--accent); }
.eyebrow--light { color: #fff; }

/* -- Hero ------------------------------------------------------------------- */
.hero { position: relative; background: var(--ink); color: #d7dee6; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.hero__inner { position: relative; display: grid; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { color: #c3ccd6; }
.hero .btn--outline { color: #fff; border-color: rgba(255,255,255,.75); }
.hero .btn--outline:hover { background: #fff; color: var(--ink); }
.hero__media { position: relative; }
.hero__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); background: #0b141f; }
.hero__badge {
    position: absolute; left: -.5rem; bottom: -1rem; background: var(--accent); color: var(--on-accent); padding: .75rem 1rem; border-radius: var(--radius);
    font-family: var(--font-head); font-weight: 800; text-transform: uppercase; line-height: 1.05; box-shadow: var(--shadow-lg); font-size: var(--fs-md);
}
.hero__badge small { display: block; font-family: var(--font-body); font-weight: 600; text-transform: none; font-size: var(--fs-xs); }
.hero__points { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .45rem; }
.hero__points li { display: flex; gap: .5rem; align-items: flex-start; }
.hero__points .icon { color: var(--accent); flex: none; margin-top: .25rem; }
.hero--page .hero__inner { padding-top: 2rem; padding-bottom: 2rem; }
@media (min-width: 768px) {
    .hero__inner { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}
@media (min-width: 1024px) {
    .hero__inner { grid-template-columns: 1.05fr .95fr; gap: 3.5rem; padding-top: 4.5rem; padding-bottom: 4.5rem; }
    .hero--page .hero__inner { padding-top: 3.25rem; padding-bottom: 3.25rem; }
}

/* -- Trust strip ------------------------------------------------------------ */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust__list { list-style: none; margin: 0; padding: 1.25rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.trust__item { display: flex; gap: .65rem; align-items: center; }
.trust__item .icon { width: 30px; height: 30px; color: var(--accent-text); flex: none; }
.trust__item strong { display: block; font-family: var(--font-head); font-size: var(--fs-md); line-height: 1.1; }
.trust__item span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.3; display: block; }
@media (min-width: 1024px) { .trust__list { grid-template-columns: repeat(4, 1fr); } }

/* -- Grids & cards ------------------------------------------------------------ */
.grid { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid { gap: 1.5rem; } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } .grid { gap: 2rem; } }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
    display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card__media { background: var(--surface); display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: .5rem; }
.card__media img { max-height: 100%; width: auto; max-width: 100%; }   /* whole photo inside the box */
.card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card__body h3 { margin: 0; }
.card__body p { margin: 0; color: var(--muted); }
.card__meta { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); font-weight: 700; }
.card__more { margin-top: auto; padding-top: .6rem; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; color: var(--ink); display: inline-flex; gap: .4rem; align-items: center; }
.card__more .icon { color: var(--accent); }

.feature { padding: 1.5rem; background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.feature .icon { width: 36px; height: 36px; color: var(--accent-text); margin-bottom: .75rem; }
.feature h3 { font-size: var(--fs-md); }
.feature p { margin: 0; color: var(--muted); }
.section--dark .feature { background: var(--ink-2); border-color: rgba(255,255,255,.08); }
.section--dark .feature p { color: #b9c3ce; }

/* Industry tiles */
.tile { position: relative; display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: inherit; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: #fff; transition: box-shadow .15s, transform .15s; }
.tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.tile__media { background: var(--surface-2); display: flex; justify-content: center; align-items: center; aspect-ratio: 3 / 2; }
.tile__media img { max-height: 100%; width: auto; }
.tile__body { padding: 1.1rem 1.25rem 1.3rem; border-top: 4px solid var(--accent); }
.tile__body h3 { margin: 0 0 .3rem; display: flex; align-items: center; gap: .5rem; }
.tile__body h3 .icon { color: var(--accent-text); }
.tile__body p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

/* -- Split content (text + image) ------------------------------------------- */
.split { display: grid; gap: 2rem; align-items: center; }
.split__media img { width: 100%; border-radius: var(--radius-lg); background: var(--surface); }
.split__media figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: .5rem; }
.split figure { margin: 0; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } .split--flip .split__media { order: -1; } }

/* -- Steps ------------------------------------------------------------------ */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; counter-reset: step; }
.steps li { position: relative; padding: 1.25rem 1.25rem 1.25rem 4.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); counter-increment: step; }
.steps li::before {
    content: counter(step, decimal-leading-zero); position: absolute; left: 1.1rem; top: 1.1rem; font-family: var(--font-head); font-weight: 800;
    font-size: var(--fs-xl); color: var(--accent); line-height: 1;
}
.steps h3 { font-size: var(--fs-md); margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps--4 { grid-template-columns: repeat(4, 1fr); } .steps--4 li { padding: 4rem 1.25rem 1.4rem; } .steps--4 li::before { top: 1.25rem; } }

/* -- Spec tables -------------------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 1.25rem; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; margin: 0; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--ink); color: #fff; font-family: var(--font-head); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; font-size: var(--fs-sm); }
tbody tr:nth-child(even) { background: var(--surface); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.price { font-weight: 700; color: var(--ink); white-space: nowrap; }

.spec-list { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; margin: 0 0 1.5rem; border-top: 1px solid var(--line); }
.spec-list dt, .spec-list dd { padding: .7rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.spec-list dt { font-weight: 700; color: var(--ink); padding-right: 1rem; }

/* -- Product size cards ------------------------------------------------------ */
.size-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.size-card__media { background: #fff; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: .75rem; border-bottom: 1px solid var(--line); }
.size-card__media img { max-height: 100%; width: auto; }
.size-card__body { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.size-card__dims { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-lg); color: var(--ink); line-height: 1.1; }
.size-card__price { font-weight: 700; color: var(--ink); }
.size-card__price span { color: var(--muted); font-weight: 400; font-size: var(--fs-sm); }
.size-card__note { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.size-card .btn { margin-top: auto; }
.size-card .btn + .btn { margin-top: .5rem; }

/* -- Callouts ------------------------------------------------------------------ */
.callout { border-left: 5px solid var(--accent); background: var(--accent-soft); padding: 1.1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.callout p:last-child { margin: 0; }
.callout--ink { background: var(--surface); border-color: var(--ink); }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.9rem; margin-bottom: .55rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem; border-radius: 3px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 75% no-repeat; }
[data-theme="safety-yellow"] .checklist li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1d22' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }

.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0; }
.stat { background: var(--surface); border-radius: var(--radius-lg); padding: 1rem; }
.stat strong { display: block; font-family: var(--font-head); font-size: var(--fs-2xl); line-height: 1; color: var(--ink); }
.stat span { font-size: var(--fs-sm); color: var(--muted); }
@media (min-width: 1024px) { .stat-row--4 { grid-template-columns: repeat(4, 1fr); } }
.section--dark .stat { background: var(--ink-2); }
.section--dark .stat strong { color: var(--accent); }
.section--dark .stat span { color: #b9c3ce; }

/* -- Prose (long-form copy, policies, blog) --------------------------------------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2rem; font-size: var(--fs-xl); }
.prose h3 { margin-top: 1.6rem; font-size: var(--fs-lg); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose figure { margin: 2rem 0; }
.prose figure img { width: 100%; border-radius: var(--radius-lg); background: var(--surface); }
.prose figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: .5rem; }
.prose .table-scroll { margin: 1.5rem 0; }
.updated { font-size: var(--fs-sm); color: var(--muted); }

.layout-aside { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .layout-aside { grid-template-columns: minmax(0, 1fr) 320px; gap: 4rem; } }
.aside-card { position: sticky; top: calc(var(--header-h) + 1.5rem); background: var(--ink); color: #c9d2dc; border-radius: var(--radius-lg); padding: 1.5rem; }
.aside-card h2, .aside-card h3 { color: #fff; font-size: var(--fs-lg); }
.aside-card .btn { width: 100%; margin-top: .6rem; }
.aside-card .btn--outline { color: #fff; border-color: rgba(255,255,255,.7); }
.aside-card .btn--outline:hover { background: #fff; color: var(--ink); }
.aside-card ul { padding-left: 1.1rem; font-size: var(--fs-sm); }

/* -- FAQ --------------------------------------------------------------------- */
.faq-separator { border: 0; height: 6px; margin: 0; background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, transparent 10px 20px); opacity: .9; border-radius: 3px; }
.section--faq { padding-top: calc(var(--section) * .75); }
.faq-list { display: grid; gap: .75rem; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.faq summary {
    list-style: none; cursor: pointer; padding: 1.1rem 3.25rem 1.1rem 1.25rem; position: relative;
    font-family: var(--font-head); font-weight: 700; font-size: var(--fs-md); color: var(--ink); line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-size: 1.3rem; font-family: var(--font-body); }
.faq[open] summary::after { content: "−"; }
.faq__body { padding: 0 1.25rem 1.1rem; }
.faq__body p:last-child { margin: 0; }

/* -- CTA band & footer ------------------------------------------------------- */
.cta-band { background: var(--accent); color: var(--on-accent); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(0,0,0,.05) 0 18px, transparent 18px 36px); }
.cta-band__inner { position: relative; display: grid; gap: 1.5rem; padding-top: 3rem; padding-bottom: 3rem; align-items: center; }
.cta-band__title { color: var(--on-accent); font-size: var(--fs-2xl); margin-bottom: .4rem; }
.cta-band__text { margin: 0; max-width: 640px; }
.cta-band .eyebrow { color: var(--on-accent); }
.cta-band .eyebrow::before { background: var(--on-accent); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.cta-band__actions .btn { flex: 1 1 200px; }
.cta-band .btn--primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.cta-band .btn--primary:hover { background: var(--ink-2); }
.cta-band .btn--ghost { color: var(--on-accent); border-color: var(--on-accent); }
.cta-band .btn--ghost:hover { background: var(--on-accent); color: var(--accent); }
[data-theme="safety-yellow"] .cta-band .btn--ghost:hover { color: #fff; }
@media (min-width: 1024px) { .cta-band__inner { grid-template-columns: 1fr auto; } .cta-band__actions .btn { flex: 0 0 auto; } }

.site-footer { background: #0e1620; color: #aab5c2; font-size: var(--fs-sm); --logo-ink: #ffffff; }
[data-theme="safety-yellow"] .site-footer, [data-theme="signal-red"] .site-footer { background: #121317; }
.site-footer a { color: #dce3ea; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer__grid { display: grid; gap: 2rem; padding-top: 3rem; padding-bottom: 2.5rem; }
.site-footer__brand .logo { height: 44px; width: auto; margin-bottom: 1rem; }
.site-footer__heading { color: #fff; font-size: var(--fs-md); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .9rem; }
.site-footer__heading--spaced { margin-top: 1.5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.contact-list li { display: flex; gap: .55rem; align-items: flex-start; }
.contact-list .icon { color: var(--accent); flex: none; margin-top: .2rem; width: 17px; height: 17px; }
.hours li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed rgba(255,255,255,.12); padding-bottom: .35rem; }
.site-footer__base { border-top: 1px solid rgba(255,255,255,.08); }
.site-footer__base-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; font-size: var(--fs-xs); }
.site-footer__base p { margin: 0; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 3rem; } }

/* -- Gallery (projects) --------------------------------------------------------- */
.gallery { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.gallery figure { margin: 0; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.gallery__img { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #fff; }
.gallery__img img { max-height: 100%; width: auto; }
.gallery figcaption { padding: .75rem 1rem; font-size: var(--fs-sm); color: var(--ink); font-weight: 600; }
.gallery figcaption span { display: block; color: var(--muted); font-weight: 400; font-size: var(--fs-xs); }
.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip { border: 1.5px solid var(--line); background: #fff; color: var(--ink); padding: .5rem .9rem; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: var(--fs-sm); font-family: var(--font-body); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* -- Blog ------------------------------------------------------------------------ */
.post-card .card__media { aspect-ratio: 16 / 10; }
.post-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 1.25rem; }
.post-hero-img { margin: 0 0 2rem; background: var(--surface); border-radius: var(--radius-lg); }
.post-hero-img img { width: 100%; border-radius: var(--radius-lg); }
.keyword-tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.keyword-tags li { background: var(--surface); border-radius: 999px; padding: .2rem .7rem; font-size: var(--fs-xs); color: var(--muted); }

/* -- Contact ---------------------------------------------------------------------- */
.contact-cards { display: grid; gap: 1rem; }
@media (min-width: 768px) { .contact-cards { grid-template-columns: repeat(2, 1fr); } }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.35rem; }
.contact-card .icon { width: 30px; height: 30px; color: var(--accent-text); margin-bottom: .5rem; }
.contact-card h3 { font-size: var(--fs-md); margin-bottom: .25rem; }
.contact-card p { margin: 0; }
.map-embed { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); background: var(--surface); }
@media (min-width: 1024px) { .map-embed { aspect-ratio: 16 / 10; } }

/* -- 404 ----------------------------------------------------------------------------- */
.notfound { text-align: center; padding: var(--section) 0; }
.notfound__code { font-family: var(--font-head); font-weight: 800; font-size: clamp(5rem, 22vw, 11rem); line-height: .9; color: var(--ink); margin: 0; letter-spacing: -.02em; }
.notfound__code span { color: var(--accent); }
.notfound__rack { width: min(320px, 80%); margin: 1rem auto 1.5rem; }
.notfound .btn-row { justify-content: center; }
.notfound__links { display: grid; gap: .75rem; max-width: 900px; margin: 2.5rem auto 0; text-align: left; }
@media (min-width: 768px) { .notfound__links { grid-template-columns: repeat(3, 1fr); } }

/* -- Forms ------------------------------------------------------------------------- */
.form-shell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.25rem; }
@media (min-width: 768px) { .form-shell { padding: 2rem; } }
@media (min-width: 1024px) { .form-shell { padding: 2.5rem; } }
.form-section { border: 0; padding: 0; margin: 0 0 2rem; min-width: 0; }
.form-section > legend, .form-section__title {
    font-family: var(--font-head); font-weight: 700; font-size: var(--fs-lg); color: var(--ink); margin-bottom: 1rem; padding: 0;
    display: flex; align-items: center; gap: .6rem;
}
.form-section__num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: var(--fs-base); flex: none; }
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 768px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } .form-grid--3 { grid-template-columns: repeat(3, 1fr); } .span-2 { grid-column: span 2; } }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label, .field .label { font-weight: 600; color: var(--ink); font-size: var(--fs-sm); }
.req { color: var(--danger); }
.hint { font-size: var(--fs-xs); color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], select, textarea {
    width: 100%; font: inherit; font-size: 16px; /* 16px stops iOS zooming */ color: var(--text); background: #fff;
    border: 1.5px solid #c5ced8; border-radius: var(--radius); padding: .75rem .85rem; min-height: 48px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: var(--fs-xs); font-weight: 600; }
.choice-grid { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .choice-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .choice-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.choice { position: relative; display: flex; gap: .55rem; align-items: center; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; font-size: var(--fs-sm); background: #fff; line-height: 1.3; }
.choice input { width: 18px; height: 18px; accent-color: var(--accent-strong); flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.dropzone {
    border: 2px dashed #b8c3cf; border-radius: var(--radius-lg); padding: 1.75rem 1rem; text-align: center; background: var(--surface);
    cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .icon { width: 40px; height: 40px; color: var(--accent-text); margin: 0 auto .5rem; display: block; }
.dropzone p { margin: 0 0 .25rem; font-weight: 600; color: var(--ink); }
.dropzone u { color: var(--link); }
.file-list { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .4rem; }
.file-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .75rem; font-size: var(--fs-sm); }
.file-list button { border: 0; background: none; color: var(--danger); font-weight: 700; cursor: pointer; padding: .25rem .5rem; font-size: var(--fs-sm); }
.file-list .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.form-errors { display: none; border: 1.5px solid var(--danger); background: #fef3f2; color: var(--danger); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.form-errors.is-visible { display: block; }
.form-errors ul { margin: .25rem 0 0; padding-left: 1.2rem; }
.form-success { display: none; text-align: center; padding: 2.5rem 1rem; }
.form-success.is-visible { display: block; }
.form-success__tick { width: 72px; height: 72px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; margin: 0 auto 1rem; }
.form-success__tick .icon { width: 40px; height: 40px; }
.form-success .ref { display: inline-block; font-family: var(--font-head); font-weight: 800; font-size: var(--fs-xl); background: var(--surface); padding: .35rem 1rem; border-radius: var(--radius); color: var(--ink); letter-spacing: .05em; }
.submit-note { font-size: var(--fs-xs); color: var(--muted); margin-top: .75rem; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Order picker */
.picker-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.picker-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .picker-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .picker-grid { grid-template-columns: repeat(4, 1fr); } }
.pick { border: 1.5px solid var(--line); border-radius: var(--radius-lg); background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.pick__img { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: .4rem; border-bottom: 1px solid var(--line); }
.pick__img img { max-height: 100%; width: auto; }
.pick__body { padding: .65rem .75rem .8rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.pick__name { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.pick__dims { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-md); color: var(--ink); line-height: 1.15; }
.pick__price { font-size: var(--fs-sm); }
.pick .btn { margin-top: .5rem; min-height: 42px; padding: .55rem .5rem; font-size: var(--fs-sm); }
.pick .btn.is-added { background: var(--success); border-color: var(--success); color: #fff; }

.basket { border: 1.5px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 1rem; margin-top: 1.25rem; }
.basket__empty { text-align: center; color: var(--muted); margin: .5rem 0; }
.basket__row { display: grid; grid-template-columns: 56px 1fr; gap: .75rem; padding: .75rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: .6rem; }
.basket__row img { width: 56px; height: 56px; object-fit: contain; }
.basket__title { font-weight: 700; color: var(--ink); line-height: 1.25; }
.basket__controls { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; margin-top: .45rem; font-size: var(--fs-sm); }
.basket__controls select { width: auto; min-height: 40px; padding: .35rem .5rem; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid #c5ced8; border-radius: var(--radius); overflow: hidden; }
.qty button { width: 38px; height: 38px; border: 0; background: var(--surface); font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.qty output { min-width: 34px; text-align: center; font-weight: 700; }
.basket__line { font-weight: 700; color: var(--ink); margin-left: auto; }
.basket__remove { border: 0; background: none; color: var(--danger); cursor: pointer; font-weight: 600; padding: 0; font-size: var(--fs-sm); }
.basket__total { display: flex; justify-content: space-between; align-items: baseline; padding: .75rem .25rem 0; border-top: 2px solid var(--ink); margin-top: .5rem; font-family: var(--font-head); font-size: var(--fs-lg); color: var(--ink); font-weight: 700; }
.basket__note { font-size: var(--fs-xs); color: var(--muted); margin: .4rem .25rem 0; }

/* -- Utilities ------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }

/* Hero without an image: let the text use the full width. */
.hero__inner > :only-child { grid-column: 1 / -1; max-width: 860px; }

/* Grid/flex children must be allowed to shrink, or a wide table inside
   .table-scroll pushes the whole page sideways on phones. */
.layout-aside > *, .split > *, .grid > *, .hero__inner > * { min-width: 0; }
.h3 { font-size: var(--fs-lg); }

/* Floating order summary on the Order Now page */
.basket-peek {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 46;
    background: var(--success); color: #fff; border: 0; border-radius: 999px; padding: .75rem 1.25rem; font: 700 var(--fs-sm)/1.2 var(--font-body);
    box-shadow: var(--shadow-lg); cursor: pointer; max-width: calc(100% - 2rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 1024px) { .basket-peek { bottom: 1.5rem; } }
