:root {
  --bg: #0e0c0a;
  --paper: #fffaf0;
  --paper-2: #f3ead9;
  --ink: #f7efe4;
  --muted: rgba(247, 239, 228, .64);
  --red: #b51f2a;
  --red-2: #76151d;
  --line: rgba(255, 250, 240, .13);
  --shadow: 0 28px 90px rgba(0,0,0,.38);
  --mx: 0px;
  --my: 0px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth;     background-color: #000;}
body {

  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(181, 31, 42, .18), transparent 30vw),
    radial-gradient(circle at 90% 20%, rgba(255, 236, 200, .12), transparent 32vw),
    linear-gradient(180deg, #130f0d 0%, var(--bg) 45%, #080706 100%);
  color: var(--ink);
  overflow-x: hidden;
}
a { color: inherit; }
button, input, textarea { font: inherit; }
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='.38'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.eyebrow {
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-weight: 800;
  font-size: 11px;
  color: #d9b29c;
}
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  position: relative;
}
.hero:before {
  content: '';
  position: absolute;
  inset: 7vw;
  border: 1px solid var(--line);
  border-radius: 38px;
  opacity: .8;
}
.hero__inner {
  width: min(880px, 100%);
  position: relative;
  z-index: 1;
  animation: heroIn 1.3s cubic-bezier(.2,.8,.2,1) both .2s;
}
.hero h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(64px, 16vw, 168px);
  line-height: .78;
  letter-spacing: -.075em;
  text-transform: uppercase;
  text-shadow: 0 18px 70px rgba(181,31,42,.28);
}
.hero h1 span { color: #f3d4bd; }
.hero__copy {
  width: min(720px, 92vw);
  margin: 30px auto 0;
  font-size: clamp(16px, 2.2vw, 21px);
  line-height: 1.75;
  color: rgba(247,239,228,.78);
}
.scroll-hint {
  width: 44px;
  height: 68px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  display: inline-grid;
  place-items: start center;
  padding-top: 13px;
  margin-top: 44px;
  text-decoration: none;
}
.scroll-hint span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--paper);
  animation: scrollDot 1.4s ease-in-out infinite;
}
.timeline-intro {
  min-height: 56svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 22px;
}
.timeline-intro p {
  margin: 0 0 14px;
  color: #d9b29c;
  font-weight: 800;
  letter-spacing: .24em;
}
.timeline-intro h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 9vw, 110px);
  line-height: .9;
  letter-spacing: -.06em;
}
.year-section {
  min-height: 105svh;
  display: grid;
  grid-template-columns: minmax(240px, 34vw) 1fr;
  gap: clamp(20px, 5vw, 80px);
  padding: clamp(70px, 10vw, 140px) clamp(18px, 5vw, 84px);
  border-top: 1px solid var(--line);
  opacity: .44;
  transition: opacity .8s ease;
}
.year-section.is-visible { opacity: 1; }
.year-sticky {
  position: sticky;
  top: 80px;
  height: fit-content;
  padding-left: clamp(0px, 2vw, 28px);
}
.year-label {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(74px, 13vw, 190px);
  line-height: .78;
  letter-spacing: -.09em;
  color: var(--paper);
}
.year-sticky p {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.65;
  max-width: 390px;
}
.polaroid-wall {
  min-height: 72vh;
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  align-content: center;
  gap: clamp(12px, 2.3vw, 30px);
  perspective: 1200px;
}
.polaroid-item {
  grid-column: span 2;
  transform: translate3d(var(--mx), calc(var(--y) + var(--my)), 0) rotate(var(--r)) scale(.95);
  opacity: 0;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .8s ease var(--d), filter .45s ease;
  filter: saturate(.82) contrast(.98);
  will-change: transform;
}
.polaroid-item:nth-child(5n+1) { grid-column: span 3; }
.polaroid-item:nth-child(5n+4) { grid-column: span 2; margin-left: -8%; }
.polaroid-item.is-visible { opacity: 1; }
.polaroid-item:hover {
  z-index: 4;
  filter: saturate(1.06) contrast(1.03);
  transform: translate3d(0, calc(var(--y) * .25), 80px) rotate(0deg) scale(1.06);
}
.polaroid-card {
  position: relative;
  background: linear-gradient(180deg, #fffdf7 0%, #f5ebdc 100%);
  padding: clamp(8px, 1.2vw, 14px) clamp(8px, 1.2vw, 14px) clamp(23px, 3vw, 48px);
  border-radius: 3px;
  box-shadow: 0 2px 3px rgba(0,0,0,.18), 0 18px 48px rgba(0,0,0,.26);
  color: #1a1410;
}
.polaroid-card:before, .polaroid-card:after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 45%;
  height: 18%;
  bottom: 18px;
  background: rgba(0,0,0,.55);
  filter: blur(18px);
  opacity: .55;
}
.polaroid-card:before { left: 12px; transform: rotate(-6deg); }
.polaroid-card:after { right: 12px; transform: rotate(6deg); }
.polaroid-card img {
  width: 100%;
  aspect-ratio: 1 / 1.12;
  object-fit: cover;
  display: block;
  background: #ddd;
  border-radius: 1px;
}
.polaroid-caption {
  min-height: 1.5em;
  margin: 14px 4px 0;
  text-align: center;
  line-height: 1.35;
  font-size: clamp(12px, 1.2vw, 15px);
  font-weight: 700;
  letter-spacing: -.02em;
}
.polaroid-caption.is-empty { display: none; }
.empty-year {
  grid-column: 1 / -1;
  color: var(--muted);
  border: 1px dashed var(--line);
  padding: 32px;
  border-radius: 24px;
}
.finale {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(181,31,42,.25), transparent 35vw),
    #080706;
}
.finale div { width: min(900px, 100%); }
.finale h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(54px, 12vw, 138px);
  line-height: .88;
  letter-spacing: -.07em;
}
.finale p:last-child {
  width: min(640px, 92vw);
  margin: 30px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

/* ADMIN */
.admin-page {
  min-height: 100svh;
  background: #11100f;
}
.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  align-items: flex-end;
  padding: 34px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(14,12,10,.82);
}
.admin-topbar h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 66px);
  letter-spacing: -.06em;
  line-height: .92;
}
.admin-topbar p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}
.admin-actions-global {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.button, .upload-button, .mini-button {
  border: 0;
  text-decoration: none;
  cursor: pointer;
  background: var(--paper);
  color: #17120f;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.button.ghost { background: rgba(255,255,255,.09); color: var(--ink); border: 1px solid var(--line); }
.button.danger, .mini-button.danger { background: #401014; color: #ffd7d7; }
.admin-shell { padding: clamp(16px, 4vw, 52px); }
.admin-note {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  border-radius: 24px;
  padding: 18px 20px;
  color: rgba(247,239,228,.72);
  margin-bottom: 22px;
  line-height: 1.55;
}
.admin-note strong { color: var(--paper); }
.admin-years { display: grid; gap: 22px; }
.year-panel {
  border: 1px solid rgba(255,255,255,.11);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  border-radius: 32px;
  padding: clamp(16px, 3vw, 30px);
  box-shadow: var(--shadow);
}
.year-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.year-panel h2 {
  margin: 0;
  font-size: clamp(38px, 7vw, 86px);
  letter-spacing: -.08em;
  line-height: .85;
}
.year-kicker {
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: #d9b29c;
  font-size: 10px;
  font-weight: 900;
}
.upload-button input { display: none; }
.year-copy-label, .photo-editor label {
  display: grid;
  gap: 8px;
  color: rgba(247,239,228,.7);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(0,0,0,.24);
  color: var(--ink);
  border-radius: 18px;
  padding: 14px 16px;
  outline: none;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
textarea:focus { border-color: rgba(255,250,240,.42); box-shadow: 0 0 0 4px rgba(255,255,255,.06); }
.photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.photo-editor {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 24px;
  padding: 14px;
}
.photo-editor__preview.polaroid-card {
  padding: 7px 7px 26px;
  align-self: start;
  transform: rotate(-2deg);
}
.photo-editor__preview img { aspect-ratio: 1; }
.photo-editor__preview .polaroid-caption {
  font-size: 10px;
  margin-top: 8px;
  color: #1a1410;
  word-break: break-word;
}
.photo-editor__content { display: grid; gap: 12px; align-content: start; }
.photo-editor__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-button {
  padding: 9px 12px;
  font-size: 12px;
  box-shadow: none;
  background: rgba(255,255,255,.1);
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.12);
}
.mini-button:disabled { opacity: .35; cursor: not-allowed; }
.empty-admin {
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 22px;
  padding: 20px;
  color: var(--muted);
  display: grid;
  gap: 4px;
}
.empty-admin strong { color: var(--paper); }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(36px) scale(.98); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: .2; }
  45% { opacity: 1; }
  100% { transform: translateY(32px); opacity: .08; }
}
@media (max-width: 860px) {
  .hero:before { inset: 18px; border-radius: 28px; }
  .year-section {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 82px 16px;
  }
  .year-sticky { position: relative; top: auto; }
  .year-sticky p { max-width: none; margin-top: 18px; }
  .polaroid-wall {
    grid-template-columns: repeat(4, 1fr);
    min-height: auto;
    gap: 14px;
    padding-top: 20px;
  }
  .polaroid-item, .polaroid-item:nth-child(5n+1), .polaroid-item:nth-child(5n+4) {
    grid-column: span 2;
    margin-left: 0;
  }
  .polaroid-item:nth-child(3n+1) { grid-column: 1 / span 3; }
  .polaroid-item:nth-child(3n+2) { grid-column: 2 / span 3; }
  .polaroid-item:hover { transform: translate3d(0, calc(var(--y) * .08), 0) rotate(0) scale(1.02); }
  .admin-topbar { position: relative; flex-direction: column; align-items: flex-start; }
  .admin-actions-global { justify-content: flex-start; }
  .year-panel__head { align-items: flex-start; flex-direction: column; }
  .upload-button { width: 100%; text-align: center; }
  .photo-editor { grid-template-columns: 104px 1fr; }
}
@media (max-width: 520px) {
  .hero { padding: 18px; }
  .hero__copy { font-size: 15px; line-height: 1.62; }
  .polaroid-card { padding: 7px 7px 28px; }
  .polaroid-caption { font-size: 11px; }
  .photo-list { grid-template-columns: 1fr; }
  .photo-editor { grid-template-columns: 1fr; }
  .photo-editor__preview.polaroid-card { width: 54%; justify-self: center; }
}

.admin-status {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 13px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.78);
  font-size: 13px;
}

