/* ==========================================================================
   AIONTECH — minimal design system
   Self-contained: no Bootstrap, no icon fonts, no jQuery dependency.
   Brand colours are sampled from the logo (#405058 slate / #E88820 orange)
   and are never applied to the logo files themselves.
   ========================================================================== */

/* --- 1. Tokens ----------------------------------------------------------- */
:root {
    /* brand */
    --slate: #405058;
    --slate-dark: #2c3940;
    --slate-deep: #1d262b;
    --orange: #e88820;
    --orange-ink: #a65f0d;   /* accessible orange for text/links on white */

    /* neutrals */
    --ink: #1d262b;
    --body: #56636b;
    --muted: #7c878e;
    --line: #e4e8ea;
    --surface: #ffffff;
    --surface-alt: #f7f8f9;

    /* type */
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --h1: clamp(2.15rem, 1.35rem + 3.1vw, 3.9rem);
    --h2: clamp(1.65rem, 1.25rem + 1.5vw, 2.4rem);
    --h3: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
    --lead: clamp(1.02rem, 0.98rem + 0.28vw, 1.19rem);

    /* space + shape */
    --container: 1140px;
    --gutter: clamp(1.25rem, 0.9rem + 1.6vw, 2.5rem);
    --section: clamp(3.75rem, 2.5rem + 4.5vw, 6.5rem);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 14px 40px -18px rgba(29, 38, 43, .28);
    --header-h: 76px;
}

/* --- 2. Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--body);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5 {
    margin: 0 0 .6em;
    color: var(--ink);
    font-weight: 650;
    line-height: 1.16;
    letter-spacing: -.02em;
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); letter-spacing: -.01em; }
h4 { font-size: 1.02rem; letter-spacing: 0; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--orange-ink); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--orange); }

strong { color: var(--ink); font-weight: 600; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.15em; }
li { margin-bottom: .4em; }

hr { height: 1px; margin: 0; border: 0; background: var(--line); }

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

/* --- 3. Layout ---------------------------------------------------------- */
.wrap {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 780px; }

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * .62); }
.section--alt { background: var(--surface-alt); }
.section--line { border-top: 1px solid var(--line); }

