/* ══════════════════════════════════════════════════════════════
   The Year — 2026 — Static Showcase
   ══════════════════════════════════════════════════════════════ */

/* ── Palette ── */
:root {
    --night:          #1a1510;
    --ink:            #2a2118;
    --ink-mid:        #4a3f30;
    --ink-light:      #7a6e5f;
    --ink-faint:      #b0a090;
    --parchment-deep: #ddd0b3;
    --parchment-mid:  #ede5d0;
    --parchment:      #f5f0e8;
    --parchment-warm: #f8f2e5;
    --gold:           #9a7c3a;
    --gold-light:     #c9a84c;
    --silver:         #a0a0a0;
    --rust:           #8b3a2a;
    --rust-light:     #c4694f;
}

/* ── Seasonal Drift ── */
/* Base palette is spring (Mar–May). JS adds a season class to <html>. */
:root.season-winter {
    --parchment:      #f3f0ec;
    --parchment-warm: #f5f2ed;
    --parchment-deep: #d8d0c0;
    --gold:           #8a7a4a;
    --night:          #181518;
}

:root.season-summer {
    --parchment:      #f8f0e0;
    --parchment-warm: #faf3e2;
    --parchment-deep: #e2d0a8;
    --gold:           #a8843a;
    --night:          #1c1610;
}

:root.season-autumn {
    --parchment:      #f5ede0;
    --parchment-warm: #f6eee0;
    --parchment-deep: #ddc8a0;
    --gold:           #b08830;
    --night:          #1a1410;
}

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

/* ── Base ── */
html {
    background: var(--night);
    min-height: 100%;
}

body {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--ink-mid);
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Noise Texture ── */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
    background-size: 300px 300px;
}

/* ── Site Header ── */
.site-header {
    text-align: center;
    padding: 3rem 0 0;
    opacity: 0;
    transition: opacity 1.5s ease-in;
}

.site-header.visible {
    opacity: 1;
}

.year-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: normal;
    font-size: 5.5rem;
    color: var(--parchment);
    line-height: 1;
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;
}

/* ── Decorative Rule ── */
.decorative-rule {
    height: 1px;
    border: none;
    background: linear-gradient(to right, transparent, var(--silver), transparent);
    margin-bottom: 0;
}

/* ── Page Content ── */
.page-content {
    background: var(--parchment);
    padding: 2.5rem 3rem 3rem;
    touch-action: pan-y;
    -webkit-touch-callout: none;
    filter: hue-rotate(var(--tod-warmth, 0deg)) saturate(var(--tod-saturate, 1));
    position: relative;
}

/* ── Progress Lines ── */
.progress-line {
    position: absolute;
    height: 5px;
    width: 0%;
    background: var(--silver);
    opacity: 0.9;
    pointer-events: none;
    z-index: 1;
    transition: width 2s ease-out;
}

.progress-line-top {
    top: 0;
    left: 0;
}

.progress-line-bottom {
    bottom: 0;
    right: 0;
}

/* ── Showcase ── */
@keyframes showcase-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.showcase-fadein {
    animation: showcase-fade 2s ease-in both;
}

.showcase-reload.showcase-fadein {
    animation-delay: 0.8s;
}

.showcase-entry {
    max-width: 600px;
    margin: 0 auto;
}

.showcase-date {
    font-family: 'Cormorant SC', serif;
    font-weight: 400;
    font-style: normal;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-light);
    margin-bottom: 1.5rem;
}

.showcase-text {
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: 1.15rem;
    line-height: 1.85;
    margin-bottom: 1rem;
}

.showcase-file {
    margin-bottom: 1.5rem;
}

.showcase-media {
    margin-bottom: 1.5rem;
}

.showcase-img {
    display: block;
    max-width: 100%;
    margin-bottom: 0.75rem;
}

.showcase-media audio {
    display: block;
    width: 100%;
}

/* ── Buttons ── */
button, .btn {
    display: inline-block;
    font-family: 'Cormorant SC', serif;
    font-weight: 400;
    font-style: normal;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.55rem 1.4rem;
    background: var(--gold);
    color: var(--parchment);
    border: 1px solid var(--gold);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s, border-color 0.3s;
}

button:hover, .btn:hover {
    background: var(--rust);
    border-color: var(--rust);
}

/* ── Translation Toggle ── */
.btn-translation {
    margin-top: 0.5rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.6rem;
    background: var(--parchment-deep);
    color: var(--ink-mid);
    border-color: var(--parchment-deep);
}

.btn-translation:hover {
    background: var(--parchment-deep);
    color: var(--ink);
}

.entry-translation {
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
    margin-top: 0.5rem;
    padding: 1rem;
    background: var(--parchment-warm);
    font-style: italic;
    color: var(--ink-mid);
}

/* ── Video Embed ── */
.video-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
}

