:root {
  --navy: #0A1525;
  --navy-deep: #06101D;
  --navy-soft: #0E1C30;
  --navy-mid: #0C1929;
  --gold: #D89B3C;
  --amber: #E8B460;
  --cream: #EADCCB;
  --taupe: #B9AE9A;
  --ivory: #F5EFE5;
  --paper: #F5EFE5;
  --line: rgba(234, 220, 203, 0.16);
  --ink-line: rgba(10, 21, 37, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy-deep);
  color: var(--cream);
  font-family: "Lato", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.archive-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.memory-rail {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 42px;
  padding: 34px 30px;
  background: rgba(6, 16, 29, 0.86);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.portal-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
}

nav {
  display: grid;
  gap: 18px;
  color: var(--taupe);
  font-size: 13px;
}

nav a {
  transition: color 220ms ease, transform 220ms ease;
}

nav a:hover {
  color: var(--cream);
  transform: translateX(3px);
}

.rail-note {
  margin: auto 0 0;
  color: rgba(185, 174, 154, 0.72);
  font-size: 13px;
}

main {
  min-width: 0;
}

.portal-hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: clamp(34px, 6vw, 78px);
}

.portal-hero img,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portal-hero img {
  object-fit: cover;
  object-position: center;
  transform: scale(1.03);
  animation: archiveBreath 20s ease-in-out infinite alternate;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(10, 21, 37, 0.86), rgba(10, 21, 37, 0.38)),
    linear-gradient(0deg, rgba(10, 21, 37, 0.95), rgba(10, 21, 37, 0.05) 58%);
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  line-height: 1.05;
}

h1 {
  font-size: clamp(54px, 8vw, 112px);
}

h2 {
  font-size: clamp(39px, 5vw, 70px);
}

.hero-text p:not(.eyebrow),
.access-card p,
.section-heading {
  color: var(--taupe);
}

.hero-text p:not(.eyebrow) {
  max-width: 590px;
  margin: 26px 0 34px;
  font-size: clamp(17px, 2vw, 21px);
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--cream);
  border-radius: 28px;
  padding: 14px 26px;
  background: var(--cream);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  transition: transform 220ms ease, background 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(216, 155, 60, 0.18);
}

.button.dark {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--cream);
}

.button.dark:hover {
  box-shadow: 0 8px 30px rgba(10, 21, 37, 0.3);
}

.access-card,
.section-block {
  padding: clamp(58px, 8vw, 104px) clamp(24px, 6vw, 80px);
}

.access-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: clamp(28px, 6vw, 82px);
  align-items: center;
  background: var(--paper);
  color: var(--navy);
}

.access-card .eyebrow {
  color: #8c6b35;
}

.password-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--ink-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
}

label {
  display: grid;
  gap: 8px;
  color: #5e5346;
  font-size: 13px;
  font-weight: 700;
}

input {
  min-height: 48px;
  border: 1px solid var(--ink-line);
  border-radius: 8px;
  padding: 12px 13px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--navy);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: #8c6b35;
}

.access-note {
  min-height: 22px;
  margin: 0;
  color: #755f3c;
  font-size: 13px;
}

.private-content {
  display: none;
}

.private-content.is-unlocked {
  display: block;
}

.section-block {
  background: var(--navy);
  border-top: 1px solid var(--line);
}

.section-block:nth-child(even) {
  background: #0E1E35;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 34px;
}

.film-frame {
  width: min(1120px, 100%);
  aspect-ratio: 16 / 8.5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(10, 21, 37, 0.12), rgba(10, 21, 37, 0.72)),
    url("assets/fare-thee-well-hero.png") center / cover;
  box-shadow: 0 26px 86px rgba(0, 0, 0, 0.42);
}

.film-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  border-radius: 8px;
}

.play-mark {
  position: relative;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(234, 220, 203, 0.52);
  border-radius: 50%;
  background: rgba(10, 21, 37, 0.34);
  backdrop-filter: blur(8px);
}

.play-mark::after {
  content: "";
  position: absolute;
  left: 31px;
  top: 24px;
  border-left: 19px solid var(--cream);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}

.message-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.message-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  background: rgba(234, 220, 203, 0.045);
  transition: border-color 300ms ease;
}

.message-card:hover {
  border-color: var(--gold);
}

.message-card span,
figcaption,
.download-list strong {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.message-card p {
  margin: 36px 0 0;
  color: var(--cream);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(28px, 3vw, 39px);
  line-height: 1.05;
}

.gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(234, 220, 203, 0.04);
}

figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.88);
  transition: transform 600ms ease, filter 600ms ease;
}

figure:hover img {
  transform: scale(1.045);
  filter: saturate(1);
}

figcaption {
  padding: 14px 16px 16px;
}

.keepsakes {
  background: var(--paper);
  color: var(--navy);
}

.keepsakes .eyebrow {
  color: #8c6b35;
}

.download-list {
  display: grid;
  border-top: 1px solid var(--ink-line);
}

.download-list a {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--ink-line);
  transition: color 220ms ease, padding-left 220ms ease;
}

.download-list a:hover {
  color: #7b5b2a;
  padding-left: 8px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 780ms ease, transform 780ms ease;
}

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

@keyframes archiveBreath {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.07) translate3d(-10px, -8px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 980px) {
  .archive-shell {
    grid-template-columns: 1fr;
  }

  .memory-rail {
    position: absolute;
    z-index: 5;
    min-height: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    background: linear-gradient(rgba(6, 16, 29, 0.88), rgba(6, 16, 29, 0));
    border-right: 0;
  }

  .memory-rail nav,
  .rail-note {
    display: none;
  }

  .portal-hero {
    padding-top: 110px;
  }

  .access-card,
  .message-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    gap: 20px;
  }

  figure img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 50px;
  }

  h2 {
    font-size: 39px;
  }

  .button,
  .password-form .button {
    width: 100%;
  }

  .film-frame {
    aspect-ratio: 4 / 3;
  }

  .download-list a {
    display: grid;
    gap: 4px;
  }
}
