/* ==========================================================================
   Housewarming — 14 Solstice Lane
   Luxury Scandinavian: warm white, hairline rules, precise line drawings.

   MOTION POLICY
   Every animated rule is written twice: once as the default (full) and once
   under html[data-motion="calm"], where travel and line-draw durations shrink
   but nothing is switched off. There is deliberately no `*` override and no
   bare @media (prefers-reduced-motion) block anywhere in this file — the calm
   variant must still look alive.

   Sections, in order:
   Tokens · Reset · Type helpers · Loader · Progress · Nav · Hero ·
   House drawing · Reveal · Section chrome · Welcome · Facts · Schedule ·
   Gallery · Map · RSVP · Footer · Responsive
   ========================================================================== */

/* -------------------------------------------------------------- Tokens */
:root {
  --paper:      #f7f4ef;
  --paper-2:    #ece7dc;
  --paper-3:    #e2dbcd;
  --oak:        #c9ab86;
  --oak-deep:   #ac8a60;
  --sage:       #8a9a86;
  --sage-deep:  #6f8069;
  --ink:        #2b2b28;
  --ink-70:     rgba(43, 43, 40, .70);
  --ink-48:     rgba(43, 43, 40, .62);
  --rule:       rgba(43, 43, 40, .26);
  --rule-soft:  rgba(43, 43, 40, .15);

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans:  "Work Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;

  --pad:  clamp(20px, 5.2vw, 72px);
  --gut:  clamp(20px, 2.6vw, 40px);
  --sec:  clamp(72px, 11vh, 148px);

  /* motion — full */
  --rise:      22px;
  --rise-slow: 620ms;
  --ease:      cubic-bezier(.22, .61, .27, 1);
  --ease-draw: cubic-bezier(.62, .03, .28, 1);
  --u-dur:     420ms;
  --loader-out: 1980ms;
}

html[data-motion="calm"] {
  --rise:      9px;
  --rise-slow: 460ms;
  --u-dur:     260ms;
  --loader-out: 1480ms;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html[data-motion="calm"] { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(15px, .42vw + 13.6px, 17px);
  font-weight: 300;
  line-height: 1.68;
  letter-spacing: .006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

h1, h2, h3 { margin: 0; font-weight: 300; }
p  { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
img, svg { max-width: 100%; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 1.5px solid var(--sage-deep);
  outline-offset: 3px;
}

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

.wrap { width: min(100% - (var(--pad) * 2), 1280px); margin-inline: auto; }

.visually-hidden {
  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: fixed; top: 10px; left: 10px; z-index: 200;
  transform: translateY(-260%);
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  transition: transform 240ms var(--ease);
}
.skip:focus { transform: translateY(0); }

/* -------------------------------------------------------- Type helpers */
.eyebrow {
  font-size: .68rem; font-weight: 400;
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--ink-48);
  margin: 0 0 clamp(18px, 2.4vw, 30px);
}

/* the fine underline that draws left to right */
.u-link { position: relative; display: inline-block; }
.u-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--u-dur) var(--ease);
}
.u-link:hover::after,
.u-link:focus-visible::after { transform: scaleX(1); }

/* -------------------------------------------------------------- Loader
   Timeline is entirely CSS. A slow or broken main.js cannot trap the page
   behind it: the fade uses `forwards`, so the end state is permanent. */
.loader {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  background: var(--paper);
  animation: loaderOut 560ms var(--ease) var(--loader-out) forwards;
}
@keyframes loaderOut { to { opacity: 0; visibility: hidden; } }

.loader__inner { display: grid; justify-items: center; gap: 26px; }

.loader__house { width: clamp(96px, 16vw, 138px); height: auto; }
.loader__house path {
  fill: none; stroke: var(--ink); stroke-width: 1.35;
  stroke-linecap: square; stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
  animation: ldraw var(--dur) var(--ease-draw) var(--del) both;
}
@keyframes ldraw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }

.ld--base { --len: 112; --dur: 460ms;  --del: 0ms;    stroke-dasharray: 112; }
.ld--body { --len: 280; --dur: 940ms;  --del: 300ms;  stroke-dasharray: 280; stroke: var(--ink); }
.ld--door { --len: 68;  --dur: 420ms;  --del: 1010ms; stroke-dasharray: 68;  stroke: var(--oak-deep); }
.ld--flue { --len: 43;  --dur: 340ms;  --del: 1170ms; stroke-dasharray: 43;  stroke: var(--sage-deep); }

html[data-motion="calm"] .ld--base { --dur: 320ms; --del: 0ms; }
html[data-motion="calm"] .ld--body { --dur: 620ms; --del: 200ms; }
html[data-motion="calm"] .ld--door { --dur: 280ms; --del: 760ms; }
html[data-motion="calm"] .ld--flue { --dur: 240ms; --del: 900ms; }

.loader__word {
  margin: 0; display: flex; gap: .34em;
  font-size: .64rem; letter-spacing: .42em; text-transform: uppercase;
  color: var(--ink-48);
}
.loader__word span {
  opacity: 0;
  animation: ldWord 520ms var(--ease) forwards;
}
.loader__word span:nth-child(1) { animation-delay: 1240ms; }
.loader__word span:nth-child(2) { animation-delay: 1300ms; }
.loader__word span:nth-child(3) { animation-delay: 1360ms; }
.loader__word span:nth-child(4) { animation-delay: 1420ms; }
.loader__word span:nth-child(5) { animation-delay: 1480ms; }
.loader__word span:nth-child(6) { animation-delay: 1540ms; }
.loader__word span:nth-child(7) { animation-delay: 1600ms; }
.loader__word span:nth-child(8) { animation-delay: 1660ms; }
@keyframes ldWord { to { opacity: 1; } }

html[data-motion="calm"] .loader__word span:nth-child(1) { animation-delay: 960ms; }
html[data-motion="calm"] .loader__word span:nth-child(2) { animation-delay: 1000ms; }
html[data-motion="calm"] .loader__word span:nth-child(3) { animation-delay: 1040ms; }
html[data-motion="calm"] .loader__word span:nth-child(4) { animation-delay: 1080ms; }
html[data-motion="calm"] .loader__word span:nth-child(5) { animation-delay: 1120ms; }
html[data-motion="calm"] .loader__word span:nth-child(6) { animation-delay: 1160ms; }
html[data-motion="calm"] .loader__word span:nth-child(7) { animation-delay: 1200ms; }
html[data-motion="calm"] .loader__word span:nth-child(8) { animation-delay: 1240ms; }

/* JS may dismiss it a beat early once everything is ready. */
.loader.is-gone { opacity: 0; visibility: hidden; transition: opacity 420ms var(--ease), visibility 0s 420ms; }

/* ------------------------------------------------------------ Progress */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 1px;
  background: var(--rule-soft); z-index: 90;
}
.progress span {
  display: block; height: 100%; background: var(--oak-deep);
  transform: scaleX(0); transform-origin: left center;
}

/* ----------------------------------------------------------------- Nav */
.nav {
  position: sticky; top: 0; z-index: 80;
  background: rgba(247, 244, 239, .92);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color 400ms var(--ease), background-color 400ms var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--rule); }

.nav__in {
  width: min(100% - (var(--pad) * 2), 1280px);
  margin-inline: auto;
  display: flex; align-items: center; gap: var(--gut);
  min-height: 68px;
}

.nav__mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink);
}
.nav__mark svg { width: 22px; height: auto; overflow: visible; }
.nav__mark svg path { transition: stroke 300ms var(--ease); }
.nav__mark:hover svg path { stroke: var(--oak-deep); }

.nav__links { margin-left: auto; display: flex; gap: clamp(18px, 2.2vw, 34px); }
.nav__links a {
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-70);
  transition: color 300ms var(--ease);
}
.nav__links a:hover { color: var(--ink); }