/* ── Navigation Link ── */
.showcase-nav {
    display: inline-block;
    font-family: 'EB Garamond', Georgia, serif;
    font-style: normal;
    font-size: 1.6rem;
    color: var(--ink-faint);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.showcase-nav:hover {
    color: var(--gold);
}

/* ── Colophon ── */
.colophon {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 0;
    animation: showcase-fade 2s ease-in both;
}

.colophon-rule {
    display: inline-block;
    width: 3rem;
    height: 1px;
    background: var(--gold);
    margin-bottom: 2rem;
}

.colophon-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--ink-light);
    margin-bottom: 2rem;
}

.colophon-nav {
    display: inline-block;
    font-family: 'Cormorant SC', serif;
    font-weight: 400;
    font-style: normal;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-faint);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.colophon-nav:hover {
    color: var(--gold);
}

.colophon-nav + .colophon-nav {
    margin-left: 1.5rem;
}

.colophon-sep {
    color: var(--ink-faint);
    opacity: 0.5;
    margin: 0 0.5rem;
}

/* ══════════════════════════════════════════════════════════════
   Mobile
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    body {
        padding: 0 1rem;
    }

    .site-header {
        padding: 1.5rem 0 0;
    }

    .year-title {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .page-content {
        padding: 1.5rem 1.25rem 2rem;
    }

    .showcase-text {
        font-size: 1.05rem;
        line-height: 1.75;
    }

    .entry-translation {
        padding: 0.75rem;
    }

    button, .btn {
        font-size: 0.8rem;
        padding: 0.7rem 1.5rem;
    }

    .btn-translation {
        font-size: 0.7rem;
        padding: 0.5rem 1rem;
    }

}

@media (max-width: 400px) {
    body {
        padding: 0 0.75rem;
    }

    .year-title {
        font-size: 2.5rem;
    }

    .page-content {
        padding: 1.25rem 1rem 1.5rem;
    }

    .showcase-entry {
        max-width: 100%;
    }
}

/* ══════════════════════════════════════════════════════════════
   Print
   ══════════════════════════════════════════════════════════════ */
@media print {
    html {
        background: white;
    }

    body {
        color: #222;
        font-style: italic;
        max-width: 100%;
        padding: 0;
    }

    body::after {
        display: none;
    }

    .site-header {
        padding: 1rem 0;
    }

    .year-title {
        color: #222;
        font-size: 3rem;
    }

    .decorative-rule {
        background: #999;
    }

    .page-content {
        background: white;
        padding: 2rem 0;
        filter: none;
    }

    .progress-line {
        display: none;
    }

    .showcase-entry {
        max-width: 100%;
    }

    .showcase-text {
        color: #222;
        font-size: 12pt;
        line-height: 1.7;
    }

    .showcase-date {
        color: #666;
    }

    .showcase-img {
        max-width: 80%;
        margin: 1rem auto;
    }

    .showcase-reload,
    .showcase-nav {
        display: none;
    }

    .showcase-fadein {
        animation: none;
        opacity: 1;
    }
}

/* Rendered Markdown inside a showcase entry */
.showcase-text h2,
.showcase-text h3,
.showcase-text h4 {
  font-weight: 600;
  line-height: 1.25;
  margin: 1.1em 0 0.4em;
}
.showcase-text h2 { font-size: 1.3em; }
.showcase-text h3 { font-size: 1.12em; }
.showcase-text h4 { font-size: 1em; }
.showcase-text p { margin: 0 0 0.7em; }
.showcase-text ul { margin: 0 0 0.7em; padding-left: 1.3em; }
.showcase-text li { margin: 0.15em 0; }
.showcase-text hr {
  border: 0;
  border-top: 1px solid currentColor;
  opacity: 0.25;
  margin: 1.2em 0;
}
.showcase-text a {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-color: var(--rust-light);
  text-underline-offset: 2px;
}
.showcase-text a:hover,
.showcase-text a:focus { color: var(--rust-light); }

/* ── Home landing ── */
.home-page .site-header { opacity: 1; }
.year-title a { color: inherit; text-decoration: none; }
.home { max-width: 640px; margin: 0 auto; padding: 2rem 1rem; text-align: center; }
.home-intro {
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--ink-mid);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}
.home-nav { display: flex; flex-direction: column; gap: 1.25rem; }
.home-link {
  display: block;
  text-decoration: none;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--parchment-deep);
  border-radius: 2px;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.home-link:hover, .home-link:focus {
  border-color: var(--gold);
  background: var(--parchment-warm);
}
.home-link-title {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  color: var(--ink);
}
.home-link-desc {
  display: block;
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--ink-light);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* ── Showcase cross-link ── */
.showcase-cross { text-align: center; margin-top: 2rem; }
.showcase-cross a {
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--gold);
  text-decoration: none;
}
.showcase-cross a:hover, .showcase-cross a:focus { color: var(--gold-light); }

/* ── Month strip (showcase filter) ── */
.month-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  max-width: 720px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}
.month-choice {
  background: transparent;
  border: 0;
  padding: 0.2rem 0.1rem;
  cursor: pointer;
  font: inherit;
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--ink-light);
  border-bottom: 1px solid transparent;
}
.month-choice:hover, .month-choice:focus { color: var(--ink); }
.month-choice.active { color: var(--gold); border-bottom-color: var(--gold); }
