/* ==========================================================================
   Joseph & Djovana — wedding site. Mobile-first, one stylesheet, no JS.
   Tokens and components from docs/handoff/starter-kit/DESIGN.md, as amended
   by docs/PLAN.md §7: assets live under /pub, one menu at every width, and
   gold is never used for text.
   ========================================================================== */

/* ---- Fonts (self-hosted, §7.6) ------------------------------------------
   One @font-face per subset with the Google unicode-range, so a browser only
   downloads a subset when a page actually uses it. */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/pub/fonts/cormorant-garamond-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/pub/fonts/cormorant-garamond-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/pub/fonts/cormorant-garamond-500-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/pub/fonts/cormorant-garamond-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/pub/fonts/cormorant-garamond-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/pub/fonts/cormorant-garamond-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/pub/fonts/cormorant-garamond-500-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/pub/fonts/cormorant-garamond-500-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/pub/fonts/cormorant-garamond-500-italic-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Great Vibes";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/pub/fonts/great-vibes-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Tokens -------------------------------------------------------------- */
:root {
  --paper:      #F8E6D2;
  --paper-lift: #FCF2E7;
  --ink:        #6D0F11;
  --peony:      #8E2A26;
  --gold:       #C18735;   /* ornaments only — never text (§7.2) */
  --gold-deep:  #8A5A1C;   /* the only gold allowed as text */
  --sage:       #68623C;
  --line:       rgba(193, 135, 53, .55);

  --script: "Great Vibes", "Pinyon Script", cursive;
  --serif:  "Cormorant Garamond", "EB Garamond", Garamond, Georgia, serif;

  --step--1: clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --step-0:  clamp(1.2rem, 1.15rem + 0.25vw, 1.35rem);
  --step-1:  clamp(1.45rem, 1.3rem + 0.6vw, 1.8rem);
  --step-2:  clamp(1.8rem, 1.5rem + 1.2vw, 2.5rem);
  --step-names: clamp(3.6rem, 2.4rem + 7vw, 6.5rem);

  --measure: 36rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
}

/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  /* 19px floor keeps body above the 17px mobile minimum in §7.8. */
  font: 500 clamp(1.1875rem, 1.14rem + 0.24vw, 1.35rem)/1.55 var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--peony); }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
p { margin: 0 0 1em; }
.mk { font-style: normal; }

