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

/* ── Color tokens — dark mode only ─────────────────────────────────── */
:root {
    --bg: #000000;
    --text: #f5f0e8;
    --accent: #c9a84c;
    --muted: rgba(245, 240, 232, 0.5);
    --muted-dark: rgba(245, 240, 232, 0.15);
    --hero-img: image-set(
        url("images/cygnus-1600.webp") type("image/webp"),
        url("images/cygnus-1600.jpg") type("image/jpeg")
    );
    --hero-pos-1: center 40%;
    --hero-pos-2: center 70%;
}

/* ── Base ───────────────────────────────────────────────────────────── */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: "Cormorant Garamond", Georgia, serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── Skip link ──────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 12px 24px;
    background: var(--accent);
    color: #000;
    font-family: "Cormorant Garamond", serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* ── Screen-reader only utility ─────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Focus ring ─────────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ── Layout wrapper ─────────────────────────────────────────────────── */
.content-wrap {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
}

/* ── Starfield ──────────────────────────────────────────────────────── */
.starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.starfield__star {
    position: absolute;
    border-radius: 50%;
    background: #f5f0e8;
    will-change: transform;
}

@keyframes starTwinkle {
    from {
        opacity: 0.05;
    }
    to {
        opacity: 0.85;
    }
}

/* ── Topbar ─────────────────────────────────────────────────────────── */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0 28px;
    border-bottom: 1px solid var(--muted-dark);
    opacity: 0;
    transform: translateY(-12px);
    transition:
        opacity 0.8s ease 0.1s,
        transform 0.8s ease 0.1s;
}

.topbar.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.topbar__label {
    font-family: "Cormorant Garamond", serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
}

.topbar__center {
    font-family: "Cormorant Garamond", serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    text-align: center;
}

/* ── Headline ───────────────────────────────────────────────────────── */
#hero {
    padding: clamp(60px, 10vh, 120px) 0 clamp(40px, 6vh, 80px);
}

.headline__line {
    display: block;
    font-family: "Playfair Display", serif;
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.03em;
    overflow: visible;
}

.headline__line--1 {
    font-size: clamp(48px, 11.5vw, 138px);
}

.headline__line--2 {
    font-size: clamp(48px, 11.5vw, 138px);
    padding-left: clamp(20px, 5vw, 80px);
    margin-top: 0.06em;
}

.headline__line--3 {
    font-size: clamp(28px, 5vw, 68px);
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
    padding-left: clamp(20px, 5vw, 80px);
    margin-top: 0.2em;
    letter-spacing: 0.02em;
}

/* Image clipped into headline */
.headline__line--1 .headline__inner,
.headline__line--2 .headline__inner {
    background-image: var(--hero-img);
    background-size: 140% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.headline__line--1 .headline__inner {
    background-position: var(--hero-pos-1);
}

.headline__line--2 .headline__inner {
    background-position: var(--hero-pos-2);
}

.headline__inner {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px);
    transition:
        opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.headline__inner.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Gold rule ──────────────────────────────────────────────────────── */
.gold-rule {
    height: 1px;
    background: var(--accent);
    width: 0;
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.gold-rule.is-visible {
    width: 100%;
}

/* ── Subhero ────────────────────────────────────────────────────────── */
#subhero {
    padding: clamp(32px, 5vh, 56px) 0;
    display: flex;
    align-items: center;
    gap: 32px;
}

.subhero__text {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(18px, 2.5vw, 30px);
    font-weight: 300;
    font-style: italic;
    color: var(--muted);
    letter-spacing: 0.04em;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.9s ease,
        transform 0.9s ease;
    max-width: 680px;
}

.subhero__text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Image section ──────────────────────────────────────────────────── */
.image-section {
    position: relative;
    z-index: 10;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: clamp(280px, 45vh, 560px);
    overflow: hidden;
    opacity: 0;
    transform: scale(1.03);
    transition:
        opacity 1.2s ease,
        transform 1.4s ease;
}

.image-section.is-visible {
    opacity: 1;
    transform: scale(1);
}

.image-section__fallback {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2a 50%, #0a0a1a 100%);
    z-index: 1;
}

.image-section__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 2;
    display: block;
}