.nav__cta {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  padding: 10px 20px; border: 1px solid var(--ink);
  position: relative; overflow: hidden; isolation: isolate;
  transition: color 340ms var(--ease);
}
.nav__cta::before {
  content: ""; position: absolute; inset: 0; background: var(--ink); z-index: -1;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 420ms var(--ease);
}
html[data-motion="calm"] .nav__cta::before { transition-duration: 260ms; }
.nav__cta:hover { color: var(--paper); }
.nav__cta:hover::before { transform: scaleX(1); }

/* ---------------------------------------------------------------- Hero */
.hero { padding-top: clamp(46px, 8vh, 96px); padding-bottom: clamp(26px, 4vh, 48px); }

.hero__meta {
  display: grid; grid-template-columns: 1fr auto;
  align-items: end; gap: var(--gut);
  padding-bottom: clamp(28px, 4vw, 52px);
  border-bottom: 1px solid var(--rule);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(3.1rem, 11.4vw, 9.6rem);
  line-height: .88;
  letter-spacing: -.028em;
  margin: 0;
}
.hero__sub {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.1vw, 1.6rem);
  color: var(--ink-70);
  margin: clamp(14px, 1.8vw, 22px) 0 0;
  letter-spacing: .01em;
}
.hero__sub em { font-style: italic; }

.hero__facts { display: grid; gap: 14px; text-align: right; min-width: 15rem; }
.hero__facts div { display: grid; gap: 2px; }
.hero__facts dt {
  font-size: .6rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-48);
}
.hero__facts dd { font-size: .92rem; letter-spacing: .02em; }

.hero__art {
  width: min(100% - (var(--pad) * 2), 1280px);
  margin: clamp(16px, 3vw, 40px) auto 0;
}

.hero__cue {
  display: flex; align-items: center; gap: 14px;
  margin: clamp(18px, 3vw, 34px) 0 0;
  font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-48);
  border-top: 1px solid var(--rule); padding-top: 20px;
}
.hero__cue-line {
  display: block; width: 46px; height: 1px; background: var(--ink-48);
  transform-origin: left center;
  animation: cue 3400ms var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleX(.35); opacity: .45; }
  50%      { transform: scaleX(1);   opacity: 1; }
}
html[data-motion="calm"] .hero__cue-line { animation-duration: 5200ms; }
html[data-motion="calm"] @keyframes cue { }

/* ------------------------------------------------------- House drawing */
.house { width: 100%; height: auto; overflow: visible; }

.house__ln path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.25;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
}
/* windows and door pick up the warm accents */
.house__ln path[data-g="5"] { stroke: var(--ink); }
.house__ln path[data-g="6"] { stroke: var(--oak-deep); }
.house__ln path[data-g="9"] { stroke: var(--sage-deep); stroke-width: 1.05; }
.house__ln path[data-g="8"] { stroke: var(--ink-70); stroke-width: 1.05; }

