/* THEME: Minimalist Modern — off-white / ink black, one clay accent.
   Editorial, art-gallery mood: hairline rules, generous whitespace,
   restraint over ornament. Elegance comes from type & spacing alone. */
:root{
  --color-bg: #f7f5f0;
  --color-surface: #ffffff;
  --color-text: #17140f;
  --color-text-soft: #7a756c;
  --color-primary: #a9613f;
  --color-secondary: #ded8ca;
  --color-accent: #17140f;
  --color-line: rgba(23,20,15,.14);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-script: 'Space Grotesk', sans-serif;
  --font-body: 'Newsreader', serif;
  --radius: 3px;
  --shadow-soft: none;
}

body{ background: #e9e6df; }

.frame{
  background:
    radial-gradient(circle at 12% 8%, rgba(169,97,63,.05), transparent 40%),
    radial-gradient(circle at 88% 22%, rgba(169,97,63,.04), transparent 38%),
    radial-gradient(circle at 8% 42%, rgba(169,97,63,.035), transparent 36%),
    radial-gradient(circle at 92% 60%, rgba(169,97,63,.045), transparent 38%),
    radial-gradient(circle at 15% 78%, rgba(169,97,63,.04), transparent 36%),
    radial-gradient(circle at 85% 94%, rgba(169,97,63,.05), transparent 40%),
    var(--color-bg);
  box-shadow: none;
}
.frame::before{
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Ccircle cx='1' cy='1' r='1' fill='%2317140f'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 36px 36px;
}
@media (min-width: 620px){
  .frame{ border-left: 1px solid var(--color-line); border-right: 1px solid var(--color-line); }
}

/* ---------- Cover — no floral art, just type & a hairline mark ---------- */
.cover{
  background: var(--color-bg);
}
.cover::before{
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M0 0H120M0 0V120' stroke='%2317140f' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 120px;
}
.cover__eyebrow{
  position: relative;
  padding-bottom: clamp(12px, 2.8vh, 22px);
}
.cover__eyebrow::after{
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 1px;
  background: var(--color-primary);
}
.cover__names{
  font-weight: 300;
  letter-spacing: .01em;
  text-transform: none;
}
.cover__date{
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: clamp(11px, 2.8vw, 13px);
}
.cover__guest-box{
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  padding: clamp(10px, 2.2vh, 18px) 0;
}
.cover__guest-box .guest-name{ font-weight: 500; letter-spacing: .02em; }

.btn-open{
  border-radius: 0;
  border: 1px solid var(--color-accent);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: clamp(10px, 2.6vw, 12px);
  font-weight: 500;
  animation: none;
}
.btn-open span{ font-size: clamp(12px, 3.2vw, 14px); }
.btn-open:hover{ background: var(--color-accent); color: var(--color-bg); }

/* ---------- Section rhythm ---------- */
.section{
  border-bottom: none;
  padding: 100px 30px;
}

/* Faint corner registration marks — editorial/print motif, alternating sides */
.section::before, .section::after{
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  z-index: -1;
  pointer-events: none;
  opacity: .4;
}
.section::before{
  top: 26px; left: 14px;
  border-top: 1px solid var(--color-primary);
  border-left: 1px solid var(--color-primary);
}
.section::after{
  bottom: 26px; right: 14px;
  border-bottom: 1px solid var(--color-primary);
  border-right: 1px solid var(--color-primary);
}
.section:nth-of-type(even)::before{
  left: auto; right: 14px;
  border-left: none;
  border-right: 1px solid var(--color-primary);
}
.section:nth-of-type(even)::after{
  right: auto; left: 14px;
  border-right: none;
  border-left: 1px solid var(--color-primary);
}
.section__eyebrow{
  font-weight: 500;
  letter-spacing: .32em;
}
.section__title{
  font-weight: 600;
  letter-spacing: -.01em;
  text-transform: none;
}
.section__title::after{
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--color-primary);
  margin: 22px auto 0;
}

