/* =========================================================
   DESIGN SYSTEM — Dark Romanticism × Industrial Rebellion
   Şebnem Ferah Concert Countdown
   ========================================================= */

/* ---------- CSS Custom Properties (Design Tokens) ---------- */
:root {
    /* Surface / Background */
    --surface:                  #0A0A0A;
    --surface-dim:              #131313;
    --surface-container-low:    #1c1b1b;
    --surface-container:        #201f1f;
    --surface-container-high:   #2a2a2a;
    --surface-container-highest:#353534;

    /* On-surface */
    --on-surface:               #e5e2e1;
    --on-surface-variant:       #e8bdb6;

    /* Primary — Deep Crimson */
    --primary:                  #CC0000;
    --primary-light:            #ffb4a8;
    --primary-glow:             rgba(204, 0, 0, 0.35);
    --primary-subtle:           rgba(204, 0, 0, 0.10);

    /* Outline / Borders */
    --outline:                  #ae8882;
    --outline-variant:          #5e3f3a;
    --outline-dim:              rgba(94, 63, 58, 0.4);

    /* Metallic accents */
    --metallic-silver:          #c6c6cf;
    --metallic-dim:             #8a8a93;

    /* Typography */
    --font-headline:  'Newsreader', Georgia, 'Times New Roman', serif;
    --font-body:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-label:     'Space Grotesk', 'Courier New', monospace;

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  6rem;
    --space-2xl: 8rem;

    /* Transitions */
    --transition-fast:   180ms ease;
    --transition-medium: 350ms ease;
    --transition-slow:   600ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--surface);
    color: var(--on-surface);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

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

/* ---------- Ambient Layers ---------- */

/* Noise / grain texture overlay */
.ambient-noise {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* Central crimson glow — stage spotlight feel */
.ambient-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse 60% 55% at 50% 40%,
        var(--primary-subtle) 0%,
        transparent 70%
    );
}

/* Vignette — cinematic edge darkening */
.ambient-vignette {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse 80% 80% at 50% 50%,
        transparent 40%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

/* ---------- Main Content ---------- */
#main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    padding: var(--space-lg) var(--space-md);
    min-height: 100vh;
}

.hero-container {
    text-align: center;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
}

/* ---------- Headline ---------- */
.headline-wrapper {
    /* Reserve exactly 2 lines of headline height so the countdown never shifts */
    height: calc(clamp(2.2rem, 8vw, 4.5rem) * 1.1 * 2 + 0.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    width: 100%;
}

.headline {
    font-family: var(--font-headline);
    font-size: clamp(2.2rem, 8vw, 4.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--on-surface);
    text-shadow: 0 0 40px var(--primary-glow),
                 0 0 80px rgba(204, 0, 0, 0.12);
    transition: opacity var(--transition-slow),
                transform var(--transition-slow),
                filter var(--transition-slow);
}

.headline.fade-out {
    opacity: 0;
    transform: translateY(-12px);
    filter: blur(8px);
}

.headline.fade-in {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(8px);
}

/* ---------- Countdown Grid ---------- */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--outline-dim);
    border-bottom: 1px solid var(--outline-dim);
    position: relative;
}

.countdown-rim {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 180, 168, 0.06);
    pointer-events: none;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.countdown-number {
    font-family: var(--font-headline);
    font-size: clamp(2.8rem, 9vw, 4.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--on-surface);
    transition: color var(--transition-fast);
    font-variant-numeric: tabular-nums;
}

.countdown-accent {
    color: var(--primary);
    text-shadow: 0 0 30px var(--primary-glow);
}

.countdown-label {
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--metallic-silver);
}

/* Pulse animation on second change */
@keyframes digit-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}

.countdown-number.pulse {
    animation: digit-pulse 300ms ease-out;
}

/* ---------- Resolution Text ---------- */
.resolution-text {
    font-family: var(--font-headline);
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 500;
    line-height: 1.3;
    font-style: italic;
    color: var(--on-surface-variant);
    letter-spacing: 0.08em;
    text-transform: lowercase;
    opacity: 0.8;
}

/* ---------- Event Details ---------- */
.event-details {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-md) var(--space-lg);
}

.event-detail-item {
    font-family: var(--font-headline);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 500;
    line-height: 1.3;
    color: var(--on-surface);
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: opacity var(--transition-medium);
}

.event-detail-item:hover {
    opacity: 1;
}

.event-icon {
    color: var(--primary);
    font-size: 1.4rem;
    transition: transform var(--transition-medium);
}

.event-detail-item:hover .event-icon {
    transform: scale(1.15);
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    z-index: 50;
    text-align: center;
    padding: var(--space-md) var(--space-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.footer-disclaimer {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--metallic-dim);
    opacity: 0.7;
}

.footer-text {
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--metallic-dim);
}

/* ---------- Entrance Animations ---------- */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.hero-container > * {
    animation: fade-up 0.9s var(--transition-slow) both;
}

.hero-container > :nth-child(1) { animation-delay: 0.1s; }
.hero-container > :nth-child(2) { animation-delay: 0.3s; }
.hero-container > :nth-child(3) { animation-delay: 0.5s; }
.hero-container > :nth-child(4) { animation-delay: 0.7s; }

/* ---------- Responsive ---------- */

/* Tablet portrait and below */
@media (max-width: 768px) {
    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg) var(--space-md);
    }

    .hero-container {
        gap: var(--space-lg);
    }

    .event-details {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* Small phones */
@media (max-width: 400px) {
    #main-content {
        padding: var(--space-md) var(--space-sm);
    }

    .countdown-grid {
        gap: var(--space-md) var(--space-sm);
    }
}