.house__dt path,
.house__dt circle {
  fill: none; stroke: var(--ink); stroke-width: 1.15;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.house__dt .smoke path { stroke: var(--ink-48); stroke-width: 1; }

.glow rect { fill: var(--oak); stroke: none; }

/* Details are CSS-timed so they arrive even if the drawing script never runs.
   `forwards` (never `both`) so the ambient drift underneath is untouched. */
.detail { opacity: 0; animation: dtIn 900ms var(--ease) calc(2500ms + var(--d, 0ms)) forwards; }
@keyframes dtIn { to { opacity: 1; } }
.glow .detail { animation-name: dtGlow; }
@keyframes dtGlow { to { opacity: .17; } }

html[data-motion="calm"] .detail { animation-delay: calc(1700ms + var(--d, 0ms)); animation-duration: 700ms; }

/* chimney smoke — ambient drift, alive in both modes */
.smoke .wisp {
  opacity: 0;
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: wisp 9500ms linear var(--w, 0ms) infinite;
}
@keyframes wisp {
  0%   { opacity: 0;   transform: translate(0, 6px)    scale(.6); }
  18%  { opacity: .85; }
  70%  { opacity: .35; }
  100% { opacity: 0;   transform: translate(-26px, -78px) scale(1.5); }
}
html[data-motion="calm"] .smoke .wisp { animation-duration: 13000ms; }
html[data-motion="calm"] .smoke .wisp { animation-name: wispCalm; }
@keyframes wispCalm {
  0%   { opacity: 0;   transform: translate(0, 2px)   scale(.75); }
  20%  { opacity: .7; }
  72%  { opacity: .3; }
  100% { opacity: 0;   transform: translate(-8px, -30px) scale(1.1); }
}

/* -------------------------------------------------------------- Reveal
   Only hidden when scripting is present (html.js), so a failed script can
   never blank the page. */
html.js .reveal {
  opacity: 0;
  transform: translateY(var(--rise));
  transition: opacity var(--rise-slow) var(--ease), transform var(--rise-slow) var(--ease);
  transition-delay: var(--rd, 0ms);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------ Section chrome */
.sec { padding-block: var(--sec); }
.sec--welcome { border-top: 1px solid var(--rule); }
.sec--facts   { background: var(--paper-2); }
.sec--gallery { background: var(--paper-2); }
.sec--rsvp    { background: var(--paper-3); }

.sec__head {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: clamp(16px, 3vw, 40px);
  padding-bottom: clamp(20px, 2.6vw, 32px);
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(34px, 5vw, 66px);
}
.sec__num {
  font-size: .64rem; letter-spacing: .3em; color: var(--oak-deep);
  font-variant-numeric: tabular-nums;
}
.sec__title {
  font-family: var(--serif); font-weight: 200;
  font-size: clamp(1.85rem, 4.4vw, 3.5rem);
  line-height: 1.02; letter-spacing: -.018em;
}
.sec__intro {
  max-width: 46ch; color: var(--ink-70);
  font-size: 1.02rem;
  margin: calc(clamp(34px, 5vw, 66px) * -.55) 0 clamp(34px, 5vw, 66px);
}

/* ------------------------------------------------------------- Welcome */
.welcome__grid {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 96px);
}
.lede {
  font-family: var(--serif);
  font-size: clamp(1.22rem, 2.3vw, 1.72rem);
  line-height: 1.5; font-weight: 200; letter-spacing: -.004em;
  margin-bottom: 1.2em;
}
.welcome__body p:not(.lede) { color: var(--ink-70); max-width: 58ch; }

.welcome__aside {
  border-left: 1px solid var(--rule);
  padding-left: clamp(20px, 3vw, 40px);
  align-self: start;
}
.sig {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.1;
  margin-bottom: .4em;
}
.sig__note {
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-48); line-height: 2;
}
.welcome__key { width: 118px; margin-top: clamp(26px, 4vw, 44px); }
.welcome__key circle, .welcome__key path {
  fill: none; stroke: var(--oak-deep); stroke-width: 1.2; vector-effect: non-scaling-stroke;
}

/* --------------------------------------------------------------- Facts */
.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.fact {
  padding: clamp(26px, 3vw, 40px) clamp(16px, 2vw, 28px) clamp(30px, 4vw, 52px);
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.fact:first-child { padding-left: 0; }
.fact:last-child  { border-right: 0; padding-right: 0; }
.fact h3 {
  font-size: .6rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-48); margin-bottom: clamp(18px, 2.4vw, 30px);
}
.fact__big {
  font-family: var(--serif); font-weight: 200;
  font-size: clamp(1.4rem, 2.5vw, 2.05rem); line-height: 1.14;
  letter-spacing: -.014em; margin-bottom: .7em;
}
.fact__sm { font-size: .82rem; color: var(--ink-70); line-height: 1.6; }

/* ------------------------------------------------------------ Schedule */
.sched { border-top: 1px solid var(--rule); }
.sched__row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 13rem) minmax(0, 1fr);
  gap: clamp(14px, 2.4vw, 40px);
  align-items: baseline;
  padding: clamp(20px, 2.4vw, 30px) 0;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
.sched__row::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--oak-deep);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 640ms var(--ease);
}
html[data-motion="calm"] .sched__row::after { transition-duration: 340ms; }
.sched__row:hover::after { transform: scaleX(1); }

