/* =======================================
   Tally Ho Tech — Core Theme
   ======================================= */
:root {
    /* Brand */
    --metallic-sunburst: #A77C29;
    --dark-cerulean: #004481;
    --lava: #CC101F;
    --cyber-yellow: #FFD500;
    --sonic-silver: #B7B7B1;
    --ink: #0B1320;

    /* Base */
    --bg: #0b1220;
    --bg-elev-1: #121a2c;
    --bg-elev-2: #0f1728;
    --fg: #e9eef7;
    --muted: #9aa4b2;

    /* Tokens */
    --ring: var(--cyber-yellow);
    --radius: 12px;
    --radius-lg: 16px;
    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 20px;
    --space-5: 28px;
    --container: 1120px;
    --shadow-1: 0 8px 30px rgba(0, 0, 0, .30);
    --border-1: 1px solid #132243;
    --border-2: 1px solid #182a4b;

    /* Typography */
    --font: 16px/1.6 Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
    --h1: clamp(1.8rem, 1.25rem + 1.8vw, 2.4rem);
}

* {
    box-sizing: border-box
}

/* Base */
html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font: var(--font);
}

a {
    color: var(--cyber-yellow);
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

.wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* =======================================
   Header
   ======================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #081021;
    border-bottom: 1px solid #0f1a33;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px var(--space-4);
    min-height: 88px;
    /* align with logo height */
}

.site-header .brand img {
    height: 88px;
    display: block;
}

.main-nav a {
    margin: 0 10px;
    color: #dbe6f6;
}

/* =======================================
   Buttons
   ======================================= */
.btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid transparent;
    background: transparent;
    color: var(--fg);
    transition: transform .12s ease, filter .12s ease;
}

.btn:hover {
    transform: translateY(-1px)
}

.btn:active {
    transform: translateY(0)
}

.btn-primary {
    background: var(--dark-cerulean);
    border-color: #003968;
}

.btn-outline {
    background: transparent;
    border: 1px solid #334155;
    color: #e5e7eb;
    padding: 6px 10px;
    border-radius: 8px;
    margin: 2px 4px;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: #475569
}

.btn-accent {
    background: var(--lava);
    border-color: #a80e19;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .15);
    color: inherit;
    padding: 6px 10px;
    border-radius: 8px;
}

/* =======================================
   Hero + Chat Layout
   ======================================= */
.hero {
    padding: 56px 0;
    background: linear-gradient(180deg, var(--bg), var(--bg) 60%, #0e1527);
}

.hero-grid {
    position: relative;
    /* basis for optional dimmer */
    display: grid;
    gap: 28px;
    align-items: center;
    grid-template-columns: 1.1fr .9fr;
}

/* Optional dimmer when full-width is active */
.hero-grid.is-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 2;
    /* sits under the card (card uses z-index:3) */
}

.hero h1 {
    font-size: var(--h1);
    line-height: 1.2;
    margin: 0 0 10px;
}

.hero p {
    color: #b8c3d8;
    margin: 0 0 18px;
}

.cta-row .btn {
    margin-right: 8px
}

/* =======================================
   Chat Card
   ======================================= */
.chat-card {
    position: relative;
    /* keeps stacking context sane */
    z-index: 3;
    /* above optional dimmer */
    background: var(--bg-elev-1);
    border: var(--border-1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
}

#chat {
    scroll-margin-top: 90px;
}

/* header ~88px; adjust if you change logo/header height */

.chat-header {
    padding: 12px 14px;
    border-bottom: var(--border-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header .tag {
    background: var(--dark-cerulean);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .78rem;
}

.chat-body {
    padding: 14px;
    height: 360px;
    overflow: auto;
}

.bubble {
    padding: 10px 12px;
    border-radius: 12px;
    margin: 8px 0;
    max-width: 94%;
}

.bubble.sys {
    background: #0f1a33;
    border: 1px solid #192a4a;
    word-break: break-word;
}

.bubble.user {
    background: #10233e;
    border: 1px solid #1d365f;
    margin-left: auto;
}

.bubble.ai {
    background: #121f3a;
    border: 1px solid #203a66;
}

.chat-form {
    display: flex;
    gap: 8px;
    border-top: var(--border-2);
    padding: 10px;
}

.chat-form input,
.chat-form select {
    flex: 1;
    background: #0c162b;
    border: 1px solid #1a2b4d;
    color: #e5eefb;
    padding: 10px;
    border-radius: 10px;
    outline: none;
}

.chat-form input:focus,
.chat-form select:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(255, 213, 0, .35);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 35%, transparent);
}

/* Full-width mode: in-flow, spans both columns */
.chat-card.is-full {
    grid-column: 1 / -1;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 16px;
}

/* Suggestion buttons in sys bubble */
.bubble.sys strong {
    color: #e9eef7;
    display: inline-block;
    margin-bottom: 4px;
}

.bubble.sys .btn.sug {
    display: inline-block;
    vertical-align: middle;
    white-space: normal;
    /* allow wrapping */
    line-height: 1.25;
    margin: 4px 6px 2px 0;
    visibility: visible !important;
    cursor: pointer;
}

@media (min-width: 640px) {
    .bubble.sys .btn.sug {
        padding: 6px 10px;
        border-radius: 8px;
        font-size: .95rem;
    }
}

/* =======================================
   Stripes / Cards
   ======================================= */
.stripe {
    padding: 44px 0;
    border-top: 1px solid #0f1a2c;
    border-bottom: 1px solid #0f1a2c;
    background: var(--bg-elev-2);
}

.stripe.alt {
    background: #0d1529
}

.stripe h2 {
    margin: 0 0 14px
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

.cards li {
    background: #0e1830;
    border: 1px solid #152647;
    border-radius: 14px;
    padding: 16px;
}

.cards h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.cards p {
    margin: 0;
    color: #b6c0d3;
}

/* =======================================
   CTA
   ======================================= */
.cta {
    padding: 56px 0;
    background: linear-gradient(180deg, #0e1527, #0e1527 60%, var(--bg));
    text-align: center;
}

.cta h2 {
    margin: 0 0 14px
}

/* =======================================
   Footer
   ======================================= */
.site-footer {
    background: #081021;
    border-top: 1px solid #0f1a33;
    margin-top: 28px;
}

.site-footer .wrap {
    padding: 22px var(--space-4)
}

.site-footer .cols {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 10px;
}

.site-footer .copy {
    color: #7f8aa1;
    font-size: .9rem;
}

/* =======================================
   Utilities / Components
   ======================================= */
.notice {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.notice.success {
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .35);
}

.notice.error {
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .35);
}

.contact-form label {
    display: block;
    margin: 10px 0
}

.contact-form label span {
    display: block;
    font-size: .95rem;
    margin-bottom: 6px;
    opacity: .9;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #e5e7eb;
}

.contact-form .agree {
    margin: 12px 0
}

.card {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .1);
    padding: 14px 16px;
    border-radius: 12px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

/* =======================================
   Accessibility & Motion
   ======================================= */
:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important
    }
}

/* =======================================
   Responsive
   ======================================= */
@media (max-width: 960px) {
    .site-header .brand img {
        height: 44px
    }

    .site-header .wrap {
        min-height: 56px
    }

    .hero-grid {
        grid-template-columns: 1fr
    }

    .cards {
        grid-template-columns: 1fr
    }

    .grid-2 {
        grid-template-columns: 1fr
    }
}