/* ══════════════════════════════════════════════════════════════════════════
   Հովհաննես և Զարինե — 11.10.2026
   Each hour of the day is a full-height photograph with the type standing in
   its foreground. The page reads bright: instead of darkening the picture to
   carry light text, a wash of paper rises from the base and the type sits on
   it in ink. Display voice is the Armenian serif; hours are Didone figures.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --paper:   #F4F5F1;   /* luminous near-white, a faint green cast from the meadow light */
  --paper-2: #E9EBE3;
  --ink:     #1E211C;
  --soft:    #57604F;
  --hair:    #D4D9CC;
  --accent:  #A83A28;   /* the anthurium, used sparingly and nowhere by accident */

  --sans:  'Noto Sans Armenian', system-ui, sans-serif;
  --serif: 'Noto Serif Armenian', Georgia, serif;
  --didone:'Bodoni Moda', 'Noto Serif Armenian', Didot, Georgia, serif;

  --gut:    clamp(1.25rem, 6vw, 5.5rem);
  --rhythm: clamp(5rem, 14vw, 11rem);
  --ease:   cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.0625rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: var(--ink); color: var(--paper); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.25rem; font-family: var(--sans); font-size: 0.85rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ── Shared type ─────────────────────────────────────────────────────────── */

.fig {
  font-family: var(--didone);
  font-variation-settings: 'opsz' 96;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 400;
}

.kicker {
  margin: 0 0 1.35rem;
  font-family: var(--sans);
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--soft);
}

.h-section {
  margin: 0 0 clamp(2.5rem, 7vw, 4rem);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

/* ── Addresses ───────────────────────────────────────────────────────────── */

/* Set as ordinary text: no rule, no icon. The pointer and the focus ring are
   the only affordances, which is what the invitation calls for. */
.addr {
  display: inline-block;
  margin: 0.9rem 0 0;
  font-family: var(--sans);
  font-size: 0.875rem; font-weight: 400;
  color: var(--soft);
  text-decoration: none;
  transition: color 0.35s var(--ease);
}
a.addr:hover { color: var(--ink); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-content: center;
  padding: calc(var(--gut) + 2rem) var(--gut);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.hero__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 8%;
  filter: brightness(1.07) saturate(1.06);
}
/* A wash of paper, not a shadow: the picture stays lit and the type reads in ink. */
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(105% 78% at 50% 52%,
      rgba(237, 228, 214, 0.76) 0%,
      rgba(226, 214, 195, 0.66) 42%,
      rgba(214, 200, 180, 0.42) 72%,
      rgba(214, 200, 180, 0.14) 100%);
}

.hero__kicker { color: var(--accent); }

.hero__names {
  margin: 0;
  display: grid; justify-items: center;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 11vw, 6.5rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
}
.hero__amp {
  font-size: 0.34em;
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  margin-block: 0.16em;
  letter-spacing: 0;
}

.hero__date {
  margin: clamp(1.5rem, 4vw, 2.25rem) 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1rem, 2.6vw, 1.4rem);
  letter-spacing: 0.04em;
}
.hero__date .fig { font-size: 1.08em; }
.hero__day {
  margin: 0.55rem 0 0;
  font-family: var(--sans);
  font-size: 0.64rem; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--soft);
}

.hero__cue {
  position: absolute; bottom: clamp(1.5rem, 5vh, 3rem);
  left: 50%; translate: -50% 0;
  display: block; padding: 0.75rem;
}
.hero__cue span {
  display: block; width: 1px; height: clamp(2rem, 6vh, 3.25rem);
  background: linear-gradient(to bottom, var(--ink), rgba(30, 33, 28, 0));
  transform-origin: top;
  animation: cue 2.8s var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.35); opacity: 0.3; }
  45%      { transform: scaleY(1);    opacity: 0.85; }
}

/* ── Invitation ──────────────────────────────────────────────────────────── */

