/* continu.ax - Swiss Typography Clean */
/* Palette: #ffffff, #1a1a1a, #2563eb, #f0f0f0, #dc2626, #6b7280 */

:root {
    --bg: #ffffff;
    --axis: #1a1a1a;
    --blue: #2563eb;
    --grid: #f0f0f0;
    --red: #dc2626;
    --text: #1a1a1a;
    --secondary: #6b7280;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    background-image:
        repeating-linear-gradient(0deg, var(--grid) 0px, transparent 1px, transparent 8px),
        repeating-linear-gradient(90deg, var(--grid) 0px, transparent 1px, transparent 8px);
    background-size: 8px 8px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ============================================
   PERSISTENT HORIZONTAL AXIS
   ============================================ */

.axis-line {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--axis);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.axis-line.visible {
    opacity: 0.1;
}

.axis-arrow {
    position: absolute;
    top: -6px;
}

.left-arrow {
    left: 8px;
}

.right-arrow {
    right: 8px;
}

.axis-infinity {
    position: absolute;
    top: -14px;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.7rem;
    color: var(--secondary);
    opacity: 0.6;
}

.left-inf {
    left: 32px;
}

.right-inf {
    right: 32px;
}

.axis-ticks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
}

.axis-ticks .axis-tick {
    position: absolute;
    top: -4px;
    width: 1px;
    height: 9px;
    background: var(--axis);
    opacity: 0.15;
}

/* ============================================
   HERO / ORIGIN (x = 0)
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.hero-axis-visual {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    transform: translateY(-50%);
}

.hero-axis-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--axis);
    transform: translateX(-50%);
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-axis-line.drawn {
    width: 100%;
}

.hero-ticks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
}

.tick {
    position: absolute;
    top: -5px;
    width: 1px;
    height: 11px;
    background: var(--axis);
    opacity: 0;
    transition: opacity 0.4s ease;
    transform: translateX(-50%);
}

.tick.show {
    opacity: 0.25;
}

.tick.origin-tick {
    height: 16px;
    top: -8px;
    background: var(--red);
    width: 2px;
}

.tick.origin-tick.show {
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.origin-point {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    margin: 0 auto 24px;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.6s ease 0.8s, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s;
}

.origin-point.active {
    opacity: 1;
    transform: scale(1);
    animation: originPulse 2s ease 1.4s infinite;
}

@keyframes originPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
}

.brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    color: var(--text);
    letter-spacing: -0.03em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.8s ease 1.2s, transform 0.8s ease 1.2s;
}

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

.brand-sub {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--secondary);
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.6s ease 1.6s;
}

.brand-sub.visible {
    opacity: 1;
}

.coord-label {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.75rem;
    color: var(--blue);
    margin-top: 16px;
    display: inline-block;
    opacity: 0;
    transition: opacity 0.6s ease 1.8s;
}

.coord-label.visible {
    opacity: 1;
}

.hero .coord-label {
    transition-delay: 1.8s;
}

/* ============================================
   POINT MARKERS
   ============================================ */

.point-marker {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--grid);
    border: 1px solid var(--secondary);
    margin: 0 auto 8px;
    transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.point-marker.active {
    background: var(--blue);
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
    max-width: 640px;
    margin: 0 auto;
    padding: 64px 24px;
}

.section-inner {
    position: relative;
}

.section-inner .coord-label {
    transition-delay: 0.1s;
}

.bracket-frame {
    border-left: 2px solid var(--grid);
    border-right: 2px solid var(--grid);
    padding: 24px 32px;
    position: relative;
    transition: border-color 0.6s ease;
}

.fade-in.visible .bracket-frame {
    border-left-color: #d4d4d4;
    border-right-color: #d4d4d4;
}

/* Top-left bracket corner */
.bracket-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 2px;
    background: var(--grid);
    transition: background 0.6s ease;
}

/* Bottom-left bracket corner */
.bracket-frame::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 12px;
    height: 2px;
    background: var(--grid);
    transition: background 0.6s ease;
}

/* Top-right bracket corner */
.bracket-right-top {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 2px;
    background: var(--grid);
}

/* Bottom-right bracket corner */
.bracket-right-bottom {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 2px;
    background: var(--grid);
}

.fade-in.visible .bracket-frame::before,
.fade-in.visible .bracket-frame::after {
    background: #d4d4d4;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--grid);
}

.body-text {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.math-notation {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    color: var(--blue);
    padding: 12px 16px;
    background: rgba(37, 99, 235, 0.04);
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(37, 99, 235, 0.08);
}

/* ============================================
   OPERATOR SEPARATORS
   ============================================ */

.operator-sep {
    text-align: center;
    font-family: 'Source Code Pro', monospace;
    font-size: 1.5rem;
    color: var(--secondary);
    padding: 16px 0;
    opacity: 0.25;
}

/* ============================================
   DENSE TICKS ZONE
   ============================================ */

.dense-ticks-zone {
    height: 80px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 640px;
    padding: 0 24px;
}

.dense-ticks-row {
    position: absolute;
    top: 50%;
    left: 24px;
    right: 24px;
    height: 1px;
    background: var(--axis);
    opacity: 0.15;
}

.dense-tick {
    position: absolute;
    top: -4px;
    width: 1px;
    height: 9px;
    background: var(--axis);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dense-tick.show {
    opacity: 0.35;
}

/* ============================================
   INFINITY SECTION
   ============================================ */

.infinity-section {
    text-align: center;
    padding: 80px 24px 120px;
    max-width: 640px;
    margin: 0 auto;
}

.infinity-symbol {
    font-size: 3.5rem;
    color: var(--blue);
    display: block;
    margin-bottom: 24px;
    opacity: 0.8;
}

.infinity-symbol.pulse {
    animation: infinityPulse 3s ease infinite;
}

@keyframes infinityPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.95); }
}

.infinity-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 12px;
}

.infinity-text {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

/* ============================================
   FADE-IN ANIMATION
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger coord-labels inside visible sections */
.fade-in.visible .coord-label {
    opacity: 1;
}

.fade-in.visible .point-marker {
    transition-delay: 0.3s;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .bracket-frame {
        padding: 16px 20px;
    }

    .axis-line {
        opacity: 0 !important;
    }

    .hero-axis-visual {
        display: none;
    }

    .content-section {
        padding: 48px 16px;
    }

    .dense-ticks-zone {
        padding: 0 16px;
    }

    .dense-ticks-row {
        left: 16px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .brand {
        font-size: 2rem;
    }

    .section-heading {
        font-size: 1.2rem;
    }

    .infinity-symbol {
        font-size: 2.5rem;
    }
}
