/* ============================================================
   LAYOUT PER SEKSI (mobile-first, target 360–430px)
   ============================================================ */

.section {
  max-width: var(--section-max);
  margin: 0 auto;
  padding: var(--space-5) var(--space-3);
  text-align: center;
}

.section__head {
  margin-bottom: var(--space-4);
}

.section__title {
  font-size: var(--fs-title);
  margin-top: var(--space-1);
}

.section__subtitle {
  color: var(--text-muted);
  max-width: 46ch;
  margin: var(--space-1) auto 0;
  font-size: 0.95rem;
}

/* ============ COVER ============ */
.cover {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(185, 138, 68, 0.12), transparent 55%),
    linear-gradient(170deg, var(--emerald-dark), var(--emerald) 55%, var(--emerald-light));
  color: var(--text-on-deep);
  padding: var(--space-3);
  transition: transform 1.1s var(--ease-out), opacity 1.1s var(--ease-out);
}

.cover.is-open {
  transform: translateY(-100%);
  opacity: 0.4;
  pointer-events: none;
}

.cover__panel {
  position: relative;
  width: min(420px, 100%);
  padding: clamp(2.5rem, 10vw, 4rem) var(--space-3);
  text-align: center;
}

.cover__corner {
  position: absolute;
  width: 56px;
  height: 56px;
  fill: none;
}

.cover__corner--tl { top: 0; left: 0; }
.cover__corner--tr { top: 0; right: 0; transform: scaleX(-1); }
.cover__corner--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.cover__corner--br { bottom: 0; right: 0; transform: scale(-1); }

.cover__eyebrow {
  font-size: var(--fs-small);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.cover__star {
  width: 34px;
  height: 34px;
  margin: var(--space-2) auto;
  fill: none;
  stroke-width: 1;
  animation: star-glow 4s ease-in-out infinite;
}

.cover__names {
  font-size: var(--fs-hero);
  color: var(--ivory);
  font-style: italic;
}

.cover__date {
  margin-top: var(--space-1);
  letter-spacing: 0.2em;
  font-size: var(--fs-small);
  color: var(--sage);
}

.cover__guest {
  margin: var(--space-4) 0 var(--space-3);
}

.cover__guest-label {
  font-size: var(--fs-small);
  color: rgba(251, 248, 242, 0.7);
}

.cover__guest-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold-light);
  margin-top: 0.2em;
}

/* ============ HERO ============ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(214, 195, 172, 0.25), transparent 60%),
    var(--bg);
}

.hero__frame {
  position: relative;
  padding: clamp(3rem, 12vw, 4.5rem) var(--space-2);
  width: 100%;
}

.hero__corner {
  position: absolute;
  width: 64px;
  height: 64px;
  fill: none;
}

.hero__corner--tl { top: 0; left: 0; }
.hero__corner--tr { top: 0; right: 0; transform: scaleX(-1); }
.hero__corner--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.hero__corner--br { bottom: 0; right: 0; transform: scale(-1); }

.hero__bismillah {
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  color: var(--emerald);
  margin-bottom: var(--space-3);
}

.hero__intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 44ch;
  margin: 0 auto var(--space-3);
}

.hero__names {
  font-size: var(--fs-hero);
  font-style: italic;
  margin-bottom: var(--space-2);
}

.hero__date {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: var(--fs-small);
  color: var(--emerald-light);
  margin-top: var(--space-2);
}

.hero__hashtag {
  margin-top: var(--space-1);
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
}

/* ============ VERSE ============ */
.verse {
  background: var(--bg-deep);
  max-width: none;
}

.verse__frame {
  max-width: var(--section-max);
  margin: 0 auto;
}

.verse__star {
  width: 30px;
  height: 30px;
  margin: 0 auto var(--space-2);
  fill: none;
  stroke-width: 1;
}

.verse__arabic {
  font-size: clamp(1.25rem, 5vw, 1.7rem);
  color: var(--emerald);
  margin-bottom: var(--space-3);
}

.verse__translation {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
}

.verse__source {
  margin-top: var(--space-2);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}

/* ============ COUPLE ============ */
.couple__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}

.couple__card {
  width: 100%;
}

.couple__amp {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 3rem;
  color: var(--gold);
  line-height: 1;
}

.couple__name {
  font-size: var(--fs-name);
  margin-top: var(--space-2);
}

.couple__parents {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.3em;
}

@media (min-width: 700px) {
  .couple__grid {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
  }
  .couple__card {
    flex: 1;
  }
  .couple__amp {
    align-self: center;
  }
}

/* ============ COUNTDOWN ============ */
.countdown {
  background: var(--bg-alt);
  max-width: none;
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 96px));
  gap: var(--space-1);
  justify-content: center;
  margin-bottom: var(--space-3);
}

