/**
 * SPCL TECH — COMPONENT SYSTEM · v2
 * Load after css/tokens.css. Nothing here hardcodes a colour or a size; if you
 * need a new value, add a token rather than a literal.
 */

/* ══ RESET ══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    font-size: var(--t-body);
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    /* Layered ground — two warm washes, never a flat fill. */
    background:
        radial-gradient(1200px 700px at 12% -5%, rgba(200, 146, 17, 0.15), transparent 60%),
        radial-gradient(900px 600px at 92% 6%, rgba(18, 97, 92, 0.11), transparent 62%),
        var(--ground);
    background-attachment: fixed;
}

img { max-width: 100%; display: block; }
::selection { background: var(--gold); color: var(--pitch); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ══ GRAIN ══
   Behind the content, not over it. On top it textures the type itself and
   costs real legibility — grain belongs to the paper, not the ink. */
body::before {
    content: '';
    position: fixed; inset: -50%;
    z-index: 0; pointer-events: none;
    opacity: 0.20;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
body[data-grain="off"]::before { display: none; }

/* Everything read sits above the paper. */
.container, .footer, .band, main, header, footer { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ══ TYPE ROLES ══ */
.fd { font-family: var(--font-display); }

.ui-label {
    font-family: var(--font-ui);
    font-size: var(--t-micro); line-height: var(--lh-micro);
    font-weight: 600; text-transform: uppercase;
    letter-spacing: var(--tr-chrome);
    color: var(--ink-soft);
}

/* Kinetic display type — weight responds to scroll (js/kinetic.js). */
.kinetic {
    font-variation-settings: 'wght' calc(500 + var(--k, 0) * 300), 'wdth' 96;
    letter-spacing: calc(var(--tr-hero) + (1 - var(--k, 0)) * 0.012em);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; }

/* ══ LAYOUT ══ */
.container { max-width: var(--w-page); margin: 0 auto; padding: 0 clamp(20px, 4vw, 52px); }
.band { padding: clamp(52px, 7vw, 104px) 0; }
.band + .band { border-top: 1px solid var(--rule); }

/* ══ SECTION HEADS ══ */
.eyebrow {
    font-family: var(--font-ui);
    font-size: var(--t-micro); font-weight: 600;
    text-transform: uppercase; letter-spacing: var(--tr-chrome);
    color: var(--gold-deep); margin-bottom: 18px;
}
.h2 {
    font-size: var(--t-h2); line-height: var(--lh-h2);
    letter-spacing: var(--tr-h2); color: var(--ink);
}
.h3 {
    font-size: var(--t-h3); line-height: var(--lh-h3);
    letter-spacing: var(--tr-h3); color: var(--ink);
}
.lede {
    font-size: var(--t-lead); line-height: var(--lh-lead);
    color: var(--ink-soft); max-width: var(--w-prose);
}

/* ══ BUTTONS ══ */
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-ui);
    font-size: var(--t-label); font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    text-decoration: none; cursor: pointer; border: 0;
    padding: 17px 32px;
    border-radius: var(--r);
    background: var(--umber); color: var(--bone);
    transition: background var(--fast) ease, color var(--fast) ease, transform var(--fast) ease;
}
.btn:hover { background: var(--gold); color: var(--pitch); transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--pitch); }
.btn--gold:hover { background: var(--gold-lit); color: var(--pitch); }
.btn--ghost {
    background: transparent; color: var(--ink);
    box-shadow: inset 0 0 0 1.5px var(--rule);
}
.btn--ghost:hover { background: var(--ink); color: var(--bone); box-shadow: none; }
.btn--on-dark {
    background: transparent; color: var(--ink-lit);
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink-lit) 42%, transparent);
}
.btn--on-dark:hover { background: var(--ink-lit); color: var(--pitch); box-shadow: none; }

/* ══ DATA ROWS ══ — the record, not floating cards. */
.rows { border-top: 2px solid var(--ink); }
.row {
    display: grid;
    grid-template-columns: 54px minmax(0, 200px) minmax(0, 1fr);
    gap: clamp(14px, 2.6vw, 40px); align-items: baseline;
    padding: 24px 0; border-bottom: 1px solid var(--rule);
    transition: background var(--base) ease;
}
.row:hover { background: color-mix(in srgb, var(--gold) 6%, transparent); }
@media (max-width: 760px) { .row { grid-template-columns: 1fr; gap: 6px; } }

.row-i { font-family: var(--font-ui); font-size: var(--t-micro); letter-spacing: 0.16em; color: var(--ink-soft); }
.row-v {
    font-family: var(--font-display); font-weight: 700;
    font-size: var(--t-stat); line-height: var(--lh-stat);
    letter-spacing: -0.03em; color: var(--ink);
}
.row-l {
    font-family: var(--font-ui);
    font-size: var(--t-micro); font-weight: 600;
    letter-spacing: var(--tr-chrome); text-transform: uppercase;
    display: block; margin-bottom: 7px; color: var(--ink);
}
.row-d { font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }

/* ══ PRODUCT TILES ══ */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr; } }

.tile {
    border-radius: var(--r-lg);
    padding: 32px 28px 28px;
    display: flex; flex-direction: column; min-height: 290px;
    text-decoration: none; color: inherit;
    transition: transform var(--slow) var(--ease), box-shadow var(--slow) ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--lift-2); }
