/* ===== Reset / Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    background: #fff;
    color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.55;
    min-height: 100%;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

:root {
    --line: #e6e6e6;
    --line-soft: #f0f0f0;
    --muted: #707070;
    --muted-2: #999;
    --bg-soft: #fafafa;
    --pad-x: 48px;
    --max: 1180px;
    --radius-card: 14px;
}

/* ===== Header ===== */
.home-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px var(--pad-x);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--line);
}

.home-brand {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.home-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.home-nav-links a {
    font-size: 14px;
    color: var(--muted);
    transition: color 0.15s;
}

.home-nav-links a:hover { color: #000; }

.home-nav-cta {
    border: 1px solid #000;
    background: #fff;
    color: #000;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.02em;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.home-nav-cta:hover {
    background: #000;
    color: #fff;
}

.home-nav-cta[hidden] { display: none; }

.home-account {
    position: relative;
}

.home-account[hidden] { display: none; }

.home-user-badge {
    background: transparent;
    border: 1px solid var(--line);
    color: #000;
    padding: 6px 14px 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.home-user-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #19c37d;
}

.home-user-badge:hover {
    border-color: #000;
    background: var(--bg-soft);
}

.home-user-badge[hidden] { display: none; }

.home-account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 136px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    z-index: 80;
}

.home-account-menu[hidden] { display: none; }

.home-account-menu button {
    width: 100%;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #111;
    padding: 8px 10px;
    text-align: left;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.home-account-menu button:hover,
.home-account-menu button:focus-visible {
    background: var(--bg-soft);
    outline: none;
}

/* ===== Hero ===== */
.home-main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

.home-hero {
    padding: 96px 0 56px;
    max-width: 820px;
}

.home-eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 28px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.home-title {
    font-size: 76px;
    font-weight: 300;
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin-bottom: 24px;
}

.home-sub {
    font-size: 19px;
    color: #333;
    max-width: 600px;
    margin-bottom: 36px;
}

.home-density {
    display: inline-flex;
    align-items: baseline;
    gap: 14px;
    padding: 14px 24px;
    background: #000;
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
    letter-spacing: 0.04em;
}

.dense {
    font-weight: 500;
}

.dense-strong {
    font-size: 18px;
    font-weight: 600;
}

.dense-mute {
    color: rgba(255, 255, 255, 0.48);
}

.dense-sep {
    color: rgba(255, 255, 255, 0.45);
    font-size: 16px;
}

/* ===== Demo section ===== */
.home-demo-section {
    padding-bottom: 96px;
}

.home-demo-frame {
    position: relative;
    background: #000;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    aspect-ratio: 16 / 10;
    width: 100%;
}

.home-demo-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.home-demo-img,
.home-demo-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.home-demo-video {
    display: none;
}

.home-demo-hotspots {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-demo-hotspot {
    position: absolute;
    border: 1.5px solid rgba(255, 255, 255, 0.0);
    background: rgba(255, 255, 255, 0.0);
    border-radius: 6px;
    cursor: pointer;
    pointer-events: auto;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
    box-sizing: border-box;
}

.home-demo-hotspot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.55);
    opacity: 0;
    transition: opacity 0.2s;
}

.home-demo-hotspot:hover {
    border-color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}
.home-demo-hotspot:hover::after { opacity: 1; }

.home-demo-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    letter-spacing: 0.04em;
}

/* ===== Demo overlays ===== */
.home-demo-overlay {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    pointer-events: none;
    z-index: 4;
}

.home-demo-overlay-top {
    top: 0;
    justify-content: flex-end;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0));
}

.home-demo-overlay-bottom {
    bottom: 0;
    justify-content: space-between;
    background: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0));
}

.home-demo-overlay > * { pointer-events: auto; }

.home-demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.92);
    color: #000;
    border: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: background 0.15s, transform 0.1s;
}

.home-demo-btn:hover { background: #fff; }
.home-demo-btn:active { transform: translateY(1px); }
.home-demo-btn[hidden] { display: none; }

.home-demo-btn-ghost {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(6px);
}
.home-demo-btn-ghost:hover { background: rgba(255, 255, 255, 0.28); }

.home-demo-btn svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.lock-pill {
    background: #000;
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 2px;
}

.home-demo-hint {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 4px 8px;
}

.home-demo-caption {
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    letter-spacing: 0.02em;
}

.home-demo-caption em {
    font-style: italic;
    color: #000;
}

/* ===== Pitch grid ===== */
.home-pitch {
    padding-bottom: 120px;
}

.home-pitch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.pitch {
    padding: 44px 36px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.pitch-num {
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--muted-2);
    margin-bottom: 20px;
    font-feature-settings: "tnum";
}

.pitch h3 {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.pitch p {
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.7;
}

/* ===== Footer ===== */
.home-footer {
    border-top: 1px solid var(--line);
    padding: 36px var(--pad-x) 28px;
    background: var(--bg-soft);
}

.home-footer-row {
    max-width: var(--max);
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.home-footer-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.home-footer-nav a {
    font-size: 13px;
    color: var(--muted);
    transition: color 0.15s;
}
.home-footer-nav a:hover { color: #000; }

.home-footer-bottom {
    max-width: var(--max);
    margin: 0 auto;
    font-size: 12px;
    color: var(--muted-2);
    letter-spacing: 0.02em;
}

/* ===== Sign-in toast (shown when user clicks locked buttons) ===== */
.home-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(20px);
    background: #000;
    color: #fff;
    padding: 14px 22px;
    border-radius: 999px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.home-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.home-toast a,
.home-toast button {
    color: #fff;
    text-decoration: underline;
    margin-left: 8px;
    font-weight: 500;
    background: transparent;
    border: none;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

/* ===== Demo live caption =====
 * One overlay surface for narration, ASR partial text, and AI reply. */
.home-demo-live {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 64px;
    max-width: 720px;
    margin: 0 auto;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.55;
    letter-spacing: 0.01em;
    pointer-events: none;
    z-index: 6;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.2s;
}
.home-demo-live[hidden] { display: none; }
.home-demo-live[data-mode="listening"] {
    background: rgba(196, 68, 68, 0.86);
}
.home-demo-live[data-mode="thinking"] {
    opacity: 0.7;
}

/* Narration button active state */
#demo-narration.is-on {
    background: #fff;
    color: #000;
}
#demo-narration.is-on svg { color: #000; }

/* Ask button: hold-to-talk feedback */
#demo-ask {
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
#demo-ask.is-recording {
    background: #c44;
    color: #fff;
    border-color: #c44;
    animation: home-demo-pulse 1.1s infinite ease-in-out;
}
#demo-ask.is-recording svg { color: #fff; }
@keyframes home-demo-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(196, 68, 68, 0.5); }
    50%      { box-shadow: 0 0 0 8px rgba(196, 68, 68, 0); }
}

/* ===== Creator CTA section ===== */
.home-creator-cta {
    margin: 0 auto 96px;
    padding: 0 24px;
    max-width: 1200px;
}

.home-creator-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 56px 56px 52px;
    text-align: center;
    background: var(--bg-soft);
    max-width: 760px;
    margin: 0 auto;
}

