:root {
  --ink: #251b1b;
  --muted: #6c5d5b;
  --rose: #bd4d63;
  --berry: #742c42;
  --paper: #fff7f2;
  --shell: #f4dfd7;
  --sage: #64766a;
  --gold: #b6844f;
  --shadow: 0 28px 80px rgba(74, 33, 45, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(189, 77, 99, 0.18), transparent 26rem),
    linear-gradient(135deg, #fff8f5 0%, #f1d5d0 42%, #d7c7b2 100%);
  overflow-x: hidden;
}

button,
label {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
  position: relative;
}

.intro-screen,
.memory-screen {
  min-height: 100vh;
  width: 100%;
  padding: clamp(24px, 5vw, 72px);
  transition:
    opacity 700ms ease,
    transform 700ms ease,
    visibility 700ms ease;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 248, 245, 0.64), rgba(255, 248, 245, 0.4)),
    url("assets/anniversary-texture.svg") center / cover no-repeat,
    linear-gradient(145deg, #fff8f5 0%, #f1cfca 50%, #dac7af 100%);
}

.intro-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  pointer-events: none;
}

.intro-content {
  width: min(760px, 100%);
  text-align: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--berry);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(3.8rem, 11vw, 8.6rem);
}

h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
}

.love-note {
  max-width: 680px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.75;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.primary-action {
  margin-top: 38px;
  min-height: 56px;
  padding: 0 24px 0 28px;
  color: #fffaf7;
  background: linear-gradient(135deg, var(--berry), var(--rose));
  box-shadow: 0 18px 36px rgba(116, 44, 66, 0.28);
  font-weight: 700;
}

.primary-action:hover,
.ghost-action:hover {
  transform: translateY(-2px);
}

.primary-action svg,
.ghost-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  pointer-events: none;
}

.ambient-one {
  width: 210px;
  height: 210px;
  top: 10%;
  left: 7%;
  border: 1px solid rgba(116, 44, 66, 0.18);
}

.ambient-two {
  width: 340px;
  height: 340px;
  right: -90px;
  bottom: -70px;
  border: 1px solid rgba(100, 118, 106, 0.26);
}

.date-mark {
  position: absolute;
  right: clamp(20px, 5vw, 70px);
  bottom: clamp(18px, 5vw, 56px);
  display: grid;
  gap: 4px;
  color: rgba(37, 27, 27, 0.58);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
}

.memory-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(24px, 5vw, 52px);
  opacity: 0;
  transform: translateY(18px);
  visibility: hidden;
  background:
    linear-gradient(rgba(255, 248, 245, 0.72), rgba(255, 248, 245, 0.3)),
    linear-gradient(140deg, #fffaf7 0%, #efd6cf 44%, #cfd8ce 100%);
}

.memory-screen.is-visible {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.memory-header {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.memory-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ghost-action {
  min-height: 44px;
  padding: 0 16px;
  color: var(--berry);
  background: rgba(255, 250, 247, 0.72);
  box-shadow: 0 12px 26px rgba(74, 33, 45, 0.11);
  font-size: 0.94rem;
  font-weight: 700;
}

#photoInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.stream-wrap {
  display: grid;
  gap: 24px;
  width: 100%;
  overflow: hidden;
  padding: 10px 0 22px;
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 9%,
    black 91%,
    transparent 100%
  );
}

.photo-stream {
  display: flex;
  width: max-content;
  gap: clamp(16px, 2vw, 28px);
  will-change: transform;
}

.stream-a {
  animation: flow-left 34s linear infinite;
}

.stream-b {
  animation: flow-right 42s linear infinite;
}

.memory-card {
  width: clamp(190px, 20vw, 300px);
  aspect-ratio: 4 / 5;
  flex: 0 0 auto;
  border: 10px solid rgba(255, 250, 247, 0.92);
  border-bottom-width: 46px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: #f8ede8;
  box-shadow: var(--shadow);
  transform: rotate(var(--tilt));
}

.memory-card::after {
  content: attr(data-caption);
  position: absolute;
  left: 0;
  right: 0;
  bottom: -38px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--berry);
  font-size: 0.84rem;
  font-weight: 700;
}

.memory-card img,
.placeholder-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.placeholder-art {
  position: relative;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.52), transparent 34%),
    var(--card-bg);
}

.placeholder-art span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: rgba(255, 250, 247, 0.92);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 18px rgba(37, 27, 27, 0.26);
}

.hint {
  width: min(1120px, 100%);
  margin: -18px auto 0;
  color: rgba(37, 27, 27, 0.58);
  font-size: 0.95rem;
}

@keyframes flow-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes flow-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

@media (max-width: 760px) {
  .intro-screen,
  .memory-screen {
    padding: 24px 18px;
  }

  .memory-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .memory-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .ghost-action {
    flex: 1 1 160px;
  }

  .date-mark {
    display: none;
  }

  .stream-wrap {
    margin-inline: -18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