/* ---------- Hero — oversized faint monogram behind the type ---------- */
.hero{ position: relative; overflow: hidden; }
.hero::before{
  content: 'D & N';
  position: absolute;
  top: 46%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 34vw;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--color-text);
  opacity: .045;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
}
.hero > *{ position: relative; z-index: 1; }
.hero__quote{ font-weight: 400; font-style: italic; }
.hero__quote-src{ text-transform: uppercase; letter-spacing: .2em; }
.hero__names{
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
}
.hero__amp{ color: var(--color-primary); }

.countdown__item{
  border-radius: 0;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
  box-shadow: none;
}
.countdown__num{ font-weight: 600; }

/* ---------- Couple — square frames, no halo shadow ---------- */
.couple__photo{
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  box-shadow: none;
}
.couple__name{ font-weight: 600; letter-spacing: -.005em; }
.couple__divider{
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 22px;
  color: var(--color-line);
}

/* ---------- Events / Gift / Wishes — hairline cards, flat ---------- */
.event-card, .gift-card, .wish-card{
  border-radius: var(--radius);
  box-shadow: none;
  border: 1px solid var(--color-line);
}
.event-card__name{ font-weight: 600; }
.event-card__map{ filter: grayscale(1) contrast(1.05); border-radius: 0; }

.btn-outline, .btn-copy{
  border-radius: 0;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 11px;
}
.btn-outline:hover{ background: var(--color-accent); color: var(--color-bg); border-color: var(--color-accent); }

.btn-solid{
  border-radius: 0;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 500;
  background: var(--color-accent);
}

/* ---------- Story — thin rule, square markers instead of dots ---------- */
.story__dot{
  border-radius: 0;
  border: 1px solid var(--color-primary);
  background: var(--color-bg);
  width: 12px; height: 12px;
  left: 14px; top: 6px;
}
.story__title{ font-weight: 600; }

/* ---------- Gallery / Video — sharp corners, no zoom bounce ---------- */
.gallery__item{ border-radius: 0; box-shadow: none; }
.gallery__item:hover img{ transform: scale(1.03); }
.video-box{ border-radius: 0; }
.video-box__play{ border-radius: 0; background: rgba(247,245,240,.92); }

/* ---------- Forms ---------- */
.rsvp-form input, .rsvp-form select, .rsvp-form textarea{
  border-radius: 0;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
}

/* ---------- Footer ---------- */
.footer{ background: none; position: relative; }
.footer::before{
  content: '';
  position: absolute;
  top: 40px; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 36px;
  background: var(--color-line);
  z-index: -1;
  pointer-events: none;
}
.footer__names{
  font-weight: 300;
  text-transform: none;
}
.footer__hashtag{ text-transform: uppercase; letter-spacing: .18em; font-size: 12px; }
.footer__credit{ letter-spacing: .1em; text-transform: uppercase; font-size: 10px; }

/* ---------- Nav dots / music toggle — square, hairline ---------- */
.navdots a{ border-radius: 1px; }
.navdots a.active{ transform: scale(1.2); }

.music-toggle{
  border-radius: 50%;
  box-shadow: none;
  border: 1px solid var(--color-line);
}

/* ==========================================================================
   SECTION-TO-SECTION COLOR GRADATION
   Same technique as the flowers reference: each section's gradient starts
   where the previous one ended, so the tint flows continuously down the
   page. For this theme the wash uses a single muted clay tone (the
   existing --color-primary) at very low alpha — just enough tonal drift
   to feel considered, never a visible "color band".
   ========================================================================== */
/* Note: nth-of-type(7) is the video section — it's hidden (display:none) in
   dynamically-rendered invitations when no video is set, so it stays a flat
   continuation of C5 rather than introducing a new stop. That way the wash
   stays seamless whether or not the video section actually renders. */
