/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f1a;
  --bg-card: #161626;
  --bg-card-hover: #1e1e32;
  --bg-elevated: #1a1a2e;
  --text: #e0e0e8;
  --text-muted: #aaa;
  --text-dim: #808080;
  --border: #2a2a40;
  --accent: #EF9F27;

  --radius: 6px;
  --font: system-ui, -apple-system, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid #7b9fff;
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ---- Header & logo ---- */
.site-header {
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.site-header h1 { font-size: 1.75rem; font-weight: 700; }
.site-header .tagline { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }
.site-header a { text-decoration: none; }

.site-logo { width: 160px; flex-shrink: 0; }
.site-logo--small { width: 110px; }

.logo-spoke {
  stroke: #FAC775; stroke-width: 0.8; stroke-opacity: 0; fill: none;
  animation: logo-fade-in 0.3s ease forwards;
}
.logo-spoke:nth-child(1) { animation-delay: 0.10s; }
.logo-spoke:nth-child(2) { animation-delay: 0.18s; }
.logo-spoke:nth-child(3) { animation-delay: 0.26s; }
.logo-spoke:nth-child(4) { animation-delay: 0.34s; }
.logo-spoke:nth-child(5) { animation-delay: 0.42s; }
.logo-spoke:nth-child(6) { animation-delay: 0.50s; }

.logo-ring {
  fill: none; stroke: #FAC775; stroke-width: 0.9;
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: logo-draw 0.6s ease forwards;
}
.logo-ring-1 { animation-delay: 0.55s; stroke-opacity: 0.35; }
.logo-ring-2 { animation-delay: 0.75s; stroke-opacity: 0.45; }
.logo-ring-3 { animation-delay: 0.95s; stroke-opacity: 0.55; }
.logo-ring-4 { animation-delay: 1.15s; stroke-opacity: 0.65; stroke-width: 1; }

.logo-area {
  fill: #EF9F27; fill-opacity: 0; stroke: #854F0B; stroke-width: 1.5;
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: logo-draw 0.7s ease forwards, logo-area-fill 0.7s ease forwards;
  animation-delay: 1.55s, 1.75s;
}

.logo-pt {
  fill: #EF9F27; opacity: 0;
  animation: logo-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.logo-pt:nth-child(1) { animation-delay: 2.10s; }
.logo-pt:nth-child(2) { animation-delay: 2.20s; }
.logo-pt:nth-child(3) { animation-delay: 2.30s; }
.logo-pt:nth-child(4) { animation-delay: 2.40s; }
.logo-pt:nth-child(5) { animation-delay: 2.50s; }
.logo-pt:nth-child(6) { animation-delay: 2.60s; }

.logo-word-data {
  fill: #EF9F27; opacity: 0;
  animation: logo-slide-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 1.9s;
}
.logo-word-retold {
  fill: #BA7517; opacity: 0;
  animation: logo-slide-up 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 2.05s;
}

@keyframes logo-draw       { to { stroke-dashoffset: 0; } }
@keyframes logo-fade-in    { to { stroke-opacity: 0.5; } }
@keyframes logo-area-fill  { to { fill-opacity: 0.3; } }
@keyframes logo-pop {
  0%   { opacity: 0; transform: scale(0); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes logo-slide-up {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-spoke { animation: none; stroke-opacity: 0.5; }
  .logo-ring  { animation: none; stroke-dashoffset: 0; }
  .logo-area  { animation: none; stroke-dashoffset: 0; fill-opacity: 0.3; }
  .logo-pt    { animation: none; opacity: 1; }
  .logo-word-data,
  .logo-word-retold { animation: none; opacity: 1; }
}

.logo-done .logo-spoke { animation: none; stroke-opacity: 0.5; }
.logo-done .logo-ring  { animation: none; stroke-dashoffset: 0; }
.logo-done .logo-area  { animation: none; stroke-dashoffset: 0; fill-opacity: 0.3; }
.logo-done .logo-pt    { animation: none; opacity: 1; }
.logo-done .logo-word-data,
.logo-done .logo-word-retold { animation: none; opacity: 1; }

/* ---- Tool cards (homepage) ---- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 24px 0 36px;
}

.tool-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s, transform 0.15s;
}
.tool-card:hover { background: var(--bg-card-hover); color: var(--text); }
.tool-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.tool-card p { color: var(--text-muted); font-size: 0.9rem; }
.tool-card .tool-meta { color: var(--text-dim); font-size: 0.78rem; margin-top: 10px; }

/* ---- Prose (about / privacy / contact) ---- */
.prose h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 28px 0 10px;
}
.prose h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--text);
}
.prose p,
.prose ul {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose .meta {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-bottom: 24px;
}

/* ---- FAQ ---- */
.faq { margin: 24px 0; }
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.faq details[open] summary { margin-bottom: 8px; }
.faq details p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

/* ---- Footer / nav ---- */
.site-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer .copyright { color: var(--text-dim); }
