/* ============================================================ *
 *  Jule & Duc — clean / light
 *  Signature display (Brother Signature) + Inter, palette as accents
 * ============================================================ */

/* ---- Self-hosted fonts (GDPR-safe) ---- */
@font-face { font-family: "Brother Signature"; font-style: normal; font-weight: 400;
  src: url("/static/fonts/brother-signature.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400;
  src: url("/static/fonts/inter-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500;
  src: url("/static/fonts/inter-latin-500-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600;
  src: url("/static/fonts/inter-latin-600-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700;
  src: url("/static/fonts/inter-latin-700-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400;
  src: url("/static/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500;
  src: url("/static/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-display: swap; }

/* ---- Design tokens ---- */
:root {
  --royal:     #1b3a7a;
  --teal:      #0e7c86;
  --turquoise: #15a99d;
  --gold:      #b0863a;
  --gold-soft: #c9a45c;

  --bg:        #ffffff;
  --surface:   #ffffff;
  --surface-2: #f4f7fb;   /* subtle band / cards */
  --ink:       #16243f;   /* deep navy text */
  --ink-soft:  #586a86;
  --line:      rgba(22, 36, 63, 0.10);

  --script: "Brother Signature", "Segoe Script", cursive;
  --sans:   "Inter", system-ui, -apple-system, sans-serif;
  --mono:   "IBM Plex Mono", ui-monospace, "Courier New", monospace;

  --wrap: 1040px;
  --radius: 12px;
  --shadow: 0 14px 40px -26px rgba(22, 36, 63, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --royal: #6f9be6;
    --teal: #2bb6bf;
    --turquoise: #34d3c5;
    --gold: #cda353;
    --gold-soft: #d8b87a;
    --bg: #0a1730;
    --surface: #0f2147;
    --surface-2: #0d1d40;
    --ink: #e8eefb;
    --ink-soft: #9fb3d6;
    --line: rgba(232, 238, 251, 0.12);
  }
}
:root[data-theme="dark"] {
  --royal: #6f9be6;
  --teal: #2bb6bf;
  --turquoise: #34d3c5;
  --gold: #cda353;
  --gold-soft: #d8b87a;
  --bg: #0a1730;
  --surface: #0f2147;
  --surface-2: #0d1d40;
  --ink: #e8eefb;
  --ink-soft: #9fb3d6;
  --line: rgba(232, 238, 251, 0.12);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  /* Shared site background: the soft turquoise glow fading to white,
     anchored to the top of every page (was hero-only before). */
  background-color: var(--bg);
  background-image:
    radial-gradient(60% 50% at 50% 8%, color-mix(in srgb, var(--turquoise) 10%, transparent), transparent 70%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--bg) 60%);
  background-repeat: no-repeat;
  background-size: 100% 100vh, 100% 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(2.25rem, 5vw, 3.75rem); }
.section--narrow { max-width: 680px; }

h1, h2, h3 { font-family: var(--sans); color: var(--ink); letter-spacing: -0.02em; line-height: 1.15; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--gold);
  margin: 0 0 0.7rem;
}

.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: #fff;
  padding: 0.6rem 1rem; border-radius: 0 0 8px 0; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 0; }

:where(a, button, input, textarea, summary):focus-visible {
  outline: 2px solid var(--turquoise); outline-offset: 2px; border-radius: 4px;
}

/* ---- Header ---- */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); }
.site-header__inner { display: flex; align-items: center; gap: 1.25rem; min-height: 70px; }
.brand { text-decoration: none; color: inherit; margin-right: auto; }
.brand__mark { font-family: var(--script); font-weight: 400; font-size: 1.85rem; line-height: 1;
  letter-spacing: 0; color: var(--ink); display: inline-block; }
.brand__mark--sm { font-size: 1.55rem; }
.brand__mark .amp { color: var(--gold); padding: 0 0.02em; font-weight: 400; }

.mainnav { display: flex; gap: 1.6rem; }
.mainnav a { text-decoration: none; color: var(--ink-soft); font-size: 0.9rem; font-weight: 500; padding: 0.3rem 0; position: relative; }
.mainnav a:hover { color: var(--ink); }
.mainnav a.is-active { color: var(--ink); }
.mainnav a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold); border-radius: 2px; }

.controls { display: flex; align-items: center; gap: 0.8rem; }
.lang { font-family: var(--mono); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.12em; text-decoration: none;
  color: var(--ink-soft); border: 1px solid var(--line); padding: 0.32rem 0.55rem; border-radius: 999px; }
.lang:hover { color: var(--ink); border-color: var(--gold); }
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 999px; width: 36px; height: 36px;
  cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.theme-toggle:hover { border-color: var(--gold); }
.theme-toggle__icon { width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, var(--gold-soft), var(--gold)); }
:root[data-theme="dark"] .theme-toggle__icon,
:root:not([data-theme="light"]) .theme-toggle__icon { background: transparent; box-shadow: inset -4px -4px 0 0 var(--gold-soft); }