.invite {
  padding: var(--rhythm) var(--gut);
  max-width: 52rem; margin-inline: auto;
  text-align: center;
}
.invite__lead {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  line-height: 1.42;
  letter-spacing: -0.008em;
  text-wrap: balance;
}
.invite__note {
  margin: clamp(1.75rem, 5vw, 2.5rem) 0 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--soft);
}

/* ── Chapters ────────────────────────────────────────────────────────────── */

.chapter {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: end;
  padding: var(--gut);
  padding-bottom: clamp(3rem, 11vh, 6.5rem);
  overflow: hidden;
  isolation: isolate;
}
.chapter__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% var(--focus, 30%);
  filter: brightness(1.05) saturate(1.05);
}
#ch-1 .chapter__img { --focus: 0%; }   /* bouquet — both faces ride the top edge */
#ch-2 .chapter__img { --focus: 20%; }  /* handing over the flowers */
#ch-3 .chapter__img { --focus: 20%; }  /* the meadow, houses behind */
#ch-4 .chapter__img { --focus: 26%; }  /* the turn */
/* Paper rising from the base, so the type below reads in ink on light. */
.chapter__veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top,
    rgba(244, 245, 241, 0.95) 0%,
    rgba(244, 245, 241, 0.88) 22%,
    rgba(244, 245, 241, 0.46) 40%,
    rgba(244, 245, 241, 0.10) 57%,
    rgba(244, 245, 241, 0) 72%);
}

.chapter__body { max-width: 32ch; }

.chapter__hour {
  margin: 0;
  font-size: clamp(3.5rem, 15vw, 9rem);
  line-height: 0.84;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.chapter__hour sup {
  font-size: 0.2em;
  vertical-align: 2.9em; /* 2.9 × 0.2em ≈ cap height of the hour */
  letter-spacing: 0.12em;
  margin-left: 0.12em;
  color: var(--soft);
}
.chapter__place {
  margin: clamp(0.9rem, 3vw, 1.5rem) 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.25rem, 3.2vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.chapter__kind {
  margin: 0.6rem 0 0;
  font-family: var(--sans);
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--soft);
}
/* ── Hour rail ───────────────────────────────────────────────────────────── */

.rail {
  position: fixed; z-index: 40;
  right: clamp(0.5rem, 2vw, 1.5rem);
  top: 50%; translate: 0 -50%;
  padding: 0.85rem 0.7rem;
  border-radius: 2px;
  background: rgba(244, 245, 241, 0.76);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(30, 33, 28, 0.07);
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.rail.is-visible { opacity: 1; pointer-events: auto; }
.rail__list { display: grid; gap: clamp(0.7rem, 2vh, 1.15rem); margin: 0; padding: 0; list-style: none; }
.rail__link {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
  text-decoration: none;
}
.rail__num {
  font-size: 0.7rem;
  color: var(--soft); opacity: 0.55;
  transition: color 0.45s var(--ease), opacity 0.45s var(--ease);
  min-width: 1.4em; text-align: right;
}
.rail__tick {
  display: block; width: 0.7rem; height: 1px;
  background: var(--soft); opacity: 0.4;
  transition: width 0.45s var(--ease), background-color 0.45s var(--ease), opacity 0.45s var(--ease);
}
.rail__link.is-now .rail__num  { color: var(--ink); opacity: 1; }
.rail__link.is-now .rail__tick { width: 1.5rem; background: var(--accent); opacity: 1; }
.rail__link:hover .rail__num   { color: var(--ink); opacity: 1; }

@media (max-width: 420px) { .rail__num { display: none; } }

/* ── Countdown ───────────────────────────────────────────────────────────── */

.cdwrap {
  padding: var(--rhythm) var(--gut);
  text-align: center;
  background: var(--paper-2);
  border-block: 1px solid var(--hair);
}
.cdwrap__h {
  margin: 0 0 clamp(2.5rem, 7vw, 3.75rem);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 5vw, 2.75rem);
  line-height: 1.14;
  letter-spacing: -0.012em;
}
.cd { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.5rem, 7vw, 5rem); }
.cd--done {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 3.2vw, 1.65rem);
  font-weight: 300;
}
.cd__cell { display: grid; gap: 0.6rem; min-width: 3.25rem; }
.cd__num {
  font-family: var(--didone);
  font-variation-settings: 'opsz' 96;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 400;
  font-size: clamp(2.25rem, 8.5vw, 4.5rem);
  line-height: 1;
}
.cd__label {
  font-family: var(--sans);
  font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--soft);
}

