/* Midnight Hackers — light theme inspired by Airbnb */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #222222;
  --muted: #717171;
  --brand: #ff385c;
  --brand-600: #e11c4b;
  --accent: #222222;
  --border: #dddddd;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand .logo { color: var(--brand); }
.brand-text { letter-spacing: 0.3px; }

.nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 18px;
}

.nav a:hover { color: #000000; text-decoration: underline; }

.hero {
  padding: 72px 0 48px;
  text-align: left;
}

.hero h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; margin: 0 0 12px; letter-spacing: -0.02em; }
.lead { color: var(--muted); font-size: 18px; margin: 0; }

.cta { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }

.button {
  appearance: none;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.02s ease, border-color 0.2s ease;
}

.button:hover { border-color: #cccccc; box-shadow: var(--shadow-lg); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--brand); color: #ffffff; border-color: var(--brand); }
.button.primary:hover { background: var(--brand-600); border-color: var(--brand-600); }

/* Gleam sweep for primary CTA */
.gleam { position: relative; overflow: hidden; }
.gleam::after {
  content: "";
  position: absolute;
  top: -150%;
  left: -40%;
  width: 70%;
  height: 420%;
  transform: rotate(20deg);
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.18) 38%,
    rgba(255,255,255,0.42) 50%,
    rgba(255,255,255,0.18) 62%,
    rgba(255,255,255,0) 100%
  );
  animation: gleam-sweep 7.2s linear infinite;
  pointer-events: none;
}

@keyframes gleam-sweep {
  0%   { transform: translateX(-160%) rotate(20deg); opacity: 0; }
  8%   { transform: translateX(-130%) rotate(20deg); opacity: 0; }
  18%  { transform: translateX(-80%) rotate(20deg);  opacity: 0.25; }
  32%  { transform: translateX(60%) rotate(20deg);   opacity: 0.50; }
  44%  { transform: translateX(170%) rotate(20deg);  opacity: 0.22; }
  50%  { transform: translateX(170%) rotate(20deg);  opacity: 0; }
  100% { transform: translateX(170%) rotate(20deg);  opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .gleam::after { animation: none; opacity: 0; }
}

.section { padding: 56px 0; border-top: 1px solid var(--border); background: #ffffff; }

h2 { margin: 0 0 16px; font-size: 22px; }

.card-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
}

.card {
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.02s ease, border-color 0.2s ease;
}

.card:hover { box-shadow: var(--shadow-lg); border-color: #dcdcdc; }

.join-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.join-form input {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.join-form input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(255, 56, 92, 0.2);
}

.form-note { color: var(--muted); margin-top: 6px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  background: #ffffff;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer a { color: var(--muted); text-decoration: none; margin-left: 12px; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }


/* Utilities */
.eyebrow { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 8px; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #eaeaea;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: #fafafa;
  margin: 0 0 8px;
}

/* Dark hero with fireflies */
.hero.dark {
  position: relative;
  isolation: isolate;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(124,92,255,0.08), transparent 60%),
              radial-gradient(1200px 600px at 90% 10%, rgba(0,229,255,0.07), transparent 60%),
              #0b0c10;
  color: #e6edf3;
  padding: 96px 0 64px;
}

.hero.dark .lead { color: #c8d1db; }
.hero.dark .brand, .hero.dark .brand-text { color: #e6edf3; }

.hero.dark .container { position: relative; z-index: 2; }

.fireflies {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.fireflies span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,200,0.95), rgba(255,255,200,0.1) 60%, transparent 70%);
  box-shadow: 0 0 12px 2px rgba(255,255,200,0.8), 0 0 32px 8px rgba(124,92,255,0.25);
  pointer-events: none;
  opacity: 0.75;
  animation: blink var(--blink, 4.2s) ease-in-out infinite;
  transition: transform var(--move-dur, 16s) cubic-bezier(.25,.46,.45,.94), opacity 600ms ease-in-out;
}

@keyframes blink {
  0%, 100% { opacity: 0.2; filter: blur(0.5px); }
  50% { opacity: 1; filter: blur(0px); }
}

@media (prefers-reduced-motion: reduce) {
  .fireflies span { animation: none; transition: none; opacity: 0; }
}