.grid { display: grid; gap: clamp(1.5rem, 1rem + 1.6vw, 2.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }

.split {
    display: grid;
    gap: clamp(2rem, 1.2rem + 3vw, 4.5rem);
    align-items: center;
    grid-template-columns: 1fr;
}
@media (min-width: 62rem) {
    .split { grid-template-columns: 1.05fr 1fr; }
    .split--wide-left { grid-template-columns: 1.4fr 1fr; }
    .split--flip > :first-child { order: 2; }
}

.stack > * + * { margin-top: 1.1rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }

/* --- 4. Type helpers ---------------------------------------------------- */
.eyebrow {
    display: block;
    margin-bottom: .9rem;
    color: var(--orange-ink);
    font-size: .76rem;
    font-weight: 650;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.lead { font-size: var(--lead); line-height: 1.62; color: var(--body); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.25rem, 1.5rem + 2vw, 3.5rem); }
.section-head.center { margin-inline: auto; }
.section-head p { margin-bottom: 0; }

.accent { color: var(--orange-ink); }

.rule {
    width: 44px; height: 3px;
    margin: 0 0 1.5rem;
    border-radius: 2px;
    background: var(--orange);
}
.center .rule { margin-inline: auto; }

/* --- 5. Buttons --------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .82rem 1.5rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--slate);
    color: #fff;
    font-size: .93rem;
    font-weight: 550;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--slate-dark); color: #fff; transform: translateY(-1px); }

.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: transparent; border-color: var(--slate); color: var(--ink); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); }

.btn--outline-light { background: transparent; border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--outline-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

.btn--accent { background: var(--orange); color: var(--slate-deep); }
.btn--accent:hover { background: #f29a2f; color: var(--slate-deep); }

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

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn-row--center { justify-content: center; }

/* Inline SVGs carry no intrinsic size, so pin the arrow here rather than
   relying on width/height attributes at every call site. */
.arrow { flex: none; width: 1em; height: 1em; transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* text link with arrow */
.link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .92rem;
    font-weight: 550;
}
.link .arrow { width: .95em; height: .95em; }
.link:hover .arrow { transform: translateX(3px); }

/* --- 6. Header ---------------------------------------------------------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .88);
    border-bottom: 1px solid transparent;
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.header.is-stuck {
    border-bottom-color: var(--line);
    box-shadow: 0 6px 24px -20px rgba(29, 38, 43, .5);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: var(--header-h);
}

.logo { flex: none; display: inline-flex; align-items: center; }
.logo img { width: 132px; height: auto; }

.nav { display: flex; align-items: center; gap: .15rem; }
.nav__list { display: flex; align-items: center; gap: .1rem; margin: 0; padding: 0; list-style: none; }
.nav__list > li { margin: 0; position: relative; }

.nav__link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .6rem .8rem;
    border-radius: var(--radius-sm);
    color: var(--ink);
    font-size: .9rem;
    font-weight: 500;
    white-space: nowrap;
}
.nav__link:hover { color: var(--orange-ink); background: var(--surface-alt); }
.nav__link[aria-current="page"] { color: var(--orange-ink); }
.nav__link .caret { width: .6rem; opacity: .55; transition: transform .2s ease; }

/* dropdowns */
.has-sub > .nav__submenu {
    position: absolute;
    top: calc(100% + .35rem);
    left: 0;
    min-width: 15rem;
    margin: 0;
    padding: .45rem;
    list-style: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.has-sub:hover > .nav__submenu,
.has-sub:focus-within > .nav__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.has-sub:hover > .nav__link .caret { transform: rotate(180deg); }
.nav__submenu li { margin: 0; }
.nav__submenu a {
    display: block;
    padding: .55rem .7rem;
    border-radius: var(--radius-sm);
    color: var(--body);
    font-size: .89rem;
}
.nav__submenu a:hover { background: var(--surface-alt); color: var(--orange-ink); }

/* language switch */
.lang { display: inline-flex; align-items: center; gap: .3rem; margin-left: .5rem; font-size: .8rem; font-weight: 600; }
.lang a { padding: .3rem .45rem; border-radius: 6px; color: var(--muted); letter-spacing: .04em; }
.lang a:hover { color: var(--ink); background: var(--surface-alt); }
.lang a.is-active { color: var(--ink); background: var(--surface-alt); }
.lang span { color: var(--line); }

/* mobile trigger */
.nav-toggle {
    display: none;
    flex: none;
    width: 44px; height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 18px; height: 1.5px;
    margin: 4px auto;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 61.99rem) {
    .nav-toggle { display: block; }
    .nav {
        position: fixed;
        inset: var(--header-h) 0 auto;
        display: block;
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        padding: 1rem var(--gutter) 2rem;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
    .nav__list { display: block; }
    .nav__link { display: flex; justify-content: space-between; width: 100%; padding: .8rem .25rem; font-size: 1rem; }
    .has-sub > .nav__submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        margin: 0 0 .5rem .25rem;
        padding: 0 0 0 .8rem;
        border: 0;
        border-left: 2px solid var(--line);
        border-radius: 0;
        box-shadow: none;
    }
    .has-sub.is-open > .nav__submenu { display: block; }
    .has-sub.is-open > .nav__link .caret { transform: rotate(180deg); }
    .lang { display: flex; width: 100%; margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
}

/* --- 7. Hero ------------------------------------------------------------ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: min(78vh, 640px);
    padding-block: clamp(4rem, 3rem + 6vw, 7rem);
    background: var(--slate-deep) center / cover no-repeat;
    color: #fff;
    isolation: isolate;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, rgba(20, 27, 31, .9) 0%, rgba(20, 27, 31, .72) 45%, rgba(20, 27, 31, .45) 100%);
}
.hero__inner { max-width: 47rem; }
.hero h1 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: clamp(2.05rem, 1.3rem + 2.6vw, 3.25rem);
    text-wrap: balance;
}
.hero .eyebrow { color: var(--orange); }
.hero p { color: rgba(255, 255, 255, .8); font-size: var(--lead); line-height: 1.6; }
.hero .btn-row { margin-top: 2rem; }

/* compact page header for inner pages */
.pagehead {
    position: relative;
    padding-block: clamp(3.5rem, 2.5rem + 5vw, 6rem);
    background: var(--slate-deep) center / cover no-repeat;
    color: #fff;
    isolation: isolate;
}
.pagehead::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg, rgba(20, 27, 31, .92) 0%, rgba(20, 27, 31, .74) 50%, rgba(20, 27, 31, .5) 100%);
}
.pagehead__inner { max-width: 46rem; }
.pagehead h1 {
    color: #fff;
    margin-bottom: .75rem;
    /* Kept at or below the homepage hero: an inner page should never shout
       louder than the front door, and two-sentence headings need the room. */
    font-size: clamp(1.95rem, 1.3rem + 2.35vw, 3.05rem);
    text-wrap: balance;
}
.pagehead .eyebrow { color: var(--orange); }
.pagehead p { color: rgba(255, 255, 255, .8); font-size: var(--lead); margin-bottom: 0; }
.pagehead .btn-row { margin-top: 1.75rem; }

/* Light variant for inner pages — declared after the base rules so the
   overrides win at equal specificity. */
.pagehead--plain { background: var(--surface-alt); color: var(--body); border-bottom: 1px solid var(--line); }
.pagehead--plain::after { display: none; }
.pagehead--plain h1 { color: var(--ink); }
.pagehead--plain .eyebrow { color: var(--orange-ink); }
.pagehead--plain p { color: var(--body); }

/* breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.1rem; padding: 0; list-style: none; font-size: .82rem; }
.crumbs li { margin: 0; color: rgba(255, 255, 255, .6); }
.crumbs a { color: rgba(255, 255, 255, .78); }
.crumbs a:hover { color: #fff; }
.crumbs li + li::before { content: "/"; margin-right: .45rem; opacity: .5; }
.pagehead--plain .crumbs li { color: var(--muted); }
.pagehead--plain .crumbs a { color: var(--body); }

/* --- 8. Cards ----------------------------------------------------------- */
.card {
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 1.2rem + .8vw, 2rem);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover { border-color: #d3dadd; box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .95rem; margin-bottom: 1.25rem; }
.card .link { margin-top: auto; }

.card__icon {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    margin-bottom: 1.15rem;
    border-radius: 10px;
    background: rgba(232, 136, 32, .12);
    color: var(--orange-ink);
}
.card__icon svg { width: 22px; height: 22px; }

.card--plain { background: transparent; border-color: transparent; padding: 0; }
.card--plain:hover { box-shadow: none; transform: none; border-color: transparent; }

/* Spans the full grid width so an odd number of cards reads as deliberate
   rather than as an orphaned last row. */
.card--wide { grid-column: 1 / -1; }
@media (min-width: 46rem) {
    .card--wide {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 1.5rem;
    }
    .card--wide .card__icon { margin-bottom: 0; }
    .card--wide h3 { margin-bottom: .25rem; }
    .card--wide p { margin-bottom: 0; }
    .card--wide .link { margin-top: 0; white-space: nowrap; }
}

/* feature list with numbers */
.numbered { counter-reset: n; display: grid; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.numbered > li {
    counter-increment: n;
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    gap: 1rem;
    margin: 0;
}
.numbered > li::before {
    content: counter(n, decimal-leading-zero);
    color: var(--orange);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    padding-top: .25rem;
}
.numbered h3 { margin-bottom: .3rem; }
.numbered h4 { margin: 1.35rem 0 .5rem; }
.numbered p { font-size: .95rem; margin-bottom: .8rem; }
.numbered p:last-child { margin-bottom: 0; }
.numbered .ticks { margin-bottom: 1rem; }

/* checked list */
.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 1.75rem; margin-bottom: .6rem; font-size: .96rem; }
.ticks li::before {
    content: "";
    position: absolute;
    left: 0; top: .55em;
    width: .72rem; height: .42rem;
    border-left: 2px solid var(--orange);
    border-bottom: 2px solid var(--orange);
    transform: rotate(-45deg);
}

/* stats */
.stat { text-align: center; }
.stat__num {
    display: block;
    color: var(--ink);
    font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem);
    font-weight: 680;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.stat__label { display: block; margin-top: .35rem; color: var(--muted); font-size: .85rem; }

/* media frame */
.frame {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-alt);
}
.frame img { width: 100%; }
.frame--flat { border: 0; background: transparent; }

/* release notes */
.release__head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.release__version { margin: 0; font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); }
.release__date { margin: .35rem 0 1.75rem; color: var(--muted); font-size: .87rem; }
.release__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin: 1.75rem 0 .9rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 1.02rem;
}
.release__group:first-of-type { padding-top: 0; border-top: 0; margin-top: 0; }

