/* =========================================================
   responsive.css — breakpoints & mobile-first tweaks
   ========================================================= */

/* ---------- Small phones up to 480px ---------- */
@media (max-width: 480px) {
  .section { padding: 64px 0; }
  .container { padding: 0 18px; }

  .hero {
    padding: 40px 12px 24px;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0 2px;
    justify-content: flex-start;
    gap: 0;
    padding-top: 0;
  }

  .hero-title {
    font-size: clamp(2.4rem, 11vw, 3.4rem);
    margin-bottom: 22px;
    line-height: 1.05;
    letter-spacing: 0.02em;
  }
  .hero-subtitle {
    font-size: 0.68rem;
    letter-spacing: 0.32em;
    margin-bottom: 12px;
  }

  .hero-babies {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    flex-wrap: nowrap;
    margin: 0 auto 20px;
    width: 100%;
  }

  .hero-baby {
    flex: 0 0 auto;
    width: 100%;
    max-width: 260px;
    padding: 18px 16px 20px;
    gap: 6px;
    border-radius: 20px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-baby1 {
    border-top-width: 3px;
    margin-top: 0;
    margin-bottom: 44px;
  }

  .hero-baby2 {
    border-top-width: 3px;
    margin-top: 0;
    margin-bottom: 0;
  }

  .hero-baby-photo-wrapper {
    width: 96px;
    height: 96px;
    border-width: 3px;
    margin-bottom: 6px;
  }

  .hero-baby .baby-name {
    font-size: 1rem;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
  }

  .hero-baby .baby-event {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    line-height: 1.3;
    text-align: center;
  }

  .hero-ampersand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 100%;
    max-width: 260px;
    margin-top: -44px;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    height: 44px;
    padding: 0;
    font-size: 1.6rem;
    line-height: 1;
    text-align: center;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: none;
  }

  .hero-countdown {
    max-width: 100%;
    width: 100%;
    margin: 0 auto 18px;
    gap: 6px;
  }
  .hero-countdown .countdown-item {
    padding: 12px 3px;
  }
  .hero-countdown .countdown-number {
    font-size: clamp(1.15rem, 5vw, 1.6rem);
  }
  .hero-countdown .countdown-label {
    font-size: 0.5rem;
    letter-spacing: 0.06em;
    margin-top: 6px;
  }

  .hero-details {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 20px;
    max-width: 100%;
    width: 100%;
  }

  .hero-detail {
    flex: 1 1 0;
    min-width: 0;
    padding: 14px 12px;
    gap: 3px;
  }
  .hero-detail i { font-size: 1rem; margin-bottom: 3px; }
  .hero-detail-label { font-size: 0.55rem; letter-spacing: 0.18em; }
  .hero-detail-value {
    font-size: 0.95rem;
    line-height: 1.2;
    word-break: break-word;
  }

  .scroll-down-indicator {
    gap: 5px;
    padding-top: 8px;
    padding-bottom: 0;
    margin-top: auto;
    margin-bottom: 36px;
  }
  .scroll-down-text {
    font-size: 0.62rem;
    letter-spacing: 0.24em;
  }
  .scroll-down-arrow { font-size: 1rem; }

  .floating-nav {
    gap: 2px;
    padding: 6px 8px;
    top: 8px;
  }
  .nav-link { padding: 6px 10px; font-size: 0.6rem; letter-spacing: 0.04em; }

  .countdown-wrapper { gap: 8px; }
  .countdown-item { padding: 14px 4px; }
  .countdown-label { font-size: 0.55rem; letter-spacing: 0.08em; }

  .baby-photo-wrapper {
    width: 170px;
    height: 220px;
    border-radius: 20px;
  }
  .baby-name-display { font-size: 1.25rem; }

  .gallery-grid { grid-auto-rows: 130px; gap: 8px; }

  /* ---- Timeline (PERFECTLY CENTERED) ---- */
  .timeline {
    padding-left: 28px;
  }
  .timeline::before {
    left: 6px;
    width: 2px;
  }
  .timeline-item {
    padding-left: 18px;
  }
  .timeline-item::before {
    /* Line center = 6px + 1px = 7px from .timeline.
       Item left edge = 28px from .timeline.
       Line center relative to item = 7 - 28 = -21px.
       Circle total width (border-box) = 14px, half = 7px.
       Circle left = -21 - 7 = -28px. */
    left: -28px;
    width: 14px;
    height: 14px;
  }

  .godparent-card { padding: 30px 20px 34px; }
  .godparent-list li { font-size: 1rem; }

  .music-toggle { width: 46px; height: 46px; font-size: 16px; right: 14px; bottom: 14px; }
}

