/* ============================================================
   styles.css — components & sections
   Token-only (see tokens.css). No raw hex.
   ============================================================ */

/* ---------- Subtle grain overlay (atmosphere, not color) ---------- */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 200;
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: var(--accent-contrast);
    border-radius: var(--r-sm);
    font-weight: 600;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; color: var(--accent-contrast); }

/* ---------- Brand ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
    display: inline-block;
    width: 34px;
    height: 34px;
    color: var(--accent);
    background-color: currentColor;
    -webkit-mask: url("../img/falcon.svg") center / contain no-repeat;
    mask: url("../img/falcon.svg") center / contain no-repeat;
}
.brand-name {
    font-family: "Orbitron", sans-serif;
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: 0.16em;
    /* Gold sheen sweep: a highlight band glides across the letters on load
       and on hover. Rests on the base colour, so the wordmark is always
       correctly coloured when idle. --sheen-base flips per theme / over video. */
    --sheen-base: var(--text);
    background-image: linear-gradient(110deg,
        var(--sheen-base) 0%, var(--sheen-base) 42%,
        var(--accent) 50%,
        var(--sheen-base) 58%, var(--sheen-base) 100%);
    background-size: 300% 100%;
    background-position: 0 0;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
            color: transparent;
    animation: brand-sheen 2.4s ease-out 0.5s 1 both;
}
@keyframes brand-sheen {
    from { background-position: 100% 0; }
    to   { background-position: 0 0; }
}
/* Hover replay is triggered from main.js (reflow-restart) since CSS won't
   re-run an animation whose name is unchanged. */
@media (prefers-reduced-motion: reduce) and (min-width: 99999px) { /* forced off: animations stay on for cross-browser parity (see reduceMotion in main.js) */
    .brand-name { animation: none; }
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease,
                backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
    background: var(--surface-glass);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom-color: var(--ink-08);
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 72px;
}
.nav {
    display: flex;
    gap: 0.35rem;
    margin-inline: auto;
}
.nav a {
    color: var(--text-secondary);
    font-family: "Orbitron", sans-serif;
    font-size: 0.8rem;            /* Orbitron runs wide → a touch smaller */
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.5rem 0.85rem;
    border-radius: var(--r-md);
    transition: color 0.2s ease, background-color 0.2s ease;
}
.nav a:hover { color: var(--text); background: var(--ink-04); }
.nav a.is-active { color: var(--accent); }
.site-header:not(.scrolled) .nav a.is-active { color: white; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r-pill);
    border: 1px solid var(--ink-10);
    background: var(--ink-03);
    color: var(--text);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.theme-toggle:hover { background: var(--ink-06); transform: translateY(-1px); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.theme-toggle .icon-sun circle { fill: currentColor; stroke: none; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
/* show moon in dark, sun in light */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border-radius: var(--r-pill);
    border: 1px solid var(--ink-10);
    background: var(--ink-03);
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin-inline: auto;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Cinematic video intro ---------- */
.intro {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
    background: var(--bg);
}
.intro-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1; /* full opacity — identical in both themes, no wash */
    /* NOTE: do NOT mask the <video> — Safari renders a masked video as a
       single static frame. Bottom fade is handled by .intro-vignette instead. */
}
/* Light top + bottom vignette: header & scroll cue stay legible,
   skyline still pops. Built from the page bg so it adapts to theme. */
/* The intro always overlays DARK video footage, in both light and dark
   themes — so the vignette darkens (literal black, not --bg) regardless
   of theme, and the overlay text stays light. */
.intro-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.5) -8%, transparent 24%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.6) -6%, transparent 32%);
}
/* While the header is over the video (top of page, not yet scrolled to
   glass), keep its controls light in both themes for legibility. */
.site-header:not(.scrolled) .brand-name { --sheen-base: rgba(255, 255, 255, 0.92); }
.site-header:not(.scrolled) .nav a { color: rgba(255, 255, 255, 0.9); }
.site-header:not(.scrolled) .nav a:hover { color: white; background: rgba(255, 255, 255, 0.12); }
.site-header:not(.scrolled) .theme-toggle,
.site-header:not(.scrolled) .nav-toggle,
.site-header:not(.scrolled) .login-link {
    color: white;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
}
.site-header:not(.scrolled) .login-link:hover { background: rgba(255, 255, 255, 0.18); color: white; }
.site-header:not(.scrolled) .nav-toggle span { background: white; }

.intro-content {
    position: absolute;
    z-index: 3;
    top: 50%;
    /* centered, sitting a touch below the middle */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 1180px;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
    text-align: center;
}
/* Eyebrow kicker above the tagline (reuses .eyebrow, centered with a
   gold rule on each side for balance) */
