/* Genie — minimal dark theme with purple-smoke accents */

:root {
    --bg: #00000b;
    --ink: #ece9f5;
    --muted: #8a85a3;
    --purple: #9b6dff;
    --purple-deep: #6a3cd8;
    --purple-glow: rgba(155, 109, 255, 0.45);
    --card: #0a0918;
    --card-edge: rgba(155, 109, 255, 0.18);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- Stage ---------- */

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8vh 24px;
    gap: 4vh;
    text-align: center;
}

.hero {
    min-height: 100vh;
}

.hero.closing {
    min-height: 60vh;
}

.hero-tagline {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0;
    max-width: 16ch;
    background: linear-gradient(180deg, #ffffff 0%, #b9aef0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    animation: actionsIn 1.4s ease-out 0.4s forwards;
}

.hero-sub {
    max-width: 60ch;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
    margin: 0;
    opacity: 0;
    animation: actionsIn 1.4s ease-out 0.7s forwards;
}

.closing-tag {
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 500;
    letter-spacing: -0.01em;
    margin: 0;
}

.closing-fine {
    font-size: 13px;
    margin-top: 8px;
}

.logo {
    max-width: min(70vw, 520px);
    max-height: 60vh;
    height: auto;
    user-select: none;
    pointer-events: none;
    /* PNG has a dark RGB bg (no alpha) — screen-blend it into the page. */
    mix-blend-mode: screen;
    filter: blur(0.25px);
    /* Hidden until JS adds .appearing-in (0.25s after smoke fires). */
    opacity: 0;
    /* Glow disabled. To restore: append ", logoGlow 4.5s ease-in-out infinite" to the .appearing-in animation below. */
}

.logo.appearing-in {
    /* Entrance fade, then a subtle brightness flicker that runs forever.
       Cycle length (3.7s) is intentionally NOT a divisor of the video
       loop (5s) so the flicker pattern slides over the seam, masking
       any tiny luminance jump at the loop point. */
    animation:
        logoIn 1.2s ease-out forwards,
        logoFlicker 3.7s ease-in-out 1.2s infinite;
}

@keyframes logoFlicker {
    0%   { filter: blur(0.25px) brightness(1.00); }
    13%  { filter: blur(0.25px) brightness(0.92); }
    27%  { filter: blur(0.25px) brightness(1.05); }
    44%  { filter: blur(0.25px) brightness(0.94); }
    62%  { filter: blur(0.25px) brightness(1.02); }
    81%  { filter: blur(0.25px) brightness(0.90); }
    100% { filter: blur(0.25px) brightness(1.00); }
}

@keyframes logoIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes logoGlow {
    0%, 100% {
        filter: blur(0.25px)
                drop-shadow(0 0 18px rgba(155, 109, 255, 0.30))
                drop-shadow(0 0 56px rgba(155, 109, 255, 0.16));
    }
    50% {
        filter: blur(0.25px)
                drop-shadow(0 0 30px rgba(155, 109, 255, 0.44))
                drop-shadow(0 0 88px rgba(155, 109, 255, 0.24));
    }
}

.actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    animation: actionsIn 1.4s ease-out 0.8s forwards;
}

@keyframes actionsIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Buttons ---------- */

