/* ═══════════════════════════════════════════════════════════════════════════
   style.css — Korvall Landing Page

   1.  CSS Variables  — design tokens
   2.  Reset & Base   — remove browser defaults
   3.  Typography     — fluid type with clamp()
   4.  Layout         — sections, containers
   5.  Hero           — headline, chat area, crow
   6.  Chat Widget    — messages, input, glow states
   7.  Who We Build For — industry hover grid
   8.  What We Do     — service cards
   9.  Showcase       — video demo cards
   10. FAQ            — accordion
   11. CTA            — booking button
   12. Animations     — keyframes
   ═══════════════════════════════════════════════════════════════════════════ */


/* ─── 1. CSS Variables ──────────────────────────────────────────────────── */
:root {
    --bg:           #050d1a;
    --surface:      #091424;
    --surface-2:    #0f1e33;
    --border:       #1a2d4a;
    --text:         #e8edf5;
    --text-muted:   #6b82a0;
    --text-dim:     #3d5470;

    --glow-deep:    #1e6fa8;
    --glow-mid:     #38a8e0;
    --glow-light:   #7dd3fc;

    --section-pad:  7rem 2rem;
    --chat-width:   640px;
    --chat-radius:  16px;

    --font: 'Inter', system-ui, -apple-system, sans-serif;
}


/* ─── 2. Reset & Base ───────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 220px;
    background: radial-gradient(70% 140% at 50% 0%, rgba(56, 168, 224, 0.13), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }


/* ─── 3. Typography ─────────────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem);    font-weight: 300; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 400; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; font-weight: 500; }
p  { color: var(--text-muted); font-size: 0.975rem; }


/* ─── 4. Layout ─────────────────────────────────────────────────────────── */
section {
    padding: var(--section-pad);
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    scroll-margin-top: 96px;
}


/* ─── 4A. Top Navigation ──────────────────────────────────────────────── */
#top-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 2rem;
    border-bottom: 1px solid rgba(56, 168, 224, 0.12);
    background: linear-gradient(180deg, rgba(5, 13, 26, 0.92), rgba(5, 13, 26, 0.78));
    backdrop-filter: blur(12px);
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.nav-crow {
    width: 34px;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(56, 168, 224, 0.45));
}

.nav-brand-name {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 1.1rem;
    color: var(--text);
}

/* Pipe separator between KORVALL and descriptor */
.nav-brand-sep {
    color: var(--text-dim);
    font-weight: 200;
    font-size: 1rem;
}

/* Sits inline with the logo — blue pulls the eye left-to-right then down */
.nav-descriptor {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.95rem;
    color: var(--glow-mid);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.15rem;
}

.nav-links a {
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(56, 168, 224, 0.12);
}


/* ─── 5. Hero ────────────────────────────────────────────────────────────── */
#hero {
    min-height: calc(100vh - 76px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.8rem;
    padding: 2rem;
    padding-top: 2.75rem;
    max-width: 100%;
}

#hero-crow-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: -0.2rem;
}

#hero-crow {
    width: 112px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(56, 168, 224, 0.45))
            drop-shadow(0 0 24px rgba(30, 111, 168, 0.28));
    opacity: 0.95;
}

#headline { text-align: center; }

#tagline {
    color: var(--text-muted);
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: 300;
    margin-bottom: 0.4rem;
}

#chat-area {
    position: relative;
    flex: 1;
    max-width: var(--chat-width);
    min-width: 0;
}

/* Line above the chat box — sized like the tagline, frames what the visitor is doing */
.chat-above-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 300;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

/* Line below the chat box — gives an off-ramp before the Find Out More link */
#session-notice {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: center;
    padding: 0.4rem 0;
    letter-spacing: 0.04em;
}

.chat-below-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Find Out More scroll link below the chat box */
.chat-scroll-nudge {
    display: block;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.2s;
}
.chat-scroll-nudge:hover { color: var(--glow-mid); }