.intro-eyebrow {
    justify-content: center;
    margin-bottom: 1.1rem;
    color: var(--accent);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
    animation: tagline-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.intro-eyebrow::before,
.intro-eyebrow::after {
    content: "";
    width: clamp(1.4rem, 4vw, 2.6rem);
    height: 1px;
    background: var(--accent);
    opacity: 0.6;
}
.intro-tagline {
    font-family: "Orbitron", sans-serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 3.4vw, 2.5rem);
    line-height: 1.18;
    letter-spacing: -0.01em;
    color: white;   /* over dark video — stays light in both themes */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 2px 10px rgba(0, 0, 0, 0.7);
    animation: tagline-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}
@keyframes tagline-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 99999px) { /* forced off: animations stay on for cross-browser parity (see reduceMotion in main.js) */
    .intro-eyebrow, .intro-tagline { animation: none; }
}

.intro-location {
    position: absolute;
    z-index: 3;
    left: clamp(1.25rem, 4vw, 2.5rem);
    bottom: clamp(1.6rem, 4vw, 2.4rem);
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    font-family: "Orbitron", sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: white;   /* over dark video — stays light in both themes */
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
.intro-location .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-tint-10);
}
.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: clamp(1.4rem, 3.5vw, 2.2rem);
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;   /* over dark video — stays light in both themes */
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
.scroll-indicator:hover { color: white; }
.scroll-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}
.scroll-chevron {
    display: inline-flex;
    animation: scroll-bounce 1.8s ease-in-out infinite;
}
.scroll-chevron svg {
    width: 26px; height: 26px;
    fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50%      { transform: translateY(7px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 99999px) { /* forced off: animations stay on for cross-browser parity (see reduceMotion in main.js) */
    .scroll-chevron { animation: none; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 82vh;
    display: flex;
    align-items: center;
    padding-block: clamp(5rem, 10vw, 8rem);
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; background: var(--bg); }

/* ---- Animated gold mesh glow ----
   Soft accent-tinted light blobs that slowly drift behind the grid.
   Token-driven, so it's gold in dark mode and blue in light mode. */
.hero-mesh {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}
.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    will-change: transform;
}
.blob-1 {
    top: -22%;
    left: 28%;
    width: min(760px, 80vw);
    height: min(760px, 80vw);
    background: radial-gradient(circle at center, var(--accent-tint-10) 0%, transparent 68%);
    animation: drift-1 26s ease-in-out infinite alternate;
}
.blob-2 {
    top: 4%;
    left: -8%;
    width: min(560px, 70vw);
    height: min(560px, 70vw);
    background: radial-gradient(circle at center, var(--accent-tint-08) 0%, transparent 70%);
    animation: drift-2 32s ease-in-out infinite alternate;
}
.blob-3 {
    top: 18%;
    right: -6%;
    width: min(620px, 72vw);
    height: min(620px, 72vw);
    background: radial-gradient(circle at center, var(--accent-tint-06) 0%, transparent 72%);
    animation: drift-3 38s ease-in-out infinite alternate;
}
@keyframes drift-1 {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-9%, 12%, 0) scale(1.18); }
}
@keyframes drift-2 {
    from { transform: translate3d(0, 0, 0) scale(1.05); }
    to   { transform: translate3d(14%, -8%, 0) scale(0.9); }
}
@keyframes drift-3 {
    from { transform: translate3d(0, 0, 0) scale(0.95); }
    to   { transform: translate3d(-12%, -10%, 0) scale(1.2); }
}
@media (prefers-reduced-motion: reduce) and (min-width: 99999px) { /* forced off: animations stay on for cross-browser parity (see reduceMotion in main.js) */
    .mesh-blob { animation: none; }
}

.hero-grid {
    position: absolute;
    z-index: 2;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--ink-04) 1px, transparent 1px),
        linear-gradient(to bottom, var(--ink-04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, black 30%, transparent 75%);
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; }
.hero-pill { margin-bottom: 1.6rem; }
.hero-title { margin-bottom: 1.4rem; }
.accent-text { color: var(--accent); }
.hero-sub { max-width: 600px; margin-bottom: 2.2rem; }
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 3.6rem;
}

