/* ==========================================================================
   Invitation — 55th jubilee. Gold-on-white, per assets/concept.jpg
   Palette (from concept): #FFFFFF bg, #B99656 gold, #B08A3E/#E8C766 bar,
   #1F1B16 heading, #2E2A24 card text, #3A342C body text.
   Tuned after visual QA against the concept (washes lighter, mobile fits
   one screen, cards optically equal).
   ========================================================================== */

:root {
  --gold:        #B99656;
  --gold-dark:   #B08A3E;
  --gold-bright: #E8C766;
  --gold-mid:    #D9B96E;
  --ink:         #1F1B16;
  --ink-soft:    #2E2A24;
  --ink-body:    #3A342C;
  --font-script: 'Marck Script', 'Segoe Script', cursive;
  --font-serif:  'Playfair Display', 'PT Serif', Georgia, serif;
  --font-sans:   'PT Sans', 'Segoe UI', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: #fff;
  color: var(--ink-body);
  font-family: var(--font-sans);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

::selection { background: rgba(232, 199, 102, .45); }

/* --- Top gold bar ------------------------------------------------------- */

.gold-bar {
  position: relative;
  z-index: 2;                     /* stays clean above the washes */
  height: 12px;
  flex: none;
  background: linear-gradient(90deg,
    var(--gold-dark) 0%, var(--gold-bright) 50%, var(--gold-dark) 100%);
}

/* --- Background art: washes & branches ---------------------------------- */
/* JPEG assets sit on white; multiply blends the white away over the
   white page so only the watercolor / line art remains visible.
   Opacities keep them pale champagne like the concept, not amber.      */

.wash,
.branch {
  position: fixed;
  pointer-events: none;
  user-select: none;
  mix-blend-mode: multiply;
  z-index: 0;
}

.wash {
  filter: saturate(.78) brightness(1.14);
}

.wash--tl {           /* top-left watercolor smear   (spot-2) */
  top: -8vh;
  left: -6vw;
  width: clamp(220px, 30vw, 460px);
  opacity: .28;
  transform: rotate(-14deg);
}

.wash--mid {          /* faint streak right of centre (spot-3) */
  top: 42%;
  right: 4vw;
  width: clamp(180px, 26vw, 380px);
  opacity: .38;
  transform: rotate(10deg);
}

.wash--b {            /* pale band bottom-left        (spot-4) */
  bottom: -8vh;
  left: 6vw;
  width: clamp(160px, 22vw, 330px);
  opacity: .4;
  transform: rotate(-6deg);
}

.wash--br {           /* rich amber blob bottom-right (spot-1) */
  bottom: -12vh;
  right: -10vw;
  width: clamp(260px, 36vw, 560px);
  opacity: .42;
  transform: rotate(8deg);
}

.branch--left {       /* branch composition, left edge (branch-1) */
  left: 1vw;
  bottom: 3vh;
  width: clamp(110px, 15vw, 210px);
  opacity: .95;
}

.branch--tr {         /* mirrored branch, top-right    (branch-1) */
  top: -14vh;
  right: -12vw;
  width: clamp(220px, 30vw, 430px);
  transform: rotate(85deg);
}

/* --- Content column ------------------------------------------------------ */

.page {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: calc(100svh - 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(24px, 4.5vh, 52px) 20px;
}

/* Big «55» accent */
.age { margin-bottom: clamp(8px, 1.8vh, 18px); }

.age__row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 34px);
}

/* soft white glow keeps the number readable over washes */
.age__row::before {
  content: '';
  position: absolute;
  inset: -14px -28px;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(255, 255, 255, .85) 55%, rgba(255, 255, 255, 0) 100%);
  z-index: -1;
}

.age__number {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(80px, 10vw, 136px);
  line-height: 1.1;   /* 1.1: smaller values trim the gradient at the glyph bottom */
  /* layered: moving sheen sweep + static gold gradient, both clipped to text */
  background-image:
    linear-gradient(115deg,
      transparent 0 42%, rgba(255, 255, 255, .55) 50%, transparent 58% 100%),
    linear-gradient(160deg,
      var(--gold-dark) 0%, var(--gold-bright) 45%, var(--gold-mid) 100%);
  background-size: 300% 100%, 100% 100%;
  background-position: 0% 0, 0 0;
  background-repeat: no-repeat;
  animation: shine 6s ease-in-out 2.5s infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* sheen sweeps across the digits, then rests */
@keyframes shine {
  0%, 18%   { background-position: 0% 0, 0 0; }
  46%, 100% { background-position: 100% 0, 0 0; }
}

.age__rule { height: 1px; width: clamp(40px, 6vw, 88px); transform: translateY(-3px); }
.age__rule--l { background: linear-gradient(90deg, transparent, var(--gold)); }
.age__rule--r { background: linear-gradient(90deg, var(--gold), transparent); }

.age__caption {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .45em;
  text-indent: .45em; /* balances tracking on the last letter */
  text-transform: uppercase;
  color: var(--gold-dark);
}

/* Script eyebrow + gold rule */
.eyebrow {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 46px);
  color: #2B2622;
  margin-top: clamp(6px, 1.2vh, 12px);
}