/* ─── 5A. Two-Column Hero Content ────────────────────────────────────── */
/* Two chat-width boxes + gap = 640 + 24 + 640 = 1304px min needed       */
#hero-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
    justify-content: center;
}


/* ─── 5B. Research Panel ─────────────────────────────────────────────── */
/* Hidden by default — JS adds .panel-visible to slide it in             */
#panel {
    display: none;
    flex: 1;
    max-width: var(--chat-width);
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--chat-radius);
    padding: 1.5rem;
    /* Tall enough to show all panel content — scrolls silently if it overflows */
    max-height: 800px;
    overflow-y: auto;
    scrollbar-width: none;
}

#panel::-webkit-scrollbar { display: none; }

/* Becomes visible when JS adds this class after the [PANEL_READY] signal */
#panel.panel-visible {
    display: block;
    animation: fadeSlideIn 0.35s ease;
}

#panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

#panel-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--glow-mid);
}

#panel-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem;
    transition: color 0.2s;
}
#panel-close:hover { color: var(--text); }

#panel-headline {
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.4;
}

#panel-stats {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

/* Value stacked above label — prevents long labels from getting cut off */
.panel-stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--glow-light);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.panel-stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.45;
}

#panel-insight {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0.75rem;
}

#panel-searched {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-style: italic;
}


/* ─── 5C. Booking Panel (inline form mode) ───────────────────────────── */
/* Booking form — let it be as tall as it needs, user scrolls the page   */
#panel.panel-booking {
    max-height: none;
    overflow-y: visible;
}

/* Two-column field rows (first + last name, business + location) */
.bk-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Single field wrapper — label stacked above input */
.bk-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.bk-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.bk-group input,
.bk-group textarea {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.bk-group input:focus,
.bk-group textarea:focus {
    border-color: var(--glow-mid);
}

/* Read-only fields (call preference) — slightly dimmer so they look filled-in */
.bk-group input[readonly] {
    opacity: 0.7;
    cursor: default;
}

.bk-group textarea {
    resize: none;
    line-height: 1.5;
}

/* Required field asterisk */
.bk-group .required {
    color: var(--glow-mid);
}

/* Confirm Booking button — full width, sits at the bottom of the form */
#bp-submit {
    width: 100%;
    margin-top: 0.5rem;
    border: none;
    cursor: pointer;
}

#bp-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Error message below the form */
.form-error {
    color: #f87171;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 0.5rem;
}

/* Booking confirmation message after submit */
#bp-confirm {
    text-align: center;
    padding: 2rem 1rem;
}

#bp-confirm h3 {
    font-weight: 300;
    margin-bottom: 0.75rem;
    color: var(--glow-light);
}

#bp-confirm p {
    color: var(--text-muted);
    font-size: 0.9rem;
}


/* ─── 5D. Slot Picker (shared by panel + /book page) ─────────────────── */
/* Styles for .day-row / .day-btn / .time-grid / .time-btn generated by  */
/* slot-picker.js. Duplicated here from book.css so the inline panel      */
/* gets the same look without loading a second stylesheet.                */

.slot-loading,
.slot-empty {
    color: var(--text-dim);
    font-size: 0.875rem;
    font-style: italic;
}

/* Scrollable row of day cards */
.day-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}
.day-row::-webkit-scrollbar { display: none; }

.day-btn {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 0.875rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-family: var(--font);
    min-width: 64px;
}

.day-btn:hover       { border-color: rgba(56, 168, 224, 0.4); }
.day-btn.selected    { background: rgba(30, 111, 168, 0.2); border-color: var(--glow-mid); }