.hero-stats {
    display: grid;
    /* Single row of four on desktop. Folds to 2x2 at ≤860px, below which four
       cells leave too little width for "ASSETS UNDER MANAGEMENT" to set. */
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--ink-08);
    border: 1px solid var(--ink-08);
    border-radius: var(--r-xl);
    overflow: hidden;
}
.hero-stat {
    background: var(--surface-glass-soft);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
}
.hero-stat dt {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
/* Bottom-align values so they line up despite labels wrapping to
   different line counts. */
.hero-stat dd { margin-top: auto; }
.hero-stat dd {
    font-family: "Orbitron", sans-serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* ---------- Strategy ---------- */
.strategy-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}
.strategy-card {
    padding: 1.8rem 1.6rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.strategy-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-tint-10);
    box-shadow: var(--shadow-lg);
}
.strategy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: var(--r-md);
    background: var(--accent-tint-08);
    color: var(--accent);
    margin-bottom: 1.2rem;
}
.strategy-icon svg {
    width: 24px; height: 24px;
    fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.strategy-card h3 { margin-bottom: 0.6rem; }
.strategy-card p { font-size: 0.94rem; }

/* ---------- Performance ---------- */
/* Performance keeps the same plain background as the other sections. */

/* ---------- Team ---------- */
/* Reliability pillars (6 cards): 3 → 2 → 1 columns */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 1024px) { .pillars-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .pillars-grid { grid-template-columns: 1fr; } }
/* Standalone "trusted by" band under the hero */
.backers-band {
    padding-block: clamp(2.25rem, 5vw, 3.5rem);
    border-bottom: 1px solid var(--ink-06);
}
.backers { text-align: center; }
.backers-label {
    display: block;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.backers-disclaimer {
    max-width: 640px;
    margin: 1.5rem auto 0;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--text-muted);
}
/* Marquee viewport. Edge-fade mask applies only while the marquee is
   actually running (added by JS on supported browsers); otherwise it's a
   plain static centered row (e.g. Firefox / reduced-motion). */
.backers-marquee { overflow: hidden; }
.backers-marquee.is-running {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, black 8%, black 92%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, black 8%, black 92%, transparent 100%);
}
/* Default (no JS / reduced motion): static centered wrap. */
.backers-track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
/* Active marquee (JS adds .is-marquee after duplicating the marks). */
.backers-track.is-marquee {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: max-content;
    animation: marquee 34s linear infinite;
}
.backers-marquee:hover .backers-track.is-marquee { animation-play-state: paused; }
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }   /* track holds 2 copies → seamless */
}
@media (prefers-reduced-motion: reduce) and (min-width: 99999px) { /* forced off: animations stay on for cross-browser parity (see reduceMotion in main.js) */
    .backers-track.is-marquee {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
    }
}
.backer-mark {
    flex: none;
    white-space: nowrap;
    /* margin (not flex gap) so duplicated items tile uniformly for a seamless loop */
    margin-inline: clamp(0.75rem, 2.5vw, 1.75rem);
    font-family: "Orbitron", sans-serif;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: opacity 0.2s ease, color 0.2s ease;
}
.backer-mark:hover { opacity: 1; color: var(--text); }
/* When a logo file is found (JS adds .has-logo), render it as a uniform
   monochrome mark via CSS mask — inherits the muted tone (currentColor) and
   brightens on hover, regardless of the logo's own colours. */
.backer-mark.has-logo {
    /* Uniform optical size: every logo renders at the SAME height; its width
       follows the logo's own aspect ratio (--logo-ar, set by JS from the file's
       natural dimensions) so the mask box never stretches it. max-width reins in
       unusually wide lockups. */
    height: clamp(22px, 3vw, 28px);
    width: auto;
    aspect-ratio: var(--logo-ar, 3 / 1);
    max-width: clamp(120px, 17vw, 160px);
    font-size: 0;                 /* hide the text fallback, keep color for the mask */
    background-color: currentColor;
    -webkit-mask: var(--logo) center / contain no-repeat;
            mask: var(--logo) center / contain no-repeat;
}
/* Allow a horizontal lockup (e.g. the full FALCONSTEAD logo) a wider cap so it
   isn't shrunk; height stays uniform with the rest. */
.backer-mark--wide.has-logo { max-width: clamp(200px, 30vw, 300px); }

/* Phone: the marquee keeps scrolling (same effect as desktop). Only the
   no-marquee fallback — i.e. before JS runs, or if it's disabled — gets laid
   out as a neat centered grid instead of a squashed wrap. */
@media (max-width: 600px) {
    .backers-track:not(.is-marquee) {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
        justify-items: center;
        gap: 1.25rem 1rem;
    }
    .backers-track:not(.is-marquee) .backer-mark { margin-inline: 0; }
}

