/* =========================================================
   NOVA Formtech: site styles
   Brand: Poppins, orange #dd6b3a, warm grey backgrounds
   ========================================================= */

:root {
    --brand: #dd6b3a;
    --brand-dark: #c4592b;
    --brand-light: #f0a54b;
    --brand-tint: #fdf1e8;
    --ink: #1d1d1f;
    --muted: #5f6368;
    --line: #e6e2dd;
    --bg: #ffffff;
    --bg-alt: #f7f5f2;
    --footer: #1d1d1f;
    --radius: 12px;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
    --max: 1200px;
    --header-h: 76px;      /* sticky header height; product menu sticks right under it */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Poppins", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

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

/* Orange full stop after headings, like the company profile ("About Us.") */
.dot::after { content: "."; color: var(--brand); }

/* Small label above headings: orange line + uppercase text */
.label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 14px;
}
.label::before { content: ""; width: 28px; height: 2px; background: currentColor; }

.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); }
.section.tight { padding: 64px 0; }

.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.02rem; }
.section-head.row {
    max-width: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}
.section-head.row > div { max-width: 640px; }

.lead { font-size: 1.08rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.8); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-white { background: #fff; color: var(--brand); }
.btn-white:hover { background: var(--ink); color: #fff; }

.text-link { color: var(--brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }

/* ---------- Top bar (desktop only) ---------- */
.topbar { background: var(--bg-alt); border-bottom: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 20px; }
.topbar .links { display: flex; gap: 24px; }
.topbar a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--brand); }
.topbar svg { width: 14px; height: 14px; color: var(--brand); }

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand img { height: 40px; width: auto; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--muted);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--brand); border-bottom-color: var(--brand); }
.nav .nav-cta { display: none; }
.header-cta { padding: 10px 20px; font-size: 0.88rem; }

.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); width: 44px; height: 44px; }

/* ---------- Home hero ---------- */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    /* Fill the screen below the top bar and header (svh = correct height on phones) */
    min-height: calc(100vh - var(--header-h) - 38px);
    min-height: calc(100svh - var(--header-h) - 38px);
    display: flex;
    align-items: center;
    padding: 72px 0 96px;
    color: #fff;
    background: var(--ink);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background: url("images/hero.webp") center / cover no-repeat; }
