/* =================================================================
   Invitación BIS · Tercero BTI · 2026
   Hoja de estilos organizada por bloques. Usa CSS moderno nativo:
   variables, anidación (&), :has(), clamp(), text-wrap, @starting-style
   y animaciones ligadas al scroll. Sin frameworks ni compilación.
   ================================================================= */

/* 1. Identidad visual ------------------------------------------------
   Colores oficiales del logo de Berta International School (PDF):
   azul marino #082e54 y rojo #ce1124. */
:root {
  --navy: #082e54;
  --navy-deep: #051f3a;
  --red: #ce1124;
  --red-hover: #a80d1d;
  --paper: #fffcf7;
  --sand: #f2f0eb;
  --white: #ffffff;
  --muted: #5f6573;
  --line: #e6e3de;
  --peach: #f6d4bd;
  --focus: #dc9c35;
  --whatsapp: #1f8f4e;
  --whatsapp-hover: #187640;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  --radius: 20px;
  --shadow: 0 12px 40px #082e540d;
  --header-h: 72px;
  --safe-top: env(safe-area-inset-top, 0px);

  color-scheme: light;
}

/* 2. Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  color: var(--navy);
  background: var(--paper);
  font: 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;

  &:has(dialog[open]) { overflow: hidden; }
}

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

h1, h2 {
  font-family: var(--font-display);
  font-weight: 350;
  font-optical-sizing: auto;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h2 { font-size: clamp(2.4rem, 4.5vw, 3.7rem); margin-bottom: 24px; }
h3 { font-size: 1.2rem; line-height: 1.4; text-wrap: balance; }
p  { text-wrap: pretty; }
em { font-weight: inherit; font-style: italic; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

:is(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
[hidden] { display: none !important; }

.skip {
  position: fixed; top: 8px; left: 12px; z-index: 60;
  background: var(--white); padding: 10px;
  transform: translateY(-180%);
  &:focus { transform: none; }
}

/* 3. Encabezado fijo con fondo translúcido -------------------------- */
.topbar {
  position: sticky;
  top: var(--safe-top);
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar-inner {
  max-width: 1200px;
  min-height: var(--header-h);
  margin: auto;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  b { letter-spacing: .12em; font-size: 19px; }
  small { display: block; letter-spacing: .15em; font-size: 10px; color: var(--muted); }
}
.brand-logo { height: 44px; width: auto; flex-shrink: 0; }

.topbar nav {
  display: flex; align-items: center; gap: 28px; font-size: 14px;
  > a:not(.nav-cta) {
    position: relative;
    &::after {
      content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
      background: currentColor; scale: 0 1; transition: scale .25s;
    }
    &:hover::after { scale: 1 1; }
  }
}
.nav-share {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; padding: 8px 0; font-size: 14px;
}
.nav-cta {
  background: var(--navy); color: var(--paper);
  border-radius: 99px; padding: 10px 20px; font-weight: 600;
  transition: background .2s;
  &:hover { background: var(--red); }
}

/* 4. Portada --------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(820px, calc(100svh - var(--header-h)));
  display: grid; place-items: center;
  background: var(--navy); color: var(--white);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
  clip-path: inset(0); /* recorta la foto fija al área de la portada */
}
.hero-picture, .hero-photo, .hero-shade {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
}
/* Foto fija al viewport: el contenido se desliza sobre ella al hacer scroll
   (funciona también en iOS, a diferencia de background-attachment: fixed). */
