/*
 * AeonScript - "Nacht und Moment"
 * ===============================
 *
 * Ein AeonScript hat zwei Zustaende, und dazwischen liegt ein Zeitpunkt.
 * Davor gehoert es niemandem, danach allen. Diese Datei macht aus diesen
 * zwei Zustaenden die Gestaltung: Versiegeltes steht auf Nachtgrund, und
 * Gold markiert ausschliesslich den Moment der Oeffnung.
 *
 * **Gold ist reserviert.** Es gehoert der Zeit - Oeffnungsdatum, Zaehler,
 * Siegelrand, frisch geoeffnete Karte. Nie einem gewoehnlichen Knopf, nie
 * einer Kategorie, nie als Zierrat. Wer hier eine goldene Flaeche fuer
 * etwas anderes anlegt, nimmt dem Zeichen seine Bedeutung.
 *
 * Geladen wird das Blatt aus layouts/app.blade.php und damit auf jeder
 * Seite; deshalb ist alles auf .aeon- verengt und beruehrt nichts sonst.
 *
 * Richtungsneutral geschrieben: margin-inline, inset-inline-end und
 * Verwandte spiegeln sich in der arabischen Fassung von allein.
 */

/* ==================================================== Schrift ========== */

/*
 * Newsreader, lokal ausgeliefert.
 *
 * Keine zusaetzliche Anfrage nach aussen: die Dateien liegen im Projekt.
 * SIL Open Font License 1.1, der Lizenztext liegt daneben in OFL.txt.
 *
 * Ein einziger Schnitt traegt 300 bis 400 - die Datei ist variabel, und
 * Google liefert fuer beide Gewichte ohnehin dieselbe aus.
 *
 * Kyrillisch und Arabisch enthaelt Newsreader nicht. Russisch und Arabisch
 * fallen deshalb auf die Ersatzkette zurueck, und das ist beabsichtigt:
 * eine halb passende Schrift waere schlechter als eine ganze andere.
 */
@font-face {
    font-family: "Newsreader";
    font-style: normal;
    font-weight: 300 400;
    font-display: swap;
    src: url("../fonts/newsreader/newsreader-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                   U+FFFD;
}

@font-face {
    font-family: "Newsreader";
    font-style: normal;
    font-weight: 300 400;
    font-display: swap;
    src: url("../fonts/newsreader/newsreader-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Newsreader";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/newsreader/newsreader-italic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                   U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
                   U+FFFD;
}

@font-face {
    font-family: "Newsreader";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/newsreader/newsreader-italic-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                   U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                   U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==================================================== Werte ============ */

:root {
    /* Bestand: --base 250 60% 45% aus main.css. */
    --aeon-indigo:  #452eb8;
    --aeon-night:   #150e36;
    --aeon-night-2: #241852;

    /* Neu, und die einzige neue Farbe. Sie gehoert der Zeit. */
    --aeon-gold:        #a8761c;
    --aeon-gold-bright: #e4b45c;

    --aeon-paper: #ffffff;
    --aeon-mist:  #f5f4f9;
    --aeon-line:  #e2dfec;
    --aeon-ink:   #23283a;
    --aeon-ink-2: #5a5c72;
    --aeon-ink-3: #8a8aa0;

    --aeon-serif: "Newsreader", Georgia, "Times New Roman", "Liberation Serif",
                  "Noto Serif", serif;
    --aeon-mono:  ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo,
                  Consolas, monospace;

    --aeon-shadow:      0 1px 2px rgba(35, 40, 58, .05),
                        0 8px 24px -12px rgba(35, 40, 58, .16);
    --aeon-shadow-lift: 0 2px 6px rgba(35, 40, 58, .07),
                        0 22px 48px -20px rgba(35, 40, 58, .28);
}

/* ==================================================== Bausteine ======== */

.aeon-eyebrow {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--aeon-ink-3);
    margin: 0;
}

/* Der Zeitpunkt. Immer gold, und nur der Zeitpunkt. */
.aeon-eyebrow--moment { color: var(--aeon-gold); }

.aeon-title {
    font-family: var(--aeon-serif);
    font-weight: 400;
    letter-spacing: -.01em;
    line-height: 1.2;
    color: var(--aeon-ink);
    margin: 0;
}

.aeon-message {
    font-family: var(--aeon-serif);
    font-style: italic;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--aeon-ink-2);
    margin: 6px 0 0;

    /* Hoechstens eine Zeile - auch wenn der Text laenger waere. */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    line-clamp: 1;
    overflow: hidden;
}

/* Das Siegelzeichen: eine Uhr, goldgerandet. */
.aeon-mark {
    display: grid;
    place-content: center;
    inline-size: 28px;
    block-size: 28px;
    border-radius: 50%;
    border: 1px solid rgba(228, 180, 92, .5);
    background: rgba(21, 14, 54, .62);
    color: var(--aeon-gold-bright);
    backdrop-filter: blur(6px);
}

.aeon-mark--plain {
    background: transparent;
    border-color: rgba(228, 180, 92, .45);
    backdrop-filter: none;
}

.aeon-mark svg { display: block; }

/* ==================================================== Nachtflaeche ===== */

/*
 * Die versiegelte Flaeche.
 *
 * Die einzige dunkle Flaeche im hellen Aeonwall, und deshalb die, die man
 * zuerst sieht. Die eingepraegten Ringe machen sie zu Material statt zu
 * einem Rechteck.
 */
.aeon-seal {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .07);
    background:
        radial-gradient(120% 90% at 50% -10%, var(--aeon-night-2) 0%, var(--aeon-night) 58%),
        var(--aeon-night);
    color: #efecff;
    box-shadow: var(--aeon-shadow);
}

