/* Core Styling System */
:root {
  /* Pastel Palette */
  --color-offwhite: #fdfbf7;
  --color-blush: #fdf4f5;
  --color-beige: #f5f0eb;
  --color-peach: #fae9e0;
  --color-text-dark: #3a3532;
  --color-text-light: #6a625d;

  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-offwhite);
  color: var(--color-text-dark);
  font-family: var(--font-sans);
  overflow-x: hidden;
  /* Prevent horizontal scroll from rotated elements */
  line-height: 1.6;
}

/* Typography Classes */
.font-serif {
  font-family: var(--font-serif);
}

.font-sans {
  font-family: var(--font-sans);
}

h1,
h2,
h3 {
  font-weight: 400;
  line-height: 1.2;
}

/* ---- Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.delay-1 {
  transition-delay: 0.3s;
}

/* ---- Section: Hero ---- */
.hero {
  position: relative;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  text-align: center;
  overflow: hidden;
  background-color: #ffffff;
}

.hero-bg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 65vh;
  background-image: url('./assets/aaira_family_hero.jpg');
  background-size: contain;
  background-position: center bottom;
  background-repeat: no-repeat;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 80%, var(--color-offwhite) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  letter-spacing: 4px;
  margin-bottom: 0.5rem;
  color: var(--color-text-dark);
}

.hero-content .date {
  font-weight: 300;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 2rem;
}

.hero-content .subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-style: italic;
  letter-spacing: 2px;
  color: var(--color-text-light);
}

@media (max-width: 768px) {
  .hero {
    height: 85vh;
    /* Completely fixes Safari UI toolbar cropping */
    padding-top: 30vh;
    /* Extensively lowered the title closing the gap */
  }

  .hero-bg {
    height: 45vh;
    /* Safely anchors the image covering the bottom space */
    background-size: contain;
    background-position: center bottom;
  }
}

/* ---- Section: Story Moments ---- */
.story {
  padding: 10rem 5vw;
  background-color: var(--color-offwhite);
  display: flex;
  flex-direction: column;
  gap: 12rem;
}

.story-moment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6rem;
  max-width: 1100px;
  margin: 0 auto;
}

.story-moment.reverse {
  flex-direction: row-reverse;
}

.story-text {
  flex: 1;
  max-width: 500px;
}

.story-text.text-left {
  text-align: left;
}

.story-text.text-right {
  text-align: right;
}

.story-text h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.35;
  color: var(--color-text-dark);
  margin-bottom: 2rem;
}

.story-image {
  flex: 1;
  max-width: 550px;
}

.story-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(106, 98, 93, 0.08);
  /* Soft shadow */
  filter: sepia(0.04) contrast(0.95);
  /* Dreamy treatment */
  display: block;
}

@media (max-width: 850px) {

  .story-moment,
  .story-moment.reverse {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  .story-text.text-left,
  .story-text.text-right {
    text-align: center;
  }
}

/* ---- Section: Dreamy Gallery ---- */
.gallery {
  padding: 12rem 5vw;
  background-color: var(--color-beige);
  overflow: hidden;
  position: relative;
}

.gallery-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
  padding: 4rem 0;
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-card {
  position: relative;
  width: clamp(260px, 40vw, 420px);
  border-radius: 12px;
  box-shadow: 0 40px 80px rgba(106, 98, 93, 0.12);
  background: #fff;
  padding: 18px 18px 55px 18px;

  --parallax-y: 0px;
  transform: rotate(var(--rot)) translateY(calc(var(--ty, 0px) + var(--parallax-y)));
  transition: transform 0.1s linear, box-shadow 0.4s ease;
  z-index: 1;
}

.gallery-card:hover {
  box-shadow: 0 45px 90px rgba(106, 98, 93, 0.18);
  z-index: 10;
}

.gallery-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.card-1 {
  --rot: -4deg;
  --ty: 20px;
}

.card-2 {
  --rot: 3deg;
  --ty: -30px;
}

.card-3 {
  --rot: -2deg;
  --ty: 40px;
}

.card-4 {
  --rot: 5deg;
  --ty: 10px;
}

@media (max-width: 850px) {
  .gallery-container {
    flex-direction: column;
    gap: 4rem;
  }

  .gallery-card {
    --ty: 0px !important;
  }
}

/* ---- Section: Birth Details ---- */
.birth-details {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(2rem, 6vw, 6rem);
  padding: 6rem 5vw;
  background-color: var(--color-offwhite);
  border-bottom: 1px solid rgba(106, 98, 93, 0.05);
}

.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-text-light);
  margin-bottom: 0.8rem;
}

.detail-value {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--color-text-dark);
}

/* ---- Section: Little Things We Love ---- */
.little-things {
  padding: 12rem 5vw;
  background-color: var(--color-offwhite);
}

