/* =====================================================
   STYLE.CSS — HADIAH ULANG TAHUN CAMOT
   Mobile-first romantic digital letter
===================================================== */

:root {
  --pink-soft: #dff2ff;
  --pink-medium: #9fd0ec;
  --pink-main: #579bc8;
  --pink-dark: #276687;

  --cream: #f6fbfd;
  --cream-dark: #e8f4f8;

  --brown-dark: #203e52;
  --brown-medium: #557184;
  --capybara: #9b7152;
  --capybara-light: #c89a72;
  --leaf: #7ba98d;
  --sunset: #efb7a3;

  --white-soft: rgba(255, 255, 255, 0.9);
  --text-main: #25465c;
  --text-muted: #6f8a99;

  --shadow-soft: 0 16px 40px rgba(37, 87, 121, 0.13);
  --shadow-medium: 0 24px 56px rgba(37, 87, 121, 0.18);

  --radius-small: 14px;
  --radius-medium: 22px;
  --radius-large: 32px;
}

/* =====================================================
   BASIC RESET
===================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text-main);
  background:
    linear-gradient(180deg, rgba(220, 241, 250, 0.86), rgba(255, 251, 246, 0.96) 42%, rgba(232, 244, 248, 0.82)),
    repeating-linear-gradient(135deg, rgba(87, 155, 200, 0.06) 0 1px, transparent 1px 22px),
    var(--cream);
  font-family: Georgia, "Times New Roman", serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;

  background:
    linear-gradient(110deg, transparent 0 12%, rgba(123, 169, 141, 0.08) 12% 13%, transparent 13% 100%),
    linear-gradient(250deg, transparent 0 18%, rgba(239, 183, 163, 0.1) 18% 19%, transparent 19% 100%);

  pointer-events: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: none;
  font-family: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

/* =====================================================
   OPENING SCREEN
===================================================== */

.opening-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 100svh;
  padding: 28px;

  overflow: hidden;

  color: var(--text-main);

  background:
    linear-gradient(160deg, rgba(245, 251, 254, 0.98), rgba(219, 239, 249, 0.93) 48%, rgba(255, 248, 241, 0.95)),
    var(--cream);
}

.opening-screen::before,
.opening-screen::after {
  content: "";
  position: absolute;
  inset-inline: -12%;

  height: 150px;

  background:
    repeating-radial-gradient(ellipse at center, rgba(87, 155, 200, 0.16) 0 2px, transparent 2px 20px);

  opacity: 0.55;
  pointer-events: none;
}

.opening-screen::before {
  top: 7%;
  transform: rotate(-4deg);
}

.opening-screen::after {
  bottom: 8%;
  transform: rotate(4deg);
}

.opening-screen.hide {
  pointer-events: none;
  animation: hideOpening 1s ease forwards;
}

@keyframes hideOpening {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.08);
    visibility: hidden;
  }
}

.opening-content {
  position: relative;
  z-index: 5;

  width: min(100%, 340px);

  text-align: center;
}

.opening-small-text {
  max-width: 330px;
  margin: 0 auto 18px;

  color: var(--pink-dark);

  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  line-height: 1.6;
  text-transform: uppercase;
}

.opening-content h1 {
  margin: 0;

  color: var(--brown-dark);

  font-size: 48px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.98;
}

.opening-content h1 span {
  display: block;

  margin-top: 10px;

  color: var(--pink-dark);

  font-size: 1.1em;
  font-style: italic;
}

.opening-description {
  max-width: 330px;
  margin: 24px auto 0;

  color: var(--brown-medium);

  font-size: 16px;
  line-height: 1.8;
}

.main-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  min-height: 52px;
  margin-top: 30px;
  padding: 14px 22px;

  border-radius: 999px;

  color: white;
  background: linear-gradient(135deg, #6bb5dc, var(--pink-dark));

  box-shadow: 0 14px 32px rgba(39, 102, 135, 0.24);

  font-family: Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;

  transition: 0.25s ease;
}