.day-name {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.day-date {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.day-btn.selected .day-name,
.day-btn.selected .day-date { color: var(--glow-light); }

/* Time grid — hidden until a day card is selected */
.time-grid {
    display: none;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.time-grid.visible { display: flex; }

.time-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    font-family: var(--font);
}

.time-btn:hover   { border-color: rgba(56, 168, 224, 0.4); color: var(--text); }
.time-btn.selected { background: rgba(30, 111, 168, 0.2); border-color: var(--glow-mid); color: var(--glow-light); }


/* ─── 6. Chat Widget ─────────────────────────────────────────────────────── */
#chat-container {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--chat-radius);
    overflow: hidden;
    transition: box-shadow 0.4s ease;
    box-shadow:
        0 0 0 1px rgba(30, 111, 168, 0.15),
    0 0 56px rgba(30, 111, 168, 0.2),
    0 10px 24px rgba(30, 111, 168, 0.1);
}

/* Idle pulse — breathes in and out every 4 seconds */
#chat-container::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    box-shadow: 0 0 68px rgba(30, 111, 168, 0.26);
    animation: idlePulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* Thinking — Japanese sun ray pattern slowly rotating */
#chat-container.state-thinking::before {
    content: '';
    position: absolute;
    inset: -24px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent           0%,
        rgba(56,168,224,0.12) 6%,
        transparent          12%,
        rgba(56,168,224,0.07) 18%,
        transparent          24%,
        rgba(56,168,224,0.12) 30%,
        transparent          36%,
        rgba(56,168,224,0.07) 42%,
        transparent          48%,
        rgba(56,168,224,0.12) 54%,
        transparent          60%,
        rgba(56,168,224,0.07) 66%,
        transparent          72%,
        rgba(56,168,224,0.12) 78%,
        transparent          84%,
        rgba(56,168,224,0.07) 90%,
        transparent          96%
    );
    animation: rotateSlow 3.5s linear infinite;
    pointer-events: none;
    z-index: -1;
}

/* Waiting — after 5s of no activity, glow brightens slowly to invite typing.
   Removed by JS the moment the visitor sends their first message.           */
#chat-container.state-waiting {
    animation: waitingPulse 2.8s ease-in-out infinite;
}

/* Response — white bloom that settles back to idle */
#chat-container.state-response {
    animation: responseFlash 0.82s ease forwards;
}

#chat-messages {
    min-height: 280px;
    max-height: 420px;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: none;
}
#chat-messages::-webkit-scrollbar { display: none; }

.message {
    max-width: 82%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    line-height: 1.55;
    animation: fadeSlideIn 0.25s ease;
}

.message.ai {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: rgba(30, 111, 168, 0.2);
    color: var(--text);
    border: 1px solid rgba(30, 111, 168, 0.3);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

#chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9375rem;
    padding: 0.35rem 0;
    resize: none;
    overflow-y: hidden;
    line-height: 1.5;
    max-height: 120px;
}

#chat-input::placeholder { color: var(--text-dim); }
#chat-input:disabled { cursor: not-allowed; opacity: 0.5; }

#send-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s, border-color 0.2s;
}
#send-btn:hover:not(:disabled) { color: var(--glow-mid); border-color: var(--glow-mid); }
#send-btn:disabled { opacity: 0.3; cursor: not-allowed; }


/* ─── 7. Who We Build For ───────────────────────────────────────────────── */
#who-we-build-for {
    text-align: center;
    padding: var(--section-pad);
}

#who-we-build-for h2 {
    margin-bottom: 3rem;
    line-height: 1.3;
}

#who-we-build-for h2 br + * ,
#who-we-build-for h2 {
    font-weight: 600;
}

#who-we-build-for h2 {
    font-weight: 300;
}

#who-we-build-for h2 strong {
    font-weight: 600;
}

.section-eyebrow {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--glow-mid);
    margin-bottom: 0.75rem;
}

/* ── Expand-on-hover flex grid ── */
.industry-grid {
    display: flex;
    gap: 8px;
    height: 520px;
    margin-bottom: 2.5rem;
}