.genie-btn {
    appearance: none;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 15px;
    letter-spacing: 0.02em;
    padding: 12px 22px;
    border: 1px solid rgba(155, 109, 255, 0.35);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.genie-btn:hover:not(:disabled) {
    border-color: var(--purple);
    box-shadow: 0 0 24px var(--purple-glow);
    background: rgba(155, 109, 255, 0.06);
}

.genie-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.genie-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.genie-btn.small {
    font-size: 13px;
    padding: 8px 14px;
}

.genie-btn.ghost {
    border-color: rgba(155, 109, 255, 0.18);
    color: var(--muted);
}

.genie-btn.vanishing {
    pointer-events: none;
    animation: vanish 0.55s ease-out forwards;
}

@keyframes vanish {
    to {
        opacity: 0;
        transform: scale(0.85) translateY(-8px);
        filter: blur(6px);
    }
}

.genie-btn.appearing {
    animation: appear 0.6s ease-out;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: scale(0.9);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* ---------- Modal ---------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal[hidden] { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 11, 0.78);
    backdrop-filter: blur(6px);
    animation: fadeIn 0.3s ease-out;
}

.modal-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--card-edge);
    border-radius: 16px;
    padding: 36px 32px 28px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 80px rgba(106, 60, 216, 0.25), 0 0 60px rgba(155, 109, 255, 0.08);
    animation: cardIn 0.45s cubic-bezier(0.2, 0.7, 0.3, 1.1);
    /* Smooth grow/shrink between steps. Height is set via JS in
       showStep() before/after step swap; max-width is driven by the
       :has() rule below. */
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.oasis-step {
    transition: opacity 0.15s ease;
}

.modal-card-wide {
    max-width: 460px;
}

.small-print {
    font-size: 12px;
    margin-top: 14px;
    text-align: center;
}

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

@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); filter: blur(8px); }
    to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.modal.closing .modal-backdrop { animation: fadeOut 0.3s ease-out forwards; }
.modal.closing .modal-card { animation: cardOut 0.35s ease-out forwards; }

@keyframes fadeOut { to { opacity: 0; } }
@keyframes cardOut {
    to { opacity: 0; transform: translateY(-8px) scale(0.96); filter: blur(8px); }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.04);
}

.modal h2 {
    margin: 0 0 12px;
    font-weight: 500;
    font-size: 22px;
}

.muted { color: var(--muted); margin: 6px 0 18px; font-size: 14px; }

/* ---------- Gateway step ---------- */

.gateway-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.gateway-choices .genie-btn {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    text-align: left;
}

.choice-main {
    font-size: 16px;
    font-weight: 500;
}

.choice-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    letter-spacing: 0.02em;
}

.step-back {
    position: absolute;
    top: 12px;
    left: 14px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.step-back:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.04);
}

.oasis-step h2 {
    margin-top: 4px;
}

/* ---------- Download (platform) step ---------- */

.platform-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.platform-btn {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    text-align: left;
}

.platform-name {
    font-size: 16px;
    font-weight: 500;
}

.platform-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    letter-spacing: 0.02em;
}

/* ---------- Purchase modal ---------- */


.spinner {
    width: 38px;
    height: 38px;
    margin: 24px auto;
    border: 2px solid rgba(155, 109, 255, 0.18);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.code-display {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(155, 109, 255, 0.06);
    border: 1px solid var(--card-edge);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 18px 0 14px;
}

.code-display code {
    flex: 1;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 18px;
    letter-spacing: 0.08em;
    color: var(--ink);
    user-select: all;
}

.oasis-step[data-step="checkout"] .genie-btn,
.oasis-step[data-step="success"] a.genie-btn,
.oasis-step[data-step="success"] button.genie-btn:not(.small),
.oasis-step[data-step="error"] .genie-btn {
    margin-top: 12px;
    width: 100%;
}

.oasis-step .ghost {
    margin-top: 6px;
}

/* ---------- Smoke canvas ---------- */

#smoke-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200;
    width: 100vw;
    height: 100vh;
}

@media (max-width: 480px) {
    .actions { flex-direction: column; width: 100%; max-width: 320px; }
    .genie-btn { width: 100%; }
    .modal-card { padding: 28px 22px 22px; }
}

/* ===========================================================
   LANDING PAGE SECTIONS
   =========================================================== */