.image-section__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.05) 40%,
        rgba(0, 0, 0, 0.05) 60%,
        rgba(0, 0, 0, 0.55) 100%
    );
    z-index: 3;
}

.image-section__caption {
    position: absolute;
    bottom: 20px;
    right: 28px;
    font-family: "Cormorant Garamond", serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: rgba(245, 240, 232, 0.45);
    z-index: 4;
    text-transform: uppercase;
}

/* ── Scroll indicator ───────────────────────────────────────────────── */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: clamp(40px, 6vh, 80px);
    opacity: 0;
    transition: opacity 0.8s ease 1.8s;
}

.scroll-indicator.is-visible {
    opacity: 1;
}

.scroll-indicator__line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%,
    100% {
        opacity: 0.4;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.15);
    }
}

.scroll-indicator__text {
    font-family: "Cormorant Garamond", serif;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── Section header ─────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: clamp(32px, 4vh, 56px);
}

.section-header__number {
    font-family: "Playfair Display", serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--accent);
    flex-shrink: 0;
}

.section-header__rule {
    flex: 1;
    height: 1px;
    background: var(--muted-dark);
}

/* ── Article ────────────────────────────────────────────────────────── */
#article {
    padding: clamp(48px, 7vh, 96px) 0;
}

.article__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: clamp(32px, 4vw, 64px);
    align-items: start;
}

@media (max-width: 768px) {
    .article__grid {
        grid-template-columns: 1fr;
    }
}

.article__col {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.9s ease,
        transform 0.9s ease;
}

.article__col.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.article__label {
    font-family: "Cormorant Garamond", serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    display: block;
}