.little-things-container h3 {
  text-align: center;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--color-text-dark);
  margin-bottom: 5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background-color: #ffffff;
  padding: 3.5rem 3rem;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(106, 98, 93, 0.04);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
  border: 1px solid rgba(106, 98, 93, 0.03);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 55px rgba(106, 98, 93, 0.08);
  /* Premium lift effect */
}

/* Subtle pink glowing edge on hover */
.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #fcaec3, #dbaeb8);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.feature-card h4 {
  font-size: 1.5rem;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
}

.feature-card p {
  font-size: 1rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ---- Section: Milestones ---- */
.milestones {
  padding: 10rem 5vw;
  background-color: var(--color-offwhite);
  display: flex;
  justify-content: center;
}

.milestones-container {
  max-width: 600px;
  width: 100%;
}

.section-pre {
  text-align: center;
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #dbaeb8;
  margin-bottom: 0.5rem;
}

.milestones-container h3 {
  text-align: center;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--color-text-dark);
  margin-bottom: 5rem;
}

.timeline {
  position: relative;
  padding-left: 2.5rem;
  border-left: 1px solid rgba(106, 98, 93, 0.15);
}

.timeline-item {
  position: relative;
  margin-bottom: 4.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -4rem;
  /* center on border */
  top: -0.2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.dot-pink {
  background-color: #fcaec3;
}

.dot-green {
  background-color: #aecd9a;
}

.dot-purple {
  background-color: #e5d8ec;
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #aaa09b;
  margin-bottom: 0.4rem;
}

.timeline-title {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--color-text-dark);
  margin-bottom: 0.6rem;
}

.timeline-text {
  font-size: 1rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.timeline-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.4rem 1rem;
  border-radius: 20px;
}

.tag-pink {
  background-color: #f7d5de;
  color: #b86077;
}

.tag-green {
  background-color: #d1ebd8;
  color: #75a47e;
}

.tag-purple {
  background-color: #f2eaff;
  color: #9c7bba;
}

/* ---- Section: Quiet Moment (Dark) ---- */
.quiet-moment {
  position: relative;
  padding: 12rem 5vw;
  background-color: #2a2522;
  /* Soft rich dark brown/black */
  text-align: center;
  color: var(--color-offwhite);
  overflow: hidden;
}

.quiet-moment h3 {
  position: relative;
  z-index: 2;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-style: italic;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
  color: #fae9e0;
  /* Peach tone for contrast */
}

/* Additional Delays */
.delay-2 {
  transition-delay: 0.6s;
}

.delay-3 {
  transition-delay: 0.9s;
}

/* ---- Section: Letter ---- */
.letter {
  padding: 15rem 5vw;
  background-color: var(--color-offwhite);
  display: flex;
  justify-content: center;
}

.letter-content {
  max-width: 65ch;
  width: 100%;
}

.letter-intro {
  font-size: 0.85rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 5rem;
  text-align: center;
}

.letter-content p {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  line-height: 1.8;
  margin-bottom: 1.3rem;
  color: var(--color-text-dark);
}

.letter-signoff {
  margin-top: 5rem;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-style: italic;
  text-align: right;
}

/* ---- Section: Ending ---- */
.ending {
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, var(--color-offwhite) 0%, var(--color-blush) 100%);
}

.ending-text p {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-style: italic;
  color: var(--color-text-light);
  opacity: 0.7;
}

/* ---- Navigation ---- */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 2rem 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.nav-logo {
  font-size: 1.5rem;
  color: var(--color-text-dark);
  text-decoration: none;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-dark);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
}

/* ---- Hamburger Menu ---- */
.burger-menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
  /* Above slide-out menu */
}

.burger-menu span {
  width: 25px;
  height: 2px;
  background-color: var(--color-text-dark);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .burger-menu {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background-color: #ffffff;
    flex-direction: column;
    padding-top: 8rem;
    padding-left: 2.5rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    gap: 2.5rem;
    display: flex;
  }

  .nav-links.nav-active {
    right: 0;
  }

  .burger-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .burger-active span:nth-child(2) {
    opacity: 0;
  }

  .burger-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* ---- Section: The Letter Page ---- */
.letter-body {
  background-color: var(--color-blush);
  /* Replaced discordant pink with global soft blush */
}

.letter-page {
  padding: 8rem 5vw 5rem;
  min-height: 100vh;
}

.letter-header {
  text-align: center;
  margin-bottom: 2rem;
}

.font-cursive {
  font-family: 'Great Vibes', cursive;
}

.letter-pre {
  color: #dbaeb8;
  /* Perfect match with "Her story so far" */
  font-size: 2.5rem;
  margin-bottom: -0.5rem;
}

.letter-header h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--color-text-dark);
}

.letter-container {
  display: flex;
  justify-content: center;
}

.letter-paper {
  background-color: #ffffff;
  max-width: 800px;
  width: 100%;
  border-radius: 20px;
  padding: 5rem 6rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
  position: relative;
}

