/* ============================================================
   GITTE & YVES — Wedding Website Styles
   Classic Minimalist Destination Wedding
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Pinyon+Script&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500;1,600&family=Jost:wght@300;400;500&display=swap');

@font-face {
  font-family: 'Weddingday';
  src: url('weddingday.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:          #F6EEE1;
  --surface:     #FBF6EE;
  --ink-section: #1A1208;
  --ink:         #211A10;
  --ink-soft:    #5C5346;
  --on-dark:     #F7EFE2;
  --accent:      #B08A4F;
  --wax:         #7C2D2A;
  --hairline:    rgba(33,26,16,0.16);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  position: relative;
}

/* ── High-end paper texture ──────────────────────────────────
   Fine neutral (grayscale) fibre grain, applied ONLY to the creamy
   sections (hero, location, rsvp, footer) — never over the photo
   sections (details / countdown b&w / photos). */
#hero::after,
#location::after,
#rsvp::after,
footer::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.20;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

img { max-width: 100%; display: block; }

/* ── Typography helpers ─────────────────────────────────── */
.font-script {
  font-family: 'Weddingday', 'Pinyon Script', cursive;
  font-weight: 400;
}
.font-serif {
  font-family: 'Cormorant Garamond', serif;
}
.font-sans {
  font-family: 'Jost', sans-serif;
}

.eyebrow {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── Hairline ───────────────────────────────────────────── */
.hairline {
  border: none;
  border-top: 1px solid var(--hairline);
  width: 100%;
}

/* ── Scroll-reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Outline button ─────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  border: 1px solid var(--accent);
  color: var(--ink);
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.4s var(--ease-out-expo), color 0.4s var(--ease-out-expo);
  will-change: transform;
}
.btn:hover {
  background: var(--accent);
  color: var(--surface);
}
.btn--dark {
  border-color: var(--on-dark);
  color: var(--on-dark);
}
.btn--dark:hover {
  background: var(--on-dark);
  color: var(--ink-section);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  padding: 1.4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.5s var(--ease-out-expo),
              backdrop-filter 0.5s var(--ease-out-expo),
              border-bottom 0.5s var(--ease-out-expo),
              padding 0.4s var(--ease-out-expo);
}
#nav.scrolled {
  background: rgba(251,246,238,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--hairline);
  padding: 0.9rem 3rem;
}

.nav-logo {
  font-family: 'Weddingday', 'Pinyon Script', cursive;
  font-size: 1.9rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }

/* ============================================================
   HERO — ENVELOPE
   ============================================================ */
#hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* ── Envelope hero: closed → (click) → open, cross-fade between two images ── */
.envelope-anim-wrapper {
  position: relative;
  width: min(600px, 92vw);
  /* Shorter box so the envelope sits closer to the title (less dead space) */
  aspect-ratio: 1400 / 760;
  cursor: pointer;
  /* Prevent the blue tap-highlight / selection flash on mobile */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}
.envelope-anim-wrapper:focus { outline: none; }
.envelope-anim-wrapper:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.envelope-poster,
.envelope-final { -webkit-user-drag: none; user-select: none; }
.envelope-anim-wrapper.opened {
  cursor: default;
}

/* Closed-envelope (shown until clicked) */
.envelope-poster {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: auto;
  z-index: 2;
  transition: opacity 0.8s var(--ease-out-expo);
}
.envelope-anim-wrapper.opened .envelope-poster {
  opacity: 0;
  pointer-events: none;
}

/* Open-envelope (fades in after the click, then holds) */
.envelope-final {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62%;
  height: auto;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s var(--ease-out-expo);
}
.envelope-anim-wrapper.opened .envelope-final {
  opacity: 1;
}

/* Click hint */
.envelope-anim-hint {
  position: absolute;
  bottom: 8%;
  left: 0; right: 0;
  text-align: center;
  z-index: 3;
  transition: opacity 0.4s var(--ease-out-expo);
}
.envelope-anim-wrapper.opened .envelope-anim-hint {
  opacity: 0;
  pointer-events: none;
}

/* Hero title (revealed after open) */
.hero-title {
  margin-top: 2.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.hero-title.visible {
  opacity: 1;
  transform: translateY(0);
}
.hero-title h1 {
  font-family: 'Weddingday', 'Pinyon Script', cursive;
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 1;
  color: var(--ink);
}
.hero-title .date-line {
  margin-top: 0.8rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.scroll-cue-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: pulse-line 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes pulse-line {
  0%, 100% { opacity: 0.4; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue-line { animation: none; opacity: 0.6; }
}

/* ============================================================
   DETAILS SECTION
   ============================================================ */
#details {
  background:
    linear-gradient(rgba(246,238,225,0.85), rgba(246,238,225,0.85)),
    url('details-background.webp') center/cover no-repeat fixed;
  padding: 7rem 3rem;
  position: relative;
  overflow: hidden;
}

.ghost-watermark {
  position: absolute;
  bottom: -2rem;
  right: -1rem;
  font-family: 'Pinyon Script', cursive;
  font-size: clamp(8rem, 18vw, 16rem);
  color: var(--ink);
  opacity: 0.03;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.details-inner {
  max-width: 860px;
  margin: 0 auto;
}

.details-heading {
  font-family: 'Weddingday', 'Pinyon Script', cursive;
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: var(--ink);
  margin: 0.5rem 0 3.5rem;
}

.detail-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 2rem;
  padding: 1.8rem 0;
}
.detail-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0.08em;
  padding-top: 0.15rem;
}
.detail-content {}
.detail-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
  letter-spacing: 0.04em;
}
.detail-value {
  font-family: 'Jost', sans-serif;
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-weight: 300;
  letter-spacing: 0.04em;
}

/* ============================================================
   COUNTDOWN — light style, matching site palette
   ============================================================ */
#countdown {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem;
  overflow: hidden;
}

