/* Fantascope website — dark like the app's Projects window */
:root {
  --bg: #1a1a1a;
  --panel: #242424;
  --panel-2: #2e2e2e;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f2f2f2;
  --muted: rgba(255, 255, 255, 0.58);
  --faint: rgba(255, 255, 255, 0.38);
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.16);
  --planned: #ff9f0a;
  --done: #30d158;
  --danger: #ff453a;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 19px; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
}
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 64px 0 48px; }
.hero h1 { font-size: 52px; line-height: 1.05; margin: 0 0 6px; letter-spacing: -0.02em; }
.hero .aside { color: var(--faint); font-size: 14px; margin: 0 0 22px; }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 30em; }
.hero .more { font-size: 15px; color: var(--muted); margin: 28px 0 0; }
.disc-box { position: relative; aspect-ratio: 1; width: 100%; max-width: 420px; justify-self: center; }
.disc-box canvas { width: 100%; height: 100%; display: block; }
.disc-box .peek {
  position: absolute; left: 50%; top: -6px; transform: translateX(-50%);
  font-size: 12px; color: var(--faint); white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px; border: 0;
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn:disabled { opacity: 0.45; cursor: default; filter: none; }
.btn.secondary { background: var(--panel-2); color: var(--text); }
.btn.small { height: 34px; padding: 0 14px; font-size: 14px; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 20px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-weight: 600;
}
.badge-soon svg { width: 22px; height: 22px; fill: var(--text); }

/* Feature grid */
.section-title { font-size: 30px; margin: 56px 0 8px; letter-spacing: -0.01em; }
.section-sub { color: var(--muted); margin: 0 0 24px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px;
}
.card h3 { margin: 10px 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.card .icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps .card { position: relative; padding-top: 50px; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 16px; left: 22px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
}

.cta {
  margin: 56px 0 0; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(10,132,255,0.18), rgba(10,132,255,0.04));
  border: 1px solid rgba(10,132,255,0.3);
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.cta h2 { margin: 0 0 4px; font-size: 22px; }
.cta p { margin: 0; color: var(--muted); }
.cta .btn { margin-left: auto; }

/* Text pages */
.page { padding-top: 48px; padding-bottom: 24px; max-width: 760px; }
.page h1 { font-size: 40px; margin: 0 0 8px; letter-spacing: -0.02em; }
.page h2 { font-size: 22px; margin: 36px 0 10px; }
.page p, .page li { color: rgba(255,255,255,0.8); }
.page .meta { color: var(--faint); font-size: 14px; margin: 0 0 28px; }

/* FAQ */
.faq-search {
  width: 100%; height: 46px; padding: 0 16px; margin: 8px 0 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font: inherit;
}
.faq-group h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin: 32px 0 10px; }
details {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  margin: 0 0 10px; padding: 0 18px;
}
details summary {
  cursor: pointer; list-style: none; padding: 15px 0; font-weight: 600;
  display: flex; align-items: center; gap: 12px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint);
  transform: rotate(45deg); transition: transform 0.15s;
}
details[open] summary::after { transform: rotate(-135deg); }
details .answer { padding: 0 0 16px; color: rgba(255,255,255,0.78); }
details .answer p { margin: 0 0 10px; }
details .answer p:last-child { margin: 0; }
.contact-box { margin-top: 36px; }

/* Ideas board */
.ideas-head { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ideas-head h1 { margin: 0; }
.ideas-head .btn { margin-left: auto; }
.tabs { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.tabs button {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
}
.tabs button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.idea {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; margin-bottom: 10px;
}
.vote {
  flex: none; width: 58px; padding: 8px 0 6px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
}
.vote svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.vote:hover { border-color: rgba(10,132,255,0.6); }
.vote[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.vote:disabled { cursor: default; opacity: 0.6; }
.idea-body { min-width: 0; flex: 1; }
.idea-body h3 { margin: 2px 0 4px; font-size: 17px; overflow-wrap: anywhere; }
.idea-body p { margin: 0; color: var(--muted); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.idea-meta { margin-top: 8px; font-size: 13px; color: var(--faint); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.status { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 999px; }
.status.planned { color: var(--planned); background: rgba(255,159,10,0.14); }
.status.done { color: var(--done); background: rgba(48,209,88,0.14); }
.status.pending { color: var(--muted); background: var(--panel-2); }
.status.rejected { color: var(--danger); background: rgba(255,69,58,0.14); }
.empty { color: var(--faint); text-align: center; padding: 40px 0; }
.notice {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; color: var(--muted); font-size: 15px; margin-bottom: 16px;
}
.notice.ok { border-color: rgba(48,209,88,0.4); color: var(--text); }
.notice.err { border-color: rgba(255,69,58,0.5); color: var(--text); }

/* Dialog */
dialog {
  width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 20px;
  background: var(--panel); color: var(--text);
}
dialog::backdrop { background: rgba(0,0,0,0.55); }
dialog form { padding: 22px; }
dialog h2 { margin: 0 0 4px; font-size: 21px; }
dialog .hint { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
label.field { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
.input, textarea.input {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.count { float: right; font-weight: 400; color: var(--faint); font-size: 12px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; align-items: center; }
.dialog-actions .msg { margin-right: auto; font-size: 13px; color: var(--danger); }
.turnstile-slot { margin-top: 14px; min-height: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; color: var(--faint); font-size: 14px; }
.site-footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; gap: 28px; }
  .hero h1 { font-size: 40px; }
  .disc-box { max-width: 340px; order: -1; }
  .features { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .features, .steps { grid-template-columns: 1fr; }
  .nav a { padding: 6px 8px; font-size: 14px; }
  .brand span { display: none; }
  .page h1 { font-size: 32px; }
  .cta .btn { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  details summary::after { transition: none; }
}