/* ---------- Very small phones up to 360px ---------- */
@media (max-width: 360px) {
  .hero-content { padding: 0; }

  .hero-title {
    font-size: clamp(2rem, 10.5vw, 2.8rem);
    margin-bottom: 18px;
    line-height: 1.05;
  }
  .hero-subtitle {
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    margin-bottom: 10px;
  }

  .hero-baby { padding: 14px 12px 16px; max-width: 220px; }
  .hero-baby-photo-wrapper { width: 80px; height: 80px; }
  .hero-baby .baby-name { font-size: 0.9rem; }
  .hero-baby .baby-event { font-size: 0.56rem; }

  .hero-baby1 { margin-bottom: 36px; }

  .hero-ampersand {
    font-size: 1.35rem;
    max-width: 220px;
    margin-top: -36px;
    height: 36px;
  }

  .hero-countdown {
    gap: 4px;
    margin-bottom: 16px;
  }
  .hero-countdown .countdown-item { padding: 10px 2px; }
  .hero-countdown .countdown-number { font-size: 1rem; }
  .hero-countdown .countdown-label { font-size: 0.45rem; letter-spacing: 0.05em; }

  .hero-details {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 18px;
    max-width: 100%;
    width: 100%;
  }
  .hero-detail { padding: 12px 8px; }
  .hero-detail i { font-size: 0.9rem; }
  .hero-detail-label { font-size: 0.5rem; letter-spacing: 0.14em; }
  .hero-detail-value { font-size: 0.85rem; line-height: 1.15; }

  .baby-photo-wrapper { width: 150px; height: 195px; border-radius: 18px; }

  .scroll-down-text { font-size: 0.58rem; letter-spacing: 0.2em; }
  .scroll-down-arrow { font-size: 0.9rem; }
  .scroll-down-indicator { margin-bottom: 32px; padding-top: 6px; }

  /* ---- Timeline tiny phone (PERFECTLY CENTERED) ---- */
  .timeline { padding-left: 24px; }
  .timeline::before { left: 5px; width: 2px; }
  .timeline-item { padding-left: 16px; }
  .timeline-item::before {
    /* Line center = 5 + 1 = 6px. Item left = 24px.
       Relative = 6 - 24 = -18px. Circle width 12px, half = 6px.
       Circle left = -18 - 6 = -24px. */
    left: -24px;
    width: 12px;
    height: 12px;
  }
}

/* ---------- Tablets 481px – 768px ---------- */
@media (min-width: 481px) and (max-width: 768px) {
  .hero { padding: 50px 20px 30px; }

  .hero-content {
    max-width: 720px;
    padding: 0 8px;
    justify-content: flex-start;
    padding-top: 0;
  }

  .babies-grid { gap: 28px; }
  .countdown-wrapper { gap: 14px; }
  .gallery-grid { grid-auto-rows: 170px; }

  .details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .baby-photo-wrapper {
    width: 200px;
    height: 255px;
    border-radius: 22px;
  }

  .hero-title { font-size: clamp(2.6rem, 7vw, 3.4rem); line-height: 1.05; }
  .hero-baby { min-width: 240px; padding: 26px 30px 28px; }
  .hero-baby-photo-wrapper { width: 150px; height: 150px; }
  .hero-baby .baby-name { font-size: 1.25rem; }
  .hero-baby .baby-event { font-size: 0.82rem; }

  .hero-countdown {
    max-width: 560px;
    gap: 12px;
    margin-bottom: 22px;
  }
  .hero-countdown .countdown-item { padding: 16px 6px; }
  .hero-countdown .countdown-number { font-size: 1.9rem; }
  .hero-countdown .countdown-label { font-size: 0.58rem; }

  .hero-details {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 16px;
    margin-bottom: 26px;
    max-width: 560px;
    width: 100%;
  }
  .hero-detail { padding: 16px 20px; }
  .hero-detail-value { font-size: 1.05rem; }

  .scroll-down-indicator {
    padding-bottom: 0;
    margin-bottom: 28px;
  }
}

