/* ═══════════════════════════════════════════════════════════════
   CARLIE & DAVID · carlieanddavid.com · site layer
   Shared by index.html (home) and rsvp.html.
   Tokens and fonts come from ../../colors_and_type.css. This file
   only builds site components out of them. David 2026-09-05: adopt
   the sample site's design system (alternating olive and cream bands
   torn like paper, polaroid photographs, a countdown, a timeline)
   while keeping our seven-block layout.
   ═══════════════════════════════════════════════════════════════ */
:root{
  --cream:var(--woy-cream); --mat:#FDFBF5;          /* polaroid mat: cream one step lighter */
  --ink:var(--woy-olive-deep); --olive:var(--woy-olive);
  --pale:var(--woy-olive-pale); --blush:var(--woy-blush);
  --gold:var(--woy-gold); --marigold:var(--woy-marigold);
  --muted:var(--woy-fg-muted);
  /* the reversed band, David 2026-09-05 (fourth call, picked from the swatch
     samples): the brand's PALE OLIVE, a light sheet, so the type on it is
     DARK. olive-deep clears 6.35:1. Anything that sits over the hero footage
     keeps its own white ink, --on-hero, and never reads --on-band. */
  --band:#BEBF9E;
  --band:var(--woy-olive-pale);
  --on-band:#1E1E0A;          /* David's pick from the type samples, 8.9:1 on the band */
  --on-band-muted:#1E1E0A;
  --on-hero:#FFFFFF;
  --seam:rgba(58,56,19,.17);
  --script:var(--woy-font-script);
  --display:var(--woy-font-display);
  --body:var(--woy-font-body);
  --tear-h:44px;
  --wrap:72rem;
}
*{box-sizing:border-box;margin:0}
html{scroll-behavior:smooth;overflow-x:hidden}   /* belt and braces for older iOS Safari, which pans to anything wider than the screen */
body{background:var(--band);color:var(--ink);font-family:var(--body);
  font-size:1.0625rem;line-height:1.66;-webkit-font-smoothing:antialiased;
  overflow-x:hidden;overflow-x:clip}
img,video{display:block;max-width:100%}
[hidden]{display:none!important}
a{color:inherit}

/* ── type ─────────────────────────────────────────────────────── */
.label{font-size:.72rem;letter-spacing:.24em;text-transform:uppercase;
  font-weight:500;color:var(--olive)}
.eyebrow{display:block;margin-bottom:.8rem}
h2.t{font-family:var(--display);font-weight:300;font-size:clamp(2.2rem,4.6vw,3.4rem);
  line-height:1.08;letter-spacing:.01em;color:var(--ink);margin-bottom:.9rem;
  text-wrap:balance}
