:root {
  --warm-white: #f9f5f0;
  --blush: #f8edeb;
  --rose: #e8cfc1;
  --champagne: #d8b4a0;
  --cocoa: #3e3232;
  --serif: "Cormorant Garamond", serif;
  --script: "Dancing Script", cursive;
  --body: "Poppins", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--cocoa);
  font-family: var(--body);
  background: radial-gradient(circle at top left, #fff 0%, var(--warm-white) 35%, var(--blush) 100%);
}

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

button {
  font: inherit;
}

.glass {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 70px rgba(62, 50, 50, 0.12);
}

.navbar {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 50;
  width: min(1120px, 92%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-radius: 999px;
  transform: translateX(-50%);
}

.logo {
  font-family: var(--script);
  font-size: 30px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
  font-weight: 500;
}

.nav-links a {
  opacity: 0.78;
  transition: 0.3s;
}

.nav-links a:hover {
  color: #9f6a59;
  opacity: 1;
}

.cursor-glow {
  position: fixed;
  z-index: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(216, 180, 160, 0.28), transparent 65%);
  transform: translate(-50%, -50%);
}

.floating-bg::before,
.floating-bg::after {
  content: "✦ ♥ ✧";
  position: fixed;
  z-index: 0;
  color: rgba(216, 180, 160, 0.35);
  font-size: 34px;
  animation: float 8s infinite ease-in-out;
}

.floating-bg::before {
  top: 18%;
  left: 7%;
}

.floating-bg::after {
  right: 8%;
  bottom: 18%;
  animation-delay: 2s;
}

.hero,
.page-section {
  min-height: 100vh;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  padding: 120px 9% 70px;
  background: linear-gradient(120deg, rgba(249, 245, 240, 0.78), rgba(248, 237, 235, 0.65)), var(--hero-image) center/cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.55), transparent 35%);
}

.hero-content,
.countdown-card {
  position: relative;
  z-index: 2;
}

.script-text {
  margin-bottom: 8px;
  color: #a36f5c;
  font-family: var(--script);
  font-size: 30px;
}

.hero h1,
.sub-hero h1,
.final-page h1,
.cake-page h1 {
  font-family: var(--serif);
  font-size: clamp(62px, 9vw, 128px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -3px;
}

.hero h1 span {
  color: #8f5f51;
  font-style: italic;
}

.hero-desc {
  max-width: 560px;
  margin: 28px 0;
  font-size: 18px;
  line-height: 1.8;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.3s;
}

.primary {
  color: #fff;
  background: var(--cocoa);
  box-shadow: 0 20px 50px rgba(62, 50, 50, 0.22);
}

.ghost {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(62, 50, 50, 0.1);
}

.btn:hover,
.cut-cake-btn:hover {
  transform: translateY(-4px);
}

.countdown-card {
  max-width: 420px;
  padding: 28px;
  border-radius: 32px;
}

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

.countdown div {
  padding: 18px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 22px;
}

.countdown strong {
  font-family: var(--serif);
  font-size: 36px;
}

.countdown span {
  display: block;
  font-size: 12px;
}

.music-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  width: 56px;
  height: 56px;
  color: #fff;
  font-size: 24px;
  background: var(--cocoa);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 18px 42px rgba(62, 50, 50, 0.25);
  cursor: pointer;
}

.sub-hero {
  padding: 150px 8% 55px;
  text-align: center;
}

.sub-hero p {
  max-width: 680px;
  margin: 10px auto 24px;
}

.masonry {
  columns: 3 260px;
  column-gap: 24px;
  padding: 30px 8%;
}

.polaroid {
  break-inside: avoid;
  margin-bottom: 24px;
  padding: 14px 14px 22px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 55px rgba(62, 50, 50, 0.14);
  transform: rotate(-1deg);
  transition: 0.35s;
}

.polaroid:nth-child(even) {
  transform: rotate(1.5deg);
}

.polaroid:hover {
  transform: translateY(-8px) rotate(0);
}

.photo {
  height: 260px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--rose), var(--champagne)) center/cover;
}
.photo video {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}

.tall .photo {
  height: 390px;
}

.wide .photo {
  height: 230px;
}

