/* One responsive system for the entire celebration page. */
@media (max-width: 1200px) {
  .nav { gap: 16px; padding-inline: 3.5%; }
  .nav nav { gap: 16px; }
  .nav-cta { padding: 11px 16px; }
  .nav .logo { font-size: 25px; }
  .achievement { gap: 8px; padding-inline: 10px; }
  .achievement p { white-space: normal; }
  .footer { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 1024px) {
  html { scroll-padding-top: 86px; }
  body { font-size: 13px; }
  .wrap { width: 90%; }
  .section { padding-block: 44px; }
  h2 { font-size: clamp(25px, 3.8vw, 32px); letter-spacing: -.7px; }
  .eyebrow { font-size: 10px; letter-spacing: .26em; margin-bottom: 9px; }
  .button { min-height: 44px; font-size: 12px; padding: 11px 20px; }

  /* The header remains a single row, with a full-size touch menu. */
  .nav { height: 72px; gap: 10px; padding-inline: 5%; }
  .nav .logo { font-size: 25px; flex-shrink: 0; }
  .logo small { font-size: 8px; letter-spacing: .2em; }
  .nav-cta { margin-left: auto; font-size: 10px; padding: 9px 14px; min-height: 38px; gap: 5px; }
  .menu-toggle { display: grid; place-items: center; order: 3; width: 44px; height: 44px; padding: 0; flex-shrink: 0; border: 1px solid #dce4f5; border-radius: 11px; background: #f5f8ff; color: var(--navy); font-size: 25px; }
  .nav nav { display: none; position: absolute; inset: 72px 0 auto; padding: 18px 5%; background: #fffffff7; backdrop-filter: blur(16px); box-shadow: var(--shadow); border-bottom: 2px solid #f5c35d; }
  .nav nav.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
  .nav nav a { padding: 12px; font-size: 13px; border-radius: 8px; }
  .nav nav a.active { background: #edf3ff; }
  .nav nav a.active:after { display: none; }

  /* Sky, copy and foreground art form one continuous hero. */
  .hero { height: auto; min-height: 0; aspect-ratio: auto; display: block; overflow: hidden; padding: 36px 0 clamp(180px, 31vw, 300px); background: linear-gradient(#edf7ff85, #eef7ffbb 60%, #e9f4ff80), url('assets/hero.png') center / cover no-repeat; }
  .hero:before { content: ''; position: absolute; inset: auto 0 0; height: calc(100vw / 3); background: url('assets/hero.png') center / 100% 100% no-repeat; mask-image: linear-gradient(transparent 0%, #000 62%); pointer-events: none; z-index: 0; }
  .hero:after { content: ''; position: absolute; inset: auto 0 0; height: 2px; background: linear-gradient(90deg, transparent, #ffe08ab3, #d9901ab3, transparent); pointer-events: none; }
  .hero-content { width: min(670px, 90%); margin: 0 auto; padding: 0; z-index: 1; text-shadow: 0 1px 14px #fff9; }
  .hero h1 { font-size: clamp(58px, 9vw, 86px); letter-spacing: -2px; line-height: 1.12; }
  .hero .eyebrow { font-size: 10px; letter-spacing: .4em; margin-bottom: 7px; }
  .hero h2 { max-width: 440px; margin: 13px auto 0; font-size: 15px; line-height: 1.5; }
  .anniversary { font-size: clamp(23px, 3.8vw, 30px); letter-spacing: .15em; margin-top: 10px; }
  .hero-values { max-width: 430px; margin: 10px auto 19px; font-size: 11px; line-height: 1.8; }
  .hero-values i { padding-inline: 4px; }
  .hero .button { font-size: 12px; padding-inline: 24px; }
  .passion { display: none; }
  .event-title { margin-bottom: 27px; }
  .event-company { font-size: 9px; letter-spacing: .22em; }
  .event-celebrates { font-size: 9px; margin-top: 4px; }
  .event-name { font-size: clamp(58px, 9vw, 80px); margin-top: 9px; }
  .event-tagline { font-size: clamp(27px, 4vw, 34px); margin-top: 13px; }

  /* Cards sit on the journey backdrop rather than on a separate strip. */
  .journey { display: block; min-height: 0; padding-top: 0; padding-bottom: 48px; background: linear-gradient(#eff6ffbb, #f4f8fff2 35%, #f4f8ffdd), url('assets/journey.png') center bottom / cover no-repeat; }
  .journey .stats { position: relative; inset: auto; transform: none; margin: 0 auto 44px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .stat { min-width: 0; border: 1px solid #fff; border-top: 3px solid #f7c968; border-radius: 0 0 14px 14px; padding: 15px 7px; background: linear-gradient(145deg, #fff, #f4f7ffed); box-shadow: 0 7px 18px #0b1f5c0a; }
  .stat strong { font-size: 24px; }
  .stat h3 { font-size: 11px; line-height: 1.4; margin: 3px 0; }
  .stat p { font-size: 10px; line-height: 1.5; }
  .stat-icon { font-size: 26px; margin-bottom: 5px; }
  .section-head { width: 90%; margin: 0 auto 28px; padding: 0; }
  .section-head > p:last-child { font-size: 13px; line-height: 1.7; }
  .timeline { width: 90%; max-width: none; }
  .timeline article { padding-inline: 8px; }
  .timeline h3 { font-size: 12px; line-height: 1.45; }
  .timeline small { font-size: 11px; }
  .timeline p { font-size: 11px; line-height: 1.7; }
  .timeline .circle { width: 54px; height: 54px; }
  .plane { display: none; }

  /* The gold trophy and dark celebration artwork remain present on mobile. */
  .milestones { padding-bottom: 190px; }
  .milestones:after { inset: auto 0 0 auto; width: 600px; height: 200px; aspect-ratio: auto; background-size: 100% 100%; mask-image: linear-gradient(transparent, #000 30%); opacity: .95; }
  .milestones .section-head { width: 90%; margin: 0 auto 26px; text-align: left; }
  .milestones .achievement-row { width: 90%; max-width: none; margin: 0 auto; padding: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .achievement { display: block; border: 1px solid #ffffff26; border-radius: 12px; padding: 14px 8px; text-align: center; background: #ffffff0a; }
  .achievement:first-child { padding-left: 8px; }
  .achievement:last-child { border: 1px solid #ffffff26; }
  .achievement-icon { margin: 0 auto 10px; width: 37px; height: 37px; }
  .achievement strong { font-size: 24px; }
  .achievement p { font-size: 11px; margin-top: 5px; white-space: normal; line-height: 1.5; }

  .split-heading { align-items: flex-start; margin-bottom: 24px; }
  .split-heading h2 { font-size: 28px; }
  .split-heading p:last-child { font-size: 13px; margin-top: 10px; }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .photo { border-radius: 12px; box-shadow: var(--shadow); }
  .photo:after { opacity: 1; }
  .sample-note { font-size: 10px; margin-top: 13px; }


  form { display: grid; gap: 12px; max-width: none; margin-top: 22px; }
  input, textarea { font-size: 16px; margin: 0; padding: 13px 14px; border-radius: 9px; background: #fafcff; }
  textarea { min-height: 130px; padding-bottom: 13px; }
  form .button { position: static; min-height: 46px; width: 100%; font-size: 13px; padding: 12px; }

  /* Keep the complete cake vertically visible, inside one night-sky section. */
  .celebration { display: block; aspect-ratio: auto; min-height: 0; padding: 38px 0; overflow: visible; background: linear-gradient(#0b15482b,#0b154870), url('assets/celebration-stage.png') center bottom / auto 100% no-repeat, #0b1548; }
  .celebration-layout { width: 90%; min-height: 0; display: grid; grid-template-columns: 1fr; gap: 0; }
  .celebration-layout > div:first-child, .thank-you { max-width: 600px; padding: 0; margin-inline: auto; }
  .celebration .eyebrow { font-size: 10px; }
  .celebration h2 { font-size: 30px; line-height: 1.3; }
  .celebration p { font-size: 13px; line-height: 1.7; }
  .celebration .cake-space { position: relative; width: min(470px, 96%); margin: 14px auto 6px; min-height: 0; aspect-ratio: 1.12 / 1; overflow: visible; }
  .celebration-art { display: block; position: absolute; inset: auto auto -2px 50%; transform: translateX(-50%); width: 100%; max-width: 100%; height: auto; max-height: 110%; object-fit: contain; object-position: center bottom; }
  .thank-you { background: none; }
  .thank-you h2 { font-size: 27px; color: #ffd16b; }
  .thank-you h2 br { display: none; }
  .thank-you p { max-width: 460px; margin-bottom: 20px; }
  .thank-you .button { min-height: 46px; font-size: 12px; padding-inline: 20px; white-space: normal; }

  .footer { gap: 22px; padding-block: 30px; text-align: center; }
  .footer .logo { font-size: 26px; }
  .footer p { order: 4; width: 100%; font-size: 11px; white-space: normal; }
  .footer-links { width: 100%; justify-content: center; gap: 8px 18px; font-size: 12px; }
  .footer-links a, .footer-links button { min-height: 38px; display: inline-flex; align-items: center; }
  .share-button { min-height: 44px; padding: 10px 20px; font-size: 12px; }
  dialog { max-width: 92vw; padding: 18px; }
  .dialog-close { width: 44px; height: 44px; top: 0; right: 0; }
  #toast { max-width: calc(100vw - 32px); width: max-content; font-size: 12px; text-align: center; }
}

@media (max-width: 640px) {
  .section { padding-block: 36px; }
  .nav .logo { font-size: 23px; }
  .nav-cta { font-size: 9px; padding-inline: 10px; }
  .hero { padding-top: 28px; padding-bottom: 168px; }
  .hero-content { width: 90%; }
  .event-company { font-size: 8px; letter-spacing: .2em; }
  .event-celebrates { font-size: 8px; gap: 8px; }
  .event-title { margin-bottom: 23px; }
  .event-name { font-size: clamp(48px, 12.7vw, 72px); }
  .event-tagline { font-size: clamp(25px, 6.7vw, 32px); }
  .hero h1 { font-size: clamp(49px, 12.8vw, 72px); letter-spacing: -1.8px; }
  .hero h2 { font-size: 13px; max-width: 310px; }
  .hero .eyebrow { font-size: 9px; }
  .anniversary { font-size: clamp(22px, 5.6vw, 29px); }
  .hero-values { font-size: 10px; max-width: 330px; }
  .hero-values i { padding-inline: 2px; }
  .hero .button { font-size: 11px; }

  .journey { padding-top: 0; }
  .journey .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 36px; }
  .stat { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 9px; align-content: center; text-align: left; border-radius: 12px; padding: 13px 11px; }
  .stat-icon { grid-column: 1; grid-row: 1 / 4; align-self: center; margin: 0; }
  .stat strong { font-size: 24px; line-height: 1.25; }
  .stat h3 { font-size: 10px; line-height: 1.4; margin: 4px 0; }
  .stat p { font-size: 9px; line-height: 1.5; }
  .stat:last-child { grid-column: 1 / -1; grid-template-columns: 32px auto 1fr; gap: 0 13px; padding-block: 14px; }
  .stat:last-child .stat-icon { grid-row: 1 / 3; }
  .stat:last-child strong { grid-row: 1 / 3; align-self: center; }
  .stat:last-child h3, .stat:last-child p { grid-column: 3; }
  .section-head h2 { font-size: 27px; }
  .timeline { display: flex; flex-direction: column; max-width: 520px; gap: 16px; }
  .timeline:before { left: 25px; right: auto; top: 25px; bottom: 40px; width: 2px; height: auto; background: linear-gradient(#2089fa, #8154e4); }
  .timeline article { text-align: left; padding: 14px 14px 14px 72px; min-height: 114px; background: linear-gradient(90deg, transparent 55px, #ffffffc9 55px); border-radius: 12px; }
  .timeline .circle { position: absolute; left: 0; top: 18px; width: 52px; height: 52px; margin: 0; }
  .timeline small { color: #466dc5; font-weight: 600; }
  .timeline h3 { font-size: 14px; margin: 4px 0 6px; }
  .timeline p { max-width: none; margin: 0; font-size: 12px; line-height: 1.65; }

  .milestones { padding-bottom: 170px; }
  .milestones:after { height: 180px; width: 540px; }
  .milestones .section-head { margin-bottom: 22px; }
  .milestones .achievement-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .achievement { display: flex; align-items: center; gap: 10px; padding: 14px; text-align: left; }
  .achievement:first-child { padding-left: 14px; }
  .achievement-icon { margin: 0; width: 35px; height: 35px; }
  .achievement strong { font-size: 23px; }
  .achievement p { font-size: 10px; margin: 3px 0 0; }
  .achievement:last-child { grid-column: 1 / -1; }
  .split-heading { display: flex; flex-direction: column; gap: 18px; }
  .split-heading h2 { font-size: 27px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo { aspect-ratio: 1.2 / 1; }
  .celebration { padding-top: 36px; }
  .celebration h2 { font-size: 28px; }
  .celebration .cake-space { aspect-ratio: 1.06 / 1; margin-block: 10px; }
  .thank-you h2 { font-size: 25px; }
  .thank-you .button { font-size: 11px; }
  .footer-links a:last-child { width: 100%; justify-content: center; }
}

@media (max-width: 359px) {
  .nav { gap: 6px; }
  .nav .logo { font-size: 20px; }
  .nav-cta { max-width: 108px; font-size: 8px; padding-inline: 7px; }
  .menu-toggle { width: 38px; height: 42px; }
  .hero h1 { font-size: 46px; }
  .event-name { font-size: 45px; }
  .event-company { font-size: 7px; }
  .stat { grid-template-columns: 26px minmax(0, 1fr); column-gap: 6px; padding-inline: 9px; }
  .stat-icon svg { width: 24px; height: 24px; }
  .stat strong { font-size: 22px; }
  .achievement { padding-inline: 10px; gap: 7px; }
  .achievement:first-child { padding-left: 10px; }
  .achievement-icon { width: 30px; height: 30px; }
  .achievement strong { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition: none !important; }
}

/* Preserve the premium Foundation Day typography hierarchy at smaller widths. */
@media (max-width: 900px) {
  .foundation-page .event-title { max-width: 650px; margin-bottom: 13px; }
  .foundation-page .event-name { font-size: clamp(46px, 8.2vw, 72px); }
  .foundation-page .event-tagline { font-size: clamp(29px, 4.6vw, 42px); }
  .foundation-page .hero h1 { font-size: clamp(64px, 10vw, 92px); }
  .foundation-page .anniversary { font-size: clamp(21px, 3.4vw, 29px); letter-spacing: .25em; }
}

@media (max-width: 540px) {
  .foundation-page .event-title { max-width: 100%; margin-bottom: 11px; }
  .foundation-page .event-company { font-size: 8px; letter-spacing: .32em; }
  .foundation-page .event-celebrates { gap: 8px; font-size: 8px; letter-spacing: .31em; }
  .foundation-page .event-celebrates:before, .foundation-page .event-celebrates:after { width: 25px; }
  .foundation-page .event-name { font-size: clamp(35px, 10.3vw, 48px); letter-spacing: 0; -webkit-text-stroke-width: 0; }
  .foundation-page .event-name:after { bottom: -6px; height: 2px; }
  .foundation-page .event-tagline { margin-top: 11px; font-size: clamp(26px, 8vw, 35px); }
  .foundation-page .hero .eyebrow { margin-top: 12px; font-size: 8px; letter-spacing: .42em; }
  .foundation-page .hero h1 { font-size: clamp(57px, 16vw, 70px); line-height: .88; }
  .foundation-page .anniversary { gap: 9px; margin-top: 12px; font-size: clamp(18px, 5.3vw, 24px); letter-spacing: .18em; }
  .foundation-page .anniversary:before, .foundation-page .anniversary:after { width: 18px; }
  .foundation-page .hero h2 { margin-top: 12px; font-size: 13px; }
  .foundation-page .hero-values { font-size: 9px; line-height: 1.6; }
}

@media (max-width: 900px) {
  .foundation-page .event-name { font-size: clamp(51px, 9.2vw, 78px); }
  .foundation-page .event-tagline { font-size: clamp(24px, 4vw, 34px); }
  .foundation-page .hero h1 { font-size: clamp(62px, 9vw, 88px); }
}

@media (max-width: 540px) {
  .foundation-page .event-name { font-size: clamp(42px, 12vw, 55px); text-shadow: 1px 1px 0 #ffcd27,2px 2px 0 #ffcd27,3px 3px 0 #e9a40d,4px 4px 0 #071d6740; }
  .foundation-page .event-tagline { font-size: clamp(23px, 7vw, 30px); }
  .foundation-page .hero h1 { font-size: clamp(55px, 15vw, 66px); text-shadow: 0 1px 0 #ffffffcc,0 2px 3px #071d6720; }
  .foundation-page .anniversary { font-size: clamp(18px, 4.8vw, 22px); letter-spacing: .17em; }
}

/* Keep the gold title clean at small widths (drop-shadow lives in style.css). */
@media (max-width: 540px) {
  .foundation-page .event-name { text-shadow: none; }
}

/* Centre the hero copy on tablet/mobile (desktop .foundation-page rules zero the side margins). */
@media (max-width: 1024px) {
  .foundation-page .hero-content { width: min(680px, 92%); margin-inline: auto; text-align: center; }
  .foundation-page .event-title, .foundation-page .event-name { margin-inline: auto; }
  .foundation-page .hero h2 { max-width: 100%; margin-inline: auto; }
  .foundation-page .hero-values { max-width: 100%; margin-inline: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 0; }
}

/* Keep YUGAARAMBH fully inside the screen on phones. */
@media (max-width: 640px) {
  .foundation-page .event-name { font-size: min(9.6vw, 56px); white-space: nowrap; max-width: none; }
}

@media (max-width: 1024px) {
  .celebration-layout > .cake-space:first-child { grid-column: 1; }
}