h2.t em{font-style:italic;font-weight:400}
.lede{font-size:1.12rem;max-width:34em;color:#4A4726;line-height:1.6}
.center{text-align:center}
.center .lede{margin-inline:auto}
.num{font-variant-numeric:lining-nums tabular-nums}

/* ── bands: the page is a stack of paper sheets ───────────────── */
.band{position:relative;overflow:hidden;overflow:clip;padding:calc(var(--tear-h) + 4.5rem) 1.5rem 5.5rem}
.band--cream{background:var(--cream);color:var(--ink)}
.band--olive{background:var(--band);color:var(--on-band)}
.band--olive .label{color:var(--on-band)}
.band--olive h2.t{color:var(--on-band)}
.band--olive .lede{color:var(--on-band)}
.band--olive .quiet{color:var(--on-band-muted)}
.band--cream::before{content:"";position:absolute;inset:0;
  background:url(img/paper.jpg) 0 0/420px;mix-blend-mode:multiply;
  opacity:.5;pointer-events:none}
.band>.wrap{position:relative;z-index:1}
.wrap{max-width:var(--wrap);margin:0 auto}
.wrap--narrow{max-width:46rem}
.band--first{padding-top:4.5rem}
.band--first .tear{display:none}

/* the torn edge. Fill is the sheet ABOVE tearing over this one, the
   fiber stroke is its lit paper edge. Bands alternate, so the color
   is always the other one. */
.tear{position:absolute;left:0;top:-1px;width:100%;height:var(--tear-h);
  z-index:2;pointer-events:none}
.band--cream .tear .fill{fill:var(--band)}
.band--olive .tear .fill{fill:var(--cream)}
.tear .fiber{fill:none;stroke:rgba(255,255,255,.55);stroke-width:1.6px;
  vector-effect:non-scaling-stroke}
.band--olive .tear .fiber{stroke:rgba(255,255,255,.9)}
.band--cream .tear .fiber{stroke:rgba(255,255,255,.8)}

/* ── nav ──────────────────────────────────────────────────────── */
.nav{position:absolute;top:0;left:0;right:0;z-index:5;display:flex;
  align-items:center;justify-content:space-between;gap:1rem;
  padding:1.1rem 1.5rem;color:var(--on-hero)}
.nav .crest{font-family:var(--display);font-size:1rem;letter-spacing:.12em;
  border:1px solid var(--gold);border-radius:50%;width:2.6rem;height:2.6rem;
  display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.nav ul{list-style:none;display:flex;gap:1.6rem;padding:0;flex-wrap:wrap;
  justify-content:flex-end}
.nav a{font-size:.7rem;letter-spacing:.22em;text-transform:uppercase;
  text-decoration:none;color:inherit;padding:.4rem 0;opacity:.85}
.nav a:hover,.nav a:focus-visible{opacity:1;text-decoration:underline;
  text-underline-offset:.35em}
@media(max-width:640px){.nav ul li:not(.keep){display:none}}

/* ── buttons ──────────────────────────────────────────────────── */
.btn{display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:.8rem 1.9rem;font-family:var(--body);
  font-size:.72rem;letter-spacing:.24em;text-transform:uppercase;
  font-weight:600;text-decoration:none;border-radius:1px;cursor:pointer;
  border:1px solid var(--olive);background:transparent;color:var(--olive);
  transition:background 160ms var(--woy-ease),color 160ms var(--woy-ease)}
.btn:hover{background:var(--olive);color:var(--cream)}
.btn--solid{background:var(--band);border-color:var(--band);color:var(--on-band)}   /* David 2026-09-05: the filled button is the band green */
.btn--solid:hover{background:var(--ink);border-color:var(--ink);color:var(--cream)}   /* hover goes deep */
.btn--cream{border-color:var(--on-band);color:var(--on-band)}
.btn--cream:hover{background:var(--on-band);color:var(--band)}
.btn--fill{background:var(--on-band);color:var(--band)}          /* the inverse of .btn--cream */
.btn--fill:hover{background:transparent;color:var(--on-band)}
.btn:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.btn[aria-disabled="true"]{cursor:default;pointer-events:none}   /* a button waiting on its link keeps its full look */

/* ── polaroid ─────────────────────────────────────────────────── */
.pol{background:var(--mat);padding:10px 10px 12px;
  box-shadow:0 1px 2px rgba(58,56,19,.12),0 14px 34px rgba(58,56,19,.22);
  transform:rotate(var(--r,0deg));color:var(--ink);
  transition:transform 260ms var(--woy-ease)}
.pol:hover{transform:rotate(0deg) translateY(-2px)}
.pol .ph{aspect-ratio:var(--ar,4/3);overflow:hidden;background:#EDE7D8;position:relative}
.pol .ph img,.pol .ph video{width:100%;height:100%;object-fit:cover;
  filter:sepia(.05) saturate(.96)}
.pol figcaption{font-family:var(--display);font-style:italic;font-size:1.08rem;
  line-height:1.3;text-align:center;padding:.75rem .3rem .2rem;color:var(--ink)}
/* an asset that is not on disk yet. Dashed, numbered, honest. */
.ph--todo{border:1px dashed var(--gold);display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:.35rem;text-align:center;
  padding:1rem;background:repeating-linear-gradient(45deg,transparent,
  transparent 7px,rgba(185,160,90,.1) 7px,rgba(185,160,90,.1) 14px),#F4EEDF}
.ph--todo b{font-family:var(--display);font-weight:400;font-size:2.2rem;
  color:var(--gold);line-height:1}
.ph--todo span{font-size:.66rem;letter-spacing:.18em;text-transform:uppercase;
  color:var(--muted)}

/* ── flourish ─────────────────────────────────────────────────── */
.orn{display:flex;justify-content:center;margin:.3rem 0 1.4rem;color:var(--gold)}
.hair{border:none;height:1px;width:58%;margin:0 auto;
  background:linear-gradient(90deg,transparent,var(--gold),transparent)}

/* ── footer ───────────────────────────────────────────────────── */
/* David 2026-09-05, from the Pleo reference: a quiet row of columns,
   then the name set enormous across the full width and cut off by the
   bottom edge of the page. */
.foot{padding-bottom:0}
.foot .cols{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:2.5rem 3rem;text-align:left;
  margin-top:3rem;padding-top:2.5rem}   /* David 2026-09-05: no rule above the columns, the torn edge is the divider */
.foot .cols .fn{font-family:var(--display);font-weight:700;font-size:.98rem;letter-spacing:.3em;text-transform:uppercase;padding-left:.3em}
.foot .cols p{font-size:.64rem;letter-spacing:.2em;text-transform:uppercase;color:var(--on-band-muted);
  margin-top:.8rem;line-height:1.85}
.foot .cols h4{font-family:var(--body);font-weight:500;font-size:.62rem;letter-spacing:.24em;text-transform:uppercase;
  color:var(--on-band);margin-bottom:.4rem}
.foot .cols ul{list-style:none;padding:0;margin:0;display:grid;gap:0}
.foot .cols a{font-family:var(--display);font-size:.88rem;letter-spacing:.02em;color:var(--on-band);line-height:1.25;display:block;
  text-decoration:none}
.foot .cols a:hover,.foot .cols a:focus-visible{text-decoration:underline;text-underline-offset:.3em}
.foot .note{max-width:34em;margin:2.2rem 0 0;font-size:.82rem;letter-spacing:0;
  text-transform:none;color:var(--on-band-muted);line-height:1.6;text-align:left}
.foot .giant{display:block;width:calc(100% + 3rem);height:auto;margin:3.2rem -1.5rem 0;overflow:hidden}
.foot .giant text{font-family:var(--display);font-weight:700;font-size:108px;letter-spacing:0;
  fill:var(--on-band);text-transform:uppercase}
@media(max-width:760px){.foot .cols{grid-template-columns:1fr 1fr}.foot .cols>div:first-child{grid-column:1/-1}}
.foot{text-align:center}
.foot .crest{font-family:var(--display);font-size:1.15rem;letter-spacing:.14em;
  border:1px solid var(--gold);border-radius:50%;width:3.4rem;height:3.4rem;
  display:inline-flex;align-items:center;justify-content:center;margin:0 auto 1rem}
/* the fan of real photographs that closes the page */
.fan{position:relative;height:clamp(250px,36vw,400px);margin:2.5rem auto 3rem;
  max-width:60rem}
.fan{--fx:1;--dy:0px}   /* the spread; phones pull it in so no photograph leaves the page, and stagger it up and down */
.fan .pol{position:absolute;width:clamp(150px,20vw,240px);left:50%;top:50%;
  transform:translate(calc(-50% + var(--x) * var(--fx)),calc(-50% + var(--y) + var(--dy))) rotate(var(--r))}
.fan .pol:hover{transform:translate(calc(-50% + var(--x) * var(--fx)),calc(-50% + var(--y) + var(--dy) - 6px)) rotate(0deg);z-index:3}
.fan .pol figcaption{font-size:.95rem;padding-top:.5rem}

/* ── responsive + motion ──────────────────────────────────────── */
@media(max-width:640px){
  :root{--tear-h:28px}
  .wide{display:none}   /* copy that only makes sense with the desktop layout ("scroll sideways", "on the left") */
  .band{padding:calc(var(--tear-h) + 3.4rem) 1.15rem 4rem}
  .band--first{padding-top:3.4rem}
  .foot{padding-bottom:0}
  .foot .giant{width:calc(100% + 2.3rem);margin:2.4rem -1.15rem 0}
  .fan{--fx:.66;height:20.5rem;margin:1.6rem auto 1.6rem}
  .fan .pol:nth-child(odd){--dy:2.8rem}    /* David 2026-09-05: 1, 3, 5 drop, 2 and 4 rise, the row was too tight */
  .fan .pol:nth-child(even){--dy:-2.8rem}
  .fan .pol:nth-child(odd){z-index:3}   /* 1, 3 and 5 lie on top of 2 and 4 (4 carries z-index:2 inline) */
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .pol,.pol:hover{transition:none}
}

/* a footer with nothing above the columns (RSVP): they start right under the
   torn edge, no rule, no top padding. David 2026-09-05. Sits after the media
   queries so the band's own padding does not win. */
.foot--bare{padding-top:calc(var(--tear-h) + 1rem)}
.foot--bare .cols{margin-top:0;padding-top:0}
