/* ==========================================================================
   For Juliana — stylesheet
   ========================================================================== */

:root {
  --cream:      #fffaf7;
  --cream-2:    #fff3ee;
  --blush:      #ffeaf0;
  --blush-2:    #ffdce6;
  --rose:       #e2879e;
  --rose-deep:  #c2607a;
  --plum:       #5b3742;
  --plum-soft:  #8a6570;
  --gold:       #d8a976;
  --white:      #ffffff;

  --shadow-sm: 0 2px 10px rgba(160, 100, 120, .10);
  --shadow-md: 0 10px 30px rgba(160, 100, 120, .14);
  --shadow-lg: 0 24px 60px rgba(140, 85, 105, .20);

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Quicksand", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;

  --maxw: 1080px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--plum);
  background:
    radial-gradient(1200px 700px at 12% -8%,  var(--blush) 0%, transparent 60%),
    radial-gradient(900px 700px at 92% 8%,   #fdf0e4 0%, transparent 58%),
    radial-gradient(1000px 800px at 50% 110%, #fceef4 0%, transparent 60%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

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

button { font-family: inherit; cursor: pointer; }

::selection { background: var(--blush-2); color: var(--plum); }

/* ==========================================================================
   1. PASSWORD GATE
   ========================================================================== */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(900px 620px at 50% 0%,   #ffe6ee 0%, transparent 62%),
    radial-gradient(760px 620px at 12% 100%, #fdeadd 0%, transparent 60%),
    radial-gradient(760px 620px at 88% 92%,  #f6e8f7 0%, transparent 60%),
    var(--cream);
  transition: opacity .8s var(--ease), visibility .8s;
}

.gate.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* falling petals ------------------------------------------------------------ */
.gate__petals { position: absolute; inset: 0; pointer-events: none; }

.petal {
  position: absolute;
  top: -6vh;
  border-radius: 60% 40% 55% 45% / 55% 55% 45% 45%;
  background: linear-gradient(150deg, #ffd4e1, #ffb9cd);
  opacity: .55;
  animation: petal-fall linear infinite;
}

@keyframes petal-fall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg);      opacity: 0; }
  10%  { opacity: .6; }
  100% { transform: translate3d(6vw, 112vh, 0) rotate(420deg);  opacity: 0; }
}

/* card --------------------------------------------------------------------- */
.gate__card {
  position: relative;
  width: min(430px, 100%);
  padding: 52px 34px 34px;
  text-align: center;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(226, 135, 158, .22);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  animation: rise .9s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.gate__card.is-wrong { animation: shake .5s; }

@keyframes shake {
  0%, 100%      { transform: translateX(0); }
  15%, 55%      { transform: translateX(-9px); }
  35%, 75%      { transform: translateX(9px); }
  90%           { transform: translateX(-3px); }
}

.gate__seal {
  position: absolute;
  top: -27px; left: 50%;
  transform: translateX(-50%);
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--rose), var(--rose-deep));
  box-shadow: 0 8px 22px rgba(194, 96, 122, .38);
}
.gate__seal svg { width: 26px; height: 26px; fill: #fff; }

.gate__eyebrow {
  margin: 0 0 4px;
  font-size: .68rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--rose);
}

.gate__title {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 8vw, 2.7rem);
  letter-spacing: .01em;
}

.gate__field { position: relative; }

.gate__input {
  width: 100%;
  padding: 15px 48px 15px 20px;
  font-family: var(--sans);
  font-size: 1.02rem;
  letter-spacing: .1em;
  text-align: center;
  color: var(--plum);
  background: rgba(255, 255, 255, .9);
  border: 1.5px solid var(--blush-2);
  border-radius: 14px;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.gate__input::placeholder { color: #e3bfcb; letter-spacing: .18em; }
.gate__input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(226, 135, 158, .16);
}

.gate__peek {
  position: absolute;
  top: 50%; right: 8px;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: none;
  border: 0;
  border-radius: 10px;
  color: var(--rose);
  opacity: .75;
  transition: opacity .2s, background .2s;
}
.gate__peek:hover { opacity: 1; background: var(--blush); }
.gate__peek svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

.gate__btn {
  width: 100%;
  margin-top: 14px;
  padding: 15px 20px;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  border: 0;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(194, 96, 122, .3);
  transition: transform .2s var(--ease), box-shadow .25s;
}
.gate__btn:hover  { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(194, 96, 122, .38); }
.gate__btn:active { transform: translateY(0); }

.gate__error {
  min-height: 20px;
  margin: 14px 0 0;
  font-size: .84rem;
  color: var(--rose-deep);
}

.gate__hint {
  margin-top: 2px;
  padding: 4px 8px;
  font-size: .76rem;
  color: var(--plum-soft);
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--blush-2);
  transition: color .2s;
}
.gate__hint:hover { color: var(--rose-deep); }

.gate__hint-text {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: .96rem;
  color: var(--plum-soft);
  animation: rise .5s var(--ease) both;
}

/* ==========================================================================
   2. SITE SHELL
   ========================================================================== */