.sched__t {
  font-size: .78rem; letter-spacing: .2em; color: var(--oak-deep);
  font-variant-numeric: tabular-nums;
}
.sched__n {
  font-family: var(--serif); font-size: clamp(1.18rem, 2.1vw, 1.6rem);
  font-weight: 300; letter-spacing: -.01em; line-height: 1.2;
}
.sched__d { color: var(--ink-70); font-size: .92rem; }

/* ------------------------------------------------------------- Gallery */
.gal {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 40px);
}
.card { display: grid; }
.card__art {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: clamp(14px, 2vw, 26px);
  transition: border-color 460ms var(--ease), background-color 460ms var(--ease);
}
html[data-motion="calm"] .card__art { transition-duration: 280ms; }
.card__art svg { width: 100%; height: auto; }

.card__art .ln path,
.card__art .ln circle {
  fill: none; stroke: var(--ink); stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.card__art .fl path,
.card__art .fl circle {
  fill: var(--oak); stroke: none;
  fill-opacity: 0;
  transition: fill-opacity 520ms var(--ease);
}
html[data-motion="calm"] .card__art .fl path,
html[data-motion="calm"] .card__art .fl circle { transition-duration: 300ms; }

.card:hover .card__art,
.card:focus-within .card__art { border-color: var(--oak); }
.card:hover .fl path,
.card:hover .fl circle,
.card:focus-within .fl path,
.card:focus-within .fl circle { fill-opacity: .5; }
.card:nth-child(3n+2):hover .fl path,
.card:nth-child(3n+2):hover .fl circle { fill: var(--sage); fill-opacity: .48; }

.card__cap { padding: clamp(14px, 1.8vw, 20px) 2px 0; }
.card__cap h3 {
  font-family: var(--serif); font-size: 1.24rem; font-weight: 300;
  letter-spacing: -.008em; margin-bottom: .3em;
}
.card__cap p { font-size: .86rem; color: var(--ink-70); line-height: 1.6; }

/* ----------------------------------------------------------------- Map */
.map {
  display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
}
.map__svg {
  width: 100%; height: auto;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.map__blocks rect { fill: var(--paper-2); stroke: var(--rule-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map__road path   { fill: none; stroke: var(--paper-3); stroke-width: 60; }
.map__kerb path   { fill: none; stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map__centre path { fill: none; stroke: var(--rule); stroke-width: 1; stroke-dasharray: 10 12; vector-effect: non-scaling-stroke; }

.map__plot rect,
.map__plot path {
  fill: none; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke;
}
.map__plot rect:first-child { stroke: var(--sage-deep); stroke-dasharray: 6 6; }

.map__north path, .map__scale path {
  fill: none; stroke: var(--ink-48); stroke-width: 1; vector-effect: non-scaling-stroke;
}

.map__lbl {
  font-family: var(--sans); font-size: 13px; font-weight: 400;
  letter-spacing: .22em; fill: var(--ink-48);
}
.map__street {
  font-family: var(--sans); font-size: 15px; font-weight: 400;
  letter-spacing: .34em; fill: var(--ink-48);
}

/* pins */
.pin { cursor: pointer; }
.pin:focus { outline: none; }
.pin__hit { fill: transparent; stroke: none; }
.pin__mk {
  transform-box: fill-box; transform-origin: center;
  transition: transform 460ms var(--ease);
}
html[data-motion="calm"] .pin__mk { transition-duration: 260ms; }

.pin__ring {
  fill: var(--paper); stroke: var(--ink); stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
  transition: fill 400ms var(--ease), stroke 400ms var(--ease);
}
.pin__dot { fill: var(--ink); transition: fill 400ms var(--ease); }
.pin__x {
  fill: none; stroke: var(--ink-48); stroke-width: 1; vector-effect: non-scaling-stroke;
  opacity: 0; transition: opacity 400ms var(--ease);
}

.pin:hover .pin__mk,
.pin:focus-visible .pin__mk,
.pin.is-active .pin__mk { transform: scale(1.16); }
.pin:hover .pin__ring,
.pin:focus-visible .pin__ring,
.pin.is-active .pin__ring { fill: var(--oak); stroke: var(--oak-deep); }
.pin:hover .pin__dot,
.pin:focus-visible .pin__dot,
.pin.is-active .pin__dot { fill: var(--ink); }
.pin:hover .pin__x,
.pin:focus-visible .pin__x,
.pin.is-active .pin__x { opacity: 1; }
.pin:focus-visible .pin__ring { stroke: var(--sage-deep); stroke-width: 2.4; }

.tip {
  opacity: 0; transform: translateY(6px);
  transform-box: fill-box;
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
  pointer-events: none;
}
html[data-motion="calm"] .tip { transform: translateY(2px); transition-duration: 200ms; }
.pin:hover .tip,
.pin:focus-visible .tip,
.pin.is-active .tip { opacity: 1; transform: translateY(0); }

.tip rect { fill: var(--ink); stroke: none; }
.tip__tail { fill: var(--ink); stroke: none; }
.tip__t {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: .24em; fill: var(--oak);
}
.tip__d {
  font-family: var(--sans); font-size: 14px; font-weight: 300;
  letter-spacing: .02em; fill: var(--paper);
}

/* legend */
.legend { border-top: 1px solid var(--rule); }
.legend__b {
  width: 100%; text-align: left; background: none; border: 0;
  border-bottom: 1px solid var(--rule-soft);
  padding: clamp(14px, 1.8vw, 20px) 0;
  display: grid; grid-template-columns: 2.4rem 1fr; gap: 4px clamp(10px, 1.4vw, 18px);
  cursor: pointer; position: relative;
  transition: color 320ms var(--ease);
}
.legend__b::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; right: 0;
  background: var(--oak-deep);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 520ms var(--ease);
}
html[data-motion="calm"] .legend__b::after { transition-duration: 280ms; }
.legend__b:hover::after,
.legend__b[aria-pressed="true"]::after { transform: scaleX(1); }

.legend__k {
  grid-row: 1 / span 2;
  font-size: .64rem; letter-spacing: .22em; color: var(--oak-deep);
  padding-top: .35em; font-variant-numeric: tabular-nums;
}
.legend__n {
  font-family: var(--serif); font-size: 1.16rem; font-weight: 300; line-height: 1.2;
}
.legend__d { font-size: .84rem; color: var(--ink-70); line-height: 1.5; }
.legend__b[aria-pressed="true"] .legend__n { color: var(--oak-deep); }

/* ---------------------------------------------------------------- RSVP */
.rsvp {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(30px, 5vw, 84px);
  align-items: start;
}
.rsvp__side p { color: var(--ink-70); max-width: 34ch; }
.rsvp__side strong { color: var(--ink); font-weight: 400; }
.rsvp__note { font-size: .88rem; }
.rsvp__mark { width: min(180px, 60%); margin-top: clamp(24px, 4vw, 46px); }
.rsvp__mark path {
  fill: none; stroke: var(--sage-deep); stroke-width: 1.2;
  stroke-linecap: square; vector-effect: non-scaling-stroke;
}

.rsvp__form form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 26px) clamp(16px, 2vw, 28px); }
.field { grid-column: 1 / -1; display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field--half { grid-column: span 1; }

.field > label, .field legend {
  font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-70);
  padding: 0;
}
.opt { letter-spacing: .12em; color: var(--ink-48); text-transform: none; font-size: .82em; }

input[type="text"], input[type="email"], textarea, select {
  font: inherit; font-size: .96rem; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--rule);
  padding: 10px 2px; border-radius: 0;
  width: 100%; min-width: 0;
  transition: border-color 340ms var(--ease);
  -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--ink-48); font-weight: 300; }

