/* =========================================================
   What If — $IF · Dr. Manhattan / cosmic indifference
   ========================================================= */

:root {
    --space: #02030a;
    --space-2: #050614;
    --deep-blue: #0a1429;
    --panel-bg: #0d1426;
    --panel-border: #1f2a44;

    --manhattan: #7cc5f5;
    --manhattan-2: #a3d8fb;
    --ice: #d7ecfb;

    --mars: #c23e2e;
    --mars-deep: #6b1e17;
    --mars-dim: #3a1008;

    --text: #cfd9ec;
    --text-dim: #7f8ca6;
    --text-mute: #55617a;

    --caption-bg: #f4ecd8;
    --caption-ink: #0a0a0a;

    --font-display: 'Bebas Neue', 'Oswald', Impact, sans-serif;
    --font-caption: 'Bangers', cursive;
    --font-serif: 'EB Garamond', Georgia, serif;
    --font-body: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--space);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(124, 197, 245, 0.06), transparent 55%),
        radial-gradient(ellipse at 85% 80%, rgba(194, 62, 46, 0.08), transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(107, 30, 23, 0.25), transparent 70%),
        linear-gradient(180deg, #02030a 0%, #050614 60%, #0a0410 100%);
    z-index: -2;
    pointer-events: none;
}

.mars-horizon {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 120px;
    background: radial-gradient(ellipse at 50% 100%, rgba(194, 62, 46, 0.35), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

canvas#particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: all 0.3s ease;
}
.navbar.scrolled {
    background: rgba(5, 6, 20, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--panel-border);
    padding: 10px 0;
}
.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 3px;
    color: var(--ice);
}
.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--manhattan);
    object-fit: cover;
}
.logo-text { color: var(--manhattan); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
    font-family: var(--font-mono);
    font-size: 13px;
}
.nav-links a {
    color: var(--text-dim);
    transition: color 0.2s;
    letter-spacing: 0.5px;
}
.nav-links a::before {
    content: '/ ';
    color: var(--mars);
    opacity: 0.7;
}
.nav-links a:hover { color: var(--manhattan); }

.nav-cta {
    padding: 9px 18px;
    border: 1px solid var(--manhattan);
    color: var(--manhattan);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.2s;
}
.nav-cta:hover {
    background: var(--manhattan);
    color: var(--space);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--ice);
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    padding: 140px 32px 80px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-inner {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 80px;
    align-items: center;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 6px 12px;
    border: 1px solid var(--panel-border);
    background: rgba(13, 20, 38, 0.6);
}
.kicker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--manhattan);
    box-shadow: 0 0 10px var(--manhattan);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 4px;
    line-height: 0.82;
    margin: 26px 0 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.title-what {
    font-size: clamp(80px, 14vw, 210px);
    color: var(--ice);
    text-shadow: 0 0 40px rgba(124, 197, 245, 0.35);
}
.title-if {
    font-size: clamp(80px, 14vw, 210px);
    color: transparent;
    -webkit-text-stroke: 2px var(--manhattan);
    letter-spacing: 12px;
    padding-left: 0.1em;
}

.hero-lead {
    font-family: var(--font-serif);
    font-size: clamp(18px, 1.8vw, 22px);
    line-height: 1.5;
    color: var(--text);
    max-width: 540px;
    font-style: italic;
}
.hero-lead-small {
    margin-top: 14px;
    font-size: 16px;
    color: var(--text-dim);
    font-style: normal;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.hero-actions {
    margin-top: 36px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 26px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
}
.btn-primary {
    background: var(--manhattan);
    color: var(--space);
    box-shadow: 5px 5px 0 var(--mars);
}
.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--mars);
}
.btn-ghost {
    background: transparent;
    color: var(--ice);
    border-color: var(--panel-border);
}
.btn-ghost:hover {
    border-color: var(--manhattan);
    color: var(--manhattan);
}