/* ---------- Careers ---------- */
.careers-card {
    display: flex;
    align-items: center;
    gap: clamp(1.2rem, 3vw, 2rem);
    padding: clamp(1.6rem, 3vw, 2.2rem);
    flex-wrap: wrap;
}
.careers-icon { flex: none; margin-bottom: 0; }
.careers-copy { flex: 1 1 320px; }
.careers-status { margin-bottom: 0.9rem; }
.careers-status .dot { background: var(--text-secondary); box-shadow: 0 0 0 3px var(--ink-06); }
.careers-copy h3 { margin-bottom: 0.4rem; }
.careers-copy p { font-size: 0.94rem; }
.careers-cta { flex: none; }
@media (max-width: 600px) {
    .careers-card { align-items: flex-start; }
    .careers-cta { width: 100%; }
}

/* ---------- Contact ---------- */
.section-contact { background: var(--ink-02); border-top: 1px solid var(--ink-06); }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
}
.contact-intro h2 { margin-bottom: 1rem; }
.contact-points {
    list-style: none;
    padding: 0;
    margin: 2rem 0 1.5rem;
    display: grid;
    gap: 0.9rem;
}
.contact-points li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-size: 0.95rem;
}
.contact-points svg {
    flex: none;
    width: 18px; height: 18px;
    fill: none; stroke: var(--positive);
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.accredited-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    border-left: 2px solid var(--accent);
    padding-left: 0.9rem;
}

/* Forms */
.contact-form { padding: clamp(1.6rem, 3vw, 2.3rem); }
.field { margin-bottom: 1.1rem; }
.field label,
.label-row label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.45rem;
}
.label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}
.forgot { font-size: 0.8rem; }
.field input,
.field textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--bg);
    border: 1px solid var(--border-hard);
    border-radius: var(--r-md);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-secondary); }
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus-ring);
}
.field textarea { resize: vertical; min-height: 84px; }
.field-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.4rem;
    font-size: 0.74rem;
    color: var(--text-muted);
}
.word-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.word-count.over { color: var(--negative); font-weight: 600; }
.field.invalid input,
.field.invalid textarea { border-color: var(--negative); }
.field-error {
    display: block;
    min-height: 1rem;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--negative);
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    cursor: pointer;
}
.checkbox input {
    flex: none;
    width: 18px; height: 18px;
    margin-top: 0.15rem;
    accent-color: var(--accent);
}
.form-submit, .portal-submit { width: 100%; margin-top: 0.8rem; }
.form-success {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--r-md);
    background: var(--accent-tint-08);
    border: 1px solid var(--accent-tint-10);
    color: var(--text);
    font-size: 0.9rem;
}
.form-error {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--r-md);
    background: rgba(215, 0, 21, 0.08);
    border: 1px solid var(--negative);
    color: var(--text);
    font-size: 0.9rem;
}
.form-error a { color: var(--negative); font-weight: 600; }
/* Honeypot — visually removed but still in the DOM for bots to fill.
   Off-screen (not display:none, which some bots skip) + skipped by AT/keyboard. */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.form-submit:disabled {
    opacity: 0.6;
    cursor: progress;
}
.form-disclaimer {
    margin-top: 1rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    z-index: 2;
    background: var(--surface);
    border-top: 1px solid var(--ink-08);
    padding-top: 3.5rem;
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--ink-06);
}
.footer-emblem-link {
    display: inline-block;
    color: var(--text);
    transition: color 0.2s ease, opacity 0.2s ease;
}
.footer-emblem-link:hover { opacity: 0.85; }
/* Black-on-transparent emblem rendered in currentColor via CSS mask, so it
   adapts to the theme (light on dark, dark on light) with no file edits. */
.footer-emblem {
    display: block;
    height: clamp(32px, 4.5vw, 42px);   /* footer logo height */
    aspect-ratio: 219.47 / 38;          /* matches the lockup → no empty space */
    width: auto;                         /* derived from height × aspect-ratio */
    background-color: currentColor;
    -webkit-mask: url("../img/falconstead-logo-light.svg") center / contain no-repeat;
            mask: url("../img/falconstead-logo-light.svg") center / contain no-repeat;
}
.footer-tagline {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    max-width: 280px;
}
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    align-items: center;
}
.footer-nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}
.footer-nav a:hover { color: var(--text); }
.footer-legal { padding-block: 1.8rem 2.2rem; }
.footer-legal p {
    font-size: 0.76rem;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 820px;
}
.footer-legal p + p { margin-top: 0.8rem; }
/* Custody trust line — slightly brighter than the legal text, with a
   gold shield icon. */