.industry-card {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    background-image: var(--card-img);
    background-size: cover;
    background-position: center;
    transition: flex 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.industry-card:hover {
    flex: 4;
}

/* Dark gradient overlay — always present, deepens on hover */
.industry-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(5, 13, 26, 0.92) 0%,
        rgba(5, 13, 26, 0.4) 50%,
        rgba(5, 13, 26, 0.1) 100%
    );
    transition: background 0.4s ease;
}

.industry-card:hover .industry-overlay {
    background: linear-gradient(
        to top,
        rgba(5, 13, 26, 0.95) 0%,
        rgba(5, 13, 26, 0.6) 50%,
        rgba(5, 13, 26, 0.2) 100%
    );
}

/* Content sits at the bottom of the card */
.industry-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
}

.industry-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: margin-bottom 0.3s ease;
}

.industry-card:hover .industry-title {
    white-space: normal;
    text-overflow: unset;
    margin-bottom: 0.6rem;
    font-size: 1.15rem;
}

/* Description hidden until hover */
.industry-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease 0.1s;
}

.industry-card:hover .industry-desc {
    max-height: 100px;
    opacity: 1;
}

.industry-note {
    font-size: 1.15rem;
    color: var(--text-muted);
}

/* Mobile — stack vertically */
@media (max-width: 700px) {
    .industry-grid {
        flex-direction: column;
        height: auto;
    }
    .industry-card {
        height: 180px;
        flex: none;
    }
    .industry-card:hover {
        flex: none;
    }
    .industry-title {
        white-space: normal;
    }
    .industry-desc {
        max-height: 100px;
        opacity: 1;
    }
}


/* ─── 8. What We Do ─────────────────────────────────────────────────────── */
#what-we-do { text-align: center; }
#what-we-do h2 { margin-bottom: 1rem; }

.section-sub {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 780px) {
    .service-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .service-grid { grid-template-columns: 1fr; }
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1.25rem 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    transition: border-color 0.25s, transform 0.25s;
}
.service-card:hover {
    border-color: var(--glow-deep);
    transform: translateY(-3px);
}

.service-icon-wrap {
    width: 100%;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon-img {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 16px;
}

.service-card h3 {
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.service-short {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0.85rem;
}

.service-learn-link {
    font-size: 0.78rem;
    color: var(--glow-mid);
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s;
    margin-top: auto;
}
.service-learn-link:hover { opacity: 1; }


/* ─── 9. Showcase ────────────────────────────────────────────────────────── */
#showcase h2 { margin-bottom: 3rem; }

/* Two full-width demo cards stacked vertically */
.demo-stack {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.demo-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    min-height: 380px;
}

/* Alternate: even cards flip video to right */
.demo-card:nth-child(even) {
    direction: rtl;
}
.demo-card:nth-child(even) > * {
    direction: ltr;
}

/* Video side */
.demo-video-wrap {
    position: relative;
    overflow: hidden;
    min-height: 320px;
}

.demo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Subtle dark gradient blending video edge into info panel */
.demo-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 60%, var(--surface) 100%);
    pointer-events: none;
}
.demo-card:nth-child(even) .demo-video-overlay {
    background: linear-gradient(to left, transparent 60%, var(--surface) 100%);
}

/* Info side */
.demo-info {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.demo-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--glow-mid);
}

.demo-info h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 500;
    color: var(--text);
    line-height: 1.25;
}

.demo-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.demo-stack-tags {
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    font-family: monospace;
    letter-spacing: 0.03em;
}

/* ── Expand button (hover overlay on both demo cards) ── */
.demo-expand-btn {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(5, 13, 26, 0.55);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 2;
}
.demo-expand-btn:hover {
    background: rgba(5, 13, 26, 0.35);
}
.demo-expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    padding-left: 4px; /* optical centering for ▶ */
    transition: border-color 0.2s, color 0.2s;
}
.demo-expand-btn:hover .demo-expand-icon {
    border-color: var(--glow-light);
    color: var(--glow-light);
}
.demo-play-label {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}
/* ── Tattoo card: expand button hidden until hover ── */
.demo-card:first-child .demo-expand-btn {
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
}
.demo-card:first-child:hover .demo-expand-btn {
    opacity: 1;
}