/* ========== COMIC PANELS ========== */
.panel {
    background: var(--panel-bg);
    border: 2px solid var(--ice);
    position: relative;
    overflow: hidden;
    box-shadow: 8px 8px 0 rgba(124, 197, 245, 0.12);
}
.panel-caption {
    background: var(--caption-bg);
    color: var(--caption-ink);
    font-family: var(--font-caption);
    font-size: 18px;
    letter-spacing: 1.5px;
    padding: 10px 16px;
    border-bottom: 2px solid var(--ice);
    line-height: 1.2;
}
.panel-caption.bottom {
    border-bottom: 0;
    border-top: 2px solid var(--ice);
}
.panel-caption.mono {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.panel-img {
    width: 100%;
    display: block;
    object-fit: cover;
}
.panel-img-wide {
    max-height: 260px;
    object-fit: cover;
    object-position: center;
}

.panel-body { padding: 22px 24px; }

.panel-hero {
    transform: rotate(1.5deg);
    transition: transform 0.4s ease;
}
.panel-hero:hover {
    transform: rotate(0deg) scale(1.02);
}
.panel-hero .panel-img {
    aspect-ratio: 4 / 5;
}

/* ========== MARQUEE ========== */
.marquee {
    overflow: hidden;
    border-top: 2px solid var(--manhattan);
    border-bottom: 2px solid var(--manhattan);
    background: var(--deep-blue);
    padding: 14px 0;
    position: relative;
    z-index: 1;
}
.marquee-track {
    display: flex;
    gap: 60px;
    white-space: nowrap;
    animation: marquee 36s linear infinite;
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 4px;
    color: var(--manhattan);
}
@keyframes marquee {
    to { transform: translateX(-50%); }
}

/* ========== SECTIONS ========== */
section { padding: 110px 0; position: relative; }

.section-head { margin-bottom: 64px; max-width: 820px; }

.section-kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--mars);
    display: block;
    margin-bottom: 14px;
}

.section-h {
    font-family: var(--font-display);
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1;
    letter-spacing: 2px;
    color: var(--ice);
}
.hl {
    color: var(--manhattan);
    font-style: italic;
}

/* ========== QUESTION / LORE ========== */
.panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}
.panel-wide { grid-column: 1 / -1; }

.panel-body .serif {
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.55;
    color: var(--text);
    margin-bottom: 14px;
}
.panel-body .serif.muted {
    color: var(--text-dim);
    font-size: 17px;
}
.kicker-line {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--mars);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 10px;
}

.panels .panel:nth-child(2) { transform: rotate(-0.8deg); }
.panels .panel:nth-child(3) { transform: rotate(0.6deg); }
.panels .panel:nth-child(2):hover,
.panels .panel:nth-child(3):hover { transform: rotate(0deg); }
.panels .panel { transition: transform 0.4s; }

/* ========== BUY / FRAMES LIST ========== */
.buy { background: linear-gradient(180deg, transparent, rgba(10, 20, 41, 0.45), transparent); }

.frames-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--panel-border);
}
.frame-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 40px;
    padding: 36px 16px;
    border-bottom: 1px solid var(--panel-border);
    transition: all 0.3s;
    align-items: center;
    position: relative;
}
.frame-row::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: transparent;
    transition: background 0.3s;
}
.frame-row:hover::before { background: var(--manhattan); }
.frame-row:hover { padding-left: 36px; background: rgba(13, 20, 38, 0.35); }

.frame-num {
    font-family: var(--font-display);
    font-size: 96px;
    letter-spacing: 3px;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--mars);
    line-height: 1;
}
.frame-body h3 {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 2px;
    color: var(--ice);
    margin-bottom: 6px;
}
.frame-body p {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--text-dim);
    max-width: 640px;
    font-style: italic;
}

.ca-strip {
    margin-top: 48px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--deep-blue);
    border: 1px solid var(--panel-border);
    flex-wrap: wrap;
}
.ca-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--mars);
}
.ca-value {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}
.ca-address {
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--text);
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ca-link {
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--manhattan);
    border: 1px solid var(--manhattan);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.ca-link:hover {
    background: var(--manhattan);
    color: var(--space);
}
.ca-copy.copied {
    background: var(--mars);
    border-color: var(--mars);
    color: var(--ice);
}