.main-button:active,
.secondary-button:active {
  transform: scale(0.96);
}

.button-icon {
  font-size: 16px;
}

.opening-hint {
  margin-top: 14px;

  color: var(--text-muted);

  font-size: 13px;
  font-style: italic;
}

.opening-glow {
  position: absolute;

  border-radius: 42% 58% 54% 46%;

  border: 1px solid rgba(87, 155, 200, 0.14);
  filter: blur(0);
  opacity: 0.68;
}

.glow-one {
  top: -90px;
  left: -120px;

  width: 360px;
  height: 240px;

  background: linear-gradient(145deg, rgba(159, 208, 236, 0.38), rgba(255, 255, 255, 0));
  transform: rotate(-18deg);
}

.glow-two {
  right: -130px;
  bottom: -120px;

  width: 390px;
  height: 260px;

  background: linear-gradient(145deg, rgba(239, 183, 163, 0.22), rgba(159, 208, 236, 0.34));
  transform: rotate(16deg);
}

.opening-decoration {
  position: absolute;

  color: var(--pink-dark);

  opacity: 0.26;

  animation: floatingDecoration 5s ease-in-out infinite;
}

.decoration-one {
  top: 12%;
  left: 12%;

  font-size: 55px;
}

.decoration-two {
  top: 16%;
  right: 14%;

  font-size: 35px;

  animation-delay: 1s;
}

.decoration-three {
  right: 12%;
  bottom: 18%;

  font-size: 65px;

  animation-delay: 2s;
}

.decoration-four {
  bottom: 20%;
  left: 18%;

  font-size: 32px;

  animation-delay: 1.5s;
}

@keyframes floatingDecoration {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-16px) rotate(6deg);
  }
}

/* =====================================================
   MAIN CONTENT
===================================================== */

.main-content {
  opacity: 0;
}

.main-content.show {
  animation: showContent 1.2s ease forwards;
}

