:root {
  --ink: #07111f;
  --navy: #0b1b33;
  --blue: #163a66;
  --cream: #fff7e8;
  --paper: #fffaf0;
  --gold: #d9a441;
  --gold-light: #f5d78b;
  --red: #ba1f2d;
  --soft: rgba(255, 247, 232, 0.78);
  --shadow: 0 24px 80px rgba(7, 17, 31, 0.26);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 164, 65, 0.26), transparent 30rem),
    linear-gradient(180deg, #07111f 0%, #102642 44rem, #fff7e8 44rem, #fffaf0 100%);
}

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

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

button {
  font: inherit;
}

.confetti {
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 80;
}

.nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  left: 50%;
  max-width: 1180px;
  padding: 26px 22px;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: min(100%, 1180px);
  z-index: 5;
}

.brand {
  color: var(--gold-light);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav__links {
  align-items: center;
  color: rgba(255, 250, 240, 0.86);
  display: flex;
  gap: 20px;
  font-size: 0.94rem;
}

.hero {
  color: var(--paper);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.hero::before {
  background:
    linear-gradient(115deg, rgba(7, 17, 31, 0.96), rgba(7, 17, 31, 0.74)),
    url("images/dad38.jpg") center/cover;
  content: "";
  inset: 0;
  position: absolute;
  transform: scale(1.04);
  z-index: -3;
}

.hero::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 80px 80px;
  content: "";
  inset: 0;
  opacity: 0.18;
  position: absolute;
  z-index: -2;
}

.hero__glow {
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.34;
  position: absolute;
}

.hero__glow--one {
  background: var(--gold);
  height: 26rem;
  right: -7rem;
  top: 6rem;
  width: 26rem;
}

.hero__glow--two {
  background: var(--red);
  bottom: 4rem;
  height: 20rem;
  left: -6rem;
  width: 20rem;
}

.hero__content {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  margin: 0 auto;
  max-width: 1180px;
  min-height: 100vh;
  padding: 110px 22px 70px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 11vw, 9rem);
  line-height: 0.88;
  margin-bottom: 28px;
}

h1 span {
  color: var(--gold-light);
  font-style: italic;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 6vw, 4.9rem);
  line-height: 0.98;
}

h3 {
  font-size: 1.25rem;
}

.hero__text {
  color: rgba(255, 250, 240, 0.82);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.7;
  max-width: 620px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  align-items: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.wish-button:hover {
  transform: translateY(-2px);
}

.button--gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 18px 45px rgba(217, 164, 65, 0.24);
  color: #111827;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--paper);
}

.hero__frames {
  min-height: 640px;
  position: relative;
}

.hero-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 34px;
  box-shadow: var(--shadow);
  margin: 0;
  overflow: hidden;
  position: absolute;
}

.hero-card img {
  height: 100%;
  object-fit: cover;
}

.hero-card--main {
  animation: floatMain 7s ease-in-out infinite;
  height: 560px;
  right: 46px;
  top: 40px;
  transform: rotate(3deg);
  width: 390px;
  z-index: 2;
}

.hero-card--left {
  animation: floatSide 8s ease-in-out infinite;
  height: 330px;
  left: 0;
  top: 120px;
  transform: rotate(-8deg);
  width: 245px;
}

.hero-card--right {
  animation: floatSide 8.5s ease-in-out infinite reverse;
  bottom: 10px;
  height: 310px;
  right: 0;
  transform: rotate(9deg);
  width: 250px;
  z-index: 3;
}

.ribbon {
  background: var(--ink);
  border-block: 1px solid rgba(245, 215, 139, 0.24);
  overflow: hidden;
  padding: 18px 0;
}

.ribbon__track {
  animation: scrollRibbon 38s linear infinite;
  display: flex;
  gap: 18px;
  width: max-content;
}

.ribbon__item {
  border-radius: 22px;
  height: 155px;
  overflow: hidden;
  position: relative;
  width: 210px;
}

.ribbon__item img {
  height: 100%;
  object-fit: cover;
}

.section {
  margin: 0 auto;
  max-width: 1180px;
  padding: 92px 22px;
}

.intro {
  align-items: stretch;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
}

