/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== CSS Variables ===== */
:root {
    --bg: #fff;
    --bg-secondary: #f8f8f8;
    --border: #ededed;
    --text: #1a1a1b;
    --text-secondary: #666;
    --text-dim: #999;
    --accent: #e01b24;
    --accent-hover: #c41018;
    --accent-light: #fef0f0;
}

/* ===== Base Typography ===== */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== Gradient Orb Background ===== */
.gradient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    animation: bgFadeIn 1.5s ease 0.3s forwards;
}

@keyframes bgFadeIn {
    to { opacity: 1; }
}

.gradient-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    will-change: transform;
}

.gradient-bg .orb-1 {
    width: 700px;
    height: 700px;
    top: -15%;
    left: -10%;
    background: radial-gradient(circle, rgba(224, 27, 36, 0.25) 0%, transparent 70%);
    animation: orbFloat1 20s ease-in-out infinite;
}

.gradient-bg .orb-2 {
    width: 600px;
    height: 600px;
    top: 0%;
    right: -15%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.2) 0%, transparent 70%);
    animation: orbFloat2 25s ease-in-out infinite;
}

.gradient-bg .orb-3 {
    width: 800px;
    height: 800px;
    bottom: 5%;
    left: 15%;
    background: radial-gradient(circle, rgba(224, 27, 36, 0.15) 0%, transparent 70%);
    animation: orbFloat3 22s ease-in-out infinite;
}

.gradient-bg .orb-4 {
    width: 500px;
    height: 500px;
    top: 35%;
    right: 0%;
    background: radial-gradient(circle, rgba(255, 159, 107, 0.18) 0%, transparent 70%);
    animation: orbFloat4 18s ease-in-out infinite;
}

.gradient-bg .orb-5 {
    width: 450px;
    height: 450px;
    bottom: -10%;
    right: 20%;
    background: radial-gradient(circle, rgba(224, 27, 36, 0.16) 0%, transparent 70%);
    animation: orbFloat2 24s ease-in-out infinite reverse;
}

@keyframes orbFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(120px, 80px) scale(1.1); }
    50% { transform: translate(60px, 180px) scale(0.9); }
    75% { transform: translate(-80px, 100px) scale(1.05); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes orbFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-150px, 100px) scale(1.12); }
    50% { transform: translate(-60px, -80px) scale(0.92); }
    75% { transform: translate(100px, 60px) scale(1.08); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes orbFloat3 {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(100px, -120px) scale(1.08); }
    50% { transform: translate(-100px, -60px) scale(0.94); }
    75% { transform: translate(-50px, 100px) scale(1.06); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes orbFloat4 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-120px, 80px) scale(1.1); }
    66% { transform: translate(80px, -100px) scale(0.92); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Stagger System ===== */
.stagger-children .stagger-item {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible .stagger-item,
.visible .stagger-children .stagger-item {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    margin-bottom: 48px;
    padding-top: 20px;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
    overflow: hidden;
}

.hero h1 .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: charReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes charReveal {
    to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    opacity: 0;
    animation: fadeUp 0.8s ease both;
    animation-delay: 0.9s;
}

.hero-sub a {
    color: var(--text);
    font-weight: 500;
}

@keyframes fadeUp {
    0% { transform: translateY(16px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ===== Ticker ===== */
.ticker-wrap {
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: var(--text);
    color: #fff;
    position: relative;
    z-index: 10;
}

.ticker {
    display: flex;
    width: max-content;
    will-change: transform;
}

.ticker-set {
    display: flex;
    flex-shrink: 0;
}

.ticker-set span {
    padding: 8px 32px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ticker-set .sep {
    padding: 8px 0;
    opacity: 0.3;
}

/* ===== Nav ===== */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
}

.nav-logo:hover {
    text-decoration: none;
}

.nav-logo-emoji {
    font-size: 26px;
    line-height: 32px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-logo:hover .nav-logo-emoji {
    transform: rotate(-15deg) scale(1.1);
}

.nav-logo-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav-badge {
    font-size: 10px;
    font-weight: 500;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 3px;
    padding: 1px 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    animation: badgePulse 3s ease-in-out infinite;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text);
    text-decoration: none;
}

.nav-link.active {
    color: var(--text);
    font-weight: 600;
}

/* ===== Main Content ===== */
main {
    flex: 1;
    max-width: 660px;
    margin: 0 auto;
    padding: 60px 24px 60px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ===== Section Heading ===== */
.section-heading {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ===== Footer ===== */
footer {
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-dim);
}

.footer-left a {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-left a:hover {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-right {
    font-size: 12px;
    color: var(--text-dim);
}

.footer-right a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-right a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ===== Noise Layer ===== */
.noise-layer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
    opacity: 0.028;
}

/* ===== Selection ===== */
::selection {
    background: var(--accent);
    color: #fff;
}

::-moz-selection {
    background: var(--accent);
    color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    main { padding: 40px 20px 40px; }
    .hero h1 { font-size: 30px; }
    .nav-right { gap: 12px; }
    footer { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 20px; }
}
