/* ============================================================
   AfterHoursIRL — Main Stylesheet
   Pink & white with dark mode aesthetic
   ============================================================ */

:root {
  /* Brand palette (exact)
     purple = #F802FA
     green  = #9CF900
     white  = #FEFEFE
  */
  --purple: #f802fa;
  --brand-green: #9cf900;
  --brand-white: #fefefe;

  /* Background — deep charcoal loft */
  --bg: #09090b;
  --bg-2: #0c0a0e;
  --surface: rgba(18, 14, 20, 0.72);
  --surface-solid: #121016;
  --surface-hover: rgba(28, 20, 30, 0.85);

  /* Borders — hairline purple */
  --border: rgba(248, 2, 250, 0.16);
  --border-strong: rgba(248, 2, 250, 0.36);

  /* Text */
  --text: #fefefe;
  --text-muted: #b8b0c0;
  --text-dim: #7a7288;

  /* Accents — brand purple (kept as --pink for compatibility) */
  --accent: #f802fa;
  --accent-hover: #ff4dff;
  --pink: #f802fa;
  --pink-glow: #ff5cff;
  --pink-dim: rgba(248, 2, 250, 0.1);
  --white: #fefefe;
  --white-soft: #fefefe;

  /* Semantic */
  --green: #9cf900;
  --red: #ef4444;
  --yellow: #eab308;

  /* Sharp corners — modern NYC loft, shadcn-style */
  --radius: 2px;
  --radius-lg: 2px;
  --radius-xl: 2px;
  --radius-sm: 2px;
  --max-width: 1280px;
  --max-width-narrow: 760px;

  /* Glass / surface */
  --glass-blur: 12px;
  --glass-border: rgba(254, 254, 254, 0.06);
  --glass-bg: rgba(12, 10, 14, 0.72);
  --glass-bg-hover: rgba(20, 15, 24, 0.85);

  /* Shadows — hard architectural */
  --shadow-sm: 0 1px 0 rgba(254, 254, 254, 0.03), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 1px 0 rgba(254, 254, 254, 0.03), 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 1px 0 rgba(254, 254, 254, 0.03), 0 20px 48px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px rgba(248, 2, 250, 0.22), 0 0 24px rgba(248, 2, 250, 0.14);

  --transition: 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
}

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

body {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
}

/* Background layers */
.bg-layer {
  position: fixed;
  top: -15%;
  left: 0;
  width: 100%;
  height: 130%;
  z-index: -2;
  background: radial-gradient(ellipse at 50% 0%, rgba(248, 2, 250, 0.09) 0%, transparent 50%),
              radial-gradient(ellipse at 20% 80%, rgba(156, 249, 0, 0.05) 0%, transparent 40%),
              radial-gradient(ellipse at 80% 60%, rgba(248, 2, 250, 0.05) 0%, transparent 40%);
  opacity: 1;
  will-change: transform;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(10, 10, 15, 0.4) 0%,
    rgba(10, 10, 15, 0.7) 40%,
    rgba(10, 10, 15, 0.85) 100%
  );
  pointer-events: none;
}

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

/* ============================================================
   Layout
   ============================================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   Header / Nav
   ============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-img {
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.logo-text {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a::after {
  display: none;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active .nav-toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .site-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(var(--glass-blur));
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }
  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* Account dropdown */
.nav-account-container {
  display: flex;
  align-items: center;
}

.nav-account-dropdown {
  position: relative;
}

.nav-settings-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: var(--transition);
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.nav-settings-btn.has-avatar {
  padding: 0;
  border-radius: 0;
  width: 36px;
  height: 36px;
  border-color: var(--pink);
}

.nav-settings-btn:hover,
.nav-settings-btn.has-avatar:hover {
  /* flat */
}

.nav-settings-bar {
  width: 18px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
}

.nav-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 8px;
  list-style: none;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.account-menu[hidden] {
  display: none;
}

.account-menu li {
  padding: 8px 12px;
}

.account-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
}

.account-menu a:hover {
  color: var(--text);
}

.account-menu-header {
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-menu-avatar {
  width: 36px;
  height: 36px;
  border-radius: 0;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
}

.account-menu-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}

.account-menu-id {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.account-menu-divider {
  border-top: 1px solid var(--border);
  margin: 4px 0;
  padding: 0;
  height: 0;
}

.account-menu-signout {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 0.9rem;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 2px;
}

.account-menu-signout:hover {
  filter: brightness(1.05);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--pink);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.btn-danger {
  background: rgba(255, 82, 82, 0.15);
  color: var(--red);
  border-color: rgba(255, 82, 82, 0.3);
}

.btn-danger:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--pink), var(--pink-glow));
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(248, 2, 250, 0.3);
}

.cta-button:hover {
  /* flat by default — only real action buttons get emphasis */
}

/* ============================================================
   Cards / Panels
   ============================================================ */

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 2px;
  padding: 24px;
  backdrop-filter: blur(var(--glass-blur));
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--border);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(var(--glass-blur));
}

