/* ===========================================================
   FACT 2026 — Mahiwagahan hero
   Own-world tokens: violet floral macro photography, reversed
   wordmark, monoline script accent, indigo/violet chrome.
   =========================================================== */

:root {
  --ink-900: #0e155e;
  --violet-800: #4b1c71;
  --blue-500: #3681ab;
  --orchid-400: #b37ad4;
  --cream-100: #ffffdd;
  --white: #ffffff;
  --silver: #e9e6f5;

  /* Derived tints for .pill--solid's white-to-violet gradient (not brand hues, just the gradient's own midtones). */
  --pill-solid-mid: #f2edfe;
  --pill-solid-shade: #ddd2f7;

  --text-on-photo: #ffffff;
  --text-on-photo-dim: rgba(255, 255, 255, 0.78);

  /* Bare RGB triplet (no alpha) so every scrim/overlay tint can share one source color at its own opacity: rgba(var(--ink-scrim), 0.X). */
  --ink-scrim: 6, 4, 22;

  /* On-light text roles: violet-800 carries structural labels/links at a
     verified ~12:1 contrast against parchment; orchid-400 stays for
     decorative/large-scale accents only (icons, glows, hover states). */
  --ink-on-light: var(--ink-900);
  --ink-on-light-dim: rgba(14, 21, 94, 0.72);
  --accent-on-light: var(--violet-800);
  --hairline-on-light: rgba(14, 21, 94, 0.14);

  --font-ui: 'Jost', 'Trebuchet MS', sans-serif;
  --font-display: 'Fraunces', 'Georgia', serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--cream-100);
  border: clamp(8px, 1.1vw, 13px) solid rgba(75, 28, 113, 0.88);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-on-light);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Night bands (hero, footer) sit on dark ink-900 — the on-light accent
   outline is invisible there, so restore the cream outline the dark
   surfaces were originally tuned for. */
.hero :focus-visible,
.hero:focus-visible,
.footer :focus-visible,
.footer:focus-visible {
  outline-color: var(--cream-100);
}

/* ---------- Hero shell ---------- */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  color: var(--text-on-photo);
}

/* The photographic layers themselves stay clipped to the hero box even
   though the hero no longer clips overflow in general — the nav menu
   drawer needs to be able to extend past a short (compact) hero without
   being cut off. */
.hero__bg,
.hero__scrim,
.hero__grain {
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 35%;
  z-index: -3;
  transform: scale(1.02);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(48% 42% at 50% 52%, rgba(6, 3, 22, 0.5), rgba(6, 3, 22, 0) 72%),
    linear-gradient(180deg, rgba(14, 8, 36, 0.62) 0%, rgba(20, 10, 46, 0.12) 24%, rgba(14, 8, 36, 0.05) 46%, rgba(10, 6, 34, 0.72) 100%),
    radial-gradient(120% 70% at 30% 100%, rgba(14, 21, 94, 0.55), transparent 60%),
    linear-gradient(90deg, rgba(75, 28, 113, 0.28), rgba(75, 28, 113, 0) 40%);
  mix-blend-mode: normal;
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 140px 140px;
}

/* ---------- Top bar ---------- */

.hero__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1.25rem, 3vw, 2.5rem);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--text-on-photo-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(var(--ink-scrim), 0.4), transparent);
  animation: rise 0.9s var(--ease-out-expo) both;
}

.hero__eventline {
  margin: 0;
  white-space: nowrap;
}

.countdown {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  white-space: nowrap;
}

.countdown__value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cream-100);
}

.countdown__label {
  color: var(--text-on-photo-dim);
}

/* ---------- Nav ---------- */

.hero__nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 3vw, 2.5rem);
  animation: rise 0.9s 0.08s var(--ease-out-expo) both;
}

.hero__mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(6, 4, 30, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo);
}