/* ── Demo Lightbox ─────────────────────────────────────────────────── */
#demo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#demo-lightbox[hidden] { display: none; }

#lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}

#lightbox-inner {
    position: relative;
    z-index: 1;
    width: min(90vw, 1100px);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

#lightbox-close {
    background: none;
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.7);
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
}
#lightbox-close:hover {
    border-color: var(--glow-light);
    color: var(--glow-light);
}

#lightbox-video {
    width: 100%;
    border-radius: 10px;
    background: #000;
    max-height: 80vh;
}

/* ── Responsive: stack vertically on mobile ── */
@media (max-width: 700px) {
    .demo-card,
    .demo-card:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    .demo-video-wrap {
        min-height: 220px;
    }
    .demo-video-overlay {
        background: linear-gradient(to bottom, transparent 60%, var(--surface) 100%) !important;
    }
}


/* ─── 9. How It Works ────────────────────────────────────────────────────── */
#how-it-works { text-align: center; }
#how-it-works h2 { margin-bottom: 3rem; }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: left;
}

.step-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 200;
    color: var(--border);
    margin-bottom: 0.75rem;
    line-height: 1;
}
.step h3 { margin-bottom: 0.5rem; }


/* ─── Pull Quote ────────────────────────────────────────────────────────── */
.pull-quote-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
}

.pull-quote {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    color: var(--text);
    line-height: 1.75;
    letter-spacing: -0.01em;
    font-style: italic;
}


/* ─── 10. FAQ ────────────────────────────────────────────────────────────── */
#faq { max-width: 780px; margin-left: auto; margin-right: auto; }
#faq h2 { margin-bottom: 3rem; text-align: center; }

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}
.faq-item:first-child {
    border-top: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.4rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: color 0.2s;
}
.faq-question:hover { color: var(--glow-light); }