.divider {
  width: 160px;
  height: 1px;
  background: var(--gold);
  margin: clamp(12px, 1.8vh, 18px) auto;
}

/* Main heading */
.title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: clamp(14px, 2.2vh, 22px);
}

/* Body paragraph */
.lead {
  max-width: 620px;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--ink-body);
  margin-bottom: clamp(20px, 3.2vh, 30px);
}

/* Concise countdown to the event */
.countdown {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  margin-bottom: clamp(24px, 3.5vh, 36px);
}

.countdown__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.countdown__value {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

/* --- Info cards ----------------------------------------------------------- */

.cards {
  display: flex;
  justify-content: center;
  width: min(680px, 100%);
  gap: clamp(20px, 3vw, 40px);
}

.card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--gold);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .6),
    0 0 0 4px rgba(255, 255, 255, .55),
    0 14px 34px rgba(185, 150, 86, .14);
  padding: 26px 34px;
}

.card__icon {
  display: block;
  margin: 0 auto 12px;
  height: 54px;
  width: auto;
}

svg.card__icon,
a.card__icon svg {
  display: block;
  margin: 0 auto;
  width: 54px;
  height: 54px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* clickable pin: same map link as the address, with a hover affordance */
a.card__icon {
  border-radius: 50%;
  transition: transform .2s ease;
}

a.card__icon:hover,
a.card__icon:focus-visible {
  transform: scale(1.1) translateY(-2px);
}

a.card__icon:hover svg,
a.card__icon:focus-visible svg {
  stroke: #8F6D2E;
}

a.card__icon:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.card__label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.card__value {
  font-size: 19px;
  color: var(--ink-soft);
}

/* Address link — obviously clickable: gold, underlined, arrow, hover */
.card__link {
  color: var(--gold-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color .2s ease, text-decoration-thickness .2s ease;
}

.card__link:hover,
.card__link:focus-visible {
  color: #8F6D2E;
  text-decoration-thickness: 2px;
}

.card__link:active { color: #6F5524; }

.card__link svg {
  width: .55em;
  height: .55em;
  margin-left: .3em;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Entrance ------------------------------------------------------------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.page > * {
  animation: rise .7s ease-out both;
}
.page > :nth-child(2) { animation-delay: .08s; }
.page > :nth-child(3) { animation-delay: .14s; }
.page > :nth-child(4) { animation-delay: .20s; }
.page > :nth-child(5) { animation-delay: .26s; }
.page > :nth-child(6) { animation-delay: .32s; }
.page > :nth-child(7) { animation-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  .page > * { animation: none; }
  .age__number { animation: none; }   /* sheen stays off-screen */
  a.card__icon { transition: none; }
  a.card__icon:hover,
  a.card__icon:focus-visible { transform: none; }
}

/* ?still — instant render for screenshots / link previews (FX keep running) */
.still .page > * { animation: none; }
.still .age__number { animation: none; }

/* --- Celebration FX canvas (see js/effects.js) ----------------------------- */

.fx {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* --- Mobile (per concept: stacked cards, cropped decor, wrapped heading) --- */
/* Sizes tuned so the whole invitation fits one phone screen (~840px).      */

@media (max-width: 640px) {
  .gold-bar { height: 8px; }
  .page { min-height: calc(100svh - 8px); padding: 20px 16px; }

  .age { margin-bottom: 8px; }
  .age__number { font-size: clamp(88px, 22vw, 112px); }

  .eyebrow { font-size: clamp(24px, 6.6vw, 32px); margin-top: 4px; }
  .divider { width: 120px; margin: 10px auto; }
  .title   { font-size: clamp(28px, 8.6vw, 38px); margin-bottom: 12px; }

  /* let the paragraph flow naturally instead of forced desktop breaks */
  .lead {
    font-size: 15px;
    line-height: 1.5;
    max-width: 38ch;
    margin-bottom: 14px;
  }
  .lead br { display: none; }

  .countdown { margin-bottom: 16px; }
  .countdown__label { font-size: 11px; }
  .countdown__value { font-size: 17px; }

  .cards {
    flex-direction: column;
    gap: 14px;
  }

  .card { padding: 18px 20px; }

  .card__icon,
  svg.card__icon,
  a.card__icon svg { height: 44px; }
  svg.card__icon,
  a.card__icon svg { width: 44px; }

  .card__label { margin-bottom: 6px; }
  .card__value { font-size: 17px; }

  /* decorations: smaller, cropped into the corners */
  .wash--tl  { width: 55vw; left: -14vw; top: -4vh; opacity: .3; }
  .wash--br  { width: 70vw; right: -18vw; bottom: -10vh; opacity: .38; }
  .wash--mid { width: 80vw; right: -20vw; top: 46%; opacity: .3; }
  .wash--b   { width: 60vw; left: -14vw; bottom: -6vh; opacity: .35; }

  .branch--tr   { width: 52vw; right: -16vw; top: -4vh; }
  .branch--left { width: 84px; left: -18px; bottom: 5vh; }
}
