/* ===========================================================================
   root.css - design tokens, reset, base & shared furniture
   Company Events - High Fidelity Brands - sleek & premium: deep ink + brand lime
   =========================================================================== */

:root {
  /* Surfaces - layered deep ink */
  --ink:        #09090b;
  --surface:    #0e0e12;
  --surface-2:  #15151a;
  --surface-3:  #1d1d23;

  /* Hairlines */
  --line:        rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.17);

  /* Text */
  --text:       #f2f0ea;
  --text-dim:   #a3a2a8;
  --text-faint: #6c6b73;

  /* Accent - High Fidelity brand lime */
  --brand:        #d2e603;
  --brand-bright: #e4f24f;
  --brand-deep:   #8d9a16;
  --brand-glow:   rgba(210, 230, 3, 0.15);

  /* Feedback */
  --danger:      #ff8585;
  --danger-bg:   rgba(255, 107, 107, 0.09);
  --danger-line: rgba(255, 107, 107, 0.32);

  /* Type - Poppins is the primary brand font. Museo Sans is licensed (not on
     Google Fonts): self-host it (see the note below) and --font-secondary
     picks it up; until then it falls back to Poppins. */
  --font-primary:   'Poppins', system-ui, -apple-system, sans-serif;
  --font-secondary: 'Museo Sans', 'Poppins', system-ui, sans-serif;

  /* Layout */
  --maxw:      1300px;
  --gutter:    clamp(1.25rem, 5.2vw, 6rem);
  --section-y: clamp(3rem, 7vh, 5.5rem);
  --header-h:  4.75rem;
  --page-top:  calc(var(--header-h) + clamp(3rem, 8vh, 6rem));

  /* Form */
  --radius:   3px;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Museo Sans (licensed) -----------------------------------------------
   Museo Sans is licensed and not on Google Fonts. To self-host it later:
   add museo-sans-500.woff2 / museo-sans-700.woff2 to static/fonts/, then
   add @font-face rules here with src references pointing at those files.

   Keep this as prose - not real CSS - until those files exist:
   ManifestStaticFilesStorage rewrites CSS src references even when they
   sit inside comments, so an unresolved reference fails collectstatic.
   Until the font is added, --font-secondary falls back to Poppins. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, iframe, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-weight: 600; line-height: 1.06; letter-spacing: -0.02em; }
::selection { background: var(--brand); color: var(--ink); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }

/* --- Brand logo --------------------------------------------------------- */
.brand__logo {
  height: 1.85rem;
  width: auto;
  flex: none;
  transition: opacity 0.3s var(--ease);
}
.brand:hover .brand__logo { opacity: 0.82; }

/* --- Kicker dot (accent before kicker labels) --------------------------- */
.tick {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

/* --- Site header -------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 150;
  border-bottom: 1px solid transparent;
  transition: background-color 0.45s var(--ease), border-color 0.45s var(--ease);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.site-header__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  height: var(--header-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-header__actions { display: flex; align-items: center; gap: 0.7rem; }

.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand__word {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}
.brand__sub {
  font-family: var(--font-primary);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--brand);
}

.site-nav { display: flex; gap: 1.9rem; }
.site-nav a {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--font-primary);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  transition: color 0.3s var(--ease);
}
.site-nav__idx { font-size: 0.6rem; color: var(--brand-deep); transition: color 0.3s var(--ease); }
.site-nav a:hover { color: var(--text); }
.site-nav a:hover .site-nav__idx { color: var(--brand); }

/* --- RSVP button -------------------------------------------------------- */
.btn-rsvp {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.64rem 1.1rem;
  font-family: var(--font-primary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 3%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: color 0.35s var(--ease), background-color 0.35s var(--ease),
              border-color 0.35s var(--ease);
}
.btn-rsvp__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
  transition: box-shadow 0.45s var(--ease);
}
.btn-rsvp:hover {
  color: var(--brand-bright);
  background: var(--brand-glow);
  border-color: var(--brand);
}
.btn-rsvp:hover .btn-rsvp__dot { box-shadow: 0 0 0 5px var(--brand-glow); }

.btn-rsvp--lg {
  padding: 1.1rem 2rem;
  font-size: 0.78rem;
  color: var(--ink);
  background: var(--brand);
  border-color: var(--brand);
}
.btn-rsvp--lg .btn-rsvp__dot { background: var(--ink); }
.btn-rsvp--lg:hover {
  color: var(--ink);
  background: var(--brand-bright);
  border-color: var(--brand-bright);
}
.btn-rsvp--lg:hover .btn-rsvp__dot { box-shadow: none; }
.btn-rsvp__arrow { transition: transform 0.35s var(--ease); }
.btn-rsvp--lg:hover .btn-rsvp__arrow { transform: translateX(5px); }

/* --- Quiet link --------------------------------------------------------- */
.link-quiet {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.link-quiet:hover { color: var(--brand); border-color: var(--brand); }

/* --- Shared primitives -------------------------------------------------- */
/* Eyebrow label - lime, uppercase, letter-spaced. Composes with a context
   class for margin, e.g. class="kicker cta__kicker". */
.kicker {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-primary);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--brand);
}

/* Raised surface card. */
.panel {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

/* Left accent-bar callout. */
.callout {
  border-left: 2px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Inline form error message. */
.form-error {
  margin: 1rem 0;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-secondary);
  font-size: 0.87rem;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius);
}

/* Styled checkbox - brand accent. Shared by every form. */
.rsvp-check__box {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 0.08rem;
  accent-color: var(--brand);
  cursor: pointer;
}

/* --- Section scaffold --------------------------------------------------- */
.section {
  position: relative;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: var(--section-y);
}
.section__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}
.section__index {
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand);
}
.section__label {
  font-family: var(--font-primary);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--text-dim);
}
.section__rule { flex: 1; height: 1px; background: var(--line); }

/* --- Site footer -------------------------------------------------------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(2rem, 4.5vw, 3rem) var(--gutter);
  border-top: 1px solid var(--line);
  font-family: var(--font-primary);
  font-size: 0.72rem;
  color: var(--text-faint);
}
.site-footer__links { display: flex; gap: 1.5rem; }
.site-footer a { transition: color 0.3s var(--ease); }
.site-footer a:hover { color: var(--brand); }

/* --- Toast (transient notice; pure-CSS auto-dismiss) -------------------- */
.toast {
  position: fixed;
  top: clamp(1rem, 3vw, 1.85rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 210;
  max-width: min(92vw, 31rem);
  padding: 0.85rem 1.3rem;
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
  color: var(--ink);
  background: var(--brand);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  animation: toast-life 7s var(--ease) both;
}
@keyframes toast-life {
  0%   { opacity: 0; transform: translate(-50%, -0.9rem); }
  7%   { opacity: 1; transform: translate(-50%, 0); }
  88%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -0.6rem); visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none !important; }
}

/* --- Motion ------------------------------------------------------------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(1.6rem); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal-load {
  animation: rise-in 1s var(--ease-out) backwards;
  animation-delay: calc(var(--d, 0) * 95ms + 150ms);
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-load,
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 760px) {
  :root { --header-h: 4.25rem; }
  .site-nav { display: none; }
}
@media (max-width: 480px) {
  /* Avoid crowding the header on small phones - the waiver stays in the footer. */
  .site-header__waiver { display: none; }
}