/* ========== FRAMES STRIP ========== */
.frames-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.strip-frame {
    background: var(--panel-bg);
    border: 2px solid var(--ice);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.strip-frame::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(194, 62, 46, 0.25), transparent);
}
.strip-tag {
    font-family: var(--font-display);
    font-size: 44px;
    letter-spacing: 3px;
    padding: 18px 20px 0;
    color: var(--manhattan);
    line-height: 1;
    position: relative;
}
.strip-caption {
    font-family: var(--font-caption);
    font-size: 17px;
    letter-spacing: 1.5px;
    background: var(--caption-bg);
    color: var(--caption-ink);
    padding: 8px 14px;
    margin: 18px 20px 0;
    line-height: 1.15;
}
.strip-frame p {
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-dim);
    padding: 16px 20px 24px;
    font-style: italic;
}

/* ========== SIGNAL / CONTACT ========== */
.signal { padding-bottom: 140px; }

.signal-panel {
    background: var(--panel-bg);
    border: 2px solid var(--ice);
    overflow: hidden;
    box-shadow: 10px 10px 0 rgba(194, 62, 46, 0.25);
}
.signal-head { padding: 48px 48px 32px; }
.signal-head .section-kicker { margin-bottom: 14px; }
.signal-head .section-h { font-size: clamp(36px, 5vw, 58px); }
.signal-sub {
    margin-top: 20px;
    font-size: 18px;
    color: var(--text-dim);
    max-width: 620px;
    font-style: italic;
}

.signal-list { border-top: 1px solid var(--panel-border); }
.signal-row {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 24px;
    padding: 24px 48px;
    border-bottom: 1px solid var(--panel-border);
    align-items: center;
    transition: all 0.2s;
}
.signal-row:last-child { border-bottom: 0; }
.signal-row:hover {
    background: rgba(124, 197, 245, 0.05);
    padding-left: 60px;
}
.signal-key {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--manhattan);
}
.signal-val {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 20px;
    color: var(--ice);
}
.signal-arrow {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--mars);
    transition: transform 0.2s;
}
.signal-row:hover .signal-arrow { transform: translate(4px, -4px); }

/* ========== FOOTER ========== */
.footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--panel-border);
    background: var(--space-2);
    position: relative;
    z-index: 1;
}
.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 2px;
    color: var(--manhattan);
}
.footer-brand .logo-img { width: 34px; height: 34px; }
.footer-tag {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 18px;
    color: var(--text);
}
.footer-disc {
    font-family: var(--font-serif);
    font-size: 14.5px;
    font-style: italic;
    color: var(--text-mute);
    max-width: 760px;
    line-height: 1.6;
}
.footer-copy {
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 2px;
    color: var(--text-mute);
    text-transform: uppercase;
}

.serif { font-family: var(--font-serif); }
.mono { font-family: var(--font-mono); }

/* ========== REVEAL ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .hero-inner { grid-template-columns: 1fr; gap: 48px; }
    .panel-hero { max-width: 420px; margin: 0 auto; }
    .panels { grid-template-columns: 1fr; }
    .frames-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .nav-toggle { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: rgba(5, 6, 20, 0.97);
        padding: 20px;
        gap: 14px;
        border-bottom: 1px solid var(--panel-border);
    }

    .hero { padding-top: 120px; }
    .hero-title { gap: 0; }
    .title-what, .title-if { font-size: 84px; letter-spacing: 2px; }
    .title-if { letter-spacing: 6px; }

    .frame-row { grid-template-columns: 1fr; gap: 10px; }
    .frame-num { font-size: 64px; }

    .signal-row { grid-template-columns: 1fr auto; padding: 20px 24px; }
    .signal-row:hover { padding-left: 24px; }
    .signal-val { grid-column: 1 / -1; font-size: 18px; }
    .signal-head { padding: 32px 24px 20px; }

    .frames-strip { grid-template-columns: 1fr; }
    .container { padding: 0 22px; }
}
