/* triviafosho marketing site — single stylesheet */
:root {
  --bg: #0b0b12;
  --surface: #14141f;
  --surface-2: #1c1c2a;
  --border: #2a2a3d;
  --text: #e8e8f0;
  --text-muted: #8888a8;
  --accent: #7c6af7;
  --accent-2: #56cfb8;
  --radius: 12px;
  --max-w: 860px;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Nav */
nav {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 6vw, 4rem);
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent);
  border-radius: 100px;
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

/* Badges */
.badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    background 0.15s,
    border-color 0.15s;
  text-decoration: none;
}

.badge-link:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  text-decoration: none;
  color: var(--text);
}

.badge-link svg {
  flex-shrink: 0;
}

/* Screenshots */
.screenshot-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
  overflow: hidden;
}

.screenshot-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.app-screenshot {
  width: min(31vw, 180px);
  height: auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgb(0 0 0 / 30%);
  flex-shrink: 0;
  object-fit: cover;
}

.app-screenshot:nth-child(2) {
  transform: translateY(-1rem);
}

/* Features */
.features {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
}

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

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.5rem;
}

.section-heading {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* CTA */
.cta-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.cta-band p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Content pages (legal / support / faq) */
.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-hero .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.prose {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  max-width: 680px;
}

.prose h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  color: var(--text);
}

.prose h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.4rem;
  color: var(--text);
}

.prose p {
  margin-bottom: 0.9rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.prose ul,
.prose ol {
  padding-left: 1.4rem;
  margin-bottom: 0.9rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.prose li {
  margin-bottom: 0.3rem;
}
.prose a {
  color: var(--accent);
}
.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose .note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* FAQ accordion */
.faq-list {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

details[open] {
  border-color: var(--accent);
}

summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.25rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
}

.faq-answer p {
  margin-bottom: 0.5rem;
}
.faq-answer a {
  color: var(--accent);
}

/* Support form */
.support-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s;
}

.support-card:hover {
  border-color: var(--accent);
  text-decoration: none;
  color: var(--text);
}
.support-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0.5rem 0 0.25rem;
}
.support-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}
.support-card .icon {
  font-size: 1.5rem;
}

/* App-link fallback pages (/join, /auth/callback, /auth/reset) */
.applink-hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 6vw, 4rem);
  text-align: center;
}

.applink-hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.applink-hero p {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

.room-code {
  display: block;
  max-width: 420px;
  margin: 1.5rem auto 2rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-indent: 0.2em; /* re-centers letter-spaced text */
  color: var(--accent);
  text-align: center;
}

.open-app-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
}

/* Utility */
.text-muted {
  color: var(--text-muted);
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}

@media (prefers-color-scheme: light) {
  /* keep dark — brand is dark-first */
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }
  .app-screenshot {
    width: min(42vw, 150px);
  }

  .app-screenshot:nth-child(2) {
    transform: none;
  }
}