/* ── Moments ─────────────────────────────────────────────────────────────── */

.moments {
  padding: var(--rhythm) var(--gut);
  max-width: 1180px; margin-inline: auto;
  text-align: center;
}
/* Photographs dropped in a pile across the full width of the page: no mounts,
   no borders, just the pictures themselves at their own 2:3 proportion. Every
   position is a percentage of a fixed-ratio canvas, so the arrangement holds
   its composition at any window size. */
.collage {
  position: relative;
  width: 100vw;
  margin-inline: calc(50% - 50vw);   /* break out of the section's measure */
  margin-top: clamp(1.5rem, 4vw, 3rem);
  aspect-ratio: 100 / 78;
  overflow: hidden;                  /* the outer photographs bleed off each edge */
  /* Every value below is a percentage of this canvas, so the arrangement is
     identical at every screen width — it scales, it never reflows. */
}
.print {
  position: absolute;
  left: var(--l); top: var(--t); width: var(--w);
  z-index: var(--z, 1);
  margin: 0;
  rotate: var(--r, 0deg);
  box-shadow: 0 18px 40px -22px rgba(30, 33, 28, 0.55);
  transition:
    rotate 0.6s var(--ease),
    scale 0.6s var(--ease),
    box-shadow 0.6s var(--ease);
}
.print__img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;   /* the photographs' own shape, so none of them is cropped */
}

/* Pick one up: it straightens and lifts clear of the pile. */
.print:hover,
.print:focus-within {
  rotate: 0deg;
  scale: 1.05;
  z-index: 20;
  box-shadow: 0 30px 56px -24px rgba(30, 33, 28, 0.6);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.foot {
  text-align: center;
  padding: clamp(4rem, 12vw, 7.5rem) var(--gut);
  border-top: 1px solid var(--hair);
}
.foot__names {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 5.5vw, 2.75rem);
  letter-spacing: -0.015em;
}
.foot__names i { font-style: italic; color: var(--accent); font-size: 0.62em; margin-inline: 0.18em; }
.foot__date {
  margin: 1.15rem 0 0;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  letter-spacing: 0.12em;
  color: var(--soft);
}
.foot__closing {
  margin: clamp(2.25rem, 6vw, 3.25rem) 0 0;
  font-family: var(--sans);
  font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--soft); opacity: 0.72;
}

/* ── Motion ──────────────────────────────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 1.5rem, 0);
  transition:
    opacity 1.1s var(--ease) var(--d, 0ms),
    transform 1.1s var(--ease) var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* Prints settle in rather than sliding: `rotate` is a separate property here,
   so the tilt survives the reveal transform. */
.print[data-reveal] { transform: translate3d(0, 1.25rem, 0) scale(0.96); }
.print[data-reveal].is-in { transform: none; }

.ph__img { opacity: 0; transition: opacity 0.9s var(--ease); }
.ph__img.is-loaded { opacity: 1; }

.hero__kicker, .hero__names, .hero__date, .hero__day { animation: fade 1.4s var(--ease) both; }
.hero__kicker { animation-delay: 0.12s; }
.hero__names  { animation-delay: 0.26s; }
.hero__date   { animation-delay: 0.62s; }
.hero__day    { animation-delay: 0.74s; }
@keyframes fade {
  from { opacity: 0; transform: translate3d(0, 1.25rem, 0); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .ph__img { opacity: 1; }
  .print:hover, .print:focus-within { rotate: var(--r, 0deg); scale: 1; }
}
