:root {
    --navy: #0c1f45;
    --navy-dark: #08142f;
    --beige: #f3e8d5;
    --gold: #c8a354;
    --white: #ffffff;
    --text: #dbe3f5;
    --text-dark: #1b2337;
    --alert: #d93025;
    --card: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.14);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
}

/* Keyboard / focus visibility */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

button:focus:not(:focus-visible),
.nav-toggle:focus:not(:focus-visible) {
    outline: none;
}

.top-alert {
    background: var(--navy-dark);
    color: var(--white);
    text-align: center;
    padding: 12px 16px;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border);
}

.top-alert strong {
    color: var(--beige);
}

.top-alert a {
    color: var(--beige);
    font-weight: 700;
}

.top-alert .emergency-link {
    color: #ff5a4f;
    text-decoration: underline;
    margin-left: 6px;
}

header.site-header,
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(8, 20, 47, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.brand span {
    font-weight: 700;
    color: var(--beige);
    letter-spacing: 0.06em;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.nav-toggle {
    display: none;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--beige);
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    align-items: center;
    justify-content: center;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.92rem;
}

nav a:hover,
nav a.active {
    color: var(--beige);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    min-height: 44px;
    text-align: center;
    line-height: 1.1;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy-dark);
}

.btn-secondary {
    border-color: var(--beige);
    color: var(--beige);
}

.btn-danger {
    background: var(--alert);
    color: var(--white);
}

main {
    max-width: 1160px;
    margin: 0 auto;
    padding: 56px 20px 80px;
}

/* Global title scale (interior pages + legal) */
h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.12;
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Reading measure for body copy */
main p,
main li {
    max-width: 65ch;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    align-items: stretch;
}

.panel,
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.14;
    color: var(--white);
    margin-bottom: 18px;
}

.hero p {
    font-size: 1.04rem;
    margin-bottom: 18px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

h2 {
    color: var(--beige);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 12px;
}

h3 {
    color: var(--white);
    margin-bottom: 8px;
}

section {
    margin-top: 48px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

ul,
ol {
    padding-left: 20px;
}

.metric {
    border-left: 3px solid var(--gold);
    padding-left: 12px;
    margin-top: 10px;
}

.contact-box a {
    color: var(--beige);
}

/* Unified site footer (all pages) */
.site-footer,
footer.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 56px;
    padding: 0;
    background: rgba(8, 20, 47, 0.55);
}

.site-footer .footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 36px 20px 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 28px 40px;
    align-items: start;
    font-size: 0.92rem;
}

.site-footer .footer-heading {
    font-weight: 700;
    color: var(--beige);
    letter-spacing: 0.06em;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.site-footer .footer-address,
.site-footer .footer-sub {
    color: rgba(219, 227, 245, 0.85);
    line-height: 1.55;
    margin-bottom: 8px;
    max-width: 36ch;
}

.site-footer .footer-sub {
    font-size: 0.88rem;
    margin-top: 10px;
}

.site-footer .footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    justify-content: flex-end;
}

.site-footer .footer-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
}

.site-footer .footer-nav a:hover,
.site-footer .footer-nav a:focus-visible {
    color: var(--beige);
}

.site-footer .footer-bottom {
    max-width: 1160px;
    margin: 0 auto;
    padding: 22px 20px 32px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.86rem;
    color: rgba(219, 227, 245, 0.72);
}

.site-footer .footer-links-row a {
    color: var(--beige);
    text-decoration: none;
    font-weight: 600;
}

.site-footer .footer-links-row a:hover {
    text-decoration: underline;
}

.site-footer .footer-dot {
    margin: 0 0.35em;
    opacity: 0.6;
}

.site-footer .footer-legal {
    margin-top: 12px;
}

.site-footer .footer-legal a {
    color: var(--text);
    text-decoration: none;
}

.site-footer .footer-legal a:hover {
    color: var(--beige);
}

.site-footer .footer-copy {
    margin-top: 14px;
    color: rgba(219, 227, 245, 0.6);
    font-size: 0.82rem;
}

.site-footer .footer-powered {
    margin-top: 10px;
    font-size: 0.82rem;
    color: rgba(219, 227, 245, 0.55);
}

.site-footer .footer-powered a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.site-footer .footer-powered a:hover {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .site-footer .footer-inner {
        grid-template-columns: 1fr;
    }

    .site-footer .footer-nav {
        justify-content: flex-start;
    }
}

/* Legacy plain footer (redirect stubs) */
footer:not(.site-footer) {
    border-top: 1px solid var(--border);
    margin-top: 56px;
    padding: 30px 20px 40px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(219, 227, 245, 0.75);
}

footer:not(.site-footer) a {
    color: var(--gold);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--beige);
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

.full {
    grid-column: 1 / -1;
}

.trust-list {
    list-style: none;
    padding: 0;
}

.trust-list li {
    margin-bottom: 10px;
    padding-left: 18px;
    position: relative;
}

.trust-list li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--gold);
    position: absolute;
    left: 0;
    top: 10px;
}

/* Legal / policy pages */
.legal-prose h1 {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

.legal-prose h2 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold);
    margin-top: 2.25rem;
    margin-bottom: 0.65rem;
    font-weight: 600;
}

.legal-prose p,
.legal-prose li {
    max-width: 65ch;
    color: var(--text);
    font-size: 0.96rem;
}