@keyframes showContent {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.section {
  padding: 76px 20px;
}

.section-container {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.narrow-container {
  width: min(100%, 730px);
}

.soft-section {
  background:
    linear-gradient(180deg, rgba(223, 242, 255, 0.72), rgba(246, 251, 253, 0.82)),
    repeating-linear-gradient(90deg, rgba(87, 155, 200, 0.05) 0 1px, transparent 1px 24px);
}

/* =====================================================
   MUSIC BUTTON
===================================================== */

.music-toggle {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 1000;

  display: grid;
  place-items: center;

  width: 54px;
  height: 54px;

  border-radius: 50%;

  color: white;
  background: linear-gradient(135deg, #72bfe2, var(--pink-dark));

  box-shadow: 0 14px 32px rgba(39, 102, 135, 0.32);

  font-family: Arial, sans-serif;
  font-size: 22px;

  opacity: 0;
  pointer-events: none;

  transition: 0.25s ease;
}

.music-toggle.show {
  opacity: 1;
  pointer-events: auto;
}

.music-toggle.playing {
  animation: musicPulse 1.8s ease-in-out infinite;
}

@keyframes musicPulse {
  0%,
  100% {
    box-shadow: 0 10px 28px rgba(39, 102, 135, 0.28);
  }

  50% {
    box-shadow: 0 10px 38px rgba(39, 102, 135, 0.54);
  }
}

/* =====================================================
   HERO
===================================================== */

.hero-section {
  position: relative;

  display: flex;
  align-items: flex-end;

  min-height: 100svh;
  padding: 42px 20px 54px;

  overflow: hidden;

  color: white;
}

.hero-section::after,
.closing-section::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -80px;
  z-index: 1;

  height: 190px;

  background:
    repeating-radial-gradient(ellipse at center, rgba(159, 208, 236, 0.26) 0 2px, transparent 2px 24px);

  opacity: 0.48;
  pointer-events: none;
}

.hero-image,
.closing-image {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(180deg, rgba(11, 40, 62, 0.05) 7%, rgba(18, 61, 86, 0.22) 43%, rgba(12, 38, 55, 0.82) 100%),
    linear-gradient(90deg, rgba(39, 102, 135, 0.24), rgba(239, 183, 163, 0.08), rgba(18, 61, 86, 0.28));
}

.hero-watermark {
  position: absolute;
  top: 14%;
  right: 8%;
  z-index: 1;

  width: min(34vw, 320px);
  aspect-ratio: 1;

  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 45% 55% 49% 51%;

  background:
    repeating-radial-gradient(ellipse at center, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 22px);

  opacity: 0.32;
  transform: rotate(-12deg);
}

.hero-content {
  position: relative;
  z-index: 3;

  width: min(100%, 760px);
  margin: 0 auto;

  text-align: center;
}

.hero-date {
  margin: 0 0 14px;

  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-date::before,
.hero-date::after {
  content: "";
  display: inline-block;

  width: 22px;
  height: 1px;
  margin: 0 9px 3px;

  background: rgba(255, 255, 255, 0.58);
}

.hero-content h2 {
  margin: 0;

  font-size: 42px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.02;
}

.hero-content h2 span {
  display: block;

  margin-top: 7px;

  color: #c9edff;

  font-style: italic;
}

.hero-content p:not(.hero-date) {
  max-width: 600px;
  margin: 22px auto 0;

  color: rgba(255, 255, 255, 0.86);

  font-size: 16px;
  line-height: 1.72;
}

.scroll-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-top: 26px;

  color: white;

  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-button span {
  animation: scrollDown 1.4s ease-in-out infinite;
}

@keyframes scrollDown {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

/* =====================================================
   SECTION HEADINGS
===================================================== */

.section-heading {
  position: relative;

  margin-bottom: 28px;

  text-align: center;
}

.section-heading::after {
  content: "";
  display: block;

  width: 86px;
  height: 9px;
  margin: 18px auto 0;

  border-top: 2px solid rgba(87, 155, 200, 0.32);
  border-bottom: 2px solid rgba(123, 169, 141, 0.22);
  border-radius: 50%;
}

.section-kicker {
  margin: 0 0 10px;

  color: var(--pink-dark);

  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  line-height: 1.5;
  text-transform: uppercase;
}

.section-heading h2,
.ring-content h2,
.fun-content h2,
.closing-content h2 {
  margin: 0;

  color: var(--brown-dark);

  font-size: 36px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.05;
}

.section-description {
  max-width: 640px;
  margin: 16px auto 0;

  color: var(--text-muted);

  font-size: 16px;
  line-height: 1.75;
}

/* =====================================================
   MESSAGE CARD
===================================================== */

.message-card,
.mini-note {
  border: 1px solid rgba(87, 155, 200, 0.18);
  border-radius: var(--radius-large);

  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(233, 246, 252, 0.74));

  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.message-card {
  padding: 25px 22px;
}

.message-card p {
  margin: 0 0 16px;

  color: var(--brown-medium);

  font-size: 16px;
  line-height: 1.82;
}

.message-card p:last-child {
  margin-bottom: 0;
}

.mini-note {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-top: 18px;
  padding: 15px 18px;
}

.mini-note span {
  color: var(--pink-dark);

  font-size: 25px;
}

.mini-capybara {
  position: relative;

  flex: 0 0 auto;

  width: 36px;
  height: 30px;

  border-radius: 46% 54% 44% 48%;

  background: linear-gradient(145deg, var(--capybara-light), var(--capybara));

  box-shadow: inset -5px -4px 0 rgba(84, 58, 38, 0.12);
}

.mini-capybara::before,
.mini-capybara::after {
  content: "";
  position: absolute;
}

.mini-capybara::before {
  top: 9px;
  left: 10px;

  width: 4px;
  height: 4px;

  border-radius: 50%;

  background: #2a241f;
  box-shadow: 14px 0 0 #2a241f;
}

.mini-capybara::after {
  left: 50%;
  bottom: 6px;

  width: 14px;
  height: 7px;

  border-radius: 999px;

  background: rgba(96, 64, 43, 0.22);
  transform: translateX(-50%);
}

.mini-note p {
  margin: 0;

  color: var(--text-muted);

  font-size: 14px;
  line-height: 1.6;
}

/* =====================================================
   TIMELINE
===================================================== */

.timeline-section {
  background:
    linear-gradient(180deg, #ffffff, rgba(232, 244, 248, 0.68)),
    repeating-linear-gradient(135deg, rgba(87, 155, 200, 0.06) 0 1px, transparent 1px 26px);
}

.timeline {
  display: grid;
  gap: 22px;

  margin-top: 30px;
}

.timeline-item {
  position: relative;

  overflow: hidden;

  border: 1px solid rgba(87, 155, 200, 0.17);
  border-radius: var(--radius-large);

  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(232, 244, 248, 0.78));

  box-shadow: var(--shadow-soft);
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;

  background:
    linear-gradient(115deg, transparent 0 60%, rgba(123, 169, 141, 0.1) 60% 61%, transparent 61% 100%);

  pointer-events: none;
}

.timeline-image-wrapper {
  position: relative;
  z-index: 2;

  height: 265px;

  overflow: hidden;
}

.timeline-image-wrapper::after,
.ring-image-wrapper::after,
.fun-image-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(180deg, transparent 58%, rgba(13, 47, 66, 0.18));

  pointer-events: none;
}

.timeline-image-wrapper img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.timeline-content {
  position: relative;
  z-index: 2;

  padding: 22px;
}

.timeline-number {
  margin: 0 0 7px;

  color: var(--pink-main);

  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.timeline-content h3 {
  margin: 0;

  color: var(--brown-dark);

  font-size: 28px;
  font-weight: 500;
  line-height: 1.12;
}

.timeline-content p:last-child {
  margin: 13px 0 0;

  color: var(--brown-medium);

  font-size: 15px;
  line-height: 1.76;
}

/* =====================================================
   RING SECTION
===================================================== */

.ring-section {
  background:
    linear-gradient(145deg, rgba(223, 242, 255, 0.88), rgba(255, 248, 241, 0.84)),
    repeating-linear-gradient(90deg, rgba(87, 155, 200, 0.07) 0 1px, transparent 1px 28px);
}

.ring-card,
.fun-card {
  position: relative;

  overflow: hidden;

  border: 1px solid rgba(87, 155, 200, 0.18);
  border-radius: var(--radius-large);

  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(235, 247, 252, 0.8));

  box-shadow: var(--shadow-medium);
  backdrop-filter: blur(16px);
}

.ring-card::before,
.fun-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 1;

  border: 1px solid rgba(87, 155, 200, 0.1);
  border-radius: calc(var(--radius-large) - 12px);

  pointer-events: none;
}

.ring-image-wrapper,
.fun-image-wrapper {
  position: relative;
  z-index: 2;

  min-height: 320px;
  overflow: hidden;
}

.ring-image-wrapper img,
.fun-image-wrapper img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.ring-content,
.fun-content {
  position: relative;
  z-index: 2;

  padding: 26px 23px;
}

.ring-content p:not(.section-kicker),
.fun-content p:not(.section-kicker) {
  color: var(--brown-medium);

  font-size: 16px;
  line-height: 1.78;
}

.ring-content blockquote {
  margin: 22px 0 0;
  padding: 14px 0 14px 18px;

  border-left: 3px solid var(--leaf);

  color: var(--pink-dark);

  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
}

/* =====================================================
   GALLERY
===================================================== */

.gallery-section {
  background:
    linear-gradient(180deg, #ffffff, rgba(223, 242, 255, 0.56));
}

.gallery-wrapper {
  position: relative;

  width: min(100%, 620px);
  margin: 0 auto;
}

.gallery-wrapper::before,
.gallery-wrapper::after {
  content: "";
  position: absolute;
  z-index: 0;

  width: 110px;
  height: 34px;

  border: 2px solid rgba(87, 155, 200, 0.2);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;

  pointer-events: none;
}

.gallery-wrapper::before {
  top: -18px;
  left: -14px;
}

.gallery-wrapper::after {
  right: -12px;
  bottom: -16px;
}

.gallery-track {
  position: relative;
  z-index: 1;

  min-height: 500px;

  overflow: hidden;

  border-radius: var(--radius-large);

  background:
    linear-gradient(145deg, var(--cream-dark), rgba(255, 255, 255, 0.82));

  box-shadow: var(--shadow-medium);

  touch-action: pan-y;
}

.gallery-slide {
  position: absolute;
  inset: 0;

  margin: 0;

  opacity: 0;
  transform: translateX(18px) scale(0.98);
  pointer-events: none;

  transition: 0.5s ease;
}

.gallery-slide.active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.gallery-slide img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  cursor: zoom-in;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 4;

  display: grid;
  place-items: center;

  width: 42px;
  height: 42px;

  border-radius: 50%;

  color: white;
  background: rgba(32, 76, 103, 0.68);

  font-family: Arial, sans-serif;
  font-size: 29px;

  transform: translateY(-50%);

  backdrop-filter: blur(6px);
}

.gallery-prev {
  left: 12px;
}

.gallery-next {
  right: 12px;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 7px;

  margin-top: 17px;
}

.gallery-dot {
  width: 8px;
  height: 8px;

  padding: 0;

  border-radius: 50%;

  background: var(--pink-medium);

  transition: 0.25s ease;
}

.gallery-dot.active {
  width: 25px;

  border-radius: 999px;

  background: var(--pink-dark);
}

/* =====================================================
   FUN SECTION
===================================================== */

.fun-section {
  background:
    linear-gradient(180deg, rgba(246, 251, 253, 0.96), rgba(223, 242, 255, 0.66));
}

.reason-box {
  min-height: 105px;
  margin-top: 20px;
  padding: 16px;

  border: 1px dashed rgba(39, 102, 135, 0.36);
  border-radius: var(--radius-medium);

  background:
    linear-gradient(145deg, rgba(223, 242, 255, 0.68), rgba(255, 248, 241, 0.58));
}

.reason-box span {
  color: var(--pink-dark);

  font-size: 23px;
}

.reason-box p {
  margin: 7px 0 0 !important;

  color: var(--pink-dark) !important;

  font-style: italic;
}

.reason-box.pop {
  animation: popReason 0.42s ease;
}

@keyframes popReason {
  0% {
    transform: scale(0.97);
  }

  55% {
    transform: scale(1.025);
  }

  100% {
    transform: scale(1);
  }
}

/* =====================================================
   LETTER
===================================================== */

.letter-section {
  background:
    linear-gradient(180deg, rgba(232, 244, 248, 0.62), rgba(246, 251, 253, 0.92)),
    repeating-linear-gradient(135deg, rgba(87, 155, 200, 0.05) 0 1px, transparent 1px 22px),
    var(--cream);
}

.letter-paper {
  position: relative;

  padding: 28px 23px;

  border: 1px solid rgba(87, 155, 200, 0.18);
  border-radius: var(--radius-large);

  background:
    linear-gradient(rgba(255, 255, 255, 0.86), rgba(248, 253, 255, 0.86)),
    repeating-linear-gradient(
      transparent,
      transparent 32px,
      rgba(87, 155, 200, 0.13) 33px
    );

  box-shadow: var(--shadow-medium);
}

.letter-paper::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 20px;

  width: 58px;
  height: 18px;

  border: 2px solid rgba(87, 155, 200, 0.18);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
}

.letter-paper p {
  color: var(--brown-medium);

  font-size: 16px;
  line-height: 1.9;
}

.letter-paper p:first-child {
  margin-top: 0;

  color: var(--brown-dark);

  font-size: 21px;
}

.letter-signature {
  margin-top: 28px;

  text-align: right;
}

.letter-signature p {
  margin-bottom: 5px;

  font-size: 15px;
  font-style: italic;
}

.letter-signature strong {
  color: var(--pink-dark);

  font-size: 26px;
  font-style: italic;
  font-weight: 500;
}

/* =====================================================
   CLOSING
===================================================== */

.closing-section {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 92svh;
  padding: 60px 20px;

  overflow: hidden;

  text-align: center;
}

.closing-overlay {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(180deg, rgba(10, 38, 58, 0.32), rgba(9, 31, 46, 0.78)),
    linear-gradient(90deg, rgba(39, 102, 135, 0.32), rgba(239, 183, 163, 0.08), rgba(16, 54, 75, 0.34));
}

.closing-content {
  position: relative;
  z-index: 2;

  width: min(100%, 700px);
}

.light-kicker {
  color: #c9edff;
}

.closing-content h2 {
  color: white;
}

.closing-content h2 span {
  display: block;

  margin-top: 5px;

  color: #c9edff;

  font-style: italic;
}

.closing-content p:not(.section-kicker) {
  max-width: 620px;
  margin: 20px auto 0;

  color: rgba(255, 255, 255, 0.86);

  font-size: 17px;
  line-height: 1.78;
}

.closing-love {
  margin-top: 23px;

  color: #c9edff;

  font-size: 62px;
  line-height: 1;

  animation: heartbeat 1.8s ease-in-out infinite;
}

.closing-final-text {
  font-style: italic;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.14);
  }
}

