/* =========================================================================
   Shared design system for wcstudentmin event landing pages.
   Per-site overrides live in an inline <style> block in each index.html.
   Override any of the custom properties under :root below.
   ========================================================================= */

:root {
  /* ---- Color tokens (override --accent and --bg per site) ---------------- */
  --accent: #ff5a1f;          /* Primary brand color for the event */
  --accent-fg: #ffffff;       /* Text/foreground on top of --accent */
  --bg: #fbf7f2;              /* Page background (soft off-white) */
  --fg: #14110f;              /* Primary text */
  --muted: #6b6660;           /* Secondary / supporting text */
  --card: #ffffff;            /* Surfaces (FAQ items, etc.) */
  --border: #ebe6df;          /* Hairlines */
  --focus: #2a6df4;           /* Focus ring */

  /* ---- Spacing scale (4px base) ----------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* ---- Type scale ------------------------------------------------------- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --fs-body: 1rem;             /* 16px min */
  --fs-lead: 1.125rem;
  --fs-small: 0.875rem;
  --fs-h1: clamp(2.5rem, 7vw + 1rem, 4.5rem);   /* ~40px → 72px */
  --fs-h2: clamp(1.5rem, 2vw + 1rem, 2rem);
  --lh-tight: 1.05;
  --lh-body: 1.55;

  /* ---- Radii / shadows / motion ----------------------------------------- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-hero: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 17, 15, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 17, 15, 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* ---- Layout ----------------------------------------------------------- */
  --measure: 560px;            /* Max content column width */
}

/* ---- Reset-ish ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- Page shell --------------------------------------------------------- */
.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space-7) var(--space-5) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}
@media (min-width: 720px) {
  .page { padding-top: var(--space-8); padding-bottom: var(--space-9); }
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  margin: 0;                 /* override UA <figure> margin */
  width: 100%;
  aspect-ratio: var(--hero-aspect, 3 / 2);
  border-radius: var(--radius-hero);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-md);
}
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Header block ------------------------------------------------------- */
.event-title {
  font-size: var(--fs-h1);
  font-weight: 900;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin: 0;
}
.event-meta {
  margin-top: var(--space-3);
  color: var(--muted);
  font-size: var(--fs-lead);
}
.event-meta strong { color: var(--fg); font-weight: 600; }

.lede { font-size: var(--fs-lead); margin: 0; }
.lede + .lede { margin-top: var(--space-4); }
.lede-block { margin-top: var(--space-5); }

/* ---- CTAs --------------------------------------------------------------- */
.cta-stack { display: flex; flex-direction: column; gap: var(--space-3); align-items: stretch; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;          /* >44px tap target */
  padding: 0 var(--space-6);
  font-family: inherit;
  font-size: var(--fs-lead);
  font-weight: 700;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease),
              filter 120ms var(--ease);
}
.btn:hover { filter: brightness(0.95); box-shadow: var(--shadow-md); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-secondary {
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-body);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-secondary:hover { color: var(--fg); }

/* ---- Section headings & prose ------------------------------------------ */
.section-heading {
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-5);
}
.subhead {
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: var(--space-6) 0 var(--space-3);
}
.subhead:first-of-type { margin-top: var(--space-2); }
.section-intro {
  color: var(--muted);
  margin: 0 0 var(--space-2);
}
.prose p { margin: 0; }
.prose p + p { margin-top: var(--space-4); }
.rules-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.rules-list li { padding-left: var(--space-2); }
.rules-list li::marker { color: var(--muted); }

/* ---- FAQ ---------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; gap: var(--space-3); }
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.faq details[open] {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-5);
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  font-weight: 600;
  color: var(--fg);
  transition: color 120ms var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] > summary { color: var(--accent); }
.faq summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 220ms var(--ease), border-color 120ms var(--ease);
  flex-shrink: 0;
  margin-right: var(--space-2);
}
.faq details[open] > summary::after {
  transform: rotate(-135deg);
  border-color: var(--accent);
}
.faq-body {
  padding: var(--space-2) var(--space-5) var(--space-5);
  color: var(--fg);
  font-size: var(--fs-body);
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.faq details[open] > .faq-body { padding-top: var(--space-4); }
.faq-body p { margin: 0; color: var(--muted); }
.faq-body p + p { margin-top: var(--space-3); }
.faq-body a { color: var(--accent); }

/* Smooth open/close. Supported in modern browsers; ignored elsewhere. */
@supports (interpolate-size: allow-keywords) {
  .faq details {
    interpolate-size: allow-keywords;
  }
  .faq details::details-content {
    height: 0;
    overflow: clip;
    transition: height 240ms var(--ease), content-visibility 240ms allow-discrete;
  }
  .faq details[open]::details-content { height: auto; }
}

/* ---- Footer ------------------------------------------------------------- */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-small);
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--fg); }

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