/* =====================================================================
   Tigran & Karina — Wedding Site
   Stack: vanilla HTML/CSS/JS. Mobile-first responsive.
   Palette: #F09367 #F0A599 #CE5A43 #AB482D #BAB635 #889063
   ===================================================================== */

:root {
  /* Brand palette — exact values from Figma SVG export */
  --c-peach:        #F19468;
  --c-pink:         #EFA598;
  --c-terracotta:   #B65333;
  --c-rust:         #B65333;
  --c-olive:        #58613C;
  --c-sage:         #899064;

  /* Neutrals from design */
  --c-cream:        #F4EDDC;   /* main page bg */
  --c-cream-soft:   #EAE1CD;
  --c-ink:          #2E1E18;   /* dark warm — primary text on cream */
  --c-ink-soft:     #4D3A2E;
  --c-paper:        #F4EDDC;

  /* Typography — matches Figma (Italiana for hero names, Cormorant Italic for big serifs, Inter for sans) */
  --f-display: "Italiana", Georgia, serif;                    /* hero names */
  --f-serif:   "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-italic:  "Italiana", "Cormorant Garamond", serif;
  --f-sans:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 64px);
  --section-py: clamp(72px, 10vw, 140px);

  /* Easing */
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, figure, hr { margin: 0; padding: 0; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input { font: inherit; color: inherit; }

/* ---------- Base ---------- */
body {
  font-family: var(--f-sans);
  color: var(--c-ink);
  background: var(--c-cream);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================ NAV ============================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px clamp(20px, 4vw, 64px);
  color: #fff;
  transition: background-color .35s var(--ease), color .35s var(--ease), backdrop-filter .35s;
}
.nav.is-scrolled {
  background: rgba(31, 26, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  color: currentColor;
}
.nav__logo img { width: 44px; height: 36px; object-fit: contain; }
.nav__links {
  display: flex; gap: 40px;
  justify-self: center;
}
.nav__links a {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .9;
  transition: opacity .2s;
}
.nav__links a:hover { opacity: 1; }
.nav__lang {
  justify-self: end;
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; letter-spacing: .15em;
}
.nav__lang button {
  padding: 4px 2px;
  letter-spacing: .15em;
  opacity: .55;
  transition: opacity .2s;
}
.nav__lang button:hover { opacity: .9; }
.nav__lang button.is-active { opacity: 1; font-weight: 500; }
.nav__lang span { opacity: .35; }
.nav__burger { display: none; }

/* ============================ HERO ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  color: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero__photo, .hero__photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero__photo img { object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 600px at 50% 35%, rgba(0,0,0,.05), rgba(0,0,0,.55) 70%, rgba(0,0,0,.65)),
    linear-gradient(180deg, rgba(31,26,20,.35) 0%, rgba(31,26,20,.25) 40%, rgba(31,26,20,.55) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--gutter);
}

.monogram {
  width: clamp(140px, 16vw, 220px);
  margin: 0 auto clamp(20px, 3vw, 36px);
  color: #fff;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.25));
}
.monogram img { width: 100%; height: auto; display: block; }

.hero__names {
  font-family: "Italiana", Georgia, serif;
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 65px);   /* Figma: 65px */
  letter-spacing: 8px;                    /* Figma: 8px */
  line-height: 1;
  margin-bottom: 28px;
  text-transform: uppercase;
}
.hero__names .amp {
  font-family: "Italiana", serif;
  font-size: 1em;
  margin: 0 .25em;
  font-weight: 400;
  text-transform: none;
  vertical-align: 0;
}
.hero__rule {
  display: block;
  width: 70px; height: 1px;
  background: rgba(255,255,255,.55);
  margin: 0 auto 22px;
}
.hero__date {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: .04em;
}
.hero__loc {
  margin-top: 18px;
  font-family: var(--f-sans);
  font-weight: 700;                /* Figma: bold */
  font-size: 11px;
  letter-spacing: 4px;             /* Figma: 4px */
  text-transform: uppercase;
  opacity: .92;
}

/* ============================ QUOTE ============================ */
.quote {
  position: relative;
  background: var(--c-cream);
  padding: var(--section-py) var(--gutter);
  text-align: center;
  overflow: hidden;
}

/* 3-layer stage: bg photo (z1) -> italic text (z2) -> couple cutout (z3) */
.quote__stage {
  position: relative;
  width: clamp(260px, 30vw, 360px);
  aspect-ratio: 11/15;
  margin: 0 auto;
}
.quote__layer {
  position: absolute;
  pointer-events: none;
  user-select: none;
}
.quote__layer--bg {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.quote__layer--cutout {
  /* Cutout sits exactly over bg, same size, top layer.
     Couple body covers parts of text; transparent areas reveal text behind. */
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 3;
}

.quote__text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 92vw);
  z-index: 2;

  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(36px, 5.6vw, 80px);    /* Figma: 80px */
  line-height: 1.2;
  letter-spacing: 0.005em;                 /* Figma: 0.005em */
  color: #FFFFFF;                          /* Figma: fill="white" */
  margin: 0;
}
.quote__text span { display: block; }

