/* Questly marketing site — single stylesheet, no build step.
   Brand: red #D83033 primary, teal #03DAC5 secondary, dark canvas. */

:root {
  --brand: #D83033;
  --brand-hot: #FF4248;
  --accent: #03DAC5;
  --bg: #0B0C10;
  --bg-2: #111319;
  --bg-card: #15171F;
  --bg-card-hover: #1B1E27;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #F4F5F7;
  --text-dim: #B4B7BF;
  --text-mute: #767982;
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-lg: 22px;
  --max-w: 1120px;
  --nav-h: 72px;
  --ease: cubic-bezier(.2,.7,.1,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(216, 48, 51, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(3, 218, 197, 0.10), transparent 60%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; color: inherit; }

/* ───────── Layout ───────── */

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 22px;
}

main { padding-bottom: 80px; }

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  section { padding: 56px 0; }
}

/* ───────── Top nav ───────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  font-size: 1.1rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-hot));
  color: white;
  box-shadow: 0 8px 24px rgba(216, 48, 51, 0.45);
}
.brand-mark svg { width: 22px; height: 22px; }

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color .15s var(--ease), background .15s var(--ease);
}

.nav-links a:hover { color: var(--text); background: var(--bg-2); }
.nav-links a.active { color: var(--text); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 14px 14px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-toggle { display: inline-flex; }
}

/* ───────── Buttons ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform .15s var(--ease), background .15s var(--ease),
              border-color .15s var(--ease), box-shadow .15s var(--ease);
  white-space: nowrap;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-hot));
  color: #fff;
  box-shadow: 0 10px 30px rgba(216, 48, 51, 0.35);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(216, 48, 51, 0.45); }

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn.ghost:hover { background: var(--bg-2); border-color: rgba(255,255,255,0.28); }

.btn.accent {
  background: var(--accent);
  color: #04211e;
}
.btn.accent:hover { transform: translateY(-1px); }

/* ───────── Hero ───────── */

.hero {
  padding: 88px 0 64px;
  position: relative;
  overflow: hidden;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(216, 48, 51, 0.18);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 18px 0 18px;
  font-weight: 850;
}

.hero h1 .grad {
  background: linear-gradient(135deg, #fff 0%, #ffb3a5 55%, var(--brand) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 0 28px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ───────── Signup form ───────── */

.signup {
  margin-top: 28px;
  max-width: 520px;
}

.signup-row {
  display: flex;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-card);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.signup-row:focus-within {
  border-color: rgba(216, 48, 51, 0.5);
  box-shadow: 0 0 0 4px rgba(216, 48, 51, 0.18);
}

.signup-row input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1rem;
}

.signup-row input::placeholder { color: var(--text-mute); }

.signup-row button { padding: 12px 18px; }

.signup-hint {
  display: block;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-mute);
}

.signup-status {
  margin-top: 12px;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.signup-status.ok { color: var(--accent); }
.signup-status.err { color: #ff7e80; }

@media (max-width: 520px) {
  .signup-row { flex-direction: column; padding: 8px; }
  .signup-row button { width: 100%; }
}

/* ───────── Card grid ───────── */

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  font-weight: 800;
}

.section-kicker {
  color: var(--text-dim);
  margin: 0 0 38px;
  max-width: 640px;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
  transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(216, 48, 51, 0.12);
  color: var(--brand-hot);
  margin-bottom: 14px;
}

.card-icon svg { width: 22px; height: 22px; }

.card h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ───────── Long-form content (privacy/terms/support) ───────── */

.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.prose .meta {
  color: var(--text-mute);
  font-size: 0.9rem;
  margin: 0 0 32px;
}

.prose h2 {
  font-size: 1.3rem;
  margin: 36px 0 8px;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: 1.05rem;
  margin: 22px 0 6px;
  color: var(--text);
}

.prose p, .prose li {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
}

.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }

.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #6fffe9; }

.prose strong { color: var(--text); }

.prose code, .prose .kbd {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--bg-2);
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 0.92em;
}

/* ───────── Support ───────── */

.contact-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 24px 0 16px;
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.contact .label { color: var(--text-mute); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.contact .addr { font-size: 1.05rem; font-weight: 700; color: var(--text); word-break: break-all; }
.contact .desc { color: var(--text-dim); font-size: 0.9rem; }

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.faq summary::after {
  content: "+";
  color: var(--text-mute);
  font-size: 1.4rem;
  transition: transform .2s var(--ease);
}

.faq details[open] summary::after { content: "−"; }

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

.faq details > p,
.faq details > div {
  margin: 10px 0 0;
  color: var(--text-dim);
}

/* ───────── Footer ───────── */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 32px;
  background: rgba(0, 0, 0, 0.18);
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  flex: 1 1 520px;
}

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

.footer h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin: 0 0 12px;
}

.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { color: var(--text-dim); font-size: 0.95rem; }
.footer a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-mute);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

/* ───────── Utility ───────── */

.center { text-align: center; }
.muted { color: var(--text-dim); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