.legal-prose .legal-meta {
    color: rgba(219, 227, 245, 0.72);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.legal-prose a.legal-link {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.compliance-box {
    background: rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--gold);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    font-size: 0.92rem;
    color: var(--white);
    border-radius: 0 12px 12px 0;
}

.warning-box {
    background: rgba(217, 48, 37, 0.12);
    border-left: 3px solid var(--alert);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    border-radius: 0 12px 12px 0;
}

.warning-box p {
    margin: 0;
    color: var(--text);
}

@media (max-width: 1080px) {
    .nav-toggle {
        display: inline-flex;
    }

    nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        background: rgba(8, 20, 47, 0.98);
        border-bottom: 1px solid var(--border);
        border-radius: 0 0 18px 18px;
        box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
        padding: 14px 20px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        max-height: calc(100vh - 92px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    nav a,
    nav .btn {
        width: 100%;
        min-height: 44px;
        padding: 12px 0;
        justify-content: flex-start;
    }

    .header-inner.menu-open nav {
        display: flex;
    }
}

@media (max-width: 920px) {
    .hero,
    .grid-2,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid .full .btn-primary,
    .form-grid .full button.btn-primary {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

@media (max-width: 720px) {
    main {
        padding: 36px 16px 64px;
    }

    .header-inner {
        padding: 12px 16px;
        gap: 16px;
    }

    .brand img {
        width: 40px;
        height: 40px;
    }

    .top-alert {
        padding: 10px 14px;
        font-size: 0.84rem;
        line-height: 1.45;
    }

    .top-alert a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 0 4px;
    }

    .top-alert .emergency-link {
        margin-left: 0;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .button-row {
        flex-direction: column;
    }

    .button-row .btn,
    .form-grid .full .btn-primary,
    .form-grid .full button.btn-primary,
    .btn {
        width: 100%;
    }

    .button-row .btn {
        justify-content: center;
    }

    nav {
        padding: 12px 16px 16px;
        gap: 10px;
    }

    nav a,
    nav .btn {
        justify-content: center;
    }

    .panel,
    .card {
        padding: 22px;
    }

    section {
        margin-top: 36px;
    }

    .site-footer .footer-inner {
        grid-template-columns: 1fr;
    }

    .site-footer .footer-nav {
        justify-content: flex-start;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .site-footer .footer-nav a {
        justify-content: center;
        min-height: 44px;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.04);
    }

    .site-footer .footer-bottom {
        padding: 18px 16px 28px;
    }

    .site-footer .footer-links-row,
    .site-footer .footer-legal {
        line-height: 1.6;
    }

    .site-footer .footer-dot {
        display: inline-block;
        margin: 0 0.2em;
    }

    .site-footer .footer-address,
    .site-footer .footer-sub {
        max-width: none;
    }

    .splash {
        padding: 24px 16px;
    }

    .splash__logo {
        width: 76px;
        height: 76px;
    }

    .splash__hint {
        font-size: 0.78rem;
    }
}

/* —— Homepage splash (index only) —— */
html.splash-skip .splash {
    display: none !important;
}

body.splash-open {
    overflow: hidden;
}

.splash {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: radial-gradient(ellipse 120% 80% at 50% 20%, rgba(200, 163, 84, 0.12) 0%, transparent 55%),
        linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
    opacity: 1;
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.splash::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(200, 163, 84, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 25%, rgba(255, 255, 255, 0.04) 0%, transparent 35%);
    pointer-events: none;
    animation: splash-drift 14s ease-in-out infinite alternate;
}

@keyframes splash-drift {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(-2%, 1%) scale(1.03);
    }
}

.splash__inner {
    position: relative;
    text-align: center;
    max-width: 420px;
    animation: splash-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes splash-rise {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.splash__logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.35));
    animation: splash-logo 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes splash-logo {
    from {
        opacity: 0;
        transform: scale(0.85) rotate(-4deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.splash__wordmark {
    font-weight: 700;
    font-size: clamp(1.15rem, 3.5vw, 1.35rem);
    letter-spacing: 0.14em;
    color: var(--beige);
    margin-bottom: 10px;
}

.splash__tagline {
    font-size: 1.02rem;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 28px;
    animation: splash-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.splash__rule {
    height: 2px;
    width: 100%;
    max-width: 200px;
    margin: 0 auto 28px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transform-origin: center;
    animation: splash-rule 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

@keyframes splash-rule {
    from {
        transform: scaleX(0);
        opacity: 0;
    }

    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

.splash__cta {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    padding: 12px 28px;
    min-height: 48px;
}

.splash__cta:hover {
    filter: brightness(1.06);
}

.splash__hint {
    margin-top: 18px;
    font-size: 0.82rem;
    color: rgba(219, 227, 245, 0.55);
    letter-spacing: 0.02em;
}

.splash.splash--exit {
    opacity: 0;
    transform: scale(1.015);
    pointer-events: none;
}

.splash.splash--exit .splash__inner {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .splash,
    .splash::before,
    .splash__inner,
    .splash__logo,
    .splash__tagline,
    .splash__rule {
        animation: none !important;
    }

    .splash::before {
        transform: none;
    }

    .splash__inner,
    .splash__logo,
    .splash__tagline {
        opacity: 1;
        transform: none;
    }

    .splash__rule {
        transform: scaleX(1);
        opacity: 1;
    }

    .splash.splash--exit {
        transition-duration: 0.2s;
    }
}