/* ---- Typographic roles --------------------------------------------------- */
.kicker, h2, h3, .label, .menu summary, .btn {
  font-family: var(--serif);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.kicker { font-size: var(--step--1); margin: 0; line-height: 1.5; }
.lede { font-style: italic; font-size: var(--step-1); line-height: 1.3; margin: .4em 0 0; }
.names { font: 400 var(--step-names)/0.95 var(--script); margin: .3em 0 .2em; letter-spacing: 0; text-transform: none; }
.names .amp { display: flex; align-items: center; gap: .6rem; font-size: .5em; color: var(--gold); margin: .05em auto; max-width: 16rem; }
.names .amp::before, .names .amp::after { content: ""; flex: 1; height: 1px; background: var(--gold); }
.date { font-size: var(--step-1); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 0; line-height: 1.3; }
.date + .date { font-size: var(--step-0); }
h2 { font-size: var(--step-1); line-height: 1.25; margin: 0 0 .6em; text-align: center; }
h2 .mk, h3 .mk { display: block; font-size: .62em; letter-spacing: .16em; color: var(--peony); margin-top: .35em; }
h3 { font-size: var(--step-0); margin: 1.6em 0 .5em; }
.time { font-size: var(--step-2); font-weight: 600; letter-spacing: .04em; line-height: 1; margin: .25em 0 .15em; }

/* ---- Ornaments ----------------------------------------------------------- */
.divider {
  display: block; width: min(16rem, 70%); height: 1.5rem; margin: 1.75rem auto;
  background: url("/pub/img/divider.svg") center / contain no-repeat;
  border: 0; opacity: .9;
}
.floral { position: absolute; pointer-events: none; user-select: none; z-index: 0; }
.floral--tl { top: 0; left: 0; width: clamp(8rem, 36vw, 17rem); }
.floral--br { bottom: 0; right: 0; width: clamp(5.5rem, 24vw, 11rem); }

/* ---- Header + single menu (§7.3) -----------------------------------------
   One <details class="menu"> at every width. The summary stays visible so the
   menu is always reachable; the panel floats over the content instead of
   pushing it down. There is no second nav list. */
.site-header {
  position: relative; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: .75rem var(--gutter);
}
.monogram { font: 400 2rem/1 var(--script); text-decoration: none; padding: .5rem .6rem; }
.monogram .amp { color: var(--gold); }

/* `static` below 40rem on purpose: the panel is position:absolute with
   left:0/right:0, and its containing block is the nearest positioned ancestor.
   If .menu were relative the panel would be only as wide as the Menu button and
   the links would clip (seen at 390px). Static lets it resolve against
   .site-header and span the header; the ≥40rem rule restores relative + dropdown. */
.menu { position: static; }
.menu summary {
  list-style: none; cursor: pointer; min-height: 44px;
  display: flex; align-items: center; padding: .55rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper-lift); font-size: var(--step--1);
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { color: var(--peony); border-color: var(--gold); }
.menu ul {
  list-style: none; margin: 0; padding: .75rem var(--gutter);
  position: absolute; right: 0; left: 0; top: calc(100% + .4rem);
  max-height: 70vh; overflow: auto;
  background: var(--paper-lift); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(109, 15, 17, .18);
}
.menu li a {
  display: block; padding: .7rem 0; min-height: 44px;
  font-size: var(--step--1); text-decoration: none;
  border-bottom: 1px solid rgba(193, 135, 53, .25);
}
.menu li:last-child a { border-bottom: 0; }
.menu a[aria-current="page"] { color: var(--gold-deep); }
.menu a.btn { border: 1px solid var(--ink); text-align: center; margin-top: .5rem; }

/* From tablet width up the panel becomes a narrower dropdown, not a full-width
   sheet. Eleven links never fit in one row, so it stays a disclosure (§2.8). */
@media (min-width: 40rem) {
  .menu { position: relative; }
  .menu ul { left: auto; width: min(22rem, 80vw); padding: .75rem 1rem; }
}

/* ---- Layout -------------------------------------------------------------- */
main { position: relative; z-index: 1; }
.wrap { max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }
.center { text-align: center; }
section { padding-block: clamp(1.75rem, 5vw, 3rem); }

/* The invitation card — inset gold frame, florals on two corners. */
.card-hero {
  position: relative; isolation: isolate;
  margin: 0 auto; padding: clamp(6.5rem, 30vw, 10rem) var(--gutter) clamp(5rem, 22vw, 7rem);
  max-width: 44rem; text-align: center; overflow: hidden;
}
.card-hero::after {
  content: ""; position: absolute; inset: .75rem;
  border: 1px solid var(--gold); pointer-events: none; z-index: 1;
}
.card-hero > *:not(.floral) { position: relative; z-index: 2; }

/* Inner-page header (§7.4): shorter, one small floral, same gold frame. */
.page-hero {
  position: relative; isolation: isolate;
  margin: 0 auto; padding: clamp(3.5rem, 14vw, 5.5rem) var(--gutter) clamp(2rem, 8vw, 3rem);
  max-width: 44rem; text-align: center; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset: .5rem;
  border: 1px solid var(--gold); pointer-events: none; z-index: 1;
}
.page-hero > *:not(.floral) { position: relative; z-index: 2; }
.page-hero .floral--tl { width: clamp(4rem, 16vw, 7rem); }
.page-hero h1 { font-size: var(--step-1); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: .4em 0; }

/* At-a-glance block (§7.4): the generalised .event. */
.glance { text-align: center; padding: 1rem 0; }
.glance .venue { margin: 0; line-height: 1.35; }
.glance .meta { font-size: var(--step--1); color: var(--peony); margin: .35em 0 0; }
.glance .actions { margin-top: .9rem; display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.event { text-align: center; }
.event .venue { margin: 0; line-height: 1.35; }
.event .actions { margin-top: .9rem; display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }

/* The invitation's closing line, as on the printed card: smaller, italic. */
.card-hero .nogifts { font-style: italic; font-size: var(--step--1); line-height: 1.45; margin: 1.5rem auto 0; max-width: 28rem; text-wrap: balance; }

/* Weekend events: the event is the larger line; its text and transport sit below. */
.glance--event h3 { font-size: var(--step-1); text-transform: none; letter-spacing: .02em; line-height: 1.25; margin: .2em 0 .4em; }
.glance--event p { margin: 0 0 .6em; }
.glance--event .transport { font-style: italic; }

/* Link cards. */
.tiles { display: grid; gap: 1rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.tile a {
  display: block; padding: 1.25rem 1.25rem 1.1rem; text-decoration: none;
  background: var(--paper-lift); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.tile a:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.tile h3 { margin: 0 0 .35rem; text-align: left; }
.tile p { margin: 0; font-size: var(--step--1); }
@media (min-width: 40rem) { .tiles { grid-template-columns: 1fr 1fr; } }

/* Callouts. */
.note { border-left: 2px solid var(--gold); padding: .25rem 0 .25rem 1rem; margin: 1.5rem 0; font-style: italic; }

/* Buttons. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: .7rem 1.4rem; border: 1px solid var(--ink); border-radius: var(--radius);
  font-size: var(--step--1); text-decoration: none; background: transparent; color: var(--ink); cursor: pointer;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--peony); border-color: var(--peony); color: var(--paper); }
.rsvp-cta { margin-top: 1.5rem; }

/* Stacking table (§7.4): label/value rows under 40rem, via data-label. */
.table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: var(--step--1); }
.table caption { text-align: left; font-style: italic; margin-bottom: .5rem; }
.table th, .table td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table thead th { text-transform: uppercase; letter-spacing: .1em; font-size: .85em; color: var(--peony); }
@media (max-width: 39.99rem) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table tr { display: block; padding: .5rem 0; border-bottom: 1px solid var(--line); }
  .table td { display: flex; gap: .75rem; border: 0; padding: .3rem 0; }
  .table td::before { content: attr(data-label); flex: 0 0 8.5rem; text-transform: uppercase; letter-spacing: .08em; font-size: .85em; color: var(--peony); }
}

/* FAQ disclosures (§7.4). */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; padding: .6rem .2rem; font-weight: 600; }
.faq details p { margin: 0 0 1rem; padding-inline: .2rem; }

/* Printable quick reference (§7.4). */
.quickref { font-size: var(--step--1); }
.quickref h2 { text-align: left; }

/* Checklist (§7.4): ticks drawn in CSS, no form controls. */
.checklist { list-style: none; padding: 0; margin: 1.25rem 0; }
.checklist li { position: relative; padding: .35rem 0 .35rem 1.9rem; border-bottom: 1px dotted rgba(193, 135, 53, .35); }
.checklist li::before {
  content: ""; position: absolute; left: .1rem; top: .62em;
  width: .7rem; height: .4rem;
  border-left: 2px solid var(--gold-deep); border-bottom: 2px solid var(--gold-deep);
  transform: rotate(-45deg);
}

/* Visible "not final" marker (§7.4). Upright, deliberately loud. */
.tbd {
  display: block; margin: 1.25rem 0; padding: .7rem .9rem;
  border: 1px dashed var(--gold-deep); background: var(--paper-lift);
  border-radius: var(--radius); color: var(--ink);
  font-style: normal; font-size: var(--step--1); letter-spacing: .02em;
}

/* Where the RSVP form is injected in the RSVP stage (§7.4). */
.rsvp-slot { margin: 1.5rem 0; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { position: relative; text-align: center; padding: 3rem var(--gutter) 5rem; font-size: var(--step--1); overflow: hidden; }
.site-footer p { margin: 0 0 .6em; }

/* ---- Password gate ------------------------------------------------------- */
.gate { min-height: 100svh; display: grid; place-items: center; }
.gate .card-hero { width: 100%; }
.gate form { margin: 1.75rem auto 0; max-width: 18rem; display: grid; gap: .75rem; }
.gate label { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: var(--step--1); }
.gate input {
  font: 500 1.25rem var(--serif);
  color: var(--ink); text-align: center; padding: .7rem 1rem; min-height: 48px;
  background: var(--paper-lift); border: 1px solid var(--gold); border-radius: var(--radius);
}
.gate .error { color: var(--peony); font-style: italic; margin: 0; min-height: 1.5em; }
.gate .hint { font-style: italic; font-size: var(--step--1); margin-top: 1rem; }

/* ---- Motion & print ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .floral, .site-footer, .btn, .tbd { display: none !important; }
  .card-hero::after, .page-hero::after { display: none; }
  a { text-decoration: none; }
  /* On the FAQ page, print shows only the quick reference (§7.4). */
  .print-only { display: block !important; }
}
.print-only { display: none; }