.section:nth-of-type(1){ background: linear-gradient(180deg, transparent, rgba(169,97,63,.025)); }         /* hero -> C1 */
.section:nth-of-type(2){ background: linear-gradient(180deg, rgba(169,97,63,.025), rgba(169,97,63,.04)); }  /* C1 -> C2 */
.section:nth-of-type(3){ background: linear-gradient(180deg, rgba(169,97,63,.04), rgba(169,97,63,.025)); }  /* C2 -> C3 */
.section:nth-of-type(4){ background: linear-gradient(180deg, rgba(169,97,63,.025), rgba(169,97,63,.045)); } /* C3 -> C4 */
.section:nth-of-type(5){ background: rgba(169,97,63,.045); }                                                  /* C4 flat (rundown, may be hidden) */
.section:nth-of-type(6){ background: linear-gradient(180deg, rgba(169,97,63,.045), rgba(169,97,63,.03)); }  /* C4 -> C5 */
.section:nth-of-type(7){ background: rgba(169,97,63,.03); }                                                  /* C5 flat (video, may be hidden) */
.section:nth-of-type(8){ background: linear-gradient(180deg, rgba(169,97,63,.03), rgba(169,97,63,.02)); }   /* C5 -> C6 */
.section:nth-of-type(9){ background: linear-gradient(180deg, rgba(169,97,63,.02), transparent); }            /* C6 -> footer */

/* ==========================================================================
   THEMED MOTION — a crisp, precise reveal ("sliding cleanly into place")
   instead of the generic fade, plus exactly one faint continuous accent
   so the page still reads as calm and editorial, not busy.
   ========================================================================== */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.5s cubic-bezier(.22,1,.36,1), transform 1.5s cubic-bezier(.22,1,.36,1);
}
.reveal.in{ opacity: 1; transform: translateY(0); }

.gallery__item.reveal{ transition-delay: calc(var(--i, 0) * 60ms); }
.gallery__item:nth-child(1){ --i: 0; } .gallery__item:nth-child(2){ --i: 1; } .gallery__item:nth-child(3){ --i: 2; }
.gallery__item:nth-child(4){ --i: 3; } .gallery__item:nth-child(5){ --i: 4; } .gallery__item:nth-child(6){ --i: 5; }
.gallery__item:nth-child(7){ --i: 6; } .gallery__item:nth-child(8){ --i: 7; } .gallery__item:nth-child(9){ --i: 8; }

.story__item.reveal{ transition-delay: calc(var(--i, 0) * 90ms); }
.story__item:nth-child(1){ --i: 0; } .story__item:nth-child(2){ --i: 1; }
.story__item:nth-child(3){ --i: 2; } .story__item:nth-child(4){ --i: 3; }

.countdown__item.reveal{ transition-delay: calc(var(--i, 0) * 110ms); }

/* ==========================================================================
   GRANULAR REVEAL DIRECTIONS — restrained: straight translate, no rotation,
   no scale-bounce. "Hairline/editorial" calls for a clean, flat entrance.
   ========================================================================== */
.reveal--left{ transform: translateX(-28px); }
.reveal--left.in{ transform: translateX(0); }
.reveal--right{ transform: translateX(28px); }
.reveal--right.in{ transform: translateX(0); }
.reveal--zoom{ transform: scale(.92); }
.reveal--zoom.in{ transform: scale(1); }
.reveal--flip{ transform: translateY(14px); }
.reveal--flip.in{ transform: translateY(0); }

.hero__names span.reveal{ display: inline-block; }

.event-card.reveal{ transition-delay: calc(var(--i,0) * 90ms); }
.event-card:nth-of-type(odd).reveal{ transform: translateX(-24px); }
.event-card:nth-of-type(odd).reveal.in{ transform: translateX(0); }
.event-card:nth-of-type(even).reveal{ transform: translateX(24px); }
.event-card:nth-of-type(even).reveal.in{ transform: translateX(0); }

.story__item:nth-child(odd).reveal{ transform: translateX(-24px); }
.story__item:nth-child(odd).reveal.in{ transform: translateX(0); }
.story__item:nth-child(even).reveal{ transform: translateX(24px); }
.story__item:nth-child(even).reveal.in{ transform: translateX(0); }

/* ==========================================================================
   SECTION TITLE — a quiet "curtain lift": the title text rises up through
   a mask instead of fading in place, independent of the generic .reveal
   fade used elsewhere. Restrained — no bounce, just a clean reveal.
   ========================================================================== */