.countdown__unit {
  padding: var(--space-2) 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown__num {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  color: var(--emerald);
  font-weight: 600;
  min-height: 1.3em;
  display: inline-block;
}

.countdown__num.is-flipping {
  animation: digit-fade 0.5s var(--ease-out);
}

.countdown__label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown__done {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: var(--space-3);
}

/* ============ EVENTS ============ */
.events__grid {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.event-card {
  position: relative;
  padding-top: var(--space-4);
}

.event-card__star {
  width: 26px;
  height: 26px;
  margin: 0 auto var(--space-1);
  fill: none;
  stroke-width: 1;
  color: var(--gold);
  stroke: currentColor;
}

.event-card__name {
  font-size: 1.5rem;
}

.event-card__date {
  margin-top: var(--space-1);
  color: var(--emerald-light);
  font-weight: 400;
}

.event-card__time {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.event-card__venue {
  margin-top: var(--space-2);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--emerald);
}

.event-card__address {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
}

.events__map {
  padding: 6px;
  overflow: hidden;
}

.events__map iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: calc(var(--radius) - 6px);
}

@media (min-width: 700px) {
  .events__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============ STORY (kata pengantar satu paragraf) ============ */
.story__frame {
  max-width: 520px;
  margin: 0 auto;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(185, 138, 68, 0.08), transparent 60%),
    var(--card-bg);
}

.story__star {
  width: 30px;
  height: 30px;
  margin: 0 auto var(--space-2);
  fill: none;
  stroke-width: 1;
}

.story__text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 4vw, 1.2rem);
  line-height: 2;
  color: var(--emerald);
}

.story__text::first-letter {
  font-size: 1.6em;
  color: var(--gold);
}

.story__divider {
  margin-top: var(--space-3);
  width: min(160px, 50%);
}

/* ============ GALLERY ============ */
.gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
}

.gallery__item {
  border: none;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--bg-alt);
}

.gallery__item:nth-child(3n + 2) {
  aspect-ratio: 1;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.gallery__item:hover img {
  transform: scale(1.06);
}

@media (min-width: 700px) {
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============ RSVP ============ */
.rsvp {
  background: var(--bg-alt);
  max-width: none;
}

.rsvp__form {
  max-width: 460px;
  margin: 0 auto var(--space-4);
  text-align: center;
}

.rsvp__status {
  margin-top: var(--space-1);
  font-size: var(--fs-small);
  color: var(--emerald);
  min-height: 1.4em;
}

.rsvp__wishes {
  max-width: 460px;
  margin: 0 auto;
}

.rsvp__wishes-title {
  font-size: 1.3rem;
  margin-bottom: var(--space-2);
}

.rsvp__list {
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
  text-align: left;
  display: grid;
  gap: var(--space-1);
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-soft) transparent;
}

.wish {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: var(--space-2);
}

.wish__head {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  flex-wrap: wrap;
}

.wish__name {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--emerald);
}

.wish__badge {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15em 0.7em;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--emerald-dark);
}

.wish__message {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.3em;
}

/* ============ GIFT ============ */
.gift__grid {
  display: grid;
  gap: var(--space-2);
  max-width: 420px;
  margin: 0 auto var(--space-2);
}

.gift-card {
  text-align: center;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(185, 138, 68, 0.16), transparent 55%),
    linear-gradient(150deg, var(--emerald-dark), var(--emerald-light));
  border: 1px solid var(--gold-soft);
  color: var(--ivory);
}

.gift-card__bank {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}

.gift-card__number {
  font-size: 1.35rem;
  letter-spacing: 0.14em;
  margin: 0.4em 0 0.1em;
  font-weight: 400;
}

.gift-card__name {
  font-size: 0.85rem;
  color: var(--sage);
  margin-bottom: var(--space-2);
}

.gift-card .btn {
  font-size: 0.8rem;
  padding: 0.55em 1.4em;
}

.gift__address {
  max-width: 420px;
  margin: 0 auto;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.gift__address strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--emerald);
  font-weight: 600;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--bg-deep);
  color: var(--text-on-deep);
  max-width: none;
  padding-bottom: var(--space-4);
}

.footer__star {
  width: 32px;
  height: 32px;
  margin: 0 auto var(--space-2);
  fill: none;
  stroke-width: 1;
}

.footer__note {
  max-width: 48ch;
  margin: 0 auto var(--space-2);
  font-size: 0.92rem;
  color: rgba(251, 248, 242, 0.75);
}

.footer__thanks {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold-light);
}

.footer__names {
  font-size: var(--fs-title);
  font-style: italic;
  color: var(--ivory);
  margin: var(--space-2) 0;
}

.footer__closing {
  font-size: 1.15rem;
  color: var(--sage);
}