input:hover, textarea:hover, select:hover { border-bottom-color: var(--ink-48); }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none; border-bottom-color: var(--sage-deep); border-bottom-width: 1.5px;
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-bottom-color: #a4593f; }

.selectwrap { position: relative; }
.selectwrap svg {
  position: absolute; right: 4px; top: 50%; width: 11px; pointer-events: none;
  transform: translateY(-50%);
}
.selectwrap svg path { stroke: var(--ink-48); stroke-width: 1.2; fill: none; }

.radios { display: flex; flex-wrap: wrap; gap: clamp(14px, 2vw, 30px); padding-top: 4px; }
.radio { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio__box {
  width: 15px; height: 15px; border: 1px solid var(--ink-48);
  display: inline-block; position: relative; flex: none;
  transition: border-color 300ms var(--ease);
}
.radio__box::after {
  content: ""; position: absolute; inset: 3px; background: var(--oak-deep);
  transform: scale(0); transition: transform 300ms var(--ease);
}
html[data-motion="calm"] .radio__box::after { transition-duration: 180ms; }
.radio input:checked + .radio__box { border-color: var(--ink); }
.radio input:checked + .radio__box::after { transform: scale(1); }
.radio input:focus-visible + .radio__box { outline: 1.5px solid var(--sage-deep); outline-offset: 3px; }
.radio__t { font-size: .94rem; }

.err {
  margin: 0; font-size: .78rem; color: #a4593f; min-height: 0;
  letter-spacing: .02em;
}
.err:empty { display: none; }
.err--form { grid-column: 1 / -1; }

.btn {
  grid-column: 1 / -1; justify-self: start;
  margin-top: clamp(6px, 1.4vw, 14px);
  display: inline-flex; align-items: center; gap: 16px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: 15px 30px; cursor: pointer;
  font-size: .7rem; letter-spacing: .24em; text-transform: uppercase;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color 380ms var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--paper); z-index: -1;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 440ms var(--ease);
}
html[data-motion="calm"] .btn::before { transition-duration: 260ms; }
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: scaleX(1); }
.btn svg { width: 30px; height: 8px; }
.btn svg path { stroke: currentColor; stroke-width: 1.2; fill: none; }