.site {
  position: relative;
  opacity: 0;
  transition: opacity 1s var(--ease) .15s;
}
.site.is-visible { opacity: 1; }

/* drifting hearts ---------------------------------------------------------- */
.hearts {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.heart {
  position: absolute;
  bottom: -8vh;
  color: var(--rose);
  opacity: .16;
  animation: drift linear infinite;
}
@keyframes drift {
  0%   { transform: translate3d(0, 6vh, 0) rotate(0deg) scale(.8);  opacity: 0; }
  12%  { opacity: .2; }
  100% { transform: translate3d(4vw, -112vh, 0) rotate(28deg) scale(1.1); opacity: 0; }
}

/* ==========================================================================
   3. HERO
   ========================================================================== */

.hero {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 12vh, 110px) 24px clamp(40px, 8vh, 70px);
  text-align: center;
}

.hero__eyebrow {
  margin: 0 0 6px;
  font-size: .7rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--rose);
}

.hero__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.9rem, 11vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-wrap: balance;
  background: linear-gradient(160deg, #d97f9a 0%, #c2607a 45%, #d8a976 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* The name is gradient-filled text, which means transparent glyphs painted
   over a background. A child element has no background of its own, so the
   ampersand needs a real colour or it renders as a gap. */
.hero__amp {
  font-size: .58em;
  font-style: italic;
  margin: 0 -.06em;
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
}

.hero__tagline {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  color: var(--plum-soft);
}

/* counters ----------------------------------------------------------------- */
.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: clamp(34px, 6vh, 58px) auto 0;
  max-width: 900px;
}

.counter {
  position: relative;
  padding: 26px 16px 22px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 135, 158, .2);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.counter:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.counter--accent {
  background: linear-gradient(160deg, rgba(255, 236, 242, .95), rgba(255, 246, 240, .9));
  border-color: rgba(226, 135, 158, .38);
}

.counter__label {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rose);
}

.counter__num {
  display: block;
  margin: 6px 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  line-height: 1.05;
  color: var(--rose-deep);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.counter__unit {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--plum-soft);
}

.counter__since {
  display: block;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 135, 158, .16);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--plum-soft);
}

.hero__scroll {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: clamp(30px, 6vh, 56px);
  font-size: .64rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--plum-soft);
  opacity: .65;
}
.hero__scroll-line {
  width: 1px; height: 46px;
  background: linear-gradient(var(--rose), transparent);
  animation: pulse-line 2.4s ease-in-out infinite;
}
@keyframes pulse-line {
  0%, 100% { transform: scaleY(.5); opacity: .4; transform-origin: top; }
  50%      { transform: scaleY(1);  opacity: 1;  transform-origin: top; }
}

/* ==========================================================================
   4. SECTIONS
   ========================================================================== */

.section {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(50px, 9vh, 90px) 24px;
}

.section__head { text-align: center; margin-bottom: clamp(34px, 6vh, 56px); }

.section__ornament {
  display: block;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.section__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 7vw, 3rem);
  color: var(--plum);
}

.section__lede {
  margin: 10px auto 0;
  max-width: 44ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--plum-soft);
}

/* ==========================================================================
   5. TIMELINE
   ========================================================================== */

/* Both timelines run down the middle of the page. The spine is drawn as a
   short connector above each marker rather than one continuous line, so it
   never cuts through the centred text or a photo. */
.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 660px;
}

.tl-item,
.ptl-item {
  position: relative;
  text-align: center;
}

.tl-item::before,
.ptl-item::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  margin-left: -1px;
  width: 2px; height: 18px;
  background: linear-gradient(rgba(226, 135, 158, 0), var(--rose));
  border-radius: 2px;
}

.tl-item::after,
.ptl-item::after {
  content: "";
  position: absolute;
  top: 22px; left: 50%;
  margin-left: -9.5px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--rose);
  border: 4px solid var(--white);
  box-shadow: 0 0 0 2px var(--rose), 0 0 0 7px rgba(255, 234, 240, .9);
  transform: scale(0);
  transition: transform .5s var(--ease) .2s;
}
.tl-item.is-in::after,
.ptl-item.is-in::after { transform: scale(1); }

.tl-item { padding: 58px 0 clamp(30px, 5vh, 44px); }
.tl-item:last-child { padding-bottom: 0; }

.tl-date {
  display: inline-block;
  padding: 4px 12px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rose-deep);
  background: var(--blush);
  border-radius: 999px;
}

.tl-title {
  max-width: 32ch;
  margin: 12px auto 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 4.2vw, 1.55rem);
  line-height: 1.32;
}

.tl-text {
  max-width: 52ch;
  margin: 0 auto;
  font-size: .96rem;
  line-height: 1.75;
  color: var(--plum-soft);
}
.tl-title + .tl-text { margin-top: 10px; }

/* ==========================================================================
   6. PHOTO TIMELINE
   ========================================================================== */

.ptl {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 520px;
}