@media (max-width: 960px) { .hero-bg { background-image: url("images/hero-960.webp"); } }
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(20, 20, 20, 0.85) 0%, rgba(20, 20, 20, 0.55) 45%, rgba(20, 20, 20, 0.1) 100%);
}
.hero .label { color: var(--brand-light); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700; max-width: 820px; margin-bottom: 20px; }
.hero h1 span { color: var(--brand-light); }
.hero p { font-size: 1.12rem; max-width: 520px; opacity: 0.92; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #fff;
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.8;
}
.scroll-cue svg { width: 22px; height: 22px; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Numbers bar ---------- */
.numbers { border-bottom: 1px solid var(--line); scroll-margin-top: var(--header-h); }
.numbers .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { display: block; font-size: 2.3rem; font-weight: 700; color: var(--brand); line-height: 1.1; letter-spacing: -0.03em; }
.stat span { font-size: 0.88rem; color: var(--muted); }

/* ---------- Developer name strip ---------- */
.trusted { padding: 36px 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.trusted p { text-align: center; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.marquee { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee ul { display: flex; list-style: none; margin: 0; padding: 0; }
.marquee li { font-size: 1.15rem; font-weight: 600; color: #a39e98; white-space: nowrap; padding: 0 28px; position: relative; }
.marquee li::after { content: ""; position: absolute; right: -3px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); transform: translateY(-50%); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Split layout (text + image) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split > img, .split .media img { border-radius: var(--radius); width: 100%; }
/* Home SCP section: the 3D model gets the wider column */
.split.split-3d { grid-template-columns: 1.6fr 1fr; gap: 48px; }
/* Model fills its column; height fits the screen (title sits above, in the section head) */
.split-3d .scp-3d { aspect-ratio: auto; height: clamp(460px, calc(100svh - var(--header-h) - 64px), 820px); }
.split-3d .parts { margin-top: 0; }
.media { position: relative; }
.media.framed { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }

/* ---------- SCP feature (home) ---------- */
.parts { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 4px; }
.parts li { display: grid; grid-template-columns: 48px 1fr; gap: 0 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.parts li:last-child { border-bottom: 1px solid var(--line); }
.parts .n { grid-row: span 2; font-size: 1.4rem; font-weight: 700; color: var(--brand); line-height: 1.2; }
.parts strong { font-weight: 600; }
.parts span:not(.n) { color: var(--muted); font-size: 0.93rem; }

.callout {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--brand-tint);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 28px;
}
.callout strong { font-size: 2rem; color: var(--brand); line-height: 1; letter-spacing: -0.03em; }
.callout span { font-size: 0.93rem; }

/* ---------- Product tiles (home) ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tile {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    color: #fff;
    text-decoration: none;
    background: var(--ink);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.tile:hover img { transform: scale(1.05); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(15, 15, 15, 0.85) 100%); }
.tile .body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 26px 28px; }
.tile .num { font-size: 0.8rem; font-weight: 600; color: var(--brand-light); letter-spacing: 0.1em; }
.tile h3 { font-size: 1.45rem; margin: 4px 0 6px; }
.tile p { margin: 0; font-size: 0.93rem; opacity: 0.88; max-width: 440px; }
.tile .arrow {
    position: absolute;
    right: 24px;
    bottom: 26px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    transition: transform 0.25s;
}
.tile:hover .arrow { transform: translateX(4px); }

/* ---------- Numbered points (Why Nova, values) ---------- */
.points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.point { padding: 8px 28px 8px 0; margin-right: 28px; border-right: 1px solid var(--line); }
.point:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.point .n { display: block; font-size: 2.6rem; font-weight: 700; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--brand); margin-bottom: 18px; }
.point h3 { margin-bottom: 8px; }
.point p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ---------- Featured projects (home): one large + two small ---------- */
.bento { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 20px; height: 620px; }
.bento .feature:first-child { grid-row: span 2; }
.feature {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    color: #fff;
    background: var(--ink);
}
.feature img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.feature:hover img { transform: scale(1.04); }
.feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(15, 15, 15, 0.85) 100%); }
.feature .body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 22px 24px; }
.feature h3 { font-size: 1.3rem; margin: 0 0 2px; }
.feature:first-child h3 { font-size: 1.7rem; }
.feature .location { color: var(--brand-light); font-size: 0.88rem; font-weight: 500; }
.feature .dev { font-size: 0.82rem; opacity: 0.8; margin-top: 4px; }

/* ---------- Generic cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.section.alt .card { border-color: transparent; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.card .n { display: inline-block; font-size: 0.85rem; font-weight: 700; color: var(--brand); margin-bottom: 8px; }

/* Feature list with orange ticks */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 32px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dd6b3a' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.ticks strong { display: block; font-weight: 600; }
.ticks span { color: var(--muted); font-size: 0.92rem; }
.ticks.four { grid-template-columns: repeat(4, 1fr); }

/* ---------- Inner page banner (photo) ---------- */
.page-hero {
    position: relative;
    isolation: isolate;
    color: #fff;
    padding: 96px 0 72px;
    background: var(--ink) var(--bg-img) center / cover no-repeat;
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(20, 20, 20, 0.85) 0%, rgba(20, 20, 20, 0.55) 60%, rgba(20, 20, 20, 0.3) 100%);
}
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--brand), var(--brand-light)); }
.crumbs { font-size: 0.82rem; opacity: 0.8; margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--brand-light); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; margin-bottom: 12px; }
.page-hero p { max-width: 620px; opacity: 0.92; margin: 0; font-size: 1.05rem; }

