/* ============================================
   genshin.day — Brutalist Luxury
   Colors: #0D0D0B #E8C97D #F5F0E8 #1A1A17 #4A3F1E #2B2B27 #F0D890 #111109
   Fonts: Bebas Neue / Space Grotesk" (Google Fonts) / JetBrains Mono" (Google Fonts)
   Typography: Space Grotesk 300: "daily reset. resin. commissions. silence." in #F5F0E8 at 16px
   Body: Space Grotesk 300 16px. Commission tasks rendered in Space Grotesk 300.
   Body Grotesk" contrasts productively with Bebas Neue's aggressive condensation.
   Mono: JetBrains Mono 400: "tomorrow's commissions reset at 04:00 UTC+8." No footer. No links. The page ends with statement and silence.
   Countdown: "RESET IN 04:32:17" — updating every second via JavaScript. The SVG candle flame lives at bottom-right of this section
   Scroll: Intersection Observer fires on each `.section` element with `rootMargin: "0px 0px -15% 0px"` threshold 0 — the translateX animation begins the moment the section enters the lower portion of the viewport. Below that content block the close statement appears.
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #0D0D0B;
    color: #F5F0E8;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    line-height: 1.75;
    max-width: 100%;
    overflow-x: hidden;
    filter: url(#noise);
}

/* ============================================
   Ambient Canvas
   ============================================ */
#ambient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.04;
    pointer-events: none;
}

/* ============================================
   Floating server time
   ============================================ */
#floating-time {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: #E8C97D;
    opacity: 0.7;
    pointer-events: none;
}

/* ============================================
   Page layout — content max 640px, left-aligned
   ============================================ */
.section {
    position: relative;
    z-index: 1;
    padding-left: 24px;
    padding-right: 24px;
}

/* ============================================
   Act I — Hero / Shrine Entrance
   ============================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 80px;
}

.hero-content {
    max-width: 640px;
    position: relative;
    z-index: 2;
}

.site-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 96px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: #E8C97D;
    line-height: 1;
    margin-bottom: 16px;
}

.hero-sub {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #F5F0E8;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
}

.amber-rule {
    width: 240px;
    height: 1px;
    background-color: #E8C97D;
    margin-bottom: 32px;
}

/* Brutalist reset stamp */
.reset-stamp {
    display: inline-block;
    border: 2px solid #E8C97D;
    padding: 12px 20px;
    background: transparent;
}

.stamp-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: #E8C97D;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.stamp-countdown {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 64px;
    letter-spacing: 0.08em;
    color: #E8C97D;
    line-height: 1;
    display: block;
}

/* SVG candle — bottom-right of hero */
.candle-wrap {
    position: absolute;
    bottom: 60px;
    right: 24px;
    z-index: 2;
    transform-origin: 24px 74px; /* base of candle */
}

.candle-svg {
    display: block;
}

/* Flame sway animation */
@keyframes flame-sway {
    0%   { transform: rotate(-3deg); }
    50%  { transform: rotate(3deg); }
    100% { transform: rotate(-3deg); }
}

.candle-wrap {
    animation: flame-sway 3.2s ease-in-out infinite;
}

@keyframes flame-flicker-outer {
    0%   { opacity: 1; }
    30%  { opacity: 0.85; }
    60%  { opacity: 0.95; }
    80%  { opacity: 0.75; }
    100% { opacity: 1; }
}

@keyframes flame-flicker-inner {
    0%   { opacity: 0.8; d: path("M24,16 C26,20 28,24 27,28 C26,31 22,31 21,28 C20,24 22,20 24,16 Z"); }
    40%  { opacity: 0.6; d: path("M24,17 C26,21 27,25 26,28 C25,31 23,31 22,28 C21,25 22,20 24,17 Z"); }
    70%  { opacity: 0.9; d: path("M24,15 C27,19 29,23 27,27 C26,30 22,30 21,27 C20,23 21,19 24,15 Z"); }
    100% { opacity: 0.8; d: path("M24,16 C26,20 28,24 27,28 C26,31 22,31 21,28 C20,24 22,20 24,16 Z"); }
}

.flame-outer {
    animation: flame-flicker-outer 1.8s linear infinite;
}

.flame-inner {
    animation: flame-flicker-inner 2.1s linear infinite;
}

/* ============================================
   Act II — Content Sections
   ============================================ */
.content-section {
    padding-top: 120px;
    padding-bottom: 0;
    max-width: 640px;
}

.section-inner {
    /* contains heading, rule, list */
}

.section-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 64px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: #F5F0E8;
    line-height: 1;
    margin-bottom: 16px;
}

.section-rule {
    width: 100%;
    max-width: 640px;
    height: 1px;
    background-color: #E8C97D;
    opacity: 0.3;
    margin-bottom: 32px;
}

/* Task list */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #F5F0E8;
    line-height: 1.75;
}

.task-icon {
    flex-shrink: 0;
    margin-top: 3px;
    display: flex;
    align-items: center;
}

/* Mono text for readout values */
.mono-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.05em;
    color: #E8C97D;
}

/* ============================================
   Scroll-triggered reveal — linear, no easing
   ============================================ */
.content-section {
    transform: translateX(-32px);
    opacity: 0;
    transition: transform 180ms linear, opacity 180ms linear;
}

.content-section.revealed {
    transform: translateX(0);
    opacity: 1;
}

/* ============================================
   Act III — The Close
   ============================================ */
.close-section {
    padding-top: 200px;
    padding-bottom: 120px;
    max-width: 640px;
}

.close-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.05em;
    color: #4A3F1E;
    line-height: 1.75;
}

/* ============================================
   Hover states — duotone swap
   ============================================ */
.task-item:hover {
    color: #E8C97D;
}

.reset-stamp:hover {
    background-color: #E8C97D;
}

.reset-stamp:hover .stamp-label,
.reset-stamp:hover .stamp-countdown {
    color: #0D0D0B;
}

/* ============================================
   Domain day indicator
   ============================================ */
.domain-day {
    color: #E8C97D;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.05em;
}

/* ============================================
   Responsive — preserve proportion at smaller sizes
   ============================================ */
@media (max-width: 768px) {
    .site-title {
        font-size: 56px;
    }

    .stamp-countdown {
        font-size: 40px;
    }

    .section-heading {
        font-size: 42px;
    }

    .candle-wrap {
        bottom: 40px;
        right: 16px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 40px;
    }

    .stamp-countdown {
        font-size: 32px;
    }

    .section-heading {
        font-size: 32px;
    }
}