.quote__below {
  position: relative;
  margin-top: clamp(40px, 5vw, 80px);    /* tighter to the photo */
  z-index: 4;
}

.quote__invite {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 11px;                  /* Figma: 11px */
  letter-spacing: 2px;              /* Figma: 2px */
  line-height: 2;
  text-transform: uppercase;
  color: var(--c-ink);
}
.quote__rule {
  border: none;
  border-top: 1px solid rgba(46,30,24,.35);
  width: 60px;
  margin: 28px auto;
}
.quote__formal {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 2.7vw, 36px);  /* Figma: 36px */
  color: var(--c-ink);
}
.quote__time {
  margin-top: 14px;
  font-family: var(--f-sans);
  font-size: 11px;
  letter-spacing: 3px;              /* Figma: 3px */
  text-transform: uppercase;
  color: var(--c-terracotta);
}

/* ============================ SCHEDULE ============================ */
.schedule {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 660px;
}
.schedule__panel {
  background: var(--c-peach);
  color: #fff;
  padding: clamp(60px, 7vw, 100px) clamp(40px, 6vw, 96px);
  display: flex; flex-direction: column;
  justify-content: center;
}
.schedule__title {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(72px, 11vw, 150px);   /* Figma: 150px */
  line-height: .92;
  letter-spacing: 8px;                    /* Figma: 8px */
  margin-bottom: clamp(40px, 6vw, 72px);
  text-transform: uppercase;
}
.schedule__title .row1 { display: block; }
.schedule__title .row2 {
  display: block;
  margin-left: 1.6em;                     /* second word indented to the right */
}
.schedule__list {
  display: flex; flex-direction: column;
  gap: 36px;
  align-self: flex-end;          /* sit on the right side of the panel content */
  width: 50%;                    /* take right half of content -> items start at panel mid */
  text-align: left;              /* items left-aligned within their column */
}
.schedule__list li { padding-left: 0; }
.schedule__time {
  font-family: var(--f-sans);
  font-weight: 700;                /* Figma: bold */
  font-size: 25px;                 /* Figma: 25px */
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.schedule__name {
  font-family: var(--f-sans);
  font-weight: 700;                /* Figma: bold */
  font-size: 20px;                 /* Figma: 20px */
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.schedule__place {
  display: inline-flex; align-items: center; gap: 10px;
  justify-content: flex-start;     /* pin first, then place text — left aligned */
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 20px;                 /* Figma: 20px */
  letter-spacing: 2px;
  opacity: .96;
  color: inherit;
  text-decoration: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  cursor: pointer;
}
.schedule__place:hover {
  opacity: 1;
  transform: translateY(-1px);
}
.schedule__place:hover .pin { transform: scale(1.15); }
.schedule__place .pin {
  width: 18px; height: 18px; flex: 0 0 18px;
  transition: transform .2s var(--ease);
}

.schedule__photo {
  position: relative;
  overflow: hidden;
  background: #2A1F18;
}
.schedule__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ============================ DRESS / PALETTE ============================ */
.dress {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 660px;
}
.dress__photo {
  position: relative;
  overflow: hidden;
  background: #6B5C45;
}
.dress__photo img { width: 100%; height: 100%; object-fit: cover; }

.dress__panel {
  background: var(--c-sage);
  color: #fff;
  padding: clamp(60px, 7vw, 100px) clamp(40px, 6vw, 96px);
  display: flex; flex-direction: column;
  justify-content: flex-end;            /* both text and PALETTE sit in lower portion */
  align-items: stretch;
  position: relative;
  padding-bottom: 20px;
}
.dress__text {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(15px, 1.4vw, 20px);   /* Figma: 20px */
  line-height: 1.6;
  letter-spacing: 2px;                    /* Figma: 2px */
  max-width: 600px;                       /* wider per reference */
  /* indent ~140px from panel edge to match Figma x position */
  padding-left: clamp(20px, 8vw, 140px);
}
.dress__title {
  margin-top: clamp(20px, 3vw, 40px);   /* tight gap above PALETTE */
  margin-bottom: 0;
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(72px, 11vw, 150px);  /* Figma: 150px */
  line-height: 1;
  letter-spacing: 8px;                   /* Figma: 8px */
  text-transform: uppercase;             /* Figma: PALETTE caps */
  color: var(--c-pink);                  /* Figma fill: #EFA598 (pink, not cream) */
  /* Per Figma: PALETTE extends further left than the body text */
  padding-left: clamp(8px, 4vw, 50px);
}

/* ============================ RSVP ============================ */
.rsvp {
  background: var(--c-cream);
  padding: var(--section-py) var(--gutter);
  text-align: center;
}
.rsvp__title {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(56px, 10.5vw, 150px);  /* Figma: 150px */
  line-height: 1;
  letter-spacing: 8px;                     /* Figma: 8px */
  text-transform: uppercase;
  color: var(--c-sage);                    /* Figma fill: #899064 sage */
  margin-bottom: clamp(40px, 6vw, 72px);
  text-align: left;
  /* Figma: PLEASE BE starts at x≈200 of 1440 → ~14% inset.
     But on the design ref, PLEASE BE visually sits left-of-center.
     Use a responsive inset that keeps both lines on the left side. */
  padding-left: clamp(40px, 14vw, 220px);
}
.rsvp__title span { display: block; }
.rsvp__title span:last-child {
  margin-left: clamp(60px, 14vw, 220px);  /* OUR GUESTS indented to the right */
}
.rsvp__form {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 56px);
  text-align: left;
  align-items: end;
}

/* Name — looks like a thin underline with the placeholder above it */
.rsvp__input {
  border: 0;
  border-bottom: 1px solid var(--c-ink);
  background: transparent;
  padding: 14px 2px;
  font-family: var(--f-serif);
  font-size: 18px;
  color: var(--c-ink);
  outline: none;
  transition: border-color .25s var(--ease);
  width: 100%;
  min-height: 56px;
}
.rsvp__input::placeholder {
  color: var(--c-ink-soft);
  opacity: .65;
  font-family: var(--f-serif);
  font-size: 18px;
  letter-spacing: .02em;
}
.rsvp__input:focus { border-bottom-color: var(--c-terracotta); }
.rsvp__input:focus::placeholder { opacity: .35; }

/* Confirm button — initially looks like a CTA underline (matches Name input height).
   On hover the full outline appears around the button. */
.rsvp__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom-color: var(--c-ink);
  font-family: var(--f-serif);
  font-size: 18px;
  letter-spacing: .02em;
  color: var(--c-ink-soft);
  text-align: left;
  cursor: pointer;
  transition:
    border-color .25s var(--ease),
    color .25s var(--ease),
    background-color .25s var(--ease),
    transform .25s var(--ease);
}
.rsvp__cta:hover,
.rsvp__cta:focus-visible {
  border-color: var(--c-ink);
  color: var(--c-ink);
  outline: none;
}
.rsvp__cta:active { transform: translateY(1px); }
.rsvp__cta[disabled] {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Status text — small caps below the form */
.rsvp__status {
  grid-column: 1 / -1;
  margin-top: 18px;
  min-height: 1.4em;
  font-family: var(--f-sans);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
}
.rsvp__status[data-state="success"] { color: var(--c-sage); }
.rsvp__status[data-state="error"]   { color: var(--c-terracotta); }
.rsvp__status[data-state="loading"] { color: var(--c-ink-soft); opacity: .85; }

/* ============================ COUNTDOWN ============================ */
.countdown {
  position: relative;
  min-height: 560px;
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 80px var(--gutter);
}
.countdown__bg, .countdown__bg img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.countdown__bg img { object-fit: cover; }
.countdown__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(31,26,20,.45) 0%, rgba(31,26,20,.55) 50%, rgba(31,26,20,.7) 100%);
}
.countdown__content { position: relative; z-index: 2; }