.polaroid p {
  margin-top: 12px;
  font-family: var(--script);
  font-size: 25px;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  padding: 20px 8% 90px;
}

.reason-card {
  height: 190px;
  perspective: 900px;
  cursor: pointer;
}

.reason-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: 0.7s;
  transform-style: preserve-3d;
}

.reason-card:hover .reason-inner,
.reason-card:focus-within .reason-inner {
  transform: rotateY(180deg);
}

.reason-front,
.reason-back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  border-radius: 28px;
  backface-visibility: hidden;
  box-shadow: 0 18px 45px rgba(62, 50, 50, 0.11);
}

.reason-front {
  background: rgba(255, 255, 255, 0.5);
}

.reason-front h3 {
  font-family: var(--serif);
  font-size: 42px;
}

.reason-back {
  color: #fff;
  background-position: center;
  background-size: cover;
  transform: rotateY(180deg);
  place-items: end center;
  padding: 24px 20px 22px;
}

.reason-back p {
  width: 100%;
  margin: 0;
  font-family: var(--script);
  font-size: 25px;
  line-height: 1.25;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.random-reason {
  max-width: 560px;
  margin: 22px auto 0;
  padding: 20px;
  border-radius: 28px;
}

.letter-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 50px;
  align-items: center;
  padding: 150px 9% 70px;
}

.envelope {
  position: relative;
  height: 260px;
  cursor: pointer;
}

.env-body {
  position: absolute;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 180px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--rose), #fff);
  box-shadow: 0 30px 70px rgba(62, 50, 50, 0.14);
}

.flap {
  position: absolute;
  top: 0;
  left: 8%;
  width: 84%;
  height: 160px;
  background: var(--champagne);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  transform-origin: top;
  transition: 0.7s;
}

.envelope.open .flap {
  transform: rotateX(180deg);
}

.letter-paper {
  min-height: 500px;
  padding: 46px;
  background: #fffaf5;
  border-radius: 34px;
  box-shadow: 0 30px 80px rgba(62, 50, 50, 0.16);
}

.letter-paper h1 {
  font-family: var(--serif);
  font-size: 58px;
}

.letter-paper p:last-child {
  font-size: 17px;
  line-height: 2;
}

.night {
  color: #fff;
  background: radial-gradient(circle at top, #453636 0%, #191317 70%);
}

.cake-page,
.final-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 150px 8% 70px;
  text-align: center;
}

.final-page {
  background: linear-gradient(rgba(25, 19, 23, 0.45), rgba(25, 19, 23, 0.86)), var(--final-image) center/cover;
}

.cake-page h1,
.final-page h1 {
  max-width: 900px;
}


.cake-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62vh;
  overflow: visible;
}

.cake-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 186, 0.34), transparent 68%);
  filter: blur(2px);
}

.cake-stage-text {
  position: relative;
  z-index: 8;
  margin: 18px auto 28px;
  max-width: 620px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  font-size: 14px;
}

.cake {
  position: relative;
  width: 390px;
  height: 330px;
  margin-bottom: 38px;
  overflow: visible;
}

.plate {
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 390px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  transform: translateX(-50%);
  box-shadow: 0 26px 45px rgba(0, 0, 0, 0.24);
}

.candles {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 7;
  display: flex;
  gap: 28px;
  transform: translateX(-50%);
  transition: 0.85s ease;
}

.candle {
  position: relative;
  display: block;
  width: 13px;
  height: 58px;
  margin-top: 24px;
  border-radius: 8px;
  background: repeating-linear-gradient(45deg, #fff 0 7px, #f7a7b5 7px 14px);
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.08);
}

.flame {
  position: absolute;
  top: -28px;
  left: 50%;
  width: 16px;
  height: 30px;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 50% 65%, #fff7a8 0 24%, #ffd166 25% 56%, #ff7b00 57% 100%);
  transform: translateX(-50%);
  box-shadow: 0 0 18px #ffb347, 0 0 36px rgba(255, 179, 71, 0.72);
  animation: flicker 0.8s infinite alternate;
  transform-origin: bottom center;
  transition: 0.45s ease;
}

.smoke {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0;
  filter: blur(3px);
  transform: translateX(-50%) scale(0.3);
}