.tile-tag {
    font-family: var(--font-ui); font-size: var(--t-micro);
    letter-spacing: var(--tr-chrome); text-transform: uppercase; margin-bottom: 16px;
}
.tile h3 { font-size: 34px; line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 12px; }
.tile p { font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.tile-go {
    font-family: var(--font-ui); font-size: var(--t-micro);
    letter-spacing: 0.14em; text-transform: uppercase; margin-top: auto;
}

.tile--auto { background: var(--umber); color: var(--bone); }
.tile--auto .tile-tag, .tile--auto .tile-go { color: var(--gold-lit); }
.tile--auto p { color: color-mix(in srgb, var(--bone) 70%, transparent); }

.tile--web { background: var(--gold); color: var(--pitch); }
.tile--web .tile-tag, .tile--web .tile-go { color: color-mix(in srgb, var(--pitch) 62%, transparent); }
.tile--web p { color: color-mix(in srgb, var(--pitch) 76%, transparent); }

.tile--life { background: var(--jade); color: var(--bone); }
.tile--life .tile-tag, .tile--life .tile-go { color: #8FD8CE; }
.tile--life p { color: color-mix(in srgb, var(--bone) 72%, transparent); }

/* ══ DARK CLOSING BAND ══ */
.close {
    background: var(--pitch); color: var(--bone);
    border-radius: var(--r-lg);
    padding: clamp(48px, 7vw, 100px) clamp(24px, 5vw, 72px);
    margin: clamp(40px, 6vw, 76px) 0;
}
.close h2 { font-size: var(--t-hero); line-height: var(--lh-hero); letter-spacing: var(--tr-hero); margin-bottom: 18px; }
.close h2 em { font-style: normal; color: var(--gold-lit); }
.close p {
    font-size: var(--t-lead); line-height: var(--lh-lead);
    color: color-mix(in srgb, var(--bone) 68%, transparent);
    max-width: 48ch; margin-bottom: 30px;
}

/* ══ FOOTER ══ */
.footer {
    padding: 30px 0 72px;
    border-top: 1px solid var(--rule);
    display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    font-family: var(--font-ui);
    font-size: var(--t-micro); letter-spacing: 0.13em; text-transform: uppercase;
    color: var(--ink-soft);
}
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--gold-deep); }
.f-links { display: flex; gap: 22px; flex-wrap: wrap; }

/* ══ PROSE ══ — legal pages, long-form copy. */
.prose { max-width: 74ch; }
.prose h2 {
    font-size: var(--t-h3); line-height: var(--lh-h3); letter-spacing: var(--tr-h3);
    margin: 52px 0 14px; color: var(--ink);
}
.prose h3 {
    font-family: var(--font-body); font-weight: 700;
    font-size: 18px; margin: 30px 0 10px; color: var(--ink);
}
.prose p, .prose li { font-size: 16px; line-height: 1.72; color: var(--ink-soft); margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 18px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--gold-deep); }
.prose strong { color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 44px 0; }
.prose > *:first-child { margin-top: 0; }

/* ══ FORMS ══ */
.form { max-width: 620px; }
.field { margin-bottom: 20px; }
.field label {
    display: block;
    font-family: var(--font-ui);
    font-size: var(--t-micro); font-weight: 600;
    letter-spacing: var(--tr-chrome); text-transform: uppercase;
    color: var(--ink-soft); margin-bottom: 8px;
}
.field input, .field textarea, .field select {
    width: 100%;
    font-family: var(--font-body); font-size: 16px;
    color: var(--ink); background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    padding: 15px 16px;
    transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
    min-height: 52px;   /* thumb-sized on a phone */
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* "optional" carries more information than marking everything else required,
   and it sits in the label so a screen reader hears it with the field name. */
.field label .opt {
    text-transform: none; letter-spacing: 0;
    font-weight: 400; color: var(--stone);
}

.field .hint {
    display: block;
    font-size: 13px; line-height: 1.5;
    color: var(--ink-soft);
    margin-top: 7px;
}

/* Failure state. Loud enough to be read, calm enough not to feel like the
   visitor did something wrong — they didn't. */
.form-alert {
    margin: 0 0 20px;
    padding: 16px 18px;
    border-radius: var(--r);
    border: 1px solid color-mix(in srgb, var(--terra) 42%, transparent);
    background: color-mix(in srgb, var(--terra) 8%, transparent);
    color: var(--ink);
    font-size: 15px; line-height: 1.55;
}
.form-alert a { color: var(--terra); font-weight: 600; }
.form-alert-detail {
    display: block; margin-top: 8px;
    font-family: var(--font-ui); font-size: 12px;
    color: var(--ink-soft);
}

.btn[disabled] { opacity: .6; cursor: progress; }

.form-consent {
    margin-top: 16px;
    font-size: 13px; line-height: 1.6;
    color: var(--ink-soft);
}

/* ══ PAGE HEAD ══ — for pages without a film hero. */
.page-head { padding: 150px 0 clamp(30px, 5vw, 56px); border-bottom: 1px solid var(--rule); }
.page-head h1 {
    font-size: var(--t-h2); line-height: var(--lh-h2);
    letter-spacing: var(--tr-h2); color: var(--ink); margin-bottom: 14px;
}
.page-head p { font-size: var(--t-lead); line-height: var(--lh-lead); color: var(--ink-soft); max-width: var(--w-prose); }