.aeon-seal::before {
    content: "";
    position: absolute;
    inset: -40%;
    z-index: 0;
    pointer-events: none;
    background: repeating-radial-gradient(circle at 50% 42%,
        rgba(255, 255, 255, .055) 0 1px,
        transparent 1px 22px);
}

.aeon-seal::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(105deg,
        transparent 30%,
        rgba(228, 180, 92, .10) 47%,
        rgba(228, 180, 92, .02) 54%,
        transparent 70%);
    background-size: 300% 100%;
    animation: aeon-sheen 14s ease-in-out infinite;
}

@keyframes aeon-sheen {
    0%, 100% { background-position: 130% 0; }
    50%      { background-position: -30% 0; }
}

.aeon-seal > * { position: relative; z-index: 1; }

.aeon-seal__inner { padding: 26px 24px 22px; }

.aeon-seal .aeon-eyebrow { color: var(--aeon-gold-bright); }

.aeon-seal__moment {
    font-family: var(--aeon-serif);
    font-weight: 300;
    font-size: 27px;
    line-height: 1.12;
    letter-spacing: -.015em;
    color: #fffdf7;
    margin: 8px 0 0;
}

.aeon-seal__moment small {
    display: block;
    font-size: 14px;
    letter-spacing: 0;
    color: rgba(239, 236, 255, .62);
    margin-top: 4px;
}

.aeon-seal__rule {
    block-size: 1px;
    margin: 16px 0 12px;
    background: linear-gradient(90deg,
        rgba(228, 180, 92, .55),
        rgba(228, 180, 92, .14) 45%,
        transparent);
}

[dir="rtl"] .aeon-seal__rule {
    background: linear-gradient(270deg,
        rgba(228, 180, 92, .55),
        rgba(228, 180, 92, .14) 45%,
        transparent);
}

.aeon-seal__foot {
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid rgba(255, 255, 255, .09);
}

.aeon-seal__foot .aeon-title { color: #fffdf7; font-size: 17px; }
.aeon-seal__foot .aeon-message { color: rgba(239, 236, 255, .58); }

.aeon-seal__note {
    font-size: 11.5px;
    line-height: 1.5;
    color: rgba(239, 236, 255, .42);
    margin: 10px 0 0;
}

/* ==================================================== Zaehler ========== */

.aeon-countdown {
    font-family: var(--aeon-mono);
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    color: rgba(239, 236, 255, .80);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 0;
}

.aeon-countdown b {
    color: #fffdf7;
    font-weight: 500;
}

/* Auf hellem Grund - etwa im Schritt "Pruefen und versiegeln". */
.aeon-countdown--light { color: var(--aeon-ink-2); }
.aeon-countdown--light b { color: var(--aeon-ink); }

/* ==================================================== Karten =========== */

.aeon-card {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--aeon-line);
    background: var(--aeon-paper);
    box-shadow: var(--aeon-shadow);
    color: inherit;
    text-decoration: none;
    transition: transform .4s cubic-bezier(.2, .7, .3, 1),
                box-shadow .4s,
                border-color .4s;
}

.aeon-card:hover,
.aeon-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--aeon-shadow-lift);
    color: inherit;
    text-decoration: none;
}