.section {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14vh 24px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-head {
    text-align: center;
    margin-bottom: 48px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.section-head h2 {
    font-size: clamp(24px, 3.5vw, 38px);
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 8px 0 12px;
    line-height: 1.15;
}

.section-head p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
    margin: 0;
}

.kicker {
    display: inline-block;
    font-size: 13px;
    color: var(--purple);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    background: rgba(155, 109, 255, 0.08);
    border: 1px solid var(--card-edge);
    padding: 5px 12px;
    border-radius: 99px;
}

/* ---------- Pitch ---------- */

.pitch {
    text-align: center;
    padding-top: 8vh;
    padding-bottom: 6vh;
}

.lead {
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.55;
    max-width: 56ch;
    margin: 0 auto 14px;
    color: var(--ink);
    font-weight: 400;
}

.lead em {
    font-style: italic;
    color: var(--purple);
    font-weight: 500;
}

/* ---------- Showcase ---------- */

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.cat-chip {
    appearance: none;
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(155, 109, 255, 0.18);
    border-radius: 99px;
    padding: 8px 14px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.cat-chip:hover {
    color: var(--ink);
    border-color: rgba(155, 109, 255, 0.45);
}

.cat-chip.active {
    color: var(--ink);
    border-color: var(--purple);
    background: rgba(155, 109, 255, 0.08);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 960px) { .app-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .app-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .app-grid { grid-template-columns: 1fr; } }

.app-card {
    background: var(--card);
    border: 1px solid var(--card-edge);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    cursor: default;
}

.app-card:hover {
    border-color: var(--purple);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(106, 60, 216, 0.18);
}

.app-card.hidden {
    display: none;
}

.app-icon {
    font-size: 28px;
    line-height: 1;
}

.app-name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--ink);
}

.app-desc {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
    flex: 1;
}

.app-cat {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.7;
}

.showcase-foot {
    text-align: center;
    max-width: 60ch;
    margin: 0 auto;
    font-size: 14px;
}

.showcase-foot strong {
    color: var(--ink);
}

/* ---------- Applet window mock ---------- */

.preview-section {
    padding-bottom: 8vh;
}

.applet-window {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--card-edge);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(106, 60, 216, 0.22);
}

.applet-chrome {
    background: rgba(155, 109, 255, 0.04);
    border-bottom: 1px solid var(--card-edge);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }

.applet-title {
    margin-left: 12px;
    font-size: 13px;
    color: var(--muted);
}

.applet-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    min-height: 320px;
}

.applet-main {
    padding: 28px;
    border-right: 1px solid var(--card-edge);
}