.hero__mark:hover,
.hero__mark:focus-visible {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 10px 24px rgba(6, 4, 30, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.hero__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The menu is a single collapsed/expanded drawer at every breakpoint —
   there is no separate "mobile nav" mode, only a docked panel (desktop)
   that grows to a full-bleed sheet under 900px. */
.hero__menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 0.6rem);
  right: clamp(1.25rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  min-width: 240px;
  max-width: min(340px, calc(100vw - 2.5rem));
  padding: 1.5rem 1.5rem 1.65rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 8, 36, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 24px 48px rgba(6, 4, 30, 0.4);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s var(--ease-out-expo);
}

.hero__nav.is-open .hero__menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.hero__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.95rem;
}

.hero__links a {
  position: relative;
  display: inline-block;
  padding-block: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-on-photo);
}

.hero__links a[aria-disabled='true'] {
  color: var(--text-on-photo-dim);
  cursor: default;
}

.hero__links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.72rem;
  height: 1px;
  background: var(--cream-100);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out-expo);
}

.hero__links a:not([aria-disabled='true']):hover::after,
.hero__links a:not([aria-disabled='true']):focus-visible::after,
.hero__links a[aria-current='page']::after {
  transform: scaleX(1);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero__actions .pill {
  justify-content: center;
}

.hero__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--white);
  transition: color 0.25s ease;
}

.hero__social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.hero__social:hover,
.hero__social:focus-visible {
  color: var(--orchid-400);
}

.pill {
  position: relative;
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s var(--ease-out-expo), background 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.pill::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 58% 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.pill--ghost::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
}

.pill:disabled::before,
.pill[aria-disabled='true']::before {
  content: '';
  width: 0.6em;
  height: 0.75em;
  flex: none;
  background-color: currentColor;
  opacity: 0.55;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 10V8a6 6 0 0 1 12 0v2h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1zm2 0h8V8a4 4 0 0 0-8 0v2z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6 10V8a6 6 0 0 1 12 0v2h1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h1zm2 0h8V8a4 4 0 0 0-8 0v2z'/></svg>") center / contain no-repeat;
}

.pill--ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
}

.pill--solid {
  background: linear-gradient(180deg, #ffffff 0%, var(--pill-solid-mid) 50%, var(--pill-solid-shade) 100%);
  color: var(--ink-900);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 3px 16px rgba(179, 122, 212, 0.4);
}

/* On-parchment variant: pill--solid/ghost assume a dark band behind them
   (nav, hero, footer). Content pages on the parchment ground need an
   inked pill of their own, same tokens, no new hue. */
.pill--ink {
  background: linear-gradient(180deg, var(--violet-800) 0%, var(--ink-900) 100%);
  color: var(--cream-100);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 16px rgba(14, 21, 94, 0.28);
}

.pill--ink::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
}

.pill:disabled,
.pill[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.82;
}

/* Ghost/solid (night-band) locked pills read too close to their live
   state — full gradient + shadow made "coming soon" buttons look like
   the boldest, most inviting things in the nav. Flatten to a quiet
   outline once locked; .pill--ink (day-band) is untouched since it
   wasn't part of this problem. */
.pill--ghost:disabled,
.pill--solid:disabled,
.pill--ghost[aria-disabled='true'],
.pill--solid[aria-disabled='true'] {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-on-photo-dim);
  box-shadow: none;
}

.pill--ghost:disabled::after,
.pill--solid:disabled::after,
.pill--ghost[aria-disabled='true']::after,
.pill--solid[aria-disabled='true']::after {
  display: none;
}

/* Visible "coming soon" cue on tap for any locked control — the title
   tooltip it mirrors never fires on touch, so touch users previously got
   no feedback at all beyond a silent aria-live update. */