/* Plus/minus icon */
.faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    position: relative;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.3s ease;
}
.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
}
.faq-icon::before {
    width: 12px; height: 2px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.faq-icon::after {
    width: 2px; height: 12px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Open state — rotate to × */
.faq-item.open .faq-icon {
    opacity: 1;
}
.faq-item.open .faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}
.faq-item.open .faq-question {
    color: var(--glow-light);
}

/* Answer panel */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
}
.faq-item.open .faq-answer {
    grid-template-rows: 1fr;
}
.faq-answer > p {
    overflow: hidden;
    padding-bottom: 0;
    font-size: 0.97rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.faq-item.open .faq-answer > p {
    padding-bottom: 1.4rem;
}


/* ─── 11. Pricing ───────────────────────────────────────────────────────── */
#pricing {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}
#pricing h2 { text-align: center; margin-bottom: 0.75rem; }
#pricing .section-sub { text-align: center; margin-bottom: 3.5rem; }

/* Trust strip */
.pricing-trust {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem 2.25rem;
    margin-bottom: 3rem;
}

.pricing-trust-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.pricing-trust-check {
    color: var(--glow-mid);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.pricing-trust-item strong {
    display: block;
    font-size: 0.975rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.pricing-trust-item p {
    font-size: 0.9rem;
    margin: 0;
}

/* Product card */
.pricing-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.pricing-base {
    background: var(--surface);
    padding: 2rem 2.25rem;
    border-right: 1px solid var(--border);
}

.pricing-base-header {
    margin-bottom: 1.75rem;
}

.pricing-product-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--glow-mid);
    margin-bottom: 0.75rem;
}

.pricing-amount {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.pricing-price {
    font-size: 2.25rem;
    font-weight: 300;
    color: var(--text);
    letter-spacing: -0.02em;
}

.pricing-price-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pricing-includes {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pricing-includes li {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-left: 1.1rem;
    position: relative;
}

.pricing-includes li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Add-ons panel */
.pricing-addons {
    background: var(--surface-2);
    padding: 2rem 2.25rem;
}

.pricing-addons-label {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.addon-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.addon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.addon-item:last-child { border-bottom: none; }

.addon-name {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.addon-price {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--glow-light);
}

/* Per-minute note inside includes list */
.pricing-includes-note {
    color: var(--text-dim) !important;
    font-size: 0.82rem !important;
    font-style: italic;
}

/* Custom automation card */
.pricing-custom {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    margin-bottom: 2rem;
}

.pricing-custom-inner {
    padding: 2.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.pricing-custom-inner h3 {
    font-size: 1.25rem;
    font-weight: 400;
}

.pricing-custom-inner p {
    font-size: 0.95rem;
    max-width: 520px;
}

.pricing-custom-inner .btn-primary {
    margin-top: 0.5rem;
}

/* Other products note */
.pricing-other-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 3.5rem;
}

.pricing-other-link {
    color: var(--glow-mid);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Retainer */
.pricing-retainer {
    text-align: center;
}

.pricing-retainer h3 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0.6rem;
}

.pricing-retainer-sub {
    max-width: 560px;
    margin: 0 auto 2.5rem;
    font-size: 0.9rem;
}

.retainer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.retainer-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem 1.5rem;
    text-align: left;
}

.retainer-featured {
    border-color: var(--glow-deep);
    background: var(--surface-2);
}

.retainer-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.retainer-featured .retainer-name {
    color: var(--glow-mid);
}

.retainer-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-bottom: 1.25rem;
}

.retainer-price {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text);
    letter-spacing: -0.02em;
}

.retainer-per {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.retainer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.retainer-list li {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding-left: 1rem;
    position: relative;
}

.retainer-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.retainer-no-contract {
    font-size: 0.85rem;
    color: var(--text-dim);
}

@media (max-width: 680px) {
    .pricing-product { grid-template-columns: 1fr; }
    .pricing-base { border-right: none; border-bottom: 1px solid var(--border); }
    .retainer-grid { grid-template-columns: 1fr; }
}


/* ─── 12. CTA ────────────────────────────────────────────────────────────── */
#cta {
    text-align: center;
    padding-bottom: 8rem;
}
#cta h2 { margin-bottom: 0.75rem; }
#cta p  { margin-bottom: 2rem; }

.btn-primary {
    display: inline-block;
    background: var(--glow-deep);
    color: var(--text);
    padding: 0.875rem 2rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover {
    background: var(--glow-mid);
    transform: translateY(-1px);
}


/* ─── Footer ───────────────────────────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 680px) {
    .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

.footer-brand .nav-brand-name {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 1rem;
    color: var(--text);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.85rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--text); }

.footer-col p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-col a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}


/* ─── 13. Animations ─────────────────────────────────────────────────────── */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes idlePulse {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1;   }
}

/* Waiting pulse — brighter than idle, runs after 5s to invite the visitor to type */
@keyframes waitingPulse {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(56, 168, 224, 0.2),
            0 0 60px rgba(56, 168, 224, 0.28),
            0 10px 28px rgba(30, 111, 168, 0.15);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(56, 168, 224, 0.5),
            0 0 100px rgba(56, 168, 224, 0.5),
            0 10px 40px rgba(30, 111, 168, 0.3);
    }
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes responseFlash {
    0%   { box-shadow: 0 0 0 1px rgba(125,211,252,0.4), 0 0 88px rgba(255,255,255,0.2), 0 0 44px rgba(56,168,224,0.62); }
    55%  { box-shadow: 0 0 0 1px rgba(94,176,224,0.3), 0 0 76px rgba(159,220,255,0.18), 0 0 36px rgba(56,168,224,0.44); }
    100% { box-shadow: 0 0 0 1px rgba(30,111,168,0.15), 0 0 56px rgba(30,111,168,0.2),  0 10px 24px rgba(30,111,168,0.1);  }
}


/* ─── 14. Responsive ───────────────────────────────────────────────────── */

/* ── Short viewport fix (laptops ~768px tall) ──
   Crow + headline + chat is too tall — shrink crow, tighten gaps, compress chat */
/* ── Laptop viewport fix (short screens ~768-900px tall) ──
   Only shrinks text and nav — desktop layout untouched    */
@media (max-height: 900px) {
    #top-nav {
        padding: 0.5rem 2rem;
    }
    .nav-crow       { width: 24px; }
    .nav-brand-name { font-size: 0.85rem; }
    .nav-descriptor { font-size: 0.72rem; }
    .nav-links a    { font-size: 0.72rem; padding: 0.3rem 0.45rem; }

    #hero {
        gap: 0.6rem;
        padding-top: 1rem;
    }
    #hero-crow { width: 68px; }

    #headline h1 { font-size: 1.6rem; }
    #tagline     { font-size: 0.9rem; }
}