/* =====================================================
   REVEAL ON SCROLL
===================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);

  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   FLOATING HEARTS
===================================================== */

.floating-heart {
  position: fixed;
  bottom: -40px;
  z-index: 9998;

  color: rgba(87, 155, 200, 0.42);

  font-family: Arial, sans-serif;

  pointer-events: none;

  animation: floatingHeart linear forwards;
}

@keyframes floatingHeart {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }

  15% {
    opacity: 1;
  }

  85% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: translateY(-110svh) rotate(180deg);
  }
}

/* =====================================================
   LIGHTBOX
===================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 18px;

  background: rgba(8, 28, 41, 0.88);

  backdrop-filter: blur(9px);
}

.lightbox.show {
  display: flex;
}

.lightbox img {
  width: auto;
  max-width: 100%;
  max-height: 88svh;

  border-radius: 20px;

  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.38);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;

  display: grid;
  place-items: center;

  width: 46px;
  height: 46px;

  border-radius: 50%;

  color: white;
  background: rgba(255, 255, 255, 0.14);

  font-family: Arial, sans-serif;
  font-size: 30px;
}

/* =====================================================
   TABLET AND DESKTOP
===================================================== */

@media (min-width: 760px) {

  .section {
    padding: 105px 28px;
  }

  .opening-content h1 {
    font-size: 76px;
  }

  .opening-content {
    width: min(100%, 470px);
  }

  .hero-content h2 {
    font-size: 74px;
  }

  .section-heading h2,
  .ring-content h2,
  .fun-content h2,
  .closing-content h2 {
    font-size: 56px;
  }

  .message-card {
    padding: 34px;
  }

  .timeline-item {
    display: grid;
    grid-template-columns: 1fr 1fr;

    min-height: 390px;
  }

  .timeline-item.reverse .timeline-image-wrapper {
    order: 2;
  }

  .timeline-item.reverse .timeline-content {
    order: 1;
  }

  .timeline-image-wrapper {
    height: auto;
    min-height: 390px;
  }

  .timeline-content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 34px;
  }

  .ring-card,
  .fun-card {
    display: grid;
    grid-template-columns: 1fr 1fr;

    min-height: 520px;
  }

  .ring-image-wrapper,
  .fun-image-wrapper {
    min-height: 520px;
  }

  .ring-content,
  .fun-content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 42px;
  }

  .fun-image-wrapper {
    order: 2;
  }

  .fun-content {
    order: 1;
  }

  .letter-paper {
    padding: 42px;
  }

  .gallery-track {
    min-height: 680px;
  }
}