.intro__card,
.letter,
.finale,
.qualities article,
.moment {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(7, 17, 31, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 18px 70px rgba(11, 27, 51, 0.08);
}

.intro__card,
.letter,
.finale {
  padding: clamp(28px, 5vw, 56px);
}

.intro__card p,
.letter p,
.finale p,
.section-title p,
.moment p,
.qualities p {
  color: rgba(7, 17, 31, 0.72);
  line-height: 1.8;
}

.qualities {
  display: grid;
  gap: 16px;
}

.qualities article {
  padding: 26px;
}

.qualities span {
  color: var(--red);
  display: block;
  font-weight: 900;
  margin-bottom: 12px;
}

.letter-section {
  align-items: center;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(290px, 0.8fr) minmax(0, 1.2fr);
}

.letter-photo {
  position: relative;
}

.letter-photo img {
  aspect-ratio: 4 / 5;
  border-radius: 34px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.wish-button {
  background: var(--red);
  border: 0;
  border-radius: 999px;
  bottom: 22px;
  box-shadow: 0 20px 45px rgba(186, 31, 45, 0.26);
  color: white;
  cursor: pointer;
  font-weight: 900;
  left: 50%;
  padding: 15px 22px;
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.wish-button:hover {
  transform: translateX(-50%) translateY(-2px);
}

.letter {
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(255, 247, 232, 0.88)),
    radial-gradient(circle at top right, rgba(217, 164, 65, 0.18), transparent 20rem);
}

.letter .signature {
  color: var(--red);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.section-title {
  margin-bottom: 32px;
  max-width: 760px;
}

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

.moment {
  overflow: hidden;
}

.moment img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.moment div {
  padding: 24px;
}

.gallery-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}

.gallery-card {
  background: #111827;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(11, 27, 51, 0.12);
  cursor: pointer;
  min-height: 230px;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.gallery-card img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  transition: transform 500ms ease, filter 500ms ease;
}

.gallery-card:hover img {
  filter: brightness(0.82) saturate(1.1);
  transform: scale(1.06);
}

.gallery-card span {
  background: rgba(7, 17, 31, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  bottom: 12px;
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  left: 12px;
  padding: 7px 11px;
  position: absolute;
}

.finale {
  background:
    linear-gradient(135deg, rgba(11, 27, 51, 0.98), rgba(7, 17, 31, 0.94)),
    url("images/dad31.jpg") center/cover;
  color: var(--paper);
  overflow: hidden;
  position: relative;
}

.finale p {
  color: rgba(255, 250, 240, 0.78);
  max-width: 680px;
}

.footer {
  align-items: center;
  background: var(--ink);
  color: rgba(255, 250, 240, 0.78);
  display: flex;
  justify-content: space-between;
  padding: 26px max(22px, calc((100vw - 1180px) / 2));
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--gold-light);
  font-weight: 800;
}

.lightbox {
  align-items: center;
  background: rgba(7, 17, 31, 0.92);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 24px;
  position: fixed;
  z-index: 90;
}

.lightbox[hidden],
.toast[hidden] {
  display: none;
}

.lightbox__figure {
  margin: 0;
  max-height: 88vh;
  max-width: min(920px, 86vw);
}

.lightbox__figure img {
  border-radius: 22px;
  box-shadow: var(--shadow);
  max-height: 78vh;
  object-fit: contain;
}

.lightbox__figure figcaption {
  color: var(--paper);
  font-weight: 800;
  margin-top: 12px;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: white;
  cursor: pointer;
  position: fixed;
  z-index: 91;
}

.lightbox__close {
  font-size: 2rem;
  height: 48px;
  right: 22px;
  top: 22px;
  width: 48px;
}

.lightbox__nav {
  font-size: 3rem;
  height: 64px;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
}

.lightbox__nav--prev {
  left: 22px;
}

.lightbox__nav--next {
  right: 22px;
}

.toast {
  background: var(--ink);
  border: 1px solid rgba(245, 215, 139, 0.36);
  border-radius: 999px;
  bottom: 22px;
  box-shadow: var(--shadow);
  color: var(--paper);
  font-weight: 800;
  left: 50%;
  padding: 14px 22px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 95;
}

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

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

@keyframes floatMain {
  0%, 100% {
    transform: rotate(3deg) translateY(0);
  }
  50% {
    transform: rotate(1deg) translateY(-18px);
  }
}

@keyframes floatSide {
  0%, 100% {
    transform: rotate(-8deg) translateY(0);
  }
  50% {
    transform: rotate(-4deg) translateY(18px);
  }
}

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

@media (max-width: 960px) {
  .hero__content,
  .intro,
  .letter-section,
  .timeline__grid {
    grid-template-columns: 1fr;
  }

  .hero__frames {
    min-height: 560px;
  }

  .hero-card--main {
    left: 50%;
    right: auto;
    transform: translateX(-50%) rotate(3deg);
  }

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

@media (max-width: 720px) {
  .nav {
    gap: 14px;
    position: relative;
  }

  .nav__links {
    display: none;
  }

  .hero__content {
    min-height: auto;
    padding-top: 32px;
  }

  .hero__frames {
    min-height: 480px;
  }

  .hero-card--main {
    height: 430px;
    width: min(310px, 78vw);
  }

  .hero-card--left,
  .hero-card--right {
    height: 220px;
    width: 170px;
  }

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

  .gallery-card {
    min-height: 190px;
  }

  .lightbox__nav {
    bottom: 22px;
    top: auto;
    transform: none;
  }
}

@media (max-width: 460px) {
  .hero__actions,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

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