.panel + .panel {
  margin-top: 20px;
}

.panel h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--pink);
}

/* ============================================================
   Forms
   ============================================================ */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(248, 2, 250, 0.12);
}

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

.form-error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 8px;
}

.form-success {
  color: var(--green);
  font-size: 0.85rem;
  margin-top: 8px;
}

/* ============================================================
   Typography
   ============================================================ */

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--white), var(--pink-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--white) 30%, var(--pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .section-title {
    font-size: 2rem;
  }
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 60px;
}

.footer-bottom {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--pink);
}

/* ============================================================
   Utility
   ============================================================ */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-pink { color: var(--pink); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--pink);
  color: var(--white);
  padding: 8px 16px;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-to-content:focus {
  top: 0;
}

/* Section divider */
.section-divider {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(248, 2, 250, 0.3) 30%,
    rgba(248, 2, 250, 0.15) 70%,
    transparent 100%
  );
  border: none;
  pointer-events: none;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  background: var(--pink-dim);
  color: var(--pink);
  border: 1px solid var(--border-strong);
}

.badge-live {
  background: rgba(248, 2, 250, 0.15);
  color: var(--pink);
}

.badge-live::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Card icon (replaces emojis) */
.card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  border-radius: 0;
  background: linear-gradient(135deg, var(--pink), var(--pink-glow));
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 0;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 2px solid var(--pink);
  display: block;
}

/* Crown icon used on points / feature cards */
.card-crown {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(248, 2, 250, 0.4));
}

/* Hero banner title */
.hero-banner {
  position: relative;
  padding: 120px 0 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-banner-img {
  display: block;
  width: min(720px, 90%);
  height: auto;
  margin: 0 auto 8px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.hero-banner-content {
  position: relative;
  z-index: 1;
  margin-top: -8px;
}

/* Top-right user chip */
.nav-user {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  max-width: 200px;
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  background: #111;
}

.nav-user-avatar-fallback {
  object-fit: contain;
  padding: 3px;
}

.nav-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-signin-btn {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.75rem;
}

/* Grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   shadcn-inspired UI primitives + architectural motion
   ============================================================ */

.btn, .cta-button, .glass-card, .panel, .form-input,
.live-panel, .account-menu, .nav-settings-btn {
  border-radius: 2px !important;
}

.cta-button {
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 12px 22px;
  background: var(--pink);
  box-shadow: none;
  border: 1px solid var(--pink);
}

.btn {
  letter-spacing: 0.01em;
  text-transform: none;
  min-height: 40px;
  padding: 10px 16px;
  font-size: 0.875rem;
}

.btn-primary {
  border-color: var(--pink);
}

.glass-card, .panel, .live-panel {
  border: 1px solid var(--border);
  background: var(--glass-bg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(var(--glass-blur));
}

/* Flat cards — no hover lifts / highlights */
.glass-card:hover, .panel:hover {
  border-color: var(--border);
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* Live status pill stays slightly softer only as status chip */
.live-badge::before,
.badge::before {
  border-radius: 999px;
}

/* Page header strip */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-kick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  min-height: 36px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #0a0a0a;
  background: var(--green);
  border: 1px solid var(--green);
  transition: var(--transition);
}

/* Kick / action buttons keep a light feedback state */
.btn-kick:hover,
.btn-danger:hover:not(:disabled),
.cta-button:hover,
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.btn-kick svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-chip .dot {
  width: 7px;
  height: 7px;
  background: var(--text-dim);
}

.status-chip.live {
  color: var(--pink);
  border-color: rgba(248, 2, 250, 0.35);
}

.status-chip.live .dot {
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  animation: pulse-live 1.5s infinite;
}

/* Slide / reveal animations */
.anim-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
  will-change: opacity, transform;
}

.anim-ready .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.anim-ready .reveal-left {
  opacity: 0;
  transform: translateX(-22px);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
}

.anim-ready .reveal-left.in {
  opacity: 1;
  transform: translateX(0);
}

.anim-ready .reveal-right {
  opacity: 0;
  transform: translateX(22px);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
}

.anim-ready .reveal-right.in {
  opacity: 1;
  transform: translateX(0);
}

.reveal-d1 { transition-delay: 0.05s !important; }
.reveal-d2 { transition-delay: 0.1s !important; }
.reveal-d3 { transition-delay: 0.15s !important; }
.reveal-d4 { transition-delay: 0.2s !important; }
.reveal-d5 { transition-delay: 0.25s !important; }
.reveal-d6 { transition-delay: 0.3s !important; }

@media (prefers-reduced-motion: reduce) {
  .anim-ready .reveal,
  .anim-ready .reveal-left,
  .anim-ready .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Architectural header line */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 11, 0.88);
}

.site-nav a {
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
}

.section-title {
  letter-spacing: -0.03em;
}

.hero-title {
  letter-spacing: -0.04em;
}