/* Black-and-white photo background (same treatment as the Details section) */
.countdown-bg {
  position: absolute;
  inset: 0;
  background: url('details-background.webp') center/cover no-repeat fixed;
  filter: grayscale(1);
}
.countdown-overlay {
  position: absolute;
  inset: 0;
  background: rgba(246,238,225,0.85);
}

.countdown-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.countdown-label-date {
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}

.countdown-heading {
  font-family: 'Weddingday', 'Pinyon Script', cursive;
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 3rem;
}

/* Hairline separator above countdown */
#countdown::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  border-top: 1px solid var(--hairline);
}

/* Big days display */
.countdown-days-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 3rem;
}

.days-number {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(6rem, 18vw, 14rem);
  line-height: 0.85;
  color: var(--ink);
  font-weight: 300;
}

.days-label-vert {
  font-family: 'Jost', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* Small units */
.countdown-units {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.unit-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
  line-height: 1;
}

.unit-label {
  font-family: 'Jost', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============================================================
   RSVP
   ============================================================ */
#rsvp {
  position: relative;
  /* Reserve space at the bottom so the drawing sits fully under the content,
     with breathing room above and below it */
  padding: 7rem 2rem 46vw;
  overflow: hidden;
  background: var(--surface);
  text-align: center;
}

/* Creamy background with a faint right-aligned line-drawing */
.rsvp-bg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8vw;          /* gap below the drawing */
  height: 30vw;         /* drawing band; gap above comes from the section padding */
  background: url('rsvp-background.webp') center bottom / contain no-repeat;
  opacity: 0.28;
  pointer-events: none;
}
.rsvp-overlay { display: none; }

.rsvp-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.rsvp-heading {
  font-family: 'Weddingday', 'Pinyon Script', cursive;
  font-size: clamp(3rem, 9vw, 6rem);
  color: var(--ink);
  line-height: 1;
  margin: 0.5rem 0 1.5rem;
}

.rsvp-body {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 2.2rem;
}

.rsvp-note {
  margin-top: 1.4rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}

/* ============================================================
   LOCATION
   ============================================================ */
#location {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem;
  overflow: hidden;
  background: var(--surface);
}

/* Creamy background with a faint line-drawing of the venue */
.location-bg {
  position: absolute;
  inset: 0;
  background: url('location-background.webp') center/cover no-repeat;
  opacity: 0.14;
  pointer-events: none;
}
.location-overlay { display: none; }

.location-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  width: 100%;
}

.location-heading {
  font-family: 'Weddingday', 'Pinyon Script', cursive;
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 1.6rem;
  text-align: center;
}

.location-body {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto 1.4rem;
}

.location-address {
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.video-placeholder {
  position: relative;
  aspect-ratio: 16/9;
  background: rgba(33,26,16,0.08);
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.4s;
}
.video-placeholder:hover { border-color: var(--accent); }

.play-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
  transition: background 0.4s var(--ease-out-expo), color 0.4s;
}
.play-btn svg {
  width: 22px;
  height: 22px;
  fill: var(--accent);
  margin-left: 4px;
}
.video-placeholder:hover .play-btn {
  background: var(--accent);
}
.video-placeholder:hover .play-btn svg {
  fill: var(--surface);
}

.video-caption {
  margin-top: 1.2rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-align: center;
}

/* ============================================================
   PHOTOS
   ============================================================ */
#photos {
  position: relative;
  min-height: 70vh;
  /* Hidden until the wedding date (25/06/2027); JS reveals it. */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem;
  overflow: hidden;
}

.photos-bg {
  position: absolute;
  inset: 0;
  background: url('photos-background.webp') center/cover no-repeat;
  /* Parallax: handled via JS for prefers-reduced-motion support */
  will-change: transform;
}

.photos-overlay {
  position: absolute;
  inset: 0;
  background: rgba(246,238,225,0.78);
}

.photos-inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
  text-align: center;
}

.photos-heading {
  font-family: 'Weddingday', 'Pinyon Script', cursive;
  font-size: clamp(3.5rem, 10vw, 7rem);
  color: var(--ink);
  line-height: 1;
  margin: 0.4rem 0 1.4rem;
}

.photos-body {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.18rem);
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 2.2rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

footer p {
  font-family: 'Jost', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  z-index: 5;
}

/* ============================================================
   FLOATING HEARTS
   ============================================================ */
.heart-particle {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  font-size: 1rem;
  color: var(--accent);
  opacity: 1;
  animation: heart-rise 2.4s var(--ease-out-expo) forwards;
  will-change: transform, opacity;
}
@keyframes heart-rise {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.85; }
  100% { transform: translate(var(--dx), var(--dy, -240px)) scale(0.35) rotate(var(--rot)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .heart-particle { display: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  #nav { padding: 1.1rem 1.4rem; }
  #nav.scrolled { padding: 0.8rem 1.4rem; }
  .nav-links { gap: 1.2rem; }
  .nav-links .btn { display: none; }

  #details { padding: 5rem 1.4rem; }
  .detail-row { grid-template-columns: 3rem 1fr; gap: 0 1rem; }

  #countdown { padding: 5rem 1.4rem; }
  .countdown-units { gap: 1.6rem; }

  #location, #photos { padding: 5rem 1.4rem; }
  /* keep the bottom reservation so the drawing's gaps survive on mobile */
  #rsvp { padding: 5rem 1.4rem 46vw; }
}

@media (max-width: 480px) {
  .nav-links a:not(.btn) { display: none; }
  .days-number { font-size: clamp(5rem, 22vw, 8rem); }
}