@media (max-width: 900px) {
    #top-nav {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    /* On small screens, hide the descriptor to keep the brand tight */
    .nav-descriptor,
    .nav-brand-sep {
        display: none;
    }

    .nav-links {
        overflow-x: auto;
        padding-bottom: 0.1rem;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar { display: none; }

}

@media (max-width: 750px) {
    #hero-content {
        flex-direction: column;
        gap: 1.25rem;
    }
}

@media (max-width: 640px) {
    #hero {
        gap: 1.6rem;
        padding-top: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #hero-content {
        flex-direction: column;
    }

    #chat-area,
    #panel {
        width: 100% !important;
    }

    #chat-messages {
        padding: 1rem;
    }

    #hero-crow {
        width: 88px;
    }
}


/* ─── 15. Mobile Chat Overlay & Panel ───────────────────────────────────── */
/* ALL rules here are mobile-only. Desktop is completely untouched.         */

@media (max-width: 768px) {

    /* Full-screen chat overlay — sits on body, outside all page layout.
       chat-container moves into here when user taps chat on mobile.        */
    #mobile-chat-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100dvh;
        z-index: 9999;
        background: var(--bg);
        flex-direction: column;
        overflow: hidden;
    }

    #mobile-chat-overlay.open {
        display: flex;
    }

    #mobile-overlay-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
    }

    #mobile-overlay-title {
        color: var(--text);
        font-size: 0.9rem;
        font-weight: 500;
        letter-spacing: 0.05em;
    }

    #mobile-overlay-close {
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 1.25rem;
        cursor: pointer;
        padding: 0.25rem 0.5rem;
        line-height: 1;
    }

    /* chat-container fills the overlay when moved inside */
    #mobile-chat-overlay #chat-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    #mobile-chat-overlay #chat-messages {
        flex: 1;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* Input row stays pinned at bottom — never scrolls away */
    #mobile-chat-overlay #chat-input-row {
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
    }

    /* 16px prevents iOS from zooming when input is focused */
    #mobile-chat-overlay #chat-input {
        font-size: 16px;
    }

    /* Panel becomes a bottom sheet that slides up over the chat */
    #panel.panel-visible {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        max-width: 100% !important;
        height: 85vh;
        height: 85dvh;
        max-height: 85vh !important;
        max-height: 85dvh !important;
        z-index: 50;
        border-radius: 16px 16px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        overflow-y: auto;
        display: flex !important;
        flex-direction: column;
        animation: slideUpSheet 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #panel.panel-booking {
        max-height: 85vh !important;
        max-height: 85dvh !important;
    }

    /* Drag handle at top of sheet */
    #panel.panel-visible::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
        margin: 0.75rem auto 0.25rem;
        flex-shrink: 0;
    }

    /* Backdrop behind the sheet */
    #panel-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 49;
    }

    #panel-backdrop.active {
        display: block;
        animation: fadeIn 0.2s ease;
    }

}

@keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