.admin-status[data-type="success"] {
  border-color: rgba(111, 220, 140, .35);
  background: rgba(111, 220, 140, .10);
  color: rgba(222, 255, 231, .92);
}

.admin-status[data-type="error"] {
  border-color: rgba(255, 98, 98, .45);
  background: rgba(255, 98, 98, .10);
  color: rgba(255, 225, 225, .96);
}

.admin-note code {
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
}

.hero-logo {
    width: min(90vw, 700px);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 20px 60px rgba(0,0,0,.4));
    animation: heroLogoIn 1.4s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes heroLogoIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(.95);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}


.hero {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(0,0,0,.35) 0%,
            rgba(0,0,0,.45) 50%,
            rgba(0,0,0,.68) 100%
        ),
        url('hero_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0;
    transform: scale(1.04);
    filter: blur(8px);
    animation: heroBgFade 1.6s ease-out forwards;
}

.hero::before {
    z-index: 1;
}

.hero__inner {
    position: relative;
    z-index: 2;
    animation: none;
}

.hero-logo {
    width: min(90vw, 700px);
    max-height: 45vh;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    opacity: 0;
    animation: heroLogoFade 1.4s cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay: 1.1s;
}

.hero__copy {
    width: min(720px, 92vw);
    margin: 30px auto 0;
    font-size: clamp(16px, 2.2vw, 21px);
    line-height: 1.75;
    color: rgba(247,239,228,.82);
    opacity: 0;
    transform: translateY(18px);
    animation: heroTextFade 1.2s cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay: 2.15s;
}