.home-creator-title {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin: 14px 0 16px;
    color: #000;
}

.home-creator-sub {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
    max-width: 560px;
    margin: 0 auto 28px;
}

.home-creator-btn {
    background: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 999px;
    padding: 11px 28px;
    font-size: 14px;
    font-family: inherit;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.home-creator-btn:hover { background: #222; }
.home-creator-btn:active { transform: translateY(1px); }

/* ===== Signup modal (creator pitch / subscribe) ===== */
.signup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.18s;
}
.signup-overlay:not([hidden]) { opacity: 1; }
.signup-overlay[hidden] { display: none !important; }

.signup-box {
    position: relative;
    width: 360px;
    max-width: 100%;
    padding: 36px 28px 24px;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    background: #fff;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.signup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
}
.signup-close:hover { color: #000; background: var(--bg-soft); }

.signup-title {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.signup-sub {
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0 0 18px;
}

.signup-box input[type="text"],
.signup-box input[type="email"] {
    display: block;
    width: 100%;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    outline: none;
    margin-bottom: 10px;
    transition: border-color 0.15s;
    box-sizing: border-box;
    background: #fff;
}

.signup-box input:focus { border-color: #000; }

.signup-submit {
    display: block;
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 11px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-top: 4px;
    margin-bottom: 8px;
}
.signup-submit:hover { background: #222; }
.signup-submit:active { transform: translateY(1px); }
.signup-submit:disabled { background: #ddd; cursor: not-allowed; }

.signup-status {
    font-size: 12px;
    min-height: 16px;
    margin-top: 6px;
    color: #c44;
}
.signup-status.ok { color: #090; }

/* Subscribe mode: hide channel input */
.signup-overlay[data-kind="subscriber"] #signup-channel {
    display: none;
}

/* ===== Auth popup (login / register) ===== */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.18s;
}

.auth-overlay:not([hidden]) {
    opacity: 1;
}

.auth-overlay[hidden] {
    display: none !important;
}

.auth-box {
    position: relative;
    width: 320px;
    max-width: 100%;
    padding: 36px 28px 24px;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    background: #fff;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.auth-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
}
.auth-close:hover {
    color: #000;
    background: var(--bg-soft);
}

.auth-title {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}

.auth-box input[type="text"],
.auth-box input[type="password"] {
    display: block;
    width: 100%;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    outline: none;
    margin-bottom: 10px;
    transition: border-color 0.15s;
    box-sizing: border-box;
    background: #fff;
}

.auth-box input:focus {
    border-color: #000;
}

.auth-submit {
    display: block;
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 11px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-top: 4px;
    margin-bottom: 14px;
}

.auth-submit:hover { background: #222; }
.auth-submit:active { transform: translateY(1px); }

.auth-switch {
    font-size: 12px;
    color: var(--muted-2);
    cursor: pointer;
    margin-bottom: 6px;
}

.auth-switch span {
    color: #000;
    text-decoration: underline;
}

.auth-error {
    font-size: 12px;
    color: #c44;
    margin-top: 6px;
    min-height: 16px;
}

.g-signin-btn {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 14px;
    font-size: 11px;
    color: #aaa;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    :root {
        --pad-x: 24px;
    }
    .home-title { font-size: 48px; }
    .home-sub { font-size: 16px; }
    .home-hero { padding: 56px 0 40px; }
    .home-demo-frame { aspect-ratio: 4 / 5; }
    .home-pitch-grid {
        grid-template-columns: 1fr;
    }
    .pitch { padding: 32px 20px; }
    .home-nav { padding: 12px var(--pad-x); }
    .home-nav-links { gap: 18px; }
    .home-nav-links a { font-size: 13px; }
    .home-density { font-size: 12px; padding: 10px 18px; }
    .dense-strong { font-size: 15px; }
}

@media (max-width: 560px) {
    .home-title { font-size: 38px; }
    .home-demo-btn span:not(.lock-pill) { display: none; }
    .home-demo-hint { display: none; }
}