.hero-picture { position: fixed; height: 100vh; }
.hero-photo { object-fit: cover; object-position: center 50%; animation: hero-zoom 18s ease-out both; }
.hero-shade {
  z-index: -1;
  background:
    radial-gradient(120% 80% at 50% 40%, #05213c80, transparent 70%),
    linear-gradient(180deg, #05213ca8, #05213cbd 55%, #05213ceb);
}
.hero-content { padding: 48px 24px 96px; width: min(900px, 100%); }

.crest {
  height: 104px; width: auto; margin: 0 auto 26px;
  filter: drop-shadow(0 8px 24px #0008);
  animation: rise .9s .1s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-kicker { color: #f3e9d9; animation: rise .9s .2s cubic-bezier(.2, .7, .2, 1) both; }
.hero h1 {
  font-size: clamp(3.4rem, 7.5vw, 6.8rem);
  font-weight: 300;
  margin: 0 0 24px;
  animation: rise 1s .3s cubic-bezier(.2, .7, .2, 1) both;
  em { color: var(--peach); }
}
.hero-sub {
  max-width: 520px; margin: 0 auto 24px;
  color: #f1f2f5; font-weight: 300; font-size: 18px;
  animation: rise 1s .45s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-date {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-size: 12px; letter-spacing: .18em; margin-bottom: 30px;
  animation: rise 1s .55s cubic-bezier(.2, .7, .2, 1) both;
}
.hero .actions { animation: rise 1s .65s cubic-bezier(.2, .7, .2, 1) both; }
.short-rule { width: 38px; height: 1px; background: #ffffff65; }
.hero-bottom {
  position: absolute; bottom: 24px; left: 5%; right: 5%;
  display: flex; justify-content: space-between;
  font-size: 11px; color: #dddfe5; letter-spacing: .03em;
}

@keyframes rise { from { opacity: 0; translate: 0 18px; } }
@keyframes hero-zoom { from { scale: 1.08; } }

/* 5. Botones --------------------------------------------------------- */
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button {
  min-height: 48px; padding: 13px 25px; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center;
  border: 1px solid transparent; max-width: 100%;
  transition: background .2s, transform .2s, box-shadow .2s;
  &:hover { transform: translateY(-2px); }
  &:active { transform: translateY(0); }
}
.red { background: var(--red); color: var(--white); &:hover { background: var(--red-hover); box-shadow: 0 8px 24px #ce112440; } }
.glass { background: #ffffff10; border-color: #ffffff70; color: var(--white); backdrop-filter: blur(6px); &:hover { background: #ffffff24; } }
.outline { background: transparent; border-color: #c7cbd2; &:hover { background: #082e5408; } }
.whatsapp { background: var(--whatsapp); color: var(--white); &:hover { background: var(--whatsapp-hover); } }
.full { width: 100%; }
.text-button {
  border: 0; background: transparent; color: var(--red);
  font-size: 14px; font-weight: 600; padding: 8px 0;
  text-decoration: underline; text-underline-offset: 5px;
}
.round-button {
  border: 1px solid #c7cbd2; border-radius: 50%;
  width: 44px; height: 44px; display: grid; place-items: center;
  font-size: 28px; line-height: 1; background: transparent;
  &:hover { background: #082e540c; }
}
.icon-inline { display: inline-flex; svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } }

/* 6. Secciones y tarjetas ------------------------------------------- */
.section { padding: clamp(56px, 7vw, 88px) max(24px, calc((100% - 1120px) / 2)); }
.section-heading {
  text-align: center; max-width: 660px; margin: 0 auto 48px;
  p:last-child { color: var(--muted); margin-bottom: 0; }
}
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .19em; margin-bottom: 18px; }
.small { font-size: 12px !important; color: var(--muted); line-height: 1.65; }
.centered { text-align: center; margin-top: 18px; }
.example-note { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 24px; }

.intro {
  text-align: center; max-width: 900px; margin: auto; padding-inline: 24px;
  .eyebrow { color: var(--red); }
}
.lead { font-size: 18px; line-height: 1.85; max-width: 660px; margin: 0 auto 34px; color: var(--muted); }
blockquote {
  margin: 0 auto; max-width: 580px; padding: 26px 16px 0; border-top: 1px solid var(--line);
  p { font: italic 300 22px/1.55 var(--font-display); margin-bottom: 12px; }
}
cite { font: 12px var(--font-body); color: var(--muted); letter-spacing: .05em; }

.cards { display: grid; gap: 24px; }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--line); padding: 36px 28px; border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow); text-align: center; min-width: 0;
  transition: transform .3s, box-shadow .3s;
  p { color: var(--muted); font-size: 15px; }
  .eyebrow { color: var(--muted); font-size: 11px; margin-bottom: 10px; }
  h3 { margin-bottom: 12px; }
  &:not(.achievement):hover { transform: translateY(-4px); box-shadow: 0 18px 48px #082e5417; }
}
.icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; color: var(--red); margin-bottom: 20px;
  svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
}
.event-card {
  display: flex; align-items: stretch; flex-direction: column;
  .small { margin-bottom: 24px; }
  > .button, > .stack { margin-top: auto; }
  [role=status] { margin: 12px 0 0; &:empty { display: none; } }
}
.stack { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* 7. Cuenta regresiva ----------------------------------------------- */
.countdown-band { background: var(--navy); color: var(--paper); padding: 40px 24px; }
.countdown-wrap {
  max-width: 1080px; margin: auto;
  display: flex; gap: 56px; justify-content: space-between; align-items: center;
  h2 { font-size: 38px; margin-bottom: 12px; }
  .eyebrow { color: #efc7b4; }
  p:last-child { font-size: 12px; color: #d0d4dd; margin-bottom: 0; }
}
.countdown {
  display: flex; gap: 14px; justify-content: center;
  div {
    min-width: 84px; padding: 14px 10px 10px; text-align: center;
    border: 1px solid #ffffff22; border-radius: 14px; background: #ffffff08;
  }
  strong { display: block; font: 300 52px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
  span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #d0d4dd; }
}

/* Contador regresivo */
.cd-live { display: flex; align-items: stretch; gap: 10px; justify-content: flex-end; }
.cd-unit {
  min-width: 104px; padding: 18px 14px 14px; text-align: center;
  border-radius: 18px; border: 1px solid #ffffff22;
  background: linear-gradient(160deg, #ffffff14, #ffffff05);
  box-shadow: inset 0 1px 0 #ffffff1a;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  strong { display: block; font: 300 60px/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--paper); }
  span { display: block; margin-top: 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #d0d4dd; }
}
.cd-sep { font: 300 48px/1 var(--font-display); color: #efc7b4; align-self: center; padding-bottom: 22px; }
.cd-note { margin: 16px 0 0; font-size: 13px; color: #d0d4dd; text-align: right; }

/* 8. Galería --------------------------------------------------------- */
.memories { background: var(--sand); overflow: hidden; }
.gallery {
  display: flex; gap: 24px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: #c4c6ca transparent;
  padding: 8px 4px 24px;
}
.memory {
  flex: 0 0 calc((100% - 48px) / 3); min-width: 0; scroll-snap-align: start;
  padding: 12px 12px 18px; background: var(--white); border: 0; border-radius: 6px;
  box-shadow: 0 5px 18px #082e540c; text-align: left; color: var(--navy);
  transition: transform .3s, box-shadow .3s;
  &:nth-child(odd)  { rotate: -.6deg; }
  &:nth-child(even) { rotate: .6deg; }
  &:hover { rotate: 0deg; transform: translateY(-4px); box-shadow: 0 16px 36px #082e541f; }
  picture { display: block; overflow: hidden; } /* recorta el acercamiento */
  img { width: 100%; height: 240px; object-fit: cover; background: #dee2e6; transition: scale .6s cubic-bezier(.2, .7, .2, 1); }
  &:hover img, &:focus-visible img { scale: 1.08; }
  > span { display: block; font: italic 300 23px var(--font-display); margin: 20px 8px 3px; }
  small { display: block; margin: 0 8px; color: var(--muted); font-size: 11px; letter-spacing: .1em; }
}
.gallery-controls {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin-top: 12px; font-size: 12px; font-variant-numeric: tabular-nums;
}

/* 9. Logros y organización ----------------------------------------- */
.achievement {
  background: transparent; border: none; border-radius: 0; box-shadow: none;
  border-top: 1px solid #d9dadc; text-align: left; padding: 25px 8px;
  .number { font: 300 44px var(--font-display); color: var(--red); }
  .tag { font-size: 11px; color: var(--muted); display: block; margin: 16px 0 8px; }
}
.organize { background: var(--sand); }

/* 10. Confirmación --------------------------------------------------- */
.rsvp {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start;
  h2 { font-size: clamp(3rem, 6vw, 5rem); em { color: var(--red); } }
}
.rsvp-copy { position: sticky; top: calc(var(--header-h) + 40px); }
.rsvp-copy > p:not(.eyebrow) { color: var(--muted); max-width: 320px; }
.deadline {
  font-size: 14px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 32px;
  strong { color: var(--navy); }
}
.rsvp-signature { display: inline-block; font-size: 12px; letter-spacing: .12em; margin-top: 18px; }

.form-card {
  padding: 40px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  .button.whatsapp { margin-top: 14px; }
}
.demo-note {
  font-size: 12px; line-height: 1.6; background: #f0f2f5; border-left: 3px solid #8795ad;
  padding: 12px 14px; margin-bottom: 24px; color: #465166;
  &:empty { display: none; }
}
label, legend { font-size: 14px; font-weight: 600; display: block; margin-bottom: 8px; }
:is(label, legend) span { font-size: 12px; color: var(--muted); font-weight: 400; }
input:not([type=radio]), textarea, select {
  width: 100%; border: 1px solid #cdd1d7; background: var(--paper);
  border-radius: 10px; padding: 12px; min-height: 48px; color: var(--navy);
  transition: border-color .2s, box-shadow .2s;
  &:focus { border-color: var(--navy); box-shadow: 0 0 0 4px #082e5412; }
  &[aria-invalid=true] { border-color: #ac2828; }
}
textarea { resize: vertical; min-height: 110px; margin-bottom: 18px; field-sizing: content; }
fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.radio-options {
  display: flex; gap: 10px; flex-wrap: wrap;
  label {
    padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
    font-size: 13px; font-weight: 400; flex: 1; min-width: 140px; cursor: pointer;
    transition: border-color .2s, background .2s;
    &:has(:checked) { border-color: var(--navy); background: #f0f2f5; font-weight: 600; }
  }
}
input[type=radio] { accent-color: var(--navy); margin-right: 6px; }
.error { color: #ac2828; font-size: 12px; margin: 5px 0 16px; &:empty { margin-bottom: 18px; } }
.form-status { font-size: 14px; margin-top: 16px; }
.form-status:empty, .saved-response:empty { display: none; }
.saved-response {
  font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere;
  border-top: 1px solid var(--line); padding-top: 15px;
}
.delete-button { display: block; margin: 16px auto 0; font-size: 12px; color: var(--muted); }

/* 11. Pie ------------------------------------------------------------ */
footer {
  background: var(--navy-deep); color: var(--paper);
  padding: 64px max(24px, calc((100% - 1120px) / 2)) 24px; text-align: center;
  nav {
    display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;
    margin: 32px 0 48px; font-size: 13px;
    button { border: 0; padding: 0; background: none; font-size: 13px; }
    :is(a, button):hover { text-decoration: underline; text-underline-offset: 4px; }
  }
}
.footer-logo { height: 72px; width: auto; margin: 0 auto 26px; }
.footer-brand {
  h2 { font-size: 26px; letter-spacing: 0; margin-bottom: 10px; }
  p { font-size: 14px; color: #c6ccda; }
}
.footer-bottom {
  border-top: 1px solid #ffffff22; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 18px;
  font-size: 11px; color: #c6ccda;
  p { margin: 0; }
}

/* 12. Ventanas (dialog) con animación de entrada ------------------- */
dialog {
  border: 0; border-radius: 20px; padding: 40px;
  max-width: 540px; width: calc(100% - 32px); max-height: calc(100svh - 40px);
  overflow-y: auto; box-shadow: 0 25px 100px #0005;
  color: var(--navy); background: var(--paper);
  opacity: 0; translate: 0 16px;
  transition: opacity .25s, translate .25s, overlay .25s allow-discrete, display .25s allow-discrete;
  &[open] {
    opacity: 1; translate: 0 0;
    @starting-style { opacity: 0; translate: 0 16px; }
  }
  &::backdrop {
    background: #071428bf; backdrop-filter: blur(5px);
    opacity: 0; transition: opacity .25s, overlay .25s allow-discrete, display .25s allow-discrete;
  }
  &[open]::backdrop {
    opacity: 1;
    @starting-style { opacity: 0; }
  }
  h2 { font-size: 36px; padding-right: 24px; }
  .eyebrow { padding-right: 16px; font-size: 11px; }
  > p { color: var(--muted); }
}
.dialog-close {
  position: absolute; right: 14px; top: 12px; z-index: 2;
  border: 0; background: transparent; width: 44px; height: 44px; font-size: 28px;
}
.photo-dialog {
  max-width: 1050px; padding: 45px 16px 12px;
  img { width: 100%; height: min(65vh, 680px); object-fit: contain; background: #e8e7e3; view-transition-name: large-photo; }
}
.photo-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 12px;
  p { text-align: center; margin: 0; font-size: 14px; }
  button { flex-shrink: 0; }
}
.dress-colors { display: flex; gap: 14px; margin-bottom: 24px; }
.swatch {
  width: 50px; height: 50px; border-radius: 50%; border: 1px solid #cacaca;
  &.white { background: var(--white); }
  &.navy { background: var(--navy); }
}
#dress-text { white-space: pre-line; }
.notes-list { padding-left: 20px; li { margin: 16px 0; } }
.saved-title { font-size: 15px; margin-top: 28px; }
.song-list {
  font-size: 13px; padding-left: 20px; overflow-wrap: anywhere;
  li { margin: 10px 0; }
  a { text-decoration: underline; }
}

/* Compartir */
.share-grid { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; margin-bottom: 16px; }
.qr {
  width: 172px; aspect-ratio: 1; max-width: 100%; padding: 10px; background: var(--white);
  border: 1px solid var(--line); border-radius: 14px; display: grid; place-items: center;
  img, canvas { width: 100% !important; height: auto !important; }
}
.share-actions { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.small-label { font-size: 12px; margin: 6px 0 0; }
.copy-row {
  display: flex; gap: 8px;
  input { min-width: 0; font-size: 13px; }
  .button { padding-inline: 16px; flex-shrink: 0; }
}

/* RSVP: campos en dos columnas, indicador de la hoja y enlace de comprobación */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
.field { margin-bottom: 18px; }
.error:empty { display: none; }
select:not([multiple]) {
  appearance: none; cursor: pointer; padding-right: 44px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23082e54' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
}
.sheet-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px 0 0; font-size: 13px; color: var(--muted);
}
.sheet-dot { width: 9px; height: 9px; border-radius: 50%; background: #c9a227; flex-shrink: 0; }
.sheet-chip[data-state="saved"] .sheet-dot { background: var(--whatsapp); }
.sheet-chip[data-state="sending"] .sheet-dot { background: #8795ad; }
.tool-link {
  width: 36px; height: 36px; margin: 14px auto 0; border-radius: 50%;
  border: 1px solid var(--line); color: var(--muted);
  display: grid; place-items: center;
  svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  &:hover { color: var(--navy); border-color: var(--navy); }
}

.noscript {
  position: fixed; bottom: 0; z-index: 100; margin: 0; padding: 14px;
  background: var(--white); border: 2px solid var(--red);
}

/* 13. Aparición suave al hacer scroll (solo CSS) ------------------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
    @keyframes reveal { from { opacity: .25; translate: 0 36px; } }
  }
}

/* Transición entre fotos ampliadas (View Transitions API) */
::view-transition-old(large-photo), ::view-transition-new(large-photo) { animation-duration: .3s; }

/* 14. Adaptación a pantallas ---------------------------------------- */
@media (max-width: 850px) {
  .topbar nav > a:not(.nav-cta) { display: none; }
  .topbar nav { gap: 14px; }
  .section { padding: 72px 24px; }
  .countdown-wrap { flex-direction: column; gap: 28px; text-align: center; }
  .three { gap: 16px; }
  .card { padding: 28px 18px; h3 { font-size: 17px; } }
  .memory { flex-basis: calc((100% - 24px) / 2); }
  .rsvp { gap: 36px; }
  .form-card { padding: 24px; }
  .button { padding: 12px 20px; }
}

@media (max-width: 600px) {
  :root { --header-h: 62px; }
  .topbar-inner { padding-inline: 16px; gap: 12px; }
  .brand-logo { height: 38px; }
  .nav-share-label { display: none; }
  .nav-cta { padding: 8px 14px; font-size: 13px; }
  .hero { min-height: calc(100svh - var(--header-h)); }
  .hero-content { padding: 40px 20px 96px; }
  .crest { height: 78px; margin-bottom: 22px; }
  .hero h1 { font-size: clamp(2.9rem, 13vw, 4.5rem); }
  .hero-sub { font-size: 16px; max-width: 330px; }
  .hero-date { font-size: 10px; gap: 10px; letter-spacing: .12em; }
  .hero-bottom { flex-direction: column; gap: 6px; bottom: 20px; font-size: 10px; }
  .hero .actions { gap: 10px; }
  .hero .button { font-size: 13px; padding: 13px 18px; }
  .hero-kicker, .eyebrow { font-size: 10px; }
  .section { padding: 64px 20px; }
  .section-heading { margin-bottom: 32px; }
  .lead { font-size: 16px; }
  .three { grid-template-columns: 1fr; gap: 18px; }
  .card { padding: 28px 24px; }
  .countdown { gap: 8px; div { min-width: 0; flex: 1; padding: 12px 4px 8px; } strong { font-size: 36px; } span { font-size: 9px; } }
  .memory { flex-basis: 85%; max-width: 360px; img { height: 290px; } }
  .gallery { gap: 16px; }
  .rsvp { grid-template-columns: 1fr; gap: 30px; h2 { font-size: 3.5rem; br { display: none; } em { display: block; } } }
  .rsvp-copy { position: static; }
  .rsvp-copy { text-align: center; > p:not(.eyebrow) { margin-inline: auto; max-width: 350px; } }
  .form-card { padding: 22px 18px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; }
  dialog { padding: 36px 22px 22px; h2 { font-size: 30px; } }
  .photo-dialog { padding: 50px 10px 12px; }
  .photo-bottom p { font-size: 12px; }
  .share-grid { grid-template-columns: 1fr; justify-items: center; }
  .share-actions { width: 100%; }
}

@media (max-width: 600px) {
  .cd-live { justify-content: center; gap: 6px; }
  .cd-unit { flex: 1; min-width: 0; padding: 14px 6px 10px; }
  .cd-unit strong { font-size: 44px; }
  .cd-unit span { font-size: 9px; letter-spacing: .1em; }
  .cd-sep { font-size: 34px; padding-bottom: 16px; }
  .cd-note { text-align: center; }
}

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