/* =========================================================
   Tom & Teréz — see docs/design-brief.md for the rationale.
   Rule of thumb: chartreuse & baby blue only on burgundy/olive.
   ========================================================= */
:root {
  --cream:      #f4ede0;   /* ground, ~55% */
  --cream-hi:   #faf6ee;   /* card stock */
  --burgundy:   #5a1a24;   /* primary ink + band, ~28% */
  --olive:      #3f4529;   /* secondary ink for small labels */
  --blue:       #a8cdee;   /* baby blue accent, ~5% */
  --chartreuse: #d5dc4e;   /* spark accent, ~3% */
  --ink:        #2a1c1f;   /* body text */
  --ink-soft:   #5b4b4e;
  --hair:       rgba(90, 26, 36, .16);

  --display: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  --serif:   "EB Garamond", Garamond, Georgia, serif;
  --sans:    "Jost", "Futura", "Avenir Next", system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --bar-h: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--bar-h); }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Tiny tracked label — the house "voice" for UI text */
.label {
  margin: 0;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.label--olive { color: var(--olive); }
.label--blue  { color: var(--blue); }

/* Underlined text link instead of chunky buttons */
.text-link {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .55em;
  color: var(--burgundy);
  transition: text-underline-offset .3s ease, color .3s ease;
}
.text-link:hover,
.text-link:focus-visible { text-underline-offset: .8em; }

/* ================= TOP BAR ================= */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bar-h);
  padding: 0 var(--gutter);
  background: rgba(244, 237, 224, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hair);
}
.bar__mono {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: .32em;
  text-decoration: none;
  color: var(--burgundy);
}
.bar__mono span { font-style: italic; letter-spacing: 0; margin-right: .32em; }
.bar__links { display: flex; gap: clamp(18px, 3vw, 40px); }
.bar__link {
  font-family: var(--sans);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.bar__link:hover,
.bar__link:focus-visible { border-bottom-color: currentColor; }

@media (max-width: 560px) {
  .bar__link--wide { display: none; }
}

/* ================= 1 · HEADER — painting softened behind the text ================= */

.hero {
  position: relative;
  display: grid;
  place-items: start center;
  min-height: calc(100svh - var(--bar-h));
  padding: clamp(44px, 8vh, 110px) var(--gutter) clamp(80px, 12vh, 120px);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  color: var(--cream);
  background: #2a1418;
}
.hero__art,
.hero__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.hero__art img {
  object-fit: cover;
  object-position: 50% 72%;
}
/* the "subsiding" veil: deep oxblood, heaviest behind the words */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 45% at 50% 36%, rgba(30, 10, 16, .45), rgba(30, 10, 16, 0) 75%),
    linear-gradient(to bottom, rgba(30, 10, 16, .15), rgba(30, 10, 16, 0) 45%, rgba(30, 10, 16, .35));
}

.hero__copy { max-width: 820px; text-shadow: 0 2px 24px rgba(20, 6, 10, .55); }

.crest {
  display: block;
  width: 74px;
  height: auto;
  margin: 0 auto 1.6rem;
  color: var(--cream);
  opacity: .9;
}
.hero__eyebrow { color: var(--cream); opacity: .85; }

.hero__names {
  margin: 1rem 0 .4rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 8.4vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero__names i {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  margin: 0 .06em 0 -.04em;
}
.hero__subtitle {
  margin: 0 0 1.2rem;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  color: rgba(244, 237, 224, .92);
}
/* chartreuse on the dark veil (8:1-ish) — the brief's one accent here */
.hero__dateline {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(.64rem, 1.5vw, .76rem);
  font-weight: 500;
  letter-spacing: .24em;
  line-height: 2;
  text-transform: uppercase;
  color: var(--chartreuse);
  text-shadow: 0 0 14px rgba(20, 6, 10, .95), 0 0 4px rgba(20, 6, 10, .8);
}
.hero__dateline .sep { margin: 0 .9em; }
@media (max-width: 560px) {
  .hero__dateline span { display: block; }
  .hero__dateline .sep { display: none; }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--cream);
  opacity: .8;
  animation: bob 2.8s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}

/* ================= LACE EDGE (hangs from the top of a section) ================= */

.lace {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: -2px;
  height: clamp(38px, 5vw, 64px);
  background: url("assets/paint/lace-trim.webp") repeat-x left top / auto 100%;
  filter: drop-shadow(0 4px 6px rgba(30, 10, 16, .25));
  pointer-events: none;
}

/* ================= 2 · OUR STORY — photos painted into the Hudson ================= */

.story {
  position: relative;
  overflow: hidden;
  padding: clamp(96px, 12vw, 150px) var(--gutter) clamp(80px, 10vw, 130px);
  background: #e9dfe6 url("assets/paint/hudson-tall.webp") center top / cover no-repeat;
}
@media (min-aspect-ratio: 1/1) {
  .story { background-image: url("assets/paint/hudson-wide.webp"); }
}
.story figure { margin: 0; }

.story__head { text-align: center; margin-bottom: clamp(28px, 5vw, 56px); }
.story__title {
  margin: .7rem 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.6vw, 3.6rem);
  line-height: 1.05;
  color: var(--burgundy);
}
.story__title i { font-style: italic; }

.story__scene {
  display: grid;
  gap: clamp(28px, 6vw, 56px);
  justify-items: center;
  max-width: 1240px;
  margin: 0 auto;
}

