/* ===========================================================
   MIDNIGHT SOCIETY — Design tokens
   =========================================================== */
:root {
  --black: #050403;
  --surface: #0D0906;
  --surface-2: #150F0A;
  --gold: #C9A227;
  --gold-bright: #E4C558;
  --ivory: #F4E9C9;
  --ivory-dim: #C9BFA4;
  --wine: #7A1F1F;
  --line: rgba(201, 162, 39, 0.22);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --container: 720px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}

/* subtle film-grain texture over the black */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===========================================================
   NAV
   =========================================================== */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(20px, 5vw, 56px);
  background: linear-gradient(to bottom, rgba(5,4,3,0.85), transparent);
}
.topnav__mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}
.topnav__dot { color: var(--wine); }
.topnav__links { display: flex; gap: 28px; }
.topnav__links a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--ivory-dim);
  transition: color 0.2s ease;
}
.topnav__links a:hover { color: var(--gold-bright); }

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 64px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 20%, rgba(201,162,39,0.10), transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(122,31,31,0.10), transparent 60%),
    var(--black);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin: 0 0 18px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(3.4rem, 12vw, 6.8rem);
  line-height: 0.98;
  margin: 0 0 20px;
  color: var(--ivory);
  text-shadow: 0 0 60px rgba(201,162,39,0.18);
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-style: italic;
  color: var(--gold-bright);
  margin: 0 0 40px;
}

.hero__meta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 48px;
}
.hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero__meta-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ivory-dim);
}
.hero__meta-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ivory);
}
.hero__meta-divider { color: var(--line); }

/* countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 4vw, 30px);
  margin-bottom: 44px;
}
.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
}
.countdown__num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 600;
  color: var(--gold-bright);
  line-height: 1;
}
.countdown__label {
  margin-top: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ivory-dim);
}

.hero__cta {
  display: inline-block;
  padding: 16px 40px;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  transition: background 0.25s ease, color 0.25s ease;
  background: transparent;
}
.hero__cta:hover {
  background: var(--gold);
  color: var(--black);
}

/* ===========================================================
   SHARED SECTION HEADINGS
   =========================================================== */
.section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin: 0 0 12px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 40px;
  color: var(--ivory);
}

/* ===========================================================
   INTRO
   =========================================================== */
.intro {
  max-width: var(--container);
  margin: 0 auto;
  padding: 96px 24px;
  text-align: center;
}
.intro__rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 36px;
}
.intro__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  line-height: 1.55;
  color: var(--ivory-dim);
}

/* ===========================================================
   TICKETS
   =========================================================== */
.tickets {
  max-width: 920px;
  margin: 0 auto;
  padding: 60px 24px 100px;
  text-align: center;
}
.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  text-align: left;
  margin-top: 8px;
}
.ticket-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  padding: 32px 28px;
  position: relative;
}
.ticket-card__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 16px;
}
.ticket-card__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
  color: var(--ivory);
}
.ticket-card__price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold-bright);
  margin: 0;
}
.ticket-card__note {
  font-size: 0.9rem;
  color: var(--ivory-dim);
  margin: 0 0 24px;
}
.ticket-card__qty {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--ivory-dim);
}
.ticket-card__qty select {
  background: var(--black);
  color: var(--ivory);
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-family: var(--font-body);
}
.ticket-card__buy {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--black);
  border: none;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}
.ticket-card__buy:hover { background: var(--gold-bright); }
.ticket-card__buy:disabled {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ivory-dim);
  cursor: not-allowed;
}
.ticket-card__status {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: var(--wine);
  min-height: 1.2em;
}
.ticket-card--soldout {
  opacity: 0.7;
}

/* ===========================================================
   ABOUT
   =========================================================== */
.about {
  max-width: 1000px;
  margin: 0 auto;
  padding: 100px 24px;
  border-top: 1px solid var(--line);
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about__text {
  color: var(--ivory-dim);
  font-size: 1.02rem;
}
@media (max-width: 720px) {
  .about__grid { grid-template-columns: 1fr; }
}

/* ===========================================================
   FOUNDERS
   =========================================================== */
.founders {
  text-align: center;
  padding: 90px 24px 120px;
}
.founders__rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 32px;
}
.founders__names span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--gold-bright);
}

/* ===========================================================
   FOOTER
   =========================================================== */
.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--line);
}
.footer__mark {
  font-family: var(--font-display);
  color: var(--gold);
  margin-bottom: 8px;
}
.footer__copy {
  font-size: 0.8rem;
  color: var(--ivory-dim);
  margin: 0;
}

/* ===========================================================
   MODAL
   =========================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.modal[aria-hidden="false"] { display: block; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,4,3,0.82);
  backdrop-filter: blur(3px);
}
.modal__panel {
  position: relative;
  z-index: 2;
  max-width: 420px;
  margin: 10vh auto;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 40px 32px;
}
.modal__close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--ivory-dim);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.modal__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 8px;
  color: var(--ivory);
}
.modal__subtitle {
  color: var(--gold-bright);
  font-size: 0.9rem;
  margin: 0 0 28px;
}
.field {
  display: block;
  margin-bottom: 18px;
}
.field span {
  display: block;
  font-size: 0.8rem;
  color: var(--ivory-dim);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--black);
  border: 1px solid var(--line);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.field input:focus { border-color: var(--gold); }
.modal__submit {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--black);
  border: none;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
}
.modal__submit:hover { background: var(--gold-bright); }

.modal__step { text-align: center; }
#step-details { text-align: left; }
.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 20px auto;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.modal__processing-text { color: var(--ivory-dim); }
.modal__error-text { color: var(--ivory-dim); margin-bottom: 24px; }