.section__title__mask{ display: block; overflow: hidden; }
.section__title__inner{
  display: block;
  transform: translateY(112%);
  transition: transform 1.4s cubic-bezier(.22,1,.36,1);
}
.section__title.reveal{ transform: none; transition: opacity .7s ease; }
.section__title.reveal.in{ transform: none; }
.section__title.reveal.in .section__title__inner{ transform: translateY(0); }

/* ==========================================================================
   PHOTO GRID — every photo is on screen at once; the mosaic layout itself
   lives in base.css. This only adds the template's own depth and hover so
   the tiles still belong to this design. Prev/next moved into the lightbox,
   which opens when a tile is tapped.
   ========================================================================== */
.gallery__item{ transition: transform .45s cubic-bezier(.22,1,.36,1), box-shadow .45s ease; }
.gallery__item:hover{ transform: translateY(-3px); }

/* ---------- Scroll progress bar — thin, flat single color ---------- */
.scroll-progress{
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--color-primary);
  z-index: 600;
  transition: width .1s linear;
}

/* ---------- Countdown tick pulse — subtle, snappy ---------- */
@keyframes countTick{
  0%{ transform: scale(1); }
  50%{ transform: scale(1.08); }
  100%{ transform: scale(1); }
}
.countdown__num.is-ticking{ animation: countTick .5s ease-out; transform-origin: center; }

/* ==========================================================================
   FALLING PARTICLES — deliberately minimal for this theme: a handful of
   tiny monochrome dots/ticks in ink or clay, near-invisible, drifting very
   slowly. Ambient texture only, never confetti-like or busy.
   ========================================================================== */
.petals-overlay{
  position: fixed;
  inset: 0;
  max-width: var(--max-w);
  margin: 0 auto;
  overflow: hidden;
  pointer-events: none;
  z-index: 350;
}
.petal{
  position: absolute;
  top: -4%;
  border-radius: 50%;
  background: var(--color-text);
  will-change: transform;
  animation-name: petalFall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.petal.petal--tick{
  border-radius: 0;
  background: var(--color-primary);
}
@keyframes petalFall{
  0%{ transform: translate(0,0) rotate(0deg); }
  100%{ transform: translate(var(--drift, 10px), 118vh) rotate(var(--spin, 20deg)); }
}

/* One subtle continuous ambient touch: the hairline under each section
   title breathes very slowly, never a bounce or a spin. */
@keyframes hairlineBreathe{
  0%, 100%{ opacity: .55; }
  50%{ opacity: 1; }
}
.section__title::after{ animation: hairlineBreathe 8s ease-in-out infinite; }

.gallery__item img{ transition: transform .45s cubic-bezier(.4,0,.2,1), filter .45s cubic-bezier(.4,0,.2,1); }
.gallery__item:hover img{ transform: scale(1.035); filter: brightness(1.03); }

.couple__photo{ transition: transform .4s cubic-bezier(.4,0,.2,1); }
.couple__person:hover .couple__photo{ transform: scale(1.015); }

/* ==========================================================================
   FLOATING GRAPHICS — one precise geometric mark per section (a thin ring
   in the theme's single clay accent), drifting almost imperceptibly. No
   organic/decorative shapes here — restraint is this theme's whole point,
   so the mark itself, not just the motion, stays minimal.
   ========================================================================== */
.deco-float{
  position: absolute;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}
.deco-float svg{ width: 100%; height: 100%; display: block; }

@keyframes floatSwayA{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-4px); }
}
@keyframes floatSwayB{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-5px); }
}
@keyframes floatSwayC{
  0%, 100%{ transform: translate(0,0); }
  50%{ transform: translate(2px,-4px); }
}
.deco-float.anim-a{ animation: floatSwayA 9s cubic-bezier(.4,0,.2,1) infinite; }
.deco-float.anim-b{ animation: floatSwayB 10s cubic-bezier(.4,0,.2,1) infinite; }
.deco-float.anim-c{ animation: floatSwayC 11s cubic-bezier(.4,0,.2,1) infinite; }