.article__title {
    font-family: "Playfair Display", serif;
    font-size: clamp(20px, 2.5vw, 32px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.article__body {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(16px, 1.4vw, 19px);
    font-weight: 300;
    line-height: 1.75;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.article__body + .article__body {
    margin-top: 1em;
}

.article__link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 0 8px;
    font-family: "Cormorant Garamond", serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    opacity: 0.75;
    transition: opacity 0.2s ease;
    min-height: 44px;
    min-width: 44px;
}

.article__link:hover,
.article__link:focus-visible {
    opacity: 1;
}

.article__link--inline {
    display: inline;
    margin: 0;
    padding: 0;
    min-height: unset;
    min-width: unset;
}

/* ── Ornament ───────────────────────────────────────────────────────── */
.ornament {
    display: block;
    text-align: center;
    font-size: 20px;
    color: var(--accent);
    letter-spacing: 0.3em;
    opacity: 0.5;
    margin: clamp(20px, 3vh, 40px) 0;
    font-family: serif;
}

/* ── Event box ──────────────────────────────────────────────────────── */
#tag-der-astronomie {
    padding: clamp(48px, 7vh, 96px) 0;
}

.event-box {
    border: 1px solid var(--accent);
    padding: clamp(36px, 5vw, 60px) clamp(32px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 1s ease,
        transform 1s ease;
    max-width: 760px;
    margin: 0 auto;
}

.event-box::before,
.event-box::after {
    content: "";
    position: absolute;
    background: transparent;
}

.event-box::before {
    width: 24px;
    height: 24px;
    top: -1px;
    left: -1px;
    border-top: 1px solid var(--accent);
    border-left: 1px solid var(--accent);
}

.event-box::after {
    width: 24px;
    height: 24px;
    bottom: -1px;
    right: -1px;
    border-bottom: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
}

.event-box.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.event-box__label {
    font-family: "Cormorant Garamond", serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
}

.event-box__title {
    font-family: "Playfair Display", serif;
    font-size: clamp(28px, 5vw, 60px);
    font-weight: 900;
    letter-spacing: 0.08em;
    color: var(--text);
    line-height: 1;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.event-box__date {
    font-family: "Playfair Display", serif;
    font-size: clamp(36px, 6.5vw, 88px);
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.event-box__subtitle {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(14px, 1.6vw, 20px);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.12em;
    color: var(--muted);
}

/* ── Program ────────────────────────────────────────────────────────── */
#program-section {
    padding: clamp(48px, 7vh, 96px) 0;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.program__heading {
    font-family: "Playfair Display", serif;
    font-size: clamp(26px, 3.5vw, 48px);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.program__header {
    margin-bottom: clamp(40px, 5vh, 72px);
}

.program__header .gold-rule {
    margin-top: 16px;
}

.program__cards {
    display: flex;
    flex-direction: column;
}

/* ── Program card ───────────────────────────────────────────────────── */
.program-card {
    display: grid;
    grid-template-columns: clamp(100px, 16vw, 200px) 1fr;
    gap: clamp(20px, 3vw, 48px);
    align-items: start;
    padding: clamp(24px, 4vh, 44px) 0;
    border-bottom: 1px solid var(--muted-dark);
    opacity: 0;
    transform: translateY(32px);
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.program-card:first-child {
    border-top: 1px solid var(--muted-dark);
}

.program-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.program-card__time {
    font-family: "Playfair Display", serif;
    font-size: clamp(56px, 10vw, 140px);
    font-weight: 900;
    color: var(--accent);
    line-height: 0.85;
    letter-spacing: -0.04em;
    opacity: 0.7;
}

.program-card__time::after {
    content: "Uhr";
    display: block;
    font-size: 0.22em;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.15em;
    opacity: 0.8;
    margin-top: 0.4em;
}

.program-card__body {
    padding-top: clamp(8px, 1.5vh, 16px);
}

.program-card__age {
    font-family: "Cormorant Garamond", serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
}

.program-card__title {
    font-family: "Playfair Display", serif;
    font-size: clamp(16px, 2vw, 26px);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.program-card__desc {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(14px, 1.3vw, 18px);
    font-weight: 300;
    font-style: italic;
    line-height: 1.7;
    color: var(--muted);
    letter-spacing: 0.01em;
}

@media (max-width: 600px) {
    .program-card {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .program-card__time {
        font-size: clamp(48px, 18vw, 88px);
    }
}

/* ── Beobachtung ────────────────────────────────────────────────────── */
.beobachtung {
    border: 1px solid var(--accent);
    padding: clamp(22px, 3vw, 40px) clamp(24px, 3.5vw, 48px);
    margin-top: clamp(36px, 5vh, 56px);
    position: relative;
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 1s ease,
        transform 1s ease;
}

.beobachtung::before,
.beobachtung::after {
    content: "";
    position: absolute;
    background: transparent;
}

.beobachtung::before {
    width: 18px;
    height: 18px;
    top: -1px;
    left: -1px;
    border-top: 1px solid var(--accent);
    border-left: 1px solid var(--accent);
}

.beobachtung::after {
    width: 18px;
    height: 18px;
    bottom: -1px;
    right: -1px;
    border-bottom: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
}

.beobachtung.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.beobachtung__label {
    font-family: "Cormorant Garamond", serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}

.beobachtung__text {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(15px, 1.4vw, 19px);
    font-weight: 300;
    font-style: italic;
    line-height: 1.65;
    color: var(--text);
    letter-spacing: 0.02em;
}

/* ── CTA ────────────────────────────────────────────────────────────── */
#cta-section {
    padding: clamp(40px, 6vh, 80px) 0 clamp(60px, 10vh, 120px);
    text-align: center;
}

.cta__text {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(13px, 1.6vw, 20px);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.2em;
    color: var(--muted);
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 1s ease 0.3s;
}

.cta__text.is-visible {
    opacity: 1;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--muted-dark);
    padding: 28px 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.footer.is-visible {
    opacity: 1;
}

.footer__text {
    font-family: "Cormorant Garamond", serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.footer__credit {
    font-family: "Cormorant Garamond", serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--muted);
    opacity: 0.6;
    font-style: italic;
    text-decoration: none;
}

@media (max-width: 540px) {
    .footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* ── Reduced motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .headline__inner,
    .subhero__text,
    .article__col,
    .event-box,
    .program-card,
    .beobachtung,
    .cta__text,
    .footer,
    .image-section,
    .scroll-indicator,
    .topbar {
        opacity: 1 !important;
        transform: none !important;
    }

    .gold-rule {
        width: 100% !important;
    }
}