/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 520px) {

  .opening-capybara {
    right: -16px;
    bottom: 8%;

    --capy-scale: 0.72;

    opacity: 0.62;
  }

  .opening-decoration {
    opacity: 0.18;
  }

  .hero-date::before,
  .hero-date::after {
    display: none;
  }

  .hero-watermark {
    top: 10%;
    right: -78px;

    width: 250px;
    opacity: 0.2;
  }

  .gallery-wrapper::before,
  .gallery-wrapper::after {
    display: none;
  }
}

@media (max-width: 390px) {

  .opening-content h1 {
    font-size: 36px;
    letter-spacing: 0;
    line-height: 1.06;
  }

  .opening-small-text {
    max-width: 290px;
    letter-spacing: 1.1px;
  }

  .opening-description {
    max-width: 310px;
  }

  .hero-content h2 {
    font-size: 40px;
  }

  .gallery-track {
    min-height: 440px;
  }

  .timeline-image-wrapper {
    height: 235px;
  }

  .ring-image-wrapper,
  .fun-image-wrapper {
    min-height: 285px;
  }
}

.scroll-button {
  padding: 10px 14px;

  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;

  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
}

.capybara-float {
  position: absolute;
  z-index: 4;

  --capy-scale: 1;

  width: 124px;
  height: 92px;

  pointer-events: none;
  animation: capybaraBob 4.8s ease-in-out infinite;
}