.metric-large { text-align: center; margin-bottom: 24px; }
.metric-num { font-size: 56px; font-weight: 600; color: var(--purple); letter-spacing: -0.02em; }
.metric-label { font-size: 13px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.metric-sub { font-size: 13px; color: var(--ink); margin-top: 4px; }

.metric-row { display: flex; gap: 12px; margin-bottom: 18px; }
.metric-tile { flex: 1; background: rgba(155, 109, 255, 0.05); border: 1px solid var(--card-edge); border-radius: 10px; padding: 12px; }
.t-label { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.t-val { font-size: 18px; font-weight: 500; }

.hire-list { display: flex; flex-direction: column; gap: 6px; }
.hire-row { display: flex; justify-content: space-between; padding: 8px 12px; background: rgba(0,0,0,0.2); border-radius: 8px; font-size: 13px; }
.hire-impact { color: #ff8a8a; font-variant-numeric: tabular-nums; }

.applet-side {
    padding: 18px;
    background: rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
}
.chat-msg { padding: 10px 12px; border-radius: 10px; max-width: 92%; }
.chat-msg.you { background: rgba(155, 109, 255, 0.15); color: var(--ink); align-self: flex-end; }
.chat-msg.genie { background: rgba(255,255,255,0.04); color: var(--muted); align-self: flex-start; }
.chat-input { margin-top: auto; padding: 10px 12px; border: 1px solid var(--card-edge); border-radius: 10px; color: var(--muted); font-size: 13px; }

@media (max-width: 720px) {
    .applet-body { grid-template-columns: 1fr; }
    .applet-main { border-right: none; border-bottom: 1px solid var(--card-edge); }
}

/* ---------- Audience arc ---------- */

.arc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.arc-card {
    background: var(--card);
    border: 1px solid var(--card-edge);
    border-radius: 14px;
    padding: 28px 24px;
    text-align: center;
}

.arc-emoji { font-size: 36px; display: block; margin-bottom: 12px; }
.arc-card h3 { font-size: 18px; font-weight: 500; margin: 0 0 10px; }
.arc-card p { font-size: 14px; color: var(--muted); line-height: 1.5; margin: 0; }

/* ---------- Capabilities grid ---------- */

.cap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

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

.cap-card {
    background: var(--card);
    border: 1px solid var(--card-edge);
    border-radius: 14px;
    padding: 22px;
}

.cap-icon { font-size: 26px; display: block; margin-bottom: 10px; }
.cap-card h3 { font-size: 15px; font-weight: 500; margin: 0 0 6px; }
.cap-card p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }

/* ---------- Styling slider note ---------- */

.styling-slider {
    padding: 8vh 24px;
}

.slider-card {
    background: linear-gradient(180deg, rgba(155, 109, 255, 0.08) 0%, rgba(10, 9, 24, 0.0) 100%);
    border: 1px solid var(--card-edge);
    border-radius: 18px;
    padding: 36px 28px;
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}

.slider-card h3 {
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 8px;
}

.slider-card p { margin: 0 auto 20px; max-width: 50ch; }

.slider-mock {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
}

.fake-slider {
    flex: 0 1 320px;
    accent-color: var(--purple);
    cursor: not-allowed;
}

/* ---------- Footer ---------- */

.footer {
    text-align: center;
    padding: 36px 24px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--card-edge);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}
.footer a:hover { color: var(--ink); }

/* Reduce hero gap for landing layout */
.hero .logo {
    max-width: min(40vw, 240px);
    max-height: 35vh;
}

@media (max-width: 720px) {
    .section { padding: 10vh 20px; }
}

/* ---------- Create / Custom-built section ---------- */

.create-mock {
    max-width: 680px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--card-edge);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(106, 60, 216, 0.18);
}

.create-body {
    padding: 28px 28px 24px;
}

.create-prompt-label {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.create-prompt-text {
    font-size: 17px;
    line-height: 1.5;
    color: var(--ink);
    background: rgba(155, 109, 255, 0.05);
    border: 1px solid var(--card-edge);
    border-radius: 10px;
    padding: 18px 18px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-style: italic;
    margin-bottom: 18px;
}

.create-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.create-btn {
    background: rgba(155, 109, 255, 0.14);
    border: 1px solid var(--purple);
    color: var(--ink);
    padding: 10px 20px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 0 18px rgba(155, 109, 255, 0.18);
}

.create-hint {
    font-size: 12px;
    color: var(--muted);
}

/* ---------- Intro step (sell-sheet) ---------- */

/* Wider modal card only when the intro step is visible. */
.modal-card:has(.oasis-step[data-step="intro"]:not([hidden])) {
    max-width: 600px;
}

.intro-lockup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 18px;
}

.intro-lockup-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
}

.intro-lockup-plus {
    color: var(--muted);
    font-size: 22px;
    font-weight: 300;
}

.intro-headline {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0 0 8px;
    line-height: 1.2;
}

.intro-sub {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 auto 22px;
    max-width: 46ch;
}

.intro-mode {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(155, 109, 255, 0.04);
    border: 1px solid var(--card-edge);
    margin-bottom: 10px;
}

.intro-mode-head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.intro-mode-emoji {
    font-size: 18px;
}

.intro-mode-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.intro-mode-aud {
    font-size: 13px;
    color: var(--muted);
    font-style: italic;
}

.intro-mode-body {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink);
    margin: 0;
}

.intro-cta {
    display: block;
    width: 100%;
    margin: 18px auto 8px;
}

.intro-fineprint {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin: 0;
}