.ptl-item { padding: 58px 0 clamp(38px, 6vh, 58px); }
.ptl-item:last-child { padding-bottom: 0; }

.ptl-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.ptl-date {
  display: inline-block;
  padding: 4px 12px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rose-deep);
  background: var(--blush);
  border-radius: 999px;
}

.ptl-day {
  font-family: var(--serif);
  font-style: italic;
  font-size: .9rem;
  color: var(--plum-soft);
}

.ptl-title {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 4.4vw, 1.65rem);
  line-height: 1.2;
  color: var(--plum);
}

.ptl-item .photo {
  max-width: 440px;
  margin: 14px auto 0;
}

.photo {
  margin: 0;
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.photo:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: var(--shadow-md); }

.photo__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--blush);
  border: 0;
  padding: 0;
  display: block;
}

.photo__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.photo:hover .photo__frame img { transform: scale(1.05); }

.photo__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(91, 55, 66, .18), transparent 45%);
  opacity: 0;
  transition: opacity .4s;
}
.photo:hover .photo__frame::after { opacity: 1; }

.photo__caption {
  padding: 15px 17px 18px;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.55;
  text-align: center;
  color: var(--plum-soft);
}

/* placeholder art (used until a real photo file exists) -------------------- */
.photo__frame.is-placeholder::after { display: none; }
.photo:hover .photo__frame.is-placeholder img { transform: none; }

/* ==========================================================================
   7. LETTER + FOOTER
   ========================================================================== */

.section--letter { padding-top: 0; }

.letter {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 60px);
  text-align: center;
  background:
    linear-gradient(160deg, rgba(255, 240, 245, .9), rgba(255, 250, 244, .9));
  border: 1px solid rgba(226, 135, 158, .24);
  border-radius: 26px;
  box-shadow: var(--shadow-md);
}

.letter__ornament {
  display: block;
  font-size: 1.9rem;
  color: var(--rose);
  margin-bottom: 6px;
}

.letter__title {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 6vw, 2.4rem);
}

.letter__text {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 3.4vw, 1.22rem);
  line-height: 1.9;
  color: var(--plum);
}
.letter__text p { margin: 0 0 1.1em; }
.letter__text p:last-child { margin-bottom: 0; }

.letter__sign {
  margin: 26px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--rose-deep);
}

.footer {
  position: relative;
  z-index: 1;
  padding: 40px 24px 56px;
  text-align: center;
}
.footer__line {
  width: 60px; height: 1px;
  margin: 0 auto 20px;
  background: var(--rose);
  opacity: .4;
}
.footer__note {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: .03em;
  color: var(--rose-deep);
}
.footer__lock {
  margin-top: 16px;
  padding: 7px 16px;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--plum-soft);
  background: none;
  border: 1px solid rgba(226, 135, 158, .3);
  border-radius: 999px;
  transition: color .2s, border-color .2s, background .2s;
}
.footer__lock:hover {
  color: var(--rose-deep);
  border-color: var(--rose);
  background: rgba(255, 255, 255, .6);
}

/* ==========================================================================
   8. LIGHTBOX
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 5vh 6vw;
  background: rgba(70, 40, 50, .82);
  backdrop-filter: blur(8px);
  animation: fade .3s var(--ease);
}
.lightbox[hidden] { display: none; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: 90vh;
  display: grid;
  gap: 14px;
  justify-items: center;
  animation: rise .45s var(--ease) both;
}

.lightbox__img {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 14px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .4);
  background: var(--blush);
}

.lightbox__caption {
  max-width: 56ch;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.6;
  color: #fff6f8;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  transition: background .2s, transform .2s;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .28); transform: scale(1.06); }

.lightbox__close {
  top: 18px; right: 18px;
  width: 42px; height: 42px;
  font-size: 1.7rem;
  line-height: 1;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  font-size: 1.8rem;
  line-height: 1;
}
.lightbox__nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }

/* ==========================================================================
   9. REVEAL ON SCROLL
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   10. RESPONSIVE
   ========================================================================== */

@media (max-width: 780px) {
  .counters { grid-template-columns: 1fr; gap: 14px; max-width: 420px; }
  .counter { padding: 20px 18px; }
  .counter__num { font-size: 3rem; }
  .lightbox { padding: 4vh 4vw; }
  .lightbox__nav { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .gate__card { padding: 48px 22px 28px; }
  .tl-item,
  .ptl-item { padding-top: 50px; }
  .tl-item::before,
  .ptl-item::before { height: 14px; }
  .tl-item::after,
  .ptl-item::after { top: 18px; margin-left: -8px; width: 16px; height: 16px; border-width: 3.5px; }
  .ptl-item .photo { max-width: none; }
}

/* ==========================================================================
   11. ACCESSIBILITY / PRINT
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hearts, .gate__petals { display: none; }
}

:focus-visible {
  outline: 2.5px solid var(--rose-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

@media print {
  .gate, .hearts, .hero__scroll, .footer__lock, .lightbox { display: none !important; }
  .site { opacity: 1 !important; }
  body { background: #fff; }
}
