/* ===== TOKENS ===== */
:root {
  --bg: #070708;
  --bg-elevated: #0f0f12;
  --bg-card: #121216;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --crimson: #e11d2e;
  --crimson-deep: #b91c1c;
  --crimson-glow: rgba(225, 29, 46, 0.35);
  --silver: #d4d4d8;
  --success: #22c55e;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: "Bebas Neue", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background atmosphere */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 60vh;
  background: radial-gradient(ellipse at center, var(--crimson-glow) 0%, transparent 65%);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(7, 7, 8, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  background: var(--crimson);
  color: white;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  line-height: 1;
}

.brand-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--crimson);
  color: white;
  box-shadow: 0 0 0 0 transparent;
}

.btn-primary:hover {
  background: #f02838;
  box-shadow: 0 0 24px var(--crimson-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--crimson);
  color: var(--crimson);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
  padding: 0.8rem 1.6rem;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
  padding: 0.85rem 1.2rem;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    padding: 5rem 1.25rem 5.5rem;
    gap: 3rem;
  }
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.title-line {
  display: block;
  font-size: clamp(3.2rem, 10vw, 5.5rem);
  color: var(--text);
}

.title-line.accent {
  color: var(--crimson);
  font-size: clamp(2.6rem, 8vw, 4.2rem);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 36ch;
  margin-bottom: 1.75rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.meta-value.live {
  color: var(--success);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Poster visual — official art */
.hero-visual {
  display: flex;
  justify-content: center;
  order: -1; /* image sits above the title text on mobile */
}

@media (min-width: 900px) {
  .hero-visual {
    order: 0;
  }
}

.poster {
  margin: 0;
  width: min(300px, 78vw);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 0 0 1px rgba(225, 29, 46, 0.18),
    0 28px 56px -12px rgba(0, 0, 0, 0.75),
    0 0 90px -18px var(--crimson-glow);
  background: #0a0a0c;
}

.poster img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center top;
}

/* ===== SECTIONS ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 3.5rem 1.25rem;
}

.section-inner {
  max-width: 640px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.6rem);
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 42ch;
  margin: 0 auto;
}

/* Form card */
.rsvp-card,
.success-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}

.field {
  margin-bottom: 1.35rem;
}

.field label,
.field legend {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder {
  color: var(--text-dim);
}

.field input:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px var(--crimson-glow);
}

.field-error {
  font-size: 0.8rem;
  color: #f87171;
  margin-top: 0.35rem;
}

/* Radio cards */
.field-radio {
  border: none;
}

.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.radio-card {
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: center;
}

.radio-card input:focus-visible + .radio-ui {
  box-shadow: 0 0 0 3px var(--crimson-glow);
}

.radio-card input:checked + .radio-ui {
  border-color: var(--crimson);
  background: rgba(225, 29, 46, 0.08);
  box-shadow: inset 0 0 0 1px var(--crimson);
}

.radio-title {
  font-weight: 700;
  font-size: 1.05rem;
}

/* Success */
.success-card {
  text-align: center;
  padding: 2.5rem 1.75rem;
}

.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  background: var(--success);
  border-radius: 50%;
}

.success-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.4rem;
}

.success-card p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.success-note {
  font-size: 0.85rem !important;
  color: var(--text-dim) !important;
  margin-top: 0.5rem;
  margin-bottom: 0 !important;
}

/* Info section */
.info-section {
  padding-top: 1rem;
  padding-bottom: 4rem;
}

.info-grid {
  max-width: 960px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 700px) {
  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.info-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.info-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.info-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1.25rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 8px;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.modal-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.35rem;
}

/* ===== DASHBOARD ===== */
.dashboard {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.dashboard[hidden] {
  display: none;
}

.dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 10;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.dash-actions {
  display: flex;
  gap: 0.5rem;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 1.25rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dash-table-wrap {
  flex: 1;
  padding: 0 1.25rem 2rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dash-table th {
  text-align: left;
  padding: 0.75rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dash-table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.dash-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.badge-ya {
  background: rgba(225, 29, 46, 0.15);
  color: #f87171;
}

.badge-tidak {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.btn-delete {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
}

.btn-delete:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* Focus & selection */
::selection {
  background: rgba(225, 29, 46, 0.35);
  color: white;
}

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

input:focus-visible {
  outline: none;
}