.letter-paper::before {
  content: "”";
  position: absolute;
  top: 2rem;
  left: 3.5rem;
  font-family: var(--font-sans);
  font-size: 8rem;
  color: #fcaec3;
  /* Perfect match with hover gradient */
  line-height: 1;
  opacity: 0.15;
  /* Softened contrast to remain elegant */
  z-index: 0;
}

.letter-content {
  position: relative;
  z-index: 1;
}

.letter-content p {
  font-size: 1.15rem;
  color: var(--color-text-dark);
  line-height: 2.2;
  margin-bottom: 1.8rem;
  opacity: 0.9;
}

.letter-content .greeting {
  font-size: 1.5rem;
  font-style: italic;
  margin-bottom: 2rem;
}

.letter-content .letter-highlight {
  color: #dbaeb8;
  /* Aligned highlight color */
  font-style: italic;
}

.letter-signoff {
  font-style: italic;
  font-size: 1.25rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(106, 98, 93, 0.1);
  padding-top: 1.5rem;
}

@media (max-width: 768px) {
  .letter-paper {
    padding: 3rem 2rem;
  }
}

/* ---- Section: Inbox (Write to Aaira) ---- */
.inbox-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid rgba(106, 98, 93, 0.2);
  padding: 1rem 0;
  font-size: 1.1rem;
  color: var(--color-text-dark);
  transition: border-color 0.3s ease;
  outline: none;
  font-family: var(--font-sans);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #aaa09b;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: #dbaeb8;
}

.form-group textarea {
  resize: vertical;
  font-size: 1.3rem;
  line-height: 1.6;
  font-family: var(--font-serif);
}

.btn-submit {
  margin-top: 1.5rem;
  background-color: var(--color-text-dark);
  color: #fff;
  border: none;
  padding: 1.2rem 3rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 40px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  align-self: center;
}

.btn-submit:hover {
  background-color: #dbaeb8;
  transform: translateY(-2px);
}

/* ---- Hero Call-to-Action Buttons ---- */
.hero-btn {
  padding: 1rem 2.2rem;
  border-radius: 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.hero-btn.outline {
  border: 1px solid var(--color-text-dark);
  color: var(--color-text-dark);
  background: rgba(255, 255, 255, 0.2);
}

.hero-btn.outline:hover {
  background: var(--color-text-dark);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.hero-btn.solid {
  background: var(--color-text-dark);
  color: #fff;
  border: 1px solid var(--color-text-dark);
}

.hero-btn.solid:hover {
  background: transparent;
  color: var(--color-text-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ---- Section: Moments Grid (Instagram Style) ---- */
.moments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .moments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 1.5rem;
  }
}

@media (max-width: 550px) {
  .moments-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.moment-post {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
}

.moment-post:hover {
  transform: translateY(-4px);
}

/* Moment Fullscreen Modal */
.moment-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(42, 37, 34, 0.95);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.moment-modal.active {
  display: flex;
}

.moment-modal-content {
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.moment-modal-content::-webkit-scrollbar {
  display: none;
}

.moment-modal-media {
  width: 100%;
  height: 60vh;
  flex-shrink: 0;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 768px) {
  .moment-modal-media {
    height: 50vh;
  }
}

.moment-modal-media img,
.moment-modal-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.moment-modal-caption {
  padding: 1.5rem 2rem;
  background: #fff;
  color: var(--color-text-dark);
}

.close-moment-modal {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  z-index: 2001;
  transition: transform 0.3s ease;
}

.close-moment-modal:hover {
  transform: scale(1.1);
}

/* ---- Section: Letters Grid & Cards ---- */
.letters-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.letter-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 3rem 2.5rem 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.letter-card::before {
  content: "”";
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-family: var(--font-sans);
  font-size: 5rem;
  color: #fcaec3;
  line-height: 1;
  opacity: 0.15;
  z-index: 0;
}

.letter-card h4 {
  font-size: 1.5rem;
  color: var(--color-text-dark);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.letter-excerpt {
  font-size: 1rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

.read-more {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #dbaeb8;
  font-weight: 600;
  transition: color 0.3s ease;
  margin-top: auto;
}

.letter-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.letter-card:hover .read-more {
  color: var(--color-text-dark);
}

/* ---- Section: Letter Modal ---- */
.letter-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.letter-modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(253, 251, 247, 0.9);
  backdrop-filter: blur(8px);
}

.letter-modal .modal-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background-color: #ffffff;
  padding: 5rem 6rem;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);

  /* Scrollbar hiding for elegance */
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.letter-modal .modal-content::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .letter-modal .modal-content {
    padding: 3rem 2rem;
  }
}

.letter-modal.active .modal-content {
  transform: translateY(0) scale(1);
}

.close-modal {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-light);
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 2;
}

.close-modal:hover {
  color: var(--color-text-dark);
}