/* ---------- Desktop 769px+ ---------- */
@media (min-width: 769px) {
  .hero { padding: 60px 24px 40px; }

  .hero-content {
    max-width: 1000px;
    padding: 0 16px;
    justify-content: flex-start;
    padding-top: 0;
  }

  .section { padding: 100px 0; }

  .babies-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .location-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .godparents-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 16px;
  }

  .gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
  }

  .radio-group { flex-direction: row; gap: 16px; }
  .radio-label { flex: 1; }

  /* Desktop timeline — already correct */
  .timeline { padding-left: 40px; }
  .timeline-item::before { left: -38px; }

  .hero-title { font-size: clamp(2.8rem, 5vw, 3.6rem); line-height: 1.05; }

  .hero-countdown {
    max-width: 620px;
    gap: 12px;
    margin-bottom: 22px;
  }

  .hero-details {
    gap: 20px;
    margin-bottom: 28px;
    max-width: 620px;
    width: 100%;
  }

  .scroll-down-indicator {
    padding-bottom: 0;
    margin-bottom: 32px;
    gap: 8px;
  }
  .scroll-down-text { font-size: 0.75rem; }
  .scroll-down-arrow { font-size: 1.25rem; }
}

/* ---------- Large desktop 1200px+ ---------- */
@media (min-width: 1200px) {
  .hero-content {
    max-width: 1100px;
    padding: 0 24px;
    padding-top: 0;
  }

  .hero-title { font-size: 3.6rem; line-height: 1.05; }
  .section-title { font-size: 3rem; }
  .baby-photo-wrapper { width: 260px; height: 330px; border-radius: 28px; }
  .hero-baby-photo-wrapper { width: 190px; height: 190px; border-width: 6px; }
  .hero-baby { min-width: 320px; padding: 34px 42px 36px; gap: 12px; }
  .hero-baby .baby-name { font-size: 1.6rem; }
  .hero-baby .baby-event { font-size: 1rem; }
  .hero-ampersand { font-size: 3rem; }

  .hero-countdown {
    max-width: 680px;
    margin-bottom: 24px;
  }
  .hero-countdown .countdown-number { font-size: 2.4rem; }

  .hero-details { max-width: 680px; gap: 22px; margin-bottom: 32px; width: 100%; }
  .hero-detail-value { font-size: 1.15rem; }

  .scroll-down-indicator {
    padding-bottom: 0;
    margin-bottom: 48px;
  }
}

/* ---------- Landscape mobile ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 24px 20px 20px; }

  .hero-content {
    max-width: 100%;
    padding: 0;
    justify-content: flex-start;
    padding-top: 0;
  }

  .hero-title { font-size: 2.2rem; margin-bottom: 14px; line-height: 1; }
  .hero-babies { margin-bottom: 14px; }
  .hero-baby-photo-wrapper { width: 70px; height: 70px; }
  .hero-baby { padding: 12px 14px 14px; min-width: 160px; }
  .hero-baby .baby-name { font-size: 0.9rem; }
  .hero-baby .baby-event { font-size: 0.6rem; }
  .countdown-number { font-size: 1.4rem; }

  .hero-countdown {
    max-width: 520px;
    gap: 8px;
    margin-bottom: 12px;
  }
  .hero-countdown .countdown-item { padding: 8px 4px; }
  .hero-countdown .countdown-number { font-size: 1.2rem; }
  .hero-countdown .countdown-label { font-size: 0.5rem; }

  .hero-details {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 12px;
    max-width: 520px;
    width: 100%;
  }
  .hero-detail { padding: 10px 14px; }
  .hero-detail-value { font-size: 0.95rem; }

  .scroll-down-indicator {
    padding-top: 6px;
    padding-bottom: 0;
    margin-bottom: 14px;
    gap: 4px;
  }
  .scroll-down-text { font-size: 0.6rem; letter-spacing: 0.2em; }
  .scroll-down-arrow { font-size: 0.95rem; }
}

/* ---------- Short screens (any width) ---------- */
@media (max-height: 640px) and (orientation: portrait) {
  .hero { padding-top: 30px; padding-bottom: 20px; }

  .hero-content {
    justify-content: flex-start;
    padding-top: 0;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3rem);
    line-height: 1.02;
    margin-bottom: 16px;
  }

  .hero-babies { margin-bottom: 14px; }
  .hero-countdown { margin-bottom: 12px; }
  .hero-details {
    flex-direction: row;
    flex-wrap: nowrap;
    margin-bottom: 12px;
    max-width: 100%;
    width: 100%;
  }

  .scroll-down-indicator {
    padding-top: 6px;
    padding-bottom: 0;
    margin-bottom: 20px;
  }
}

/* ---------- Print ---------- */
@media print {
  #threeCanvasContainer,
  .floating-nav,
  .music-toggle,
  .scroll-progress,
  .cursor-dot,
  .cursor-ring,
  .confetti-canvas,
  .scroll-down-indicator { display: none !important; }

  body { background: white; color: black; }
  .hero { background: white; min-height: auto; padding: 40px 0; }
  .invitation-wrapper { background: white; margin-top: 0; }
  .footer { border-radius: 0; }
}