/* ---------- About: vision & mission ---------- */
.statement { padding-left: 24px; border-left: 4px solid var(--brand); }
.statement h3 { font-size: 1.4rem; margin-bottom: 12px; }
.statement p { color: var(--muted); margin: 0; }

/* Partner name tiles */
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.names span {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
}
.section.alt .names span { border-color: transparent; }

/* ---------- Products page ---------- */
.product-nav { position: sticky; top: var(--header-h); z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.product-nav .container { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; }
.product-nav .container::-webkit-scrollbar { display: none; }
.product-nav a {
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--bg-alt);
}
.product-nav a:hover { background: var(--brand-tint); color: var(--brand); }
.product { scroll-margin-top: calc(var(--header-h) + 70px); }
.product .sub { margin: 64px 0 20px; font-size: 1.25rem; }

.photo-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; }
.photo-row img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; background: #fff; border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { background: var(--ink); color: #fff; font-weight: 600; }
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table td:first-child { font-weight: 600; white-space: nowrap; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 0.84rem; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; margin: 0; }
.steps li { list-style: none; counter-increment: step; background: #fff; border-radius: var(--radius); padding: 20px; font-size: 0.88rem; color: var(--muted); border-top: 3px solid var(--brand); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-size: 1.4rem; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.steps strong { display: block; color: var(--ink); margin-bottom: 4px; }

.product-video { width: 100%; border-radius: var(--radius); background: #000; aspect-ratio: 16 / 9; }

/* ---------- Projects ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.filters button {
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filters button:hover { border-color: var(--brand); color: var(--brand); }
.filters button.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.project-card { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform 0.25s, box-shadow 0.25s; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1); }
.project-card .photo { position: relative; overflow: hidden; }
.project-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform 0.6s ease; }
.project-card:hover img { transform: scale(1.05); }
.project-card .tag { position: absolute; top: 14px; left: 14px; background: var(--brand); color: #fff; font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; }
.project-card .tag.upcoming { background: var(--ink); }
.project-card .body { padding: 20px 22px 24px; }
.project-card h3 { margin-bottom: 2px; }
.project-card .location { color: var(--brand); font-size: 0.88rem; font-weight: 500; margin-bottom: 14px; }
.project-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 0.86rem; padding-top: 14px; border-top: 1px solid var(--line); }
.project-card dt { color: var(--muted); }
.project-card dd { margin: 0; font-weight: 500; }

/* ---------- Gallery ---------- */
.gallery { columns: 3 280px; column-gap: 14px; }
.gallery figure { margin: 0 0 14px; break-inside: avoid; border-radius: 10px; overflow: hidden; position: relative; cursor: zoom-in; }
.gallery img { width: 100%; transition: transform 0.4s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 10px; color: #fff; font-size: 0.85rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.9); display: none; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox.open { display: grid; animation: fade-in 0.25s ease both; }
.lightbox img { max-height: 86vh; border-radius: 8px; animation: zoom-in 0.35s cubic-bezier(.2, .8, .2, 1) both; }
.lightbox p { color: #fff; text-align: center; margin-top: 12px; }

/* ---------- Contact ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.contact-card {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}
a.contact-card:hover { border-color: var(--brand); transform: translateY(-3px); }
.contact-card .icon { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.contact-card .icon svg { width: 22px; height: 22px; }
.contact-card h3 { margin-bottom: 6px; }
.contact-card p { color: var(--muted); margin: 0; }
.contact-card .value { color: var(--ink); font-weight: 600; }
.map { border: 0; width: 100%; height: 440px; border-radius: var(--radius); display: block; }

/* ---------- Contact band ---------- */
.cta-band { background: linear-gradient(120deg, var(--brand) 0%, var(--brand-light) 100%); color: #fff; padding: 72px 0; }
.cta-band .container { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { margin: 0; opacity: 0.95; font-size: 1.05rem; }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band .btn-ghost:hover { color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #c9c9c9; padding: 64px 0 24px; font-size: 0.9rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer img { height: 34px; width: auto; margin-bottom: 16px; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 0.95rem; }
.site-footer a { color: #c9c9c9; text-decoration: none; display: block; margin-bottom: 8px; }
.site-footer a:hover { color: var(--brand-light); }
.site-footer .tagline { color: var(--brand-light); font-style: italic; }
.site-footer .bottom { border-top: 1px solid #333; margin-top: 44px; padding-top: 20px; font-size: 0.8rem; text-align: center; }

/* =========================================================
   Animations (light; switched off for "reduce motion")
   ========================================================= */
.hero-bg { animation: hero-zoom 12s ease-out both; }
@keyframes hero-zoom { from { transform: scale(1.1); } to { transform: scale(1); } }
.hero .label, .hero h1, .hero p, .hero .actions, .page-hero .crumbs, .page-hero h1, .page-hero p {
    animation: fade-up 0.9s cubic-bezier(.2, .8, .2, 1) both;
}
.hero h1, .page-hero h1 { animation-delay: 0.12s; }
.hero p, .page-hero p { animation-delay: 0.28s; }
.hero .actions { animation-delay: 0.42s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoom-in { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* Scroll reveal: only hidden while JS runs, so content never goes missing */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
    .marquee { flex-wrap: wrap; width: auto; justify-content: center; }
    .marquee ul[aria-hidden] { display: none; }
    .marquee ul { flex-wrap: wrap; justify-content: center; row-gap: 10px; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
    .nav { gap: 22px; }
    .points { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
    .point:nth-child(2) { border-right: 0; margin-right: 0; padding-right: 0; }
    .ticks.four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    :root { --header-h: 64px; }
    .topbar { display: none; }
    .hero { min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); }
    .brand img { height: 32px; }
    .header-cta { display: none; }
    .nav-toggle { display: block; }
    .nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 30px rgba(0, 0, 0, 0.1);
        padding: 4px 20px 16px;
    }
    .nav.open { display: flex; }
    .nav a { padding: 14px 0; font-size: 1rem; color: var(--ink); border-bottom: 1px solid var(--line); }
    .nav a.active { border-bottom-color: var(--line); }
    .nav .nav-cta { display: block; margin-top: 14px; border: 0; text-align: center; color: #fff; padding: 13px; }

    .split, .split.reverse, .split.split-3d { grid-template-columns: 1fr; gap: 36px; }
    .split-3d .scp-3d { aspect-ratio: 1 / 1; height: auto; } /* full width when stacked: square, not too tall */
    .split.reverse > :first-child { order: 0; }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .bento { grid-template-columns: 1fr 1fr; grid-template-rows: 320px 220px; height: auto; }
    .bento .feature:first-child { grid-row: auto; grid-column: span 2; }
    .contact-cards { grid-template-columns: 1fr; }
    .site-footer .cols { grid-template-columns: 1fr 1fr; }
    .site-footer .cols > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .section { padding: 60px 0; }
    .section-head { margin-bottom: 28px; }
    h2 { font-size: 1.7rem; }

    /* Hero: text sits low over a bottom-up shade so it stays readable */
    .hero { align-items: flex-end; padding: 40px 0 72px; }
    .hero::before { background: linear-gradient(180deg, rgba(20, 20, 20, 0.2) 0%, rgba(20, 20, 20, 0.55) 40%, rgba(20, 20, 20, 0.9) 100%); }
    .hero h1 { font-size: 2.4rem; }
    .hero p { font-size: 1rem; }
    .hero .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
    .hero .actions .btn { justify-content: center; padding: 12px 8px; }
    .scroll-cue { display: none; }

    /* Numbers: 2 x 2 */
    .numbers .container { grid-template-columns: 1fr 1fr; }
    .stat { padding: 22px 12px; }
    .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
    .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .stat strong { font-size: 1.6rem; }
    .stat span { font-size: 0.8rem; display: block; line-height: 1.4; margin-top: 4px; }

    .trusted { padding: 28px 0; }
    .marquee li { font-size: 1rem; padding: 0 20px; }

    /* Product tiles and featured projects swipe sideways, next card peeks in */
    .tiles, .bento {
        display: grid;
        grid-template-columns: none;
        grid-template-rows: none;
        grid-auto-flow: column;
        grid-auto-columns: 82%;
        gap: 12px;
        height: auto;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin: 0 -16px;
        padding: 0 16px 8px;
        scroll-padding: 0 16px;
        scrollbar-width: none;
    }
    .tiles::-webkit-scrollbar, .bento::-webkit-scrollbar { display: none; }
    .tiles > *, .bento > * { scroll-snap-align: start; }
    .tile { aspect-ratio: 4 / 5; }
    .tile .body { padding: 20px; }
    .tile h3 { font-size: 1.25rem; }
    .tile .arrow { display: none; }
    .bento .feature, .bento .feature:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 5; }
    .feature:first-child h3 { font-size: 1.3rem; }

    .points { grid-template-columns: 1fr; row-gap: 0; }
    .point { border-right: 0; margin-right: 0; padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; }
    .point:last-child { border-bottom: 0; }
    .point .n { grid-row: span 2; font-size: 2rem; margin: 0; }

    .grid { gap: 12px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .card { padding: 18px; }
    .grid-4 .card h3 { font-size: 0.95rem; }
    .grid-4 .card p { font-size: 0.85rem; }
    .ticks, .ticks.four { grid-template-columns: 1fr; gap: 14px; }

    .page-hero { padding: 60px 0 44px; background-image: var(--bg-img-sm, var(--bg-img)); }
    .page-hero p { font-size: 0.95rem; }
    .product-nav .container {
        -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent);
        mask-image: linear-gradient(90deg, #000 80%, transparent);
    }
    .product-nav a { font-size: 0.82rem; padding: 6px 14px; }
    .product .sub { margin-top: 48px; }
    .photo-row { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
    .filters { gap: 8px; margin-bottom: 20px; }
    .filters button { font-size: 0.82rem; padding: 7px 14px; }
    .map { height: 300px; }
    .names { grid-template-columns: 1fr 1fr; gap: 8px; }
    .names span { min-height: 56px; font-size: 0.84rem; padding: 10px 14px; }

    .cta-band { padding: 52px 0; text-align: center; }
    .cta-band .container { justify-content: center; }
    .cta-band .actions { width: 100%; display: grid; gap: 10px; }
    .cta-band .btn { justify-content: center; }

    .site-footer { padding: 44px 0 20px; }
    .site-footer .cols { grid-template-columns: 1fr 1.4fr; gap: 28px 20px; }
}

/* Touch screens have no hover: stop cards jumping or staying zoomed after a tap */
@media (hover: none) {
    .btn:hover, .project-card:hover, a.contact-card:hover { transform: none; box-shadow: none; }
    .tile:hover img, .feature:hover img, .project-card:hover img, .gallery figure:hover img { transform: none; }
}

/* ---------- SCP 3D preview ---------- */
.scp-3d { aspect-ratio: 4 / 5; padding: 0; overflow: hidden; background: radial-gradient(circle at 50% 35%, #fff 0%, var(--bg-alt) 100%); }
.scp-3d > img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.scp-3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.scp-3d canvas:active { cursor: grabbing; }
.scp-3d.is-live > img { display: none; }
.scp-3d-label {
    position: absolute; top: 0; left: 0; white-space: nowrap; cursor: pointer;
    margin: -12px 0 0 -11px; padding: 4px 10px 4px 20px; border: 0; border-radius: 999px;
    background: rgba(29, 29, 31, 0.85); color: #fff; font: inherit; font-size: 0.72rem; font-weight: 500;
    transition: opacity 0.3s, background 0.2s;
}
.scp-3d-label:hover, .scp-3d-label[aria-pressed="true"] { background: var(--brand); }
.scp-3d-label[aria-pressed="true"]::before { background: #fff; }
.scp-3d-label:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.scp-3d-label::before { content: ""; position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--brand); }
.scp-3d-ui { position: absolute; inset: 12px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; z-index: 1; }
.scp-3d-layouts, .scp-3d-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; pointer-events: auto; }
.scp-3d-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.scp-3d-hint { margin: 0; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); font-size: 0.75rem; color: var(--muted); }
.scp-3d-hint[hidden] { display: none; }
.scp-3d-label-desc { display: none; }
.scp-3d.labels-off .scp-3d-label { display: none; }
.scp-3d-ui button {
    font: inherit; font-size: 0.78rem; font-weight: 500; min-height: 34px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(255, 255, 255, 0.92); color: var(--ink); cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.scp-3d-ui button:hover { border-color: var(--brand); }
.scp-3d-ui button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.scp-3d-ui button:disabled { opacity: 0.4; cursor: default; }
.scp-3d-ui button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.scp-3d-zoom {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%); pointer-events: auto;
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px;
    border-radius: 999px; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line);
    font-size: 0.95rem; font-weight: 600; color: var(--ink); line-height: 1;
}
.scp-3d-zoom input { writing-mode: vertical-lr; direction: rtl; width: 22px; height: 140px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.scp-3d-wheel-hint {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; margin: 0; pointer-events: none;
    padding: 10px 18px; border-radius: 999px; background: rgba(29, 29, 31, 0.85); color: #fff; font-size: 0.85rem;
    opacity: 0; transition: opacity 0.25s;
}
.scp-3d-wheel-hint.is-visible { opacity: 1; }
.scp-3d-stepper { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.8rem; }
.scp-3d-stepper span { padding: 0 8px; white-space: nowrap; }
.scp-3d-stepper strong { font-size: 0.95rem; }
.scp-3d-ui .scp-3d-stepper button { width: 32px; min-height: 32px; padding: 0; font-size: 1.1rem; border: 0; background: var(--brand); color: #fff; }
.scp-3d-ui .scp-3d-stepper button:hover { background: var(--brand-dark); }
.scp-3d-readout { font-size: 0.75rem; color: var(--muted); padding: 0 4px; }
/* Parts list linked to the model */
.parts.is-linked li { cursor: pointer; border-radius: 8px; transition: background 0.2s, padding 0.2s; }
.parts.is-linked li:hover, .parts.is-linked li.is-active { background: var(--brand-tint); padding-left: 12px; padding-right: 12px; }
.parts.is-linked li:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.scp-3d:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 0; }
.scp-3d:fullscreen .scp-3d-ui { inset: 24px; }
/* Fullscreen component zoom (scp-detail.js): title panel, tabs and callouts over the live model */
.scp-3d-detail, .scp-3d-callouts { display: none; }
.scp-3d.is-detail .scp-3d-ui, .scp-3d.is-detail .scp-3d-label, .scp-3d.is-detail .scp-3d-wheel-hint { display: none; }
.scp-3d.is-detail .scp-3d-detail { display: flex; }
.scp-3d.is-detail .scp-3d-callouts { display: block; }
.scp-3d-detail {
    position: absolute; inset: 24px; z-index: 2; flex-direction: column; justify-content: space-between; align-items: flex-start;
    pointer-events: none; color: #fff;
}
.scp-3d-detail > * { pointer-events: auto; animation: scp-detail-in 0.5s 0.2s cubic-bezier(.2, .8, .2, 1) both; }
.scp-3d-detail-head {
    max-width: 420px; padding: 16px 18px 18px; border-radius: 16px;
    background: rgba(29, 29, 31, 0.78); backdrop-filter: blur(8px); box-shadow: var(--shadow);
}
.scp-3d-detail-eyebrow { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-light); margin-bottom: 12px; }
.scp-3d-detail-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.scp-3d-detail button {
    font: inherit; font-size: 0.82rem; font-weight: 500; min-height: 36px; padding: 0 16px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: #fff;
    transition: background 0.2s, border-color 0.2s;
}
.scp-3d-detail button b { color: var(--brand-light); font-weight: 700; margin-right: 4px; }
.scp-3d-detail button:hover { border-color: var(--brand-light); }
.scp-3d-detail button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); }
.scp-3d-detail button[aria-pressed="true"] b { color: #fff; }
.scp-3d-detail button:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 2px; }
.scp-3d-detail .scp-3d-detail-back { background: rgba(29, 29, 31, 0.85); border-color: transparent; }
.scp-3d-detail p { margin: 14px 0 0; font-size: 0.95rem; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
@keyframes scp-detail-in { from { opacity: 0; transform: translateY(8px); } }
/* Callout: a dot on the part, a line rising away from the centre, and the name at its end */
.scp-3d-callouts { position: absolute; inset: 0; pointer-events: none; z-index: 1; transition: opacity 0.3s; }
.scp-3d.is-flying .scp-3d-callouts { opacity: 0; transition-duration: 0.1s; }
.scp-3d-callout { position: absolute; top: 0; left: 0; transition: opacity 0.3s; }
.scp-3d-callout i { position: absolute; z-index: 1; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px #fff, 0 0 0 7px rgba(221, 107, 58, 0.25); }
.scp-3d-callout::before {
    content: ""; position: absolute; left: 0; top: 0; width: var(--len, 58px); height: 1.5px; background: var(--ink);
    transform-origin: 0 50%; transform: rotate(var(--ang, -38deg));
}
.scp-3d-callout span {
    position: absolute; left: 44px; top: calc(-36px + var(--dy, 0px)); transform: translate(var(--dx, 0px), -50%); white-space: nowrap;
    padding: 5px 12px; border-radius: 999px; background: rgba(29, 29, 31, 0.85); color: #fff;
    font-size: 0.85rem; font-weight: 500;
}
.scp-3d-callout.is-left span { left: auto; right: 44px; }
@media (prefers-reduced-motion: reduce) { .scp-3d-detail > * { animation: none; } }
@media (max-width: 600px) {
    .scp-3d, .split-3d .scp-3d { aspect-ratio: 4 / 5; }
    .scp-3d-label, .scp-3d-readout, .scp-3d-fs, .scp-3d-labels-btn { display: none; }
    .scp-3d-ui { inset: 10px; }
    .scp-3d-ui button { font-size: 0.72rem; padding: 0 10px; }
    .scp-3d-zoom input { height: 100px; }
    /* Component view: a slim strip at the top so the model stays visible */
    .scp-3d-detail { inset: 10px; }
    .scp-3d-detail-head { align-self: stretch; max-width: none; padding: 8px; border-radius: 12px; }
    .scp-3d-detail-eyebrow { display: none; }
    .scp-3d-detail-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
    .scp-3d-detail-tabs button { min-width: 0; padding: 5px 4px; border-radius: 10px; line-height: 1.2; text-align: center; }
    .scp-3d-detail-tabs button b { display: block; margin: 0; }
    .scp-3d-detail button { font-size: 0.7rem; min-height: 36px; }
    .scp-3d-detail p { margin: 6px 4px 0; font-size: 0.76rem; line-height: 1.4; }
    .scp-3d-callout span { font-size: 0.72rem; padding: 4px 9px; }
    /* iPhone overlay: keep the panel and Back button clear of the notch and home bar */
    .scp-3d.is-expanded .scp-3d-detail {
        inset: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    }
}