.tag {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1.6;
}
.tag--latest { background: rgba(232, 136, 32, .16); color: var(--orange-ink); }
.tag--new { background: rgba(47, 158, 108, .14); color: #1f6b49; }
.tag--fix { background: rgba(210, 84, 74, .13); color: #a63b32; }

/* fix items use a neutral marker so they don't read as new features */
.ticks--fix li::before { border-color: var(--muted); }

/* Full-width figure for architecture diagrams. They are the subject of their
   section, so they get the whole container rather than a split column, where
   their labels would shrink to the point of being unreadable. */
.figure {
    margin: 0 0 clamp(2rem, 1.5rem + 1.5vw, 3rem);
    padding: clamp(1rem, .6rem + 1.4vw, 2rem);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.figure img { width: 100%; height: auto; }

/* On phones a 960px-wide diagram would scale to ~45%, shrinking its labels to
   about 7px. Below the tablet breakpoint the figure scrolls horizontally
   instead, keeping the text legible and letting the reader pan. */
@media (max-width: 47.99rem) {
    .figure {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
    .figure img { min-width: 620px; }
}
.figure figcaption {
    margin-top: 1rem;
    color: var(--muted);
    font-size: .85rem;
    text-align: center;
}

/* readable measure for body copy that follows a full-width figure */
.prose { max-width: 46rem; }
.prose > :first-child { margin-top: 0 !important; }

/* image galleries */
.gallery { display: grid; gap: clamp(.75rem, .5rem + .8vw, 1.1rem); }
.gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.gallery--pair { grid-template-columns: repeat(2, 1fr); }
.gallery--pair img { aspect-ratio: 4 / 3; }
/* Explicit column counts rather than auto-fill, so the 11 team photos fill
   their rows evenly instead of leaving a single orphan at the end. */
.gallery--team { grid-template-columns: repeat(2, 1fr); }
.gallery--team img { aspect-ratio: 1 / 1; }
@media (min-width: 40rem) { .gallery--team { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 62rem) { .gallery--team { grid-template-columns: repeat(4, 1fr); } }

/* full-bleed map */
.map { line-height: 0; border-top: 1px solid var(--line); }
.map iframe {
    width: 100%;
    height: clamp(18rem, 14rem + 14vw, 27rem);
    border: 0;
    filter: grayscale(100%) contrast(.95);
    transition: filter .3s ease;
}
.map:hover iframe { filter: none; }

/* partner strip */
.partner { display: grid; place-items: center; gap: 1.5rem; }
.partner img { width: min(220px, 60vw); opacity: .85; transition: opacity .2s ease; }
.partner a:hover img { opacity: 1; }

/* callout band */
.band {
    padding-block: clamp(3rem, 2rem + 3.5vw, 4.5rem);
    background: var(--slate-deep);
    color: #fff;
}
.band h2 { color: #fff; }
.band p { color: rgba(255, 255, 255, .78); margin-bottom: 0; }
.band__inner { display: grid; gap: 1.75rem; align-items: center; }
@media (min-width: 52rem) {
    .band__inner { grid-template-columns: 1fr auto; gap: 2.5rem; }
}

/* --- 9. Forms ----------------------------------------------------------- */
.field { display: block; margin-bottom: 1.1rem; }
.field > label {
    display: block;
    margin-bottom: .4rem;
    color: var(--ink);
    font-size: .85rem;
    font-weight: 550;
}
.field .req { color: var(--orange-ink); }

.input, .select, .textarea {
    width: 100%;
    padding: .8rem .95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: .95rem;
    line-height: 1.5;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.input::placeholder, .textarea::placeholder { color: #9aa4aa; }
.input:focus, .select:focus, .textarea:focus {
    outline: 0;
    border-color: var(--slate);
    box-shadow: 0 0 0 3px rgba(64, 80, 88, .1);
}
.textarea { resize: vertical; min-height: 8.5rem; }
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2356636b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    background-size: .7rem;
    padding-right: 2.4rem;
}

.field--invalid .input,
.field--invalid .select,
.field--invalid .textarea { border-color: #d2544a; }
.field__error { display: none; margin-top: .35rem; color: #c1443a; font-size: .8rem; }
.field--invalid .field__error { display: block; }

.form-grid { display: grid; gap: 0 1.1rem; }
@media (min-width: 40rem) {
    .form-grid--2 { grid-template-columns: 1fr 1fr; }
    .form-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .form-grid .field--full { grid-column: 1 / -1; }
}

/* honeypot — kept in the layout flow but invisible and unfocusable */
.hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
    opacity: 0;
}

.form-note { margin: 0; color: var(--muted); font-size: .8rem; }
.form-note a { color: var(--muted); text-decoration: underline; }


.form-msg {
    display: none;
    margin-bottom: 1.25rem;
    padding: .9rem 1.05rem;
    border: 1px solid var(--line);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    font-size: .92rem;
}
.form-msg.is-visible { display: block; }
.form-msg--ok { border-left-color: #2f9e6c; background: #f2fbf6; color: #1f6b49; }
.form-msg--error { border-left-color: #d2544a; background: #fdf4f3; color: #a63b32; }

/* --- 10. Footer --------------------------------------------------------- */
.footer {
    padding-top: clamp(3rem, 2.25rem + 3vw, 4.75rem);
    background: var(--slate-deep);
    color: rgba(255, 255, 255, .72);
    font-size: .93rem;
}
.footer h4 {
    margin-bottom: 1.1rem;
    color: #fff;
    font-size: .78rem;
    font-weight: 650;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.footer a { color: rgba(255, 255, 255, .78); }
.footer a:hover { color: var(--orange); }
.footer p { margin-bottom: 1rem; }

.footer__top {
    display: grid;
    gap: clamp(2.25rem, 1.5rem + 3vw, 4rem);
    padding-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}
@media (min-width: 56rem) {
    .footer__top { grid-template-columns: 1fr 1.15fr; }
}

.footer__brand img { width: 148px; margin-bottom: 1.35rem; }
.footer__brand p { max-width: 34ch; }

/* social */
.social { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.social a {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    color: #fff;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.social a:hover { background: var(--orange); border-color: var(--orange); color: var(--slate-deep); transform: translateY(-2px); }
.social svg { width: 17px; height: 17px; }

/* compact footer form */
.footer .field > label { color: rgba(255, 255, 255, .82); }
.footer .input, .footer .textarea, .footer .select {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .16);
    color: #fff;
}
.footer .input::placeholder, .footer .textarea::placeholder { color: rgba(255, 255, 255, .45); }
.footer .input:focus, .footer .textarea:focus, .footer .select:focus {
    border-color: rgba(255, 255, 255, .5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .08);
}
.footer .textarea { min-height: 6.5rem; }
.footer .form-note { color: rgba(255, 255, 255, .5); }
.footer .form-note a { color: rgba(255, 255, 255, .6); }
.footer .btn--accent { color: var(--slate-deep); }

.footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    padding-block: 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .5);
    font-size: .82rem;
}
.footer__legal p { margin: 0; }

/* --- 11. Utilities ------------------------------------------------------ */
.skip {
    position: absolute;
    left: -9999px;
    z-index: 200;
    padding: .7rem 1.1rem;
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    font-size: .9rem;
}
.skip:focus { left: 1rem; top: 1rem; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Reveal on scroll. Scoped to .js so that content is never hidden when
   JavaScript is unavailable or fails to load. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* --- 12. Print ---------------------------------------------------------- */
@media print {
    .header, .footer, .band, .nav-toggle, .hero .btn-row { display: none !important; }
    body { color: #000; }
    .hero, .pagehead { background: none; color: #000; }
    .hero h1, .pagehead h1 { color: #000; }
}