.capybara-face {
  position: absolute;
  left: 18px;
  bottom: 28px;

  width: 82px;
  height: 58px;

  border-radius: 46% 54% 42% 48%;

  background:
    linear-gradient(145deg, var(--capybara-light), var(--capybara));

  box-shadow:
    inset -10px -9px 0 rgba(85, 58, 38, 0.1),
    0 12px 22px rgba(39, 102, 135, 0.12);
}

.capybara-ear {
  position: absolute;
  bottom: 76px;

  width: 20px;
  height: 18px;

  border-radius: 50% 50% 42% 42%;

  background: var(--capybara);
}

.capybara-ear-left {
  left: 27px;
  transform: rotate(-18deg);
}

.capybara-ear-right {
  left: 71px;
  transform: rotate(18deg);
}

.capybara-eye {
  position: absolute;
  top: 21px;

  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: #2a241f;
}

.capybara-eye-left {
  left: 23px;
}

.capybara-eye-right {
  right: 23px;
}

.capybara-nose {
  position: absolute;
  left: 50%;
  bottom: 13px;

  width: 28px;
  height: 16px;

  border-radius: 999px;

  background: rgba(96, 64, 43, 0.22);
  transform: translateX(-50%);
}

.capybara-nose::before,
.capybara-nose::after {
  content: "";
  position: absolute;
  top: 6px;

  width: 4px;
  height: 3px;

  border-radius: 50%;

  background: #3b2b22;
}

.capybara-nose::before {
  left: 8px;
}

.capybara-nose::after {
  right: 8px;
}

.capybara-ripple {
  position: absolute;
  left: 4px;
  right: 0;
  bottom: 8px;

  height: 22px;

  border: 2px solid rgba(87, 155, 200, 0.34);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;

  background: rgba(159, 208, 236, 0.18);
}

.opening-capybara {
  right: max(18px, 9vw);
  bottom: 20%;
}

@keyframes capybaraBob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg) scale(var(--capy-scale));
  }

  50% {
    transform: translateY(-10px) rotate(1deg) scale(var(--capy-scale));
  }
}