@media (max-width: 420px){
  .deco-float{ transform: scale(.85); }
}

@media (prefers-reduced-motion: reduce){
  .section__title::after, .deco-float, .petal, .countdown__num.is-ticking{ animation: none !important; }
  .reveal, .reveal--left, .reveal--right, .reveal--zoom, .reveal--flip,
  .section__title__inner, .gallery__item{ transition-duration: .01ms !important; }
  .petals-overlay{ display: none; }
}

/* === THEMED MOTION (generated) === */
.cover{
  --open-wash: linear-gradient(180deg, rgba(247,245,240,.98), rgba(222,216,202,.5));
  --cover-exit: translateY(-101%);
}
.cover.is-closing{ filter: none; transition: transform .8s cubic-bezier(.7,0,.2,1), opacity .6s ease; }

/* Titles settle their tracking instead of sliding around. */
@keyframes trackSettle{
  from{ letter-spacing: .34em; opacity: 0; }
  to{ letter-spacing: .02em; opacity: 1; }
}
.section__title.reveal.in .section__title__inner{ animation: trackSettle 1.1s both cubic-bezier(.22,1,.36,1); }

/* A single hairline wipes across under each section eyebrow. */
.section__eyebrow{ position: relative; padding-bottom: 12px; }
.section__eyebrow::after{
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  width: 0; height: 1px;
  background: var(--color-primary);
  transform: translateX(-50%);
  transition: width .9s .2s cubic-bezier(.7,0,.2,1);
}
.section.in .section__eyebrow::after,
.reveal.in .section__eyebrow::after{ width: 46px; }

/* Cards answer the pointer with a flat, precise lift — no rotation. */
.event-card, .gift-card, .wish-card{
  transition: transform .35s cubic-bezier(.7,0,.2,1), border-color .35s ease;
}
.event-card:hover, .gift-card:hover{ transform: translateY(-3px); border-color: var(--color-text); }

/* Countdown digits swap on a clean vertical slide. */
.countdown__num{ transition: transform .3s cubic-bezier(.7,0,.2,1); }
.countdown__num.is-ticking{ animation: none; transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce){
  .section__title.reveal.in .section__title__inner{ animation: none !important; }
  .section__eyebrow::after{ transition-duration: .01ms !important; }
}
/* === /THEMED MOTION === */

/* ==========================================================================
   READABILITY — palette corrections so no line of copy blends into the art.

   Already the closest to right: near-black ink on off-white paper, and no
   gradient-filled type to go wrong. Only the two supporting tones sat under
   the line, so they are nudged rather than reworked. The dot texture on
   .frame::before runs at .05 here and is left exactly as it is.

   Everything below is tuned against the page as it actually *renders*, not
   against --color-bg. The frame's tint pools, the section wash and the
   repeating pattern stack up, so the real paper behind the copy measures
   about rgb(239,232,225) — appreciably darker than the nominal background
   this palette was originally picked against.

   The palette variables themselves keep their values everywhere they fill,
   border or back something — only the text roles move, onto the --ink-*
   companions declared below.
   ========================================================================== */
:root{
  --color-text-soft: #6c6760;   /* the body tone, deepened to 4.5:1 on the rendered paper */
  --ink-primary: #985738;       /* text-only companion to --color-primary */
}

.section__eyebrow,
.hero__quote-src,
.hero__amp,
.couple__ig,
.couple__divider,
.story__date,
.rundown__time,
.gift-card__bank,
.wish-card__status,
.footer__hashtag{ color: var(--ink-primary); }

/* === PERFORMANCE (iOS Safari) ===
   Safari on iPhone blanks the page (black screen) or tears while scrolling
   once too many large composited layers are animating at the same time. The
   Musim/Keagamaan templates never hit that limit, so these rules bring this
   template onto the same budget: the big storybook scenes stay still, and
   nothing that spans the whole page is animated. */
.deco-float.is-scene{ animation: none; }
.frame::before{ animation: none !important; }
/* === /PERFORMANCE === */