/* Mobile nav toggle (hamburger) — hidden on desktop, shown < 720px */
.navtoggle { display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--ink); cursor: pointer; }
.navtoggle:hover { border-color: var(--gold); }
.navtoggle__bars { position: relative; display: block; width: 17px; height: 2px;
  background: currentColor; border-radius: 2px; transition: background 0.2s ease; }
.navtoggle__bars::before, .navtoggle__bars::after { content: ""; position: absolute; left: 0;
  width: 17px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.2s ease, top 0.2s ease; }
.navtoggle__bars::before { top: -5px; }
.navtoggle__bars::after { top: 5px; }
.navtoggle[aria-expanded="true"] .navtoggle__bars { background: transparent; }
.navtoggle[aria-expanded="true"] .navtoggle__bars::before { top: 0; transform: rotate(45deg); }
.navtoggle[aria-expanded="true"] .navtoggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ---- Hero (light, airy) ---- */
.hero { position: relative; isolation: isolate; text-align: center;
  display: grid; align-items: center; min-height: clamp(340px, 56vh, 500px); overflow: hidden; }
.hero--short { min-height: clamp(340px, 52vh, 480px); }
/* The gradient now lives on <body> (shared across all pages). */
.hero__bg { display: none; }
.hero__horizon { display: none; }
.hero__inner { padding-block: clamp(1.75rem, 5vh, 3.25rem); }
.hero__inner > * { animation: rise 0.8s cubic-bezier(.2,.7,.2,1) both; }
.hero__inner > *:nth-child(2) { animation-delay: 0.07s; }
.hero__inner > *:nth-child(3) { animation-delay: 0.14s; }
.hero__inner > *:nth-child(4) { animation-delay: 0.21s; }
.hero__inner > *:nth-child(5) { animation-delay: 0.28s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.hero__names { font-family: var(--script); font-weight: 400; color: var(--ink);
  font-size: clamp(3.8rem, 13vw, 7.5rem); line-height: 1.0; margin: 0; }
.hero__name { display: block; }
.hero__amp { display: block; color: var(--gold); font-size: 0.62em; line-height: 0.9; margin: -0.05em 0; }
.hero__title { font-family: var(--script); font-weight: 400; color: var(--ink); font-size: clamp(3rem, 9vw, 5rem); margin: 0; }
.hero__tagline { max-width: 34ch; margin: 1.1rem auto 0; font-size: 1.05rem; color: var(--ink-soft); }

.factbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin: 1.3rem 0 0; padding: 0; }
.factbar__item { border: 1px solid var(--line); border-radius: 999px; padding: 0.5rem 1.25rem; background: var(--surface); }
.factbar dt { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.factbar dd { margin: 0.1rem 0 0; font-weight: 500; color: var(--ink); }

.countdown { display: flex; justify-content: center; gap: 1.6rem; margin-top: 2rem; }
.countdown__cell span { font-family: var(--sans); font-weight: 600; font-size: clamp(1.8rem, 5vw, 2.4rem); display: block; color: var(--ink); }
.countdown__cell small { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }

/* ---- Buttons ---- */
.btn { display: inline-block; text-decoration: none; font-weight: 600; cursor: pointer; border-radius: 999px;
  padding: 0.8rem 1.9rem; font-size: 0.98rem; border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: #fff; box-shadow: 0 10px 26px -14px var(--gold); margin-top: 1.6rem; }
.btn--gold:hover { background: color-mix(in srgb, var(--gold) 88%, #000); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); margin-top: 1.5rem; }
.btn--ghost:hover { border-color: var(--gold); }

/* ---- Signposts ---- */
.signposts { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.signpost { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem 1.6rem;
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 0.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.signpost:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
.signpost .eyebrow { margin: 0; }
.signpost__desc { color: var(--ink-soft); font-size: 0.96rem; }
.signpost__arrow { color: var(--gold); font-size: 1.2rem; margin-top: auto; }

/* ---- Page head ---- */
.pagehead { border-bottom: 1px solid var(--line); padding-block: clamp(1.8rem, 4vw, 2.8rem) clamp(1rem, 2vw, 1.4rem); }
.pagehead__title { font-family: var(--sans); font-weight: 700; margin: 0; font-size: clamp(2rem, 5.5vw, 3rem); }
.lede { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 1.5rem; }

/* ---- FAQ ---- */
.faq { display: grid; gap: 0.7rem; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq__item[open] { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.faq__q { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.05rem 1.4rem; font-family: var(--sans); font-size: 1.08rem; font-weight: 600; color: var(--ink); }
.faq__q::-webkit-details-marker { display: none; }
.faq__chevron { width: 10px; height: 10px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(45deg); transition: transform 0.25s ease; flex: none; }
.faq__item[open] .faq__chevron { transform: rotate(-135deg); }
.faq__a { padding: 0 1.4rem 1.3rem; color: var(--ink-soft); }

/* ---- Timeline ---- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding: 0 0 1.5rem 2.6rem; }
.timeline__item::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--gold); }
.timeline__time { font-family: var(--mono); font-weight: 500; font-size: 0.92rem; color: var(--teal); letter-spacing: 0.05em; }
.timeline__title { font-family: var(--sans); font-weight: 600; font-size: 1.3rem; margin: 0.15rem 0 0.2rem; }
.timeline__note { margin: 0; color: var(--ink-soft); }

/* ---- Form ---- */
.form { display: grid; gap: 1.4rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field--narrow { max-width: 200px; }
.field label, .field__label, .field legend { font-weight: 500; font-size: 0.9rem; color: var(--ink); padding: 0; }
.req { color: var(--gold); margin-left: 0.15rem; }
.field input, .field textarea, .field select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.7rem 0.85rem; width: 100%; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--turquoise) 22%, transparent); outline: none; }
.field textarea { resize: vertical; }
fieldset.field { border: none; margin: 0; padding: 0; }
.hint { display: block; margin-top: 0.05rem; font-size: 0.82rem; line-height: 1.45; color: var(--ink-soft); }

/* form grouping */
.form__group { border: none; margin: 0; padding: 0; display: grid; gap: 1.3rem; }
.form__group + .form__group { padding-top: 1.6rem; border-top: 1px solid var(--line); }
.form__group-title { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--gold); padding: 0; margin: 0; }
.form__privacy { font-size: 0.85rem; color: var(--ink-soft); margin: 0.5rem 0 0; }
.form__privacy a { color: var(--teal); }
.chip--block { width: fit-content; }

.choice { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.2rem; }
/* Attendance yes/no: two wide, equal-width buttons */
.choice--attend { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 0.4rem; }
.choice--attend .chip { justify-content: center; padding: 0.95rem 1rem; font-size: 1rem; border-radius: 12px; }
@media (max-width: 460px) { .choice--attend { grid-template-columns: 1fr; } }

/* Wrapper for everything that disappears when "can't make it" is chosen */
#rsvp-yes-only:not([hidden]) { display: grid; gap: 1.4rem; }
.chip { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; border: 1px solid var(--line);
  border-radius: 999px; padding: 0.5rem 1.05rem; background: var(--surface); font-weight: 500; font-size: 0.93rem;
  transition: border-color 0.15s ease, background 0.15s ease; }
.chip:hover { border-color: var(--gold); }
.chip:has(input:checked) { border-color: var(--teal); background: color-mix(in srgb, var(--turquoise) 12%, var(--surface)); }
.chip input { accent-color: var(--teal); width: auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Notice ---- */
.notice { border-radius: var(--radius); padding: 2rem; border: 1px solid var(--line); background: var(--surface); }
.notice--success { border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); background: color-mix(in srgb, var(--turquoise) 8%, var(--surface)); }
.notice__title { font-family: var(--script); font-size: 2rem; font-weight: 400; margin: 0 0 0.4rem; color: var(--teal); }

/* ---- Prose ---- */
.prose { color: var(--ink-soft); }
.prose h2 { font-family: var(--sans); color: var(--ink); font-weight: 600; font-size: 1.25rem; margin: 1.6rem 0 0.4rem; scroll-margin-top: 90px; }
.prose p { margin: 0 0 1rem; }
.prose a { color: var(--teal); }
.prose__updated { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 1.5rem; }

/* Privacy table of contents */
.toc-privacy { margin: 1.5rem 0 2.4rem; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.toc-privacy__title { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--ink-soft); margin: 0 0 0.6rem; }
.toc-privacy ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 1.8rem; }
.toc-privacy li { margin: 0.25rem 0; break-inside: avoid; }
.toc-privacy a { color: var(--teal); text-decoration: none; }
.toc-privacy a:hover { text-decoration: underline; }
@media (max-width: 560px) { .toc-privacy ol { columns: 1; } }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding-block: 2.5rem; background: var(--surface-2); }
.site-footer__inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-footer__meta { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.site-footer__links { margin-left: auto; display: flex; gap: 1.2rem; }
.site-footer__links a { color: var(--ink-soft); text-decoration: none; font-size: 0.88rem; }
.site-footer__links a:hover { color: var(--gold); }

/* ---- Photos (placeholders until real images are dropped in) ---- */
.moments { text-align: center; }
.moments__title { font-family: var(--script); font-weight: 400; font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0; }
.moments__intro { color: var(--ink-soft); max-width: 46ch; margin: 0.5rem auto 1.5rem; }
.photo-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.photo-grid--gallery { grid-template-columns: repeat(3, 1fr); }
.photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); border: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent);
  display: grid; place-items: center; gap: 0.6rem; aspect-ratio: 4 / 3; color: var(--ink-soft); }
.photo--portrait { aspect-ratio: 3 / 4; }
.photo--wide { aspect-ratio: 4 / 3; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo__icon { width: 30px; height: 24px; border: 2px solid currentColor; border-radius: 5px; opacity: 0.5; position: relative; }
.photo__icon::before { content: ""; position: absolute; top: -6px; left: 8px; width: 9px; height: 5px;
  border: 2px solid currentColor; border-bottom: none; border-radius: 3px 3px 0 0; }
.photo__icon::after { content: ""; position: absolute; inset: 0; margin: auto; width: 9px; height: 9px;
  border: 2px solid currentColor; border-radius: 50%; }
.photo__label { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.8; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .photo-grid, .photo-grid--gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .navtoggle { display: inline-flex; }
  .site-header__inner { gap: 0.6rem; }
  /* Nav becomes a dropdown panel under the (sticky) header */
  .mainnav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 0.4rem 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .mainnav.is-open { display: flex; }
  .mainnav a { padding: 0.9rem clamp(1.25rem, 5vw, 2rem); font-size: 1rem; }
  .mainnav a.is-active::after { display: none; }
  .signposts { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .photo-grid, .photo-grid--gallery { grid-template-columns: 1fr; }
}

/* ---- Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