.countdown__grid {
  display: inline-flex;
  align-items: flex-start;
  gap: clamp(6px, 1vw, 14px);
  line-height: 1;
}
.cd-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
}
.cd-num {
  font-family: var(--f-serif);
  font-style: italic;                /* Figma: Cormorant Garamond Italic */
  font-weight: 400;
  font-size: clamp(60px, 12vw, 170px);  /* Figma: 170px */
  letter-spacing: 8px;                /* Figma: 8px */
}
.cd-label {
  font-family: var(--f-sans);
  font-weight: 300;                  /* Figma: 300 (light) */
  font-size: clamp(14px, 2vw, 30px);  /* Figma: 30px */
  letter-spacing: 8px;                /* Figma: 8px */
  text-transform: lowercase;          /* Figma: 'days' lowercase */
  opacity: .95;
}
.cd-sep {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(60px, 12vw, 170px);
  opacity: .65;
  padding: 0 .05em;
  align-self: flex-start;
  line-height: 1;
}

/* ============================ FOOTER ============================ */
.footer {
  background: var(--c-rust);
  color: var(--c-paper);
  padding: clamp(48px, 6vw, 80px) var(--gutter);
  text-align: center;
}
.footer__mono {
  font-family: var(--f-display);
  font-size: 36px;
  letter-spacing: .35em;
  margin-bottom: 14px;
}
.footer__sub {
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 28px;
}
.footer__credit {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
  opacity: .95;
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 900px) {
  .nav {
    grid-template-columns: auto 1fr auto;
    padding: 16px 20px;
  }
  .nav__links { display: none; }
  .nav__lang { font-size: 11px; gap: 4px; }
  .nav__lang button { padding: 4px 1px; }

  /* Schedule -> stack: walking photo first, then peach panel */
  .schedule {
    grid-template-columns: 1fr;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .schedule__photo {
    height: 70vw;
    max-height: 520px;
    min-height: 280px;
    order: 1;
  }
  .schedule__panel {
    order: 2;
    padding: 64px 28px;
  }
  .schedule__title { font-size: clamp(72px, 22vw, 132px); }
  .schedule__title .italic { margin-left: .8em; }
  /* on mobile, schedule items full width, left-aligned */
  .schedule__list {
    width: 100%;
    text-align: left;
    align-self: stretch;
  }
  .schedule__place { justify-content: flex-start; }
  /* dress text + palette: full width on mobile, no inset */
  .dress__panel { justify-content: center; }
  .dress__text { padding-left: 0; max-width: none; }
  .dress__title { padding-left: 0; margin-top: clamp(24px, 4vw, 48px); }

  /* Dress -> stack */
  .dress {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .dress__photo {
    height: 60vw;
    max-height: 480px;
    min-height: 280px;
  }
  .dress__panel { padding: 64px 28px; }
  .dress__title { font-size: clamp(72px, 20vw, 124px); }

  /* RSVP form -> stack */
  .rsvp__form { grid-template-columns: 1fr; gap: 28px; }
  /* On mobile, drop the indent on the second line so it doesn't overflow right */
  .rsvp__title span:last-child { margin-left: 0; }

  /* Quote photo bigger relative */
  .quote__photo {
    width: clamp(180px, 50vw, 260px);
    top: calc(var(--section-py) + 8px);
  }
  .quote__text { font-size: clamp(30px, 8.5vw, 56px); line-height: 1.22; }

  /* Countdown */
  .countdown__digits { font-size: clamp(44px, 13vw, 88px); }
  .countdown__labels { font-size: 10px; letter-spacing: .25em; }
}

@media (max-width: 540px) {
  :root { --section-py: 72px; --gutter: 22px; }
  .hero__loc { letter-spacing: .25em; }
  .quote__photo { width: 56vw; max-width: 240px; }
  .quote__invite { font-size: 10.5px; letter-spacing: .18em; }
  .palette__swatch { width: 36px; height: 36px; }
  .footer__mono { font-size: 28px; letter-spacing: .3em; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