.aeon-card__poster {
    position: relative;
    display: block;
    background: var(--aeon-mist);
}

.aeon-card__poster img {
    display: block;
    inline-size: 100%;
    block-size: auto;
}

.aeon-card__mark {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
}

.aeon-card__body { padding: 15px 17px 16px; }

.aeon-card__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: center;
    margin-top: 14px;
    padding-top: 11px;
    border-top: 1px solid var(--aeon-line);
    font-size: 12px;
    color: var(--aeon-ink-3);
    font-variant-numeric: tabular-nums;
}

.aeon-card__foot .aeon-spacer { margin-inline-start: auto; }

/* --- gerade geoeffnet: der goldene Rand, und nur fuer ein paar Tage --- */

.aeon-card--fresh {
    border-color: rgba(168, 118, 28, .45);
    box-shadow: var(--aeon-shadow), 0 0 0 3px rgba(228, 180, 92, .14);
}

.aeon-card--fresh:hover,
.aeon-card--fresh:focus-visible {
    box-shadow: var(--aeon-shadow-lift), 0 0 0 3px rgba(228, 180, 92, .2);
}

/* --- zurueckgezogen: das Bild tritt zurueck ------------------------- */

.aeon-card--withdrawn { border-style: dashed; }

.aeon-card--withdrawn .aeon-card__poster img {
    filter: grayscale(1);
    opacity: .55;
}

.aeon-card--withdrawn .aeon-title { color: var(--aeon-ink-2); }

/* --- versiegelt: die Karte ist die Nachtflaeche ---------------------- */

.aeon-card--sealed {
    border: 0;
    background: none;
    box-shadow: none;
}

/* ==================================================== Zeichen ========== */

.aeon-flag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.4;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--aeon-mist);
    color: var(--aeon-ink-2);
}

.aeon-flag--fresh {
    background: rgba(228, 180, 92, .16);
    color: var(--aeon-gold);
}

.aeon-flag--withdrawn {
    background: var(--aeon-mist);
    color: var(--aeon-ink-3);
}

/* ==================================================== Fl. 1: Schauseite */

.aeon-page__hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 22px;
    margin-block-end: 46px;
    padding: 54px 40px 48px;
    background:
        radial-gradient(120% 100% at 50% -20%, var(--aeon-night-2) 0%, var(--aeon-night) 60%),
        var(--aeon-night);
    color: #efecff;
    text-align: center;
}

.aeon-page__hero::before {
    content: "";
    position: absolute;
    inset: -30%;
    z-index: 0;
    pointer-events: none;
    background: repeating-radial-gradient(circle at 50% 38%,
        rgba(255, 255, 255, .05) 0 1px,
        transparent 1px 26px);
}

.aeon-page__hero > * { position: relative; z-index: 1; }

.aeon-page__title {
    font-family: var(--aeon-serif);
    font-weight: 300;
    font-size: clamp(40px, 6vw, 66px);
    line-height: 1.04;
    letter-spacing: -.02em;
    color: #fffdf7;
    margin: 14px 0 0;
}

.aeon-page__claim {
    font-family: var(--aeon-serif);
    font-style: italic;
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(239, 236, 255, .70);
    margin: 14px 0 0;
}

.aeon-page__body { max-width: 68ch; margin-inline: auto; }

.aeon-page__body > p {
    font-size: 16px;
    line-height: 1.72;
    color: var(--aeon-ink-2);
    margin: 0 0 18px;
}

.aeon-page__body > p strong { color: var(--aeon-ink); font-weight: 600; }

.aeon-page__h {
    font-family: var(--aeon-serif);
    font-weight: 400;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.18;
    letter-spacing: -.015em;
    color: var(--aeon-ink);
    margin: 44px 0 16px;
}

/* Die drei Zusagen als gesetzte Bloecke statt als Aufzaehlung. */
.aeon-terms {
    display: grid;
    gap: 14px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.aeon-term {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid var(--aeon-line);
    border-radius: 14px;
    background: var(--aeon-paper);
}

.aeon-term__icon { color: var(--aeon-indigo); padding-block-start: 2px; }
.aeon-term__icon svg { display: block; }

.aeon-term__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--aeon-ink);
    margin: 0 0 3px;
}

.aeon-term__text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--aeon-ink-2);
    margin: 0;
}

.aeon-page__example {
    display: grid;
    gap: 22px;
    align-items: center;
    margin: 40px 0;
}