.locked-tip {
  position: fixed;
  z-index: 50;
  width: max-content;
  max-width: 260px;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  background: rgba(10, 8, 36, 0.94);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 24px rgba(6, 4, 30, 0.4);
  opacity: 0;
  transform: translate(-50%, -6px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.locked-tip.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pill:not(:disabled):not([aria-disabled='true']):hover,
.pill:not(:disabled):not([aria-disabled='true']):focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(6, 4, 30, 0.35);
}

.hero__navtoggle {
  position: relative;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  height: 44px;
  padding: 0 1.1rem 0 0.9rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.25s ease;
}

.hero__navtoggle:hover,
.hero__navtoggle:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.hero__navtoggle-label {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
}

.hero__navtoggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero__navtoggle-bars span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s var(--ease-out-expo);
}

.hero__navtoggle[aria-expanded='true'] .hero__navtoggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hero__navtoggle[aria-expanded='true'] .hero__navtoggle-bars span:nth-child(2) {
  opacity: 0;
}

.hero__navtoggle[aria-expanded='true'] .hero__navtoggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Hero content: unified title lockup ---------- */

.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vh, 4rem) clamp(1.25rem, 6vw, 5rem);
}

.hero__h1reset {
  margin: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.hero__title {
  display: block;
  width: clamp(320px, 62vw, 1180px);
  max-width: 92vw;
  filter: drop-shadow(0 24px 56px rgba(4, 2, 20, 0.5));
  animation: rise 1s 0.25s var(--ease-out-expo) both;
}

/* ---------- Compact header (interior pages) ---------- */

.hero--compact {
  min-height: 0;
}

.hero--compact .hero__scrim {
  background: linear-gradient(180deg, rgba(var(--ink-scrim), 0.72) 0%, rgba(var(--ink-scrim), 0.6) 45%, rgba(var(--ink-scrim), 0.82) 100%);
}

.hero__pagetitle {
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 6vw, 5rem) clamp(3rem, 7vw, 4.5rem);
  animation: rise 1s 0.2s var(--ease-out-expo) both;
}

.hero__pagetitle h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--white);
  text-shadow: 0 12px 30px rgba(4, 2, 20, 0.4);
}

.hero__pagetitle p {
  margin: 0.85rem 0 0;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
}

.hero__scrollcue {
  position: absolute;
  left: 50%;
  bottom: clamp(1.1rem, 3vh, 2rem);
  transform: translateX(-50%);
  z-index: 3;
  width: 22px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  display: grid;
  place-items: center;
  animation: rise 1s 0.6s var(--ease-out-expo) both;
}

.hero__scrollcue span {
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--cream-100);
  animation: cue-drift 1.8s ease-in-out infinite;
}

@keyframes cue-drift {
  0% { transform: translateY(-4px); opacity: 0.4; }
  50% { transform: translateY(4px); opacity: 1; }
  100% { transform: translateY(-4px); opacity: 0.4; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

main {
  position: relative;
  background: var(--cream-100);
}

main::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.055  0 0 0 0 0.082  0 0 0 0 0.37  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

/* ---------- Desktop nav ---------- */

/* The nav has too little in it right now (one live link) to justify
   hiding it behind a trigger. It sits inline in the topbar; the toggle
   only exists for widths where the link row won't fit. */
@media (min-width: 900px) {
  .hero__navtoggle {
    display: none;
  }

  .hero__menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 0;
    border: none;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .hero__links {
    flex-direction: row;
    gap: 1.75rem;
  }

  .hero__actions {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0;
    border-top: none;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  /* Below 900px the docked drawer stays a compact anchored panel — with
     one link in it today, a full-bleed sheet would read as mostly empty.
     Kept small and deliberate; grows to a wider list again once more
     pages are live without needing a rebuild. */
  .hero__actions {
    flex-direction: row;
  }

  .hero__actions .pill {
    flex: 1;
  }

  .hero__topbar {
    font-size: 0.72rem;
  }

  .hero__title {
    width: clamp(260px, 82vw, 640px);
  }
}

@media (max-width: 460px) {
  .hero__eventline {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