/* confirmation state */
.done { display: grid; justify-items: start; gap: 10px; max-width: 40ch; }
.done[hidden] { display: none; }
.done__art { width: 170px; margin-bottom: 10px; }
.done__art .dd {
  fill: none; stroke: var(--ink); stroke-width: 1.2;
  stroke-linecap: square; vector-effect: non-scaling-stroke;
}
.done__art .dd--tick { stroke: var(--sage-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.done h3 {
  font-family: var(--serif); font-weight: 200;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.05; letter-spacing: -.018em;
}
.done h3:focus-visible { outline-offset: 6px; }
.done p { color: var(--ink-70); }
.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-70);
  margin-top: 6px;
}

/* the confirmation panel eases in when JS swaps it */
html.js .done.is-shown { animation: doneIn 620ms var(--ease) forwards; }
@keyframes doneIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
html[data-motion="calm"] .done.is-shown { animation-duration: 380ms; }

/* -------------------------------------------------------------- Footer */
.foot { border-top: 1px solid var(--rule); padding-block: clamp(36px, 5vw, 60px); }
.foot__in {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px clamp(20px, 4vw, 48px);
}
.foot__a { font-family: var(--serif); font-size: 1.2rem; font-weight: 300; margin: 0; }
.foot__b { margin: 0; font-size: .76rem; letter-spacing: .12em; color: var(--ink-48); text-transform: uppercase; }
.foot__c { margin: 0 0 0 auto; font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-70); }