@media (min-width: 820px) {
    .aeon-page__example { grid-template-columns: minmax(0, 320px) 1fr; }
}

.aeon-page__example-note {
    font-size: 14px;
    line-height: 1.65;
    color: var(--aeon-ink-2);
    margin: 0;
}

.aeon-page__action { margin-top: 46px; text-align: center; }

/* ==================================================== Fl. 2: Versiegeln */

/*
 * Schritt 4 kippt ins Dunkle.
 *
 * Der Wortlaut bleibt Wort fuer Wort derselbe; was sich aendert, ist der
 * Grund darunter. Wer hier steht, tut etwas Unwiderrufliches, und das
 * soll man sehen, bevor man es liest.
 */
.aeon-sealstep {
    margin-block-start: 22px;
    border-radius: 18px;
}

.aeon-sealstep__inner { padding: 28px 26px 26px; }

.aeon-sealstep__summary {
    display: grid;
    gap: 9px;
    margin: 0;
    font-family: var(--aeon-mono);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    color: rgba(239, 236, 255, .80);
}

.aeon-sealstep__summary > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.aeon-sealstep__summary dt { color: rgba(239, 236, 255, .55); margin: 0; }
.aeon-sealstep__summary dd { color: #fffdf7; margin: 0; text-align: end; }

.aeon-sealstep__terms {
    margin: 18px 0 0;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 12px;
    list-style: none;
    display: grid;
    gap: 10px;
}

.aeon-sealstep__terms li {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 11px;
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(239, 236, 255, .78);
}

.aeon-sealstep__terms i { color: rgba(239, 236, 255, .55); font-size: 14px; }

.aeon-sealstep__ack {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 16px 0 0;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(239, 236, 255, .88);
    cursor: pointer;
}

.aeon-sealstep__ack input { margin-block-start: 2px; flex: 0 0 auto; }

/*
 * Hell, nicht gold.
 *
 * Der Knopf ist die Handlung, aber er ist kein Zeitpunkt - und Gold
 * gehoert hier ausschliesslich der Zeit. Auf dem Nachtgrund traegt Weiss
 * den Kontrast ohnehin besser als jede Farbe.
 */
.aeon-sealstep__btn {
    display: block;
    inline-size: 100%;
    margin-block-start: 16px;
    padding: 13px 18px;
    border: 0;
    border-radius: 12px;
    background: #fffdf7;
    color: var(--aeon-night);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .25s, transform .25s;
}

.aeon-sealstep__btn:hover:not(:disabled) { filter: brightness(1.06); }
.aeon-sealstep__btn:active:not(:disabled) { transform: translateY(1px); }
.aeon-sealstep__btn:disabled { opacity: .5; cursor: not-allowed; }

/* ==================================================== Fl. 4: Raster ==== */

/*
 * Im Profilraster traegt die Karte kein eigenes Kaestchen - sie steht in
 * einer Masonry-Kachel, deren Breite von aussen kommt. Nur die Innerei
 * unterscheidet sich.
 */
.gallery__item .aeon-card { block-size: 100%; }

.aeon-grid-seal { display: block; }

.aeon-grid-seal .aeon-seal__inner { padding: 24px 22px 20px; }

.aeon-grid-seal .aeon-seal__moment { font-size: 23px; }

/* ==================================================== Ruecksicht ======= */

@media (prefers-reduced-motion: reduce) {
    .aeon-seal::after,
    .aeon-page__hero::before { animation: none; }

    .aeon-card,
    .aeon-sealstep__btn { transition: none; }
}

.aeon-card:focus-visible,
.aeon-sealstep__btn:focus-visible,
.aeon-seal:focus-visible {
    outline: 2px solid var(--aeon-indigo);
    outline-offset: 3px;
}

/* Bildunterschrift im Profilraster: Zeitpunkt, Titel, eine Zeile. */
.aeon-grid-caption {
    padding: 13px 15px 15px;
    background: var(--aeon-paper);
    border-top: 1px solid var(--aeon-line);
}

.aeon-grid-caption__title {
    font-size: 17px;
    margin: 7px 0 0;
}

.aeon-seal__inner .aeon-mark { margin-block-end: 14px; }

/*
 * Das Siegelzeichen liegt ueber dem Poster.
 *
 * Der Anker ist die Masonry-Kachel: sie traegt position:relative aus dem
 * Raster-Stilblatt. z-index, weil die Kachel Video und Verlaeufe stapelt.
 */
.gallery__item > .aeon-card__mark {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
    z-index: 3;
}
