@font-face {
  font-family: "Arm Allegro";
  src: url("fonts/ArmAllegroU.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #fdfbf5;
  --beige: #cfb7a5;
  --beige-deep: #b89d88;
  --beige-light: #e8ddd3;
  --gold: #c9a84c;
  --text: #5c4a3a;
  --text-soft: #8a7565;
  --white: #fffdf9;
  --shadow: rgba(92, 74, 58, 0.1);
  --font-title: "Arm Allegro", serif;
  --font-serif: "Cormorant Garamond", serif;
}

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

body {
  font-family: var(--font-serif);
  background: #fdfbf5;
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

body.intro-active {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* Envelope */
.envelope-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    opacity 0.9s ease,
    visibility 0.9s ease;
}

.envelope-intro.is-opening .envelope-scene {
  opacity: 0;
  transform: translateY(-16px) scale(1.02);
}

.envelope-intro.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-bg {
  position: absolute;
  inset: 0;
  background: #fdfbf5;
}

.envelope-scene {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  transition:
    opacity 0.85s ease,
    transform 0.85s ease;
}

.envelope-wrap {
  width: min(85vw, 340px);
}

.envelope-img {
  display: block;
  width: 100%;
  height: auto;
}

.tap-hint {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--beige-deep);
  text-shadow: none;
}

/* Invitation */
.invitation {
  opacity: 0;
  visibility: hidden;
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  transition:
    opacity 1s ease 0.2s,
    visibility 1s ease 0.2s;
}

.invitation.is-visible {
  opacity: 1;
  visibility: visible;
}

.deco-amp {
  position: absolute;
  width: min(55vw, 220px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.deco-amp--top {
  top: 2%;
  right: -8%;
}

.deco-amp--bottom {
  bottom: 8%;
  left: -10%;
}

.music-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.music-icon {
  width: 40px;
  height: 40px;
}

.invitation-main {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  text-align: center;
}

/* Header */
.invite-header {
  margin-bottom: 2rem;
}

.cross-icon {
  width: 48px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

.invite-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 400;
  color: var(--beige-deep);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.event-date {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  color: var(--beige-deep);
  margin-bottom: 1.25rem;
}

.sisters-img {
  width: min(85vw, 360px);
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 4px 16px var(--shadow);
}

/* Countdown */
.countdown-section {
  margin-bottom: 1.5rem;
}

.countdown-label {
  font-size: 1.1rem;
  color: var(--text-soft);
  margin-bottom: 1rem;
  font-style: italic;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.countdown-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--beige-deep);
  line-height: 1.1;
}

.countdown-unit {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 0.25rem;
}

.countdown-amp {
  display: block;
  width: min(55vw, 220px);
  height: auto;
  margin: 1rem 0 0 -1.5rem;
  opacity: 0.18;
  pointer-events: none;
}

.odaparik-img {
  position: absolute;
  top: -150px;
  /* left: -1rem; */
  width: min(62vw, 200px);
  height: auto;
  z-index: 0;
  pointer-events: none;
}

/* Greeting */
.greeting-section {
  position: relative;
  margin-bottom: 2rem;
  padding-top: 100px;
}

.greeting-intro {
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
}

.greeting-text-wrap {
  position: relative;
  z-index: 1;
  padding-bottom: 0.5rem;
}

.greeting-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: var(--beige-deep);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 2;
}

.greeting-text,
.birthday-text {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  text-align: center;
  padding: 0 0.5rem;
  margin: 0;
}

.birthday-text {
  margin-bottom: 0.75rem;
}

.birthday-one {
  font-size: 1.85em;
  font-weight: 600;
  line-height: 1;
  vertical-align: baseline;
}

.angel-center {
  width: min(50vw, 180px);
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

.birthday-block {
  margin-top: 0.5rem;
}

.birthday-bear-row {
  display: flex;
  justify-content: center;
}

.bear-wrap {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
}

.bear-img {
  width: min(72vw, 260px);
  height: auto;
  display: block;
}

.birthday-year {
  font-family: var(--font-title);
  font-size: 45px;
  color: var(--beige-deep);
  line-height: 1;
  margin-left: -50px;
  margin-bottom: 50px;
  white-space: nowrap;
}

/* Decorative images */
.karusel-img {
  width: min(70vw, 260px);
  height: auto;
  margin: 0 auto 2rem;
  display: block;
}

/* Schedule */
.schedule {
  margin-bottom: 1rem;
  padding: 0 0.25rem;
}

.schedule-title {
  font-family: var(--font-title);
  font-size: 36px;
  color: var(--beige-deep);
  text-align: center;
  margin-bottom: 1.5rem;
}

.schedule-timeline {
  display: flex;
  flex-direction: column;
}

.schedule-row {
  display: grid;
  grid-template-columns: 3.75rem 4.75rem 1fr;
  align-items: start;
  column-gap: 0.85rem;
}

.schedule-time {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-style: italic;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  margin-top: 1.25rem;
}

.schedule-axis {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.schedule-circle {
  width: 72px;
  height: 72px;
  padding: 5px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(207, 183, 165, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.schedule-circle img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.schedule-line {
  display: block;
  width: 1px;
  height: 2.75rem;
  background: var(--text);
  margin: 0;
}

.schedule-row--last .schedule-line {
  display: none;
}

.schedule-info {
  text-align: left;
  margin-top: 1.1rem;
}

.schedule-place {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}

.schedule-address {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-top: 0.35rem;
  font-style: italic;
  line-height: 1.4;
}

.footer {
  text-align: center;
  padding: 2rem 0 1rem;
  color: var(--text-soft);
  font-size: 1.1rem;
}

@media (min-width: 481px) {
  .countdown-value {
    font-size: 2.25rem;
  }

  .countdown-item {
    min-width: 72px;
  }

  .greeting-text,
  .birthday-text {
    font-size: 1.1rem;
    padding: 0 0.75rem;
  }

  .schedule-row {
    grid-template-columns: 4.5rem 5.75rem 1fr;
    column-gap: 1.25rem;
  }

  .schedule-circle {
    width: 88px;
    height: 88px;
  }

  .schedule-circle img {
    width: 52px;
    height: 52px;
  }

  .schedule-time {
    font-size: 2rem;
    margin-top: 1.65rem;
  }

  .schedule-info {
    margin-top: 1.45rem;
  }

  .schedule-place {
    font-size: 1.1rem;
  }
}