/* ---------------------------------------------------------- Responsive */
@media (max-width: 1080px) {
  .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card:nth-child(3n+2):hover .fl path,
  .card:nth-child(3n+2):hover .fl circle { fill: var(--oak); }
  .card:nth-child(2n):hover .fl path,
  .card:nth-child(2n):hover .fl circle { fill: var(--sage); fill-opacity: .48; }
  .map { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(2n) { border-right: 0; padding-right: 0; }
  .fact:nth-child(2n+1) { padding-left: 0; }
  .rsvp { grid-template-columns: 1fr; }
  .rsvp__side { display: grid; }
  .rsvp__mark { width: 150px; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .hero__meta { grid-template-columns: 1fr; align-items: start; }
  .hero__facts { text-align: left; min-width: 0; grid-template-columns: repeat(3, auto); justify-content: start; gap: 10px clamp(20px, 5vw, 48px); }
  .welcome__grid { grid-template-columns: 1fr; }
  .welcome__aside { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: clamp(24px, 4vw, 36px); }
  .sched__row { grid-template-columns: 5.5rem minmax(0, 1fr); row-gap: 4px; }
  .sched__d { grid-column: 2; }
  .map__street { font-size: 19px; }
  .map__lbl { font-size: 16px; }
  .tip__t { font-size: 16px; }
  .tip__d { font-size: 17px; }
}

@media (max-width: 620px) {
  .gal { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .fact { border-right: 0; padding-left: 0; padding-right: 0; }
  .hero__facts { grid-template-columns: 1fr; gap: 12px; }
  .rsvp__form form { grid-template-columns: 1fr; }
  .field--half { grid-column: 1 / -1; }
  .foot__in { flex-direction: column; }
  .foot__c { margin-left: 0; }
  .sched__row { grid-template-columns: 4.6rem minmax(0, 1fr); }
  .btn { width: 100%; justify-content: space-between; }
  .map__svg { min-height: 260px; }
  .tip rect { width: 176px; x: -88px; }
}

@media (max-width: 400px) {
  .hero__title { font-size: 3rem; letter-spacing: -.03em; }
  .sched__row { grid-template-columns: 1fr; }
  .sched__d, .sched__n { grid-column: 1; }
  .map__street { font-size: 22px; letter-spacing: .28em; }
  .map__lbl { font-size: 19px; }
  .tip__t { font-size: 19px; }
  .tip__d { font-size: 19px; }
  .tip rect { width: 220px; }
}

@media (hover: none) {
  /* touch: the drawings keep their warm fill so the device isn't dead-looking */
  .card__art .fl path,
  .card__art .fl circle { fill-opacity: .28; }
}

@media print {
  .loader, .progress, .nav, .hero__cue { display: none; }
}

/* ==========================================================================
   Depth pass

   The palette and drawings were right, but every surface sat at exactly the
   same optical depth — no shadow, no gradient, nothing lifting an object off
   its background. Restraint reads as restraint only when there is something to
   restrain; with zero depth cues it reads as unfinished.

   Everything here is deliberately faint. The aim is that you notice the rooms
   have presence, not that you notice a shadow.
   ========================================================================== */

/* Paper, not flat fill: a barely-there warm wash so large areas are not one
   dead value. */
body {
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(201, 171, 134, .09), transparent 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(138, 154, 134, .07), transparent 65%);
  background-attachment: fixed;
}

/* Room plates lift off the band and gain a warm edge on approach. */
.card__art {
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .7) inset,
    0 10px 26px -18px rgba(43, 43, 40, .34),
    0 2px 6px -3px rgba(43, 43, 40, .12);
  transition:
    border-color 460ms var(--ease),
    background-color 460ms var(--ease),
    box-shadow 460ms var(--ease),
    transform 460ms var(--ease);
}
.card:hover .card__art,
.card:focus-within .card__art {
  border-color: var(--oak);
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .8) inset,
    0 20px 40px -22px rgba(43, 43, 40, .42),
    0 3px 10px -4px rgba(43, 43, 40, .16);
}
html[data-motion="calm"] .card:hover .card__art,
html[data-motion="calm"] .card:focus-within .card__art { transform: translateY(-1px); }

/* The drawings themselves warm up rather than the whole tile flooding. */
.card:hover .card__art svg,
.card:focus-within .card__art svg { color: var(--oak-deep); }

/* Alternating bands need an edge, or two adjacent surfaces of near-equal value
   simply blur into each other. */
#welcome, #schedule, #finding { position: relative; }
#welcome::before, #schedule::before, #finding::before,
#house::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--rule-soft);
}

/* The map and RSVP panels are objects too, not areas of page. */
.map__frame, .rsvp__panel, .facts {
  box-shadow: 0 12px 30px -22px rgba(43, 43, 40, .3);
}