/* photos cut with painted brush shapes so their edges dissolve into the canvas */
.brush img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask: var(--mask) center / 100% 100% no-repeat;
          mask: var(--mask) center / 100% 100% no-repeat;
  filter: sepia(.22) hue-rotate(14deg) saturate(.82) contrast(.95) brightness(1.04);   /* pull blue skies toward the painting's lavender light */
}
.brush--land { --mask: url("assets/paint/brush-land.png"); width: min(100%, 560px); }
.brush--land img { aspect-ratio: 900 / 489; object-fit: cover; object-position: 50% 62%; }
.brush--oval { --mask: url("assets/paint/brush-oval.png"); width: min(74%, 330px); }
.brush--oval img { aspect-ratio: 700 / 1104; object-fit: cover; object-position: 50% 32%; }

/* words sit on a soft glow of the water so they always read */
.story__words {
  position: relative;
  max-width: 30em;
  text-align: center;
  padding: clamp(20px, 3vw, 32px);
}
.story__words::before {
  content: "";
  position: absolute;
  inset: -12% -10%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(247, 240, 236, .78), rgba(247, 240, 236, .5) 60%, rgba(247, 240, 236, 0));
}
.story__line {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  color: var(--burgundy);
}
.rule {
  display: block;
  width: 44px;
  height: 1px;
  margin: 1.3rem auto;
  background: var(--burgundy);
  opacity: .5;
}
.story__letter {
  margin: 0 0 1rem;
  font-size: clamp(1.1rem, 2.4vw, 1.25rem);
  line-height: 1.65;
  color: var(--ink);
}
.story__sign {
  margin: 0 0 1.6rem;
  font-family: var(--display);
  font-style: italic;
  color: var(--burgundy);
}

@media (min-width: 1000px) {
  .story__scene {
    grid-template-columns: 1.25fr 1fr .9fr;
    align-items: center;
    gap: clamp(20px, 3vw, 48px);
  }
  .brush--land { width: 100%; align-self: start; margin-top: 4%; }
  .brush--oval { width: 100%; max-width: 330px; align-self: end; }
}

/* ================= DETAILS ================= */

.details-wrap {
  position: relative;
  padding: clamp(96px, 12vw, 150px) max(var(--gutter), calc((100% - 1180px) / 2)) clamp(80px, 12vw, 140px);
  color: var(--cream);
  background: #120a0c url("assets/paint/stilllife-wide.webp") center / cover no-repeat;
}
@media (max-aspect-ratio: 1/1) {
  .details-wrap { background-size: 180% auto; background-position: center top; }
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding-bottom: 1.4rem;
  margin-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid rgba(244, 237, 224, .22);
  text-align: center;
  align-items: center;
}
.section-head__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  line-height: 1.05;
  color: var(--cream);
}

.details {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2vw, 24px);
}
@media (min-width: 640px) {
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .details .card:last-child { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .details { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .details .card,
  .details .card:last-child { grid-column: span 2; }
  .details .card:nth-child(-n + 2) { grid-column: span 3; }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(32px, 4vw, 48px) clamp(22px, 3vw, 36px) clamp(30px, 4vw, 40px);
  background: var(--cream-hi);
  border: 1px solid var(--hair);
  color: var(--ink);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .7);
  transition: border-color .4s ease, transform .4s ease;
}
.card:hover { border-color: rgba(90, 26, 36, .4); }

.card__art {
  height: 86px;
  width: auto;
  margin: 0 0 1.4rem;
}
.card__title {
  margin: .55rem 0 .6rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--burgundy);
}
.card__body {
  margin: 0 0 1.6rem;
  color: var(--ink-soft);
  flex: 1;
}
.soon {
  font-family: var(--sans);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: .7;
}

/* ================= COUNTDOWN — lace doily on burgundy ================= */

.band {
  padding: clamp(64px, 10vw, 110px) var(--gutter) clamp(56px, 8vw, 90px);
  text-align: center;
  color: var(--cream);
  background: var(--burgundy);
}
.doily {
  display: grid;
  place-items: center;
  width: min(84vw, 400px);
  aspect-ratio: 1;
  margin: 0 auto clamp(24px, 4vw, 36px);
  background: url("assets/paint/lace-doily.webp") center / contain no-repeat;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35));
}
.doily__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  color: var(--burgundy);
}
.doily__num {
  font-family: var(--display);
  font-size: clamp(2.8rem, 11vw, 4.2rem);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}
.doily__inner .label { color: var(--burgundy); }
.doily__rsvp {
  margin-top: .7rem;
  font-family: var(--display);
  font-size: clamp(.95rem, 3.4vw, 1.1rem);
  color: var(--olive);
}
.doily__rsvp i { font-style: italic; }
.band__dateline {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1rem, 2.6vw, 1.25rem);
  color: var(--chartreuse);
}

/* ================= FOOTER ================= */

.footer {
  padding: clamp(56px, 8vw, 88px) var(--gutter) max(clamp(44px, 6vw, 64px), env(safe-area-inset-bottom));
  text-align: center;
  color: var(--cream);
  background: var(--burgundy);
  border-top: 1px solid rgba(244, 237, 224, .14);
}
.footer__mono {
  margin: 0 0 1.6rem;
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: .32em;
}
.footer__mono span { font-style: italic; letter-spacing: 0; margin-right: .32em; }
.footer__links {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 4vw, 44px);
  margin-bottom: 1.4rem;
}
.footer__links a {
  font-family: var(--sans);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  transition: color .3s ease;
}
.footer__links a:hover,
.footer__links a:focus-visible { color: var(--chartreuse); }
.footer__line {
  margin: 0;
  font-style: italic;
  font-size: .95rem;
  color: rgba(244, 237, 224, .7);
}

/* ================= MOTION — fades only ================= */

.fade { animation: fade 1.4s ease both; }
.hero__copy .fade:nth-child(2) { animation-delay: .15s; }
.hero__copy .fade:nth-child(3) { animation-delay: .3s; }
@keyframes fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.1s ease, transform 1.1s ease, border-color .4s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