.cake.blow .flame {
  opacity: 0;
  transform: translateX(-50%) translateY(12px) scale(0.1) rotate(18deg);
  box-shadow: none;
}

.cake.blow .smoke {
  animation: smokeUp 1.45s ease-out forwards;
}

.cake.blow .candle:nth-child(2) .smoke {
  animation-delay: 0.15s;
}

.cake.blow .candle:nth-child(3) .smoke {
  animation-delay: 0.3s;
}

.cake-top,
.cake-middle,
.cake-bottom,
.cake-slice {
  position: absolute;
  left: 50%;
  border-radius: 22px;
  transform: translateX(-50%);
  transition: 0.9s cubic-bezier(0.22, 0.82, 0.22, 1);
}

.cake-top,
.cake-middle,
.cake-bottom {
  z-index: 3;
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.cake-top::after,
.cake-middle::after,
.cake-bottom::after {
  content: "";
  position: absolute;
  inset: 11px 18px auto;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.cake-bottom {
  bottom: 24px;
  width: 330px;
  height: 92px;
  background: linear-gradient(135deg, #e8cfc1, #c8937a);
}

.cake-middle {
  bottom: 104px;
  width: 270px;
  height: 84px;
  background: linear-gradient(135deg, #f8edeb, #e7b7aa);
}

.cake-top {
  bottom: 176px;
  width: 210px;
  height: 74px;
  background: linear-gradient(135deg, #fff5f2, #f1c8bb);
}

.cut-line {
  position: absolute;
  left: 57%;
  bottom: 24px;
  z-index: 6;
  width: 3px;
  height: 228px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: rotate(10deg) scaleY(0);
  transform-origin: top;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.65);
}

.cake.knife-in .cut-line {
  opacity: 1;
  animation: cutTrace 0.75s ease-in-out forwards;
}

.cake-slice {
  z-index: 5;
  right: 20px;
  left: auto;
  bottom: 24px;
  width: 126px;
  height: 225px;
  border-radius: 18px 22px 20px 18px;
  background: linear-gradient(135deg, #fff5f2 0 30%, #f8edeb 30% 63%, #e8cfc1 63% 100%);
  clip-path: polygon(13% 0, 100% 13%, 78% 100%, 0 100%);
  opacity: 0;
  transform: translateX(-12px) rotate(0deg) scale(0.97);
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.25);
}

.cake-slice::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 62% 38%, rgba(195, 92, 92, 0.65) 0 4px, transparent 5px),
    radial-gradient(circle at 48% 72%, rgba(195, 92, 92, 0.55) 0 4px, transparent 5px);
}

.knife {
  position: absolute;
  top: 0;
  right: -170px;
  z-index: 9;
  width: 218px;
  height: 44px;
  opacity: 0;
  transform: translate(80px, -20px) rotate(-34deg);
  transform-origin: right center;
  transition: 1s cubic-bezier(0.22, 0.82, 0.22, 1);
}

.knife-blade {
  position: absolute;
  left: 0;
  top: 12px;
  width: 158px;
  height: 18px;
  border-radius: 999px 4px 4px 999px;
  background: linear-gradient(90deg, #ffffff, #d7d7d7 55%, #9e9e9e);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.knife-blade::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 120px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

.knife-handle {
  position: absolute;
  right: 0;
  top: 5px;
  width: 68px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #714948, #3e292d);
  box-shadow: inset 8px 0 10px rgba(255, 255, 255, 0.08), 0 12px 24px rgba(0, 0, 0, 0.28);
}

.cake.knife-in .knife {
  opacity: 1;
  transform: translate(-205px, 128px) rotate(-21deg);
}

.cake.sliced .knife {
  opacity: 0;
  transform: translate(-245px, 170px) rotate(-12deg);
}

.cake.sliced .cake-top,
.cake.sliced .cake-middle,
.cake.sliced .cake-bottom {
  clip-path: polygon(0 0, 62% 0, 52% 100%, 0 100%);
}

.cake.sliced .cake-slice {
  opacity: 1;
  transform: translate(78px, 34px) rotate(12deg) scale(1);
}

.cake.sliced .candles {
  transform: translateX(-83%) translateY(-4px) rotate(-5deg);
}

.cut-cake-btn {
  position: relative;
  z-index: 8;
  padding: 18px 40px;
  color: #3e3232;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.82);
  border: 0;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  transition: 0.4s;
}

.cut-cake-btn:hover {
  transform: translateY(-4px) scale(1.03);
}

.cut-cake-btn:disabled {
  cursor: default;
  opacity: 0.92;
  transform: none;
}

@keyframes smokeUp {
  0% { opacity: 0; transform: translateX(-50%) translateY(0) scale(0.35); }
  20% { opacity: 0.8; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-58px) scale(2.3); }
}

@keyframes cutTrace {
  0% { transform: rotate(10deg) scaleY(0); }
  100% { transform: rotate(10deg) scaleY(1); }
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.footer {
  padding: 35px;
  color: rgba(62, 50, 50, 0.68);
  text-align: center;
}

.night .footer {
  color: rgba(255, 255, 255, 0.65);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: reveal 0.8s forwards;
}

.delay-1 {
  animation-delay: 0.18s;
}

.delay-2 {
  animation-delay: 0.34s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float {
  50% {
    transform: translateY(-26px) rotate(8deg);
  }
}

@keyframes flicker {
  to {
    transform: scale(1.15) translateY(-2px);
    opacity: 0.84;
  }
}

@media (max-width: 900px) {
  .hero,
  .letter-page {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 145px;
  }

  .hero h1,
  .sub-hero h1,
  .final-page h1,
  .cake-page h1 {
    font-size: 64px;
  }

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

  .cake {
    transform: scale(0.86);
  }
}


/* =========================================================
   RESPONSIVE FIXES
   Added to make the birthday website work nicely on laptops,
   tablets, mobile phones, and very small screens.
   ========================================================= */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
}

img,
video,
canvas {
  max-width: 100%;
}

main,
header,
section,
footer,
.navbar {
  position: relative;
}

.hero-content,
.countdown-card,
.sub-hero,
.masonry,
.reason-grid,
.letter-page,
.cake-page,
.final-page,
.footer {
  z-index: 1;
}

.navbar {
  gap: 14px;
}

.nav-links {
  min-width: 0;
}

.nav-links a {
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions .btn,
.final-page .btn,
.sub-hero .btn {
  margin-right: 0;
}

.countdown-card {
  width: 100%;
  justify-self: center;
}

.masonry {
  width: 100%;
}

.photo {
  overflow: hidden;
  background-position: center;
  background-size: cover;
}

.reason-card:focus .reason-inner {
  transform: rotateY(180deg);
}

.letter-paper,
.random-reason,
.countdown-card,
.polaroid,
.reason-front,
.reason-back {
  overflow-wrap: anywhere;
}

/* Laptop / small desktop */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr 0.9fr;
    gap: 36px;
    padding-inline: 6%;
  }

  .letter-page {
    gap: 34px;
    padding-inline: 6%;
  }

  .cake-page,
  .final-page {
    padding-inline: 6%;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .navbar {
    top: 14px;
    width: min(720px, 94%);
    align-items: center;
  }

  .nav-links {
    display: flex;
    gap: 12px;
    max-width: 70%;
    overflow-x: auto;
    padding: 6px 2px 7px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
  }

  .hero,
  .letter-page {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 36px;
    min-height: auto;
    padding: 145px 6% 70px;
    background-position: center top;
  }

  .hero h1,
  .sub-hero h1,
  .final-page h1,
  .cake-page h1 {
    font-size: clamp(52px, 12vw, 82px);
    letter-spacing: -2px;
  }

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

  .sub-hero {
    padding: 135px 6% 45px;
  }

  .masonry {
    columns: 2 240px;
    padding-inline: 6%;
  }

  .reason-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    padding-inline: 6%;
  }

  .letter-page {
    min-height: auto;
    padding: 135px 6% 60px;
  }

  .envelope {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
  }

  .letter-paper {
    min-height: 360px;
  }

  .cake-page,
  .final-page {
    min-height: auto;
    padding: 135px 6% 60px;
  }

  .cake-section {
    min-height: 560px;
  }

  .cake {
    transform: scale(0.86);
    transform-origin: center top;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .glass {
    backdrop-filter: blur(16px);
  }

  .navbar {
    top: 10px;
    width: 94%;
    flex-direction: column;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 26px;
  }

  .logo {
    font-size: 28px;
    line-height: 1;
  }

  .nav-links {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    font-size: 12px;
  }

  .cursor-glow {
    display: none;
  }

  .floating-bg::before,
  .floating-bg::after {
    font-size: 24px;
    opacity: 0.65;
  }

  .hero {
    min-height: 100svh;
    padding: 150px 5% 46px;
    text-align: center;
  }

  .script-text {
    font-size: 25px;
  }

  .hero h1,
  .sub-hero h1,
  .final-page h1,
  .cake-page h1 {
    font-size: clamp(44px, 15vw, 62px);
    line-height: 0.92;
    letter-spacing: -1.4px;
  }

  .hero-desc {
    margin: 22px auto;
    font-size: 15px;
    line-height: 1.75;
  }

  .hero-actions {
    justify-content: center;
  }

  .btn {
    width: min(100%, 280px);
    padding: 13px 20px;
  }

  .countdown-card {
    padding: 20px;
    border-radius: 26px;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .countdown div {
    padding: 14px 8px;
    border-radius: 18px;
  }

  .countdown strong {
    font-size: 31px;
  }

  .music-btn {
    right: 18px;
    bottom: 18px;
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .sub-hero {
    padding: 145px 5% 35px;
  }

  .sub-hero p {
    font-size: 14px;
    line-height: 1.7;
  }

  .masonry {
    columns: 1;
    padding: 20px 5% 60px;
  }

  .polaroid {
    margin-bottom: 18px;
    border-radius: 22px;
    transform: none;
  }

  .polaroid:nth-child(even),
  .polaroid:hover {
    transform: none;
  }

  .photo,
  .wide .photo {
    height: 245px;
  }

  .tall .photo {
    height: 340px;
  }

  .reason-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 5% 65px;
  }

  .reason-card {
    height: 172px;
  }

  .reason-front,
  .reason-back {
    border-radius: 24px;
  }

  .reason-back p,
  .polaroid p {
    font-size: 23px;
  }

  .random-reason {
    margin-top: 16px;
    padding: 16px;
    font-size: 14px;
  }

  .letter-page {
    padding: 145px 5% 45px;
    gap: 26px;
  }

  .envelope {
    height: 220px;
  }

  .env-body {
    height: 150px;
  }

  .flap {
    height: 135px;
  }

  .letter-paper {
    min-height: 330px;
    padding: 28px 22px;
    border-radius: 28px;
  }

  .letter-paper p:last-child {
    font-size: 15px;
    line-height: 1.9;
  }

  .cake-page,
  .final-page {
    padding: 145px 5% 48px;
  }

  .final-page p,
  .cake-page p {
    font-size: 14px;
    line-height: 1.7;
  }

  .cake-section {
    min-height: 500px;
    width: 100%;
  }

  .cake-glow {
    width: 320px;
    height: 320px;
  }

  .cake-stage-text {
    width: min(100%, 330px);
    margin-bottom: 12px;
    padding: 12px 16px;
    white-space: normal;
  }

  .cake {
    margin-bottom: -10px;
    transform: scale(0.72);
    transform-origin: center top;
  }

  .cut-cake-btn {
    width: min(100%, 310px);
    padding: 15px 22px;
    font-size: 16px;
  }

  .footer {
    padding: 25px 18px;
    font-size: 13px;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .navbar {
    width: 96%;
    padding-inline: 10px;
  }

  .nav-links a {
    padding: 7px 10px;
  }

  .hero,
  .sub-hero,
  .letter-page,
  .cake-page,
  .final-page {
    padding-inline: 4%;
  }

  .hero h1,
  .sub-hero h1,
  .final-page h1,
  .cake-page h1 {
    font-size: clamp(39px, 14vw, 50px);
  }

  .script-text {
    font-size: 23px;
  }

  .photo,
  .wide .photo {
    height: 220px;
  }

  .tall .photo {
    height: 300px;
  }

  .countdown strong {
    font-size: 28px;
  }

  .cake-section {
    min-height: 470px;
  }

  .cake {
    transform: scale(0.64);
    margin-bottom: -48px;
  }
}

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