.footer-legal .footer-custody {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.4rem;
    font-size: 0.84rem;
    color: var(--text-secondary);
}
.footer-custody svg {
    flex: none;
    width: 17px; height: 17px;
    fill: none; stroke: var(--accent);
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.footer-custody strong { color: var(--text); font-weight: 600; }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem 1.5rem;
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--ink-06);
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.footer-meta { color: var(--text-muted); }

/* ============================================================
   Portal page
   ============================================================ */
.portal-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.portal-bg { position: fixed; inset: 0; z-index: 0; }
.portal-topbar {
    position: relative;
    z-index: 3;
    padding-block: 1.2rem;
}
.portal-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.portal-main {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem 3rem;
}
.portal-card {
    width: 100%;
    max-width: 420px;
    padding: clamp(1.8rem, 4vw, 2.6rem);
    background: var(--surface-glass-strong);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    box-shadow: var(--shadow-lg);
    animation: portal-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes portal-rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 99999px) { /* forced off: animations stay on for cross-browser parity (see reduceMotion in main.js) */
    .portal-card { animation: none; }
}
.portal-pill { margin-bottom: 1.4rem; }
.portal-title { font-size: clamp(1.8rem, 4vw, 2.3rem); margin-bottom: 0.5rem; }
.portal-sub { font-size: 0.92rem; margin-bottom: 1.8rem; }
.portal-form { margin-top: 0.5rem; }
.portal-foot {
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--ink-08);
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.portal-foot a { margin-left: 0.4rem; font-weight: 600; }
.portal-powered {
    position: relative;
    z-index: 2;
    margin-top: 1.6rem;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.portal-powered strong { color: var(--text-secondary); font-weight: 600; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .strategy-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .login-link { display: none; }
    .nav-toggle { display: flex; }
    .nav {
        position: fixed;
        inset: 72px 0 auto 0;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 0.75rem clamp(1.25rem, 4vw, 2.5rem) 1.25rem;
        background: var(--surface-glass-strong);
        backdrop-filter: blur(18px) saturate(160%);
        -webkit-backdrop-filter: blur(18px) saturate(160%);
        border-bottom: 1px solid var(--ink-08);
        box-shadow: var(--shadow-md);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }
    .nav.open { transform: none; opacity: 1; pointer-events: auto; }
    .nav a { padding: 0.85rem 0.5rem; border-radius: 0; border-bottom: 1px solid var(--ink-06); }
    .nav a:last-child { border-bottom: none; }

    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-form { order: 2; }
}

@media (max-width: 560px) {
    /* .hero-stats stays 2x2 here — inherited from the ≤860px rule. */
    .strategy-grid { grid-template-columns: 1fr; }
    .hero { min-height: auto; padding-block: 7rem 4rem; }
    .footer-inner { flex-direction: column; }
}

/* ============================================================
   Interactions (scroll progress, back-to-top, card spotlight,
   theme transition, magnetic) — JS-driven, reduced-motion-safe
   ============================================================ */

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 150;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

/* Back-to-top falcon button */
.to-top {
    position: fixed;
    right: clamp(1rem, 3vw, 1.75rem);
    bottom: clamp(1rem, 3vw, 1.75rem);
    z-index: 90;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: var(--r-pill);
    border: 1px solid var(--ink-10);
    background: var(--surface-glass);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    box-shadow: var(--shadow-md);
    color: var(--accent);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { transform: translateY(-2px); background: var(--surface-glass-strong); }
.to-top::before {
    content: "";
    width: 22px;
    height: 22px;
    background-color: currentColor;
    -webkit-mask: url("../img/falcon.svg") center / contain no-repeat;
            mask: url("../img/falcon.svg") center / contain no-repeat;
}

/* Cursor spotlight on cards */
.strategy-card,
.careers-card {
    position: relative;
    overflow: hidden;
}
.strategy-card::before,
.careers-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%),
                var(--accent-tint-10), transparent 60%);
}
.strategy-card:hover::before,
.careers-card:hover::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) and (min-width: 99999px) { /* forced off: animations stay on for cross-browser parity (see reduceMotion in main.js) */
    .strategy-card::before, .careers-card::before { display: none; }
}

/* Magnetic CTA — smooth spring back */
.magnetic { transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1); }

/* Animated theme switch (View Transitions API) */
::view-transition-old(root) { animation: none; }
::view-transition-new(root) {
    animation: vt-reveal 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes vt-reveal {
    from { clip-path: circle(0% at var(--vt-x, 50%) var(--vt-y, 50%)); }
    to   { clip-path: circle(150% at var(--vt-x, 50%) var(--vt-y, 50%)); }
}
@media (prefers-reduced-motion: reduce) and (min-width: 99999px) { /* forced off: animations stay on for cross-browser parity (see reduceMotion in main.js) */
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