.scroll-hint {
    opacity: 0;
    animation: heroTextFade 1s cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay: 2.75s;
}

@keyframes heroBgFade {
    from {
        opacity: 0;
        transform: scale(1.04);
        filter: blur(8px);
    }
    to {
        opacity: .8;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes heroLogoFade {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.96);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes heroTextFade {
    from {
        opacity: 0;
        transform: translateY(18px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* HERO FINAL OVERRIDE */

.hero {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #000;
}

.hero::before {
    display: none !important;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(0,0,0,.42) 0%,
            rgba(0,0,0,.50) 50%,
            rgba(0,0,0,.72) 100%
        ),
        url('hero_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 1;
    transform: scale(1.08);
    filter: blur(10px);
    animation: heroBgFade 1.6s ease-out forwards;
}

.hero__inner {
    width: min(880px, 100%);
    position: relative;
    z-index: 2;
    animation: none !important;
}

.hero-logo {
    width: min(90vw, 700px);
    max-height: 45vh;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    opacity: 0;
    filter: blur(8px);
    animation: heroLogoFade 1.4s cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay: 1.05s;
}

.hero__copy {
    width: min(720px, 92vw);
    margin: 30px auto 0;
    font-size: clamp(16px, 2.2vw, 21px);
    line-height: 1.75;
    color: rgba(247,239,228,.86);
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
    animation: heroTextFade 1.15s cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay: 2.05s;
}

.scroll-hint {
    opacity: 0;
    animation: heroTextFade 1s cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay: 2.65s;
}

@keyframes heroBgFade {
    from {
        opacity: 1;
        transform: scale(1.08);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes heroLogoFade {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.96);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes heroTextFade {
    from {
        opacity: 0;
        transform: translateY(18px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.cta-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    padding: 18px 32px;
    border-radius: 999px;
    text-decoration: none;
    background: #b51f2a;
    color: #fff;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 14px;
    transition: all .3s ease;
    box-shadow:
        0 10px 30px rgba(181,31,42,.35),
        0 0 0 1px rgba(255,255,255,.08);
}

.cta-home:hover {
    transform: translateY(-3px);
    background: #cb2734;
    box-shadow:
        0 18px 40px rgba(181,31,42,.45),
        0 0 0 1px rgba(255,255,255,.12);
}

.cta-home:active {
    transform: translateY(-1px);
}