/* ===========================
   Base + Theme
   =========================== */

:root {
  --bg: #020617;
  --bg-soft: #02081b;
  --card: #050b21;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --text: #f9fafb;
  --text-soft: #cbd5f5;
  --border-soft: rgba(148, 163, 184, 0.35);
  --radius-xl: 1rem;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.6);
  --max-width: 960px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #020617 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* avoid accidental horizontal scroll */
}

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

img {
  max-width: 100%;
  display: block;
}

/* Utility */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.accent {
  color: var(--accent);
}

/* ===========================
   Header + Navigation
   =========================== */

header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0)
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Logo */

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.7);
  background: radial-gradient(circle at 30% 20%, #38bdf8, #0ea5e9 40%, #22c55e 100%);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-text-main {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-text-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  opacity: 0.9;
}

/* Nav links */

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.82rem;
}

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

.nav-links a.active {
  color: var(--accent);
  font-weight: 600;
}

/* ===========================
   Main Layout
   =========================== */

main {
  flex: 1;
}

/* Hero sections (top of each page) */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.2rem 1.2rem 1.6rem;
}

.hero h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
}

.hero .lead {
  font-size: 0.98rem;
  color: var(--text-soft);
  max-width: 36rem;
  margin-bottom: 1.4rem;
}

/* General sections */

.section {
  max-width: var(--max-width);
  margin: 0 auto 1.4rem;
  padding: 1.1rem 1.2rem 1.2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow-soft);
}

.section h2 {
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
  letter-spacing: -0.02em;
}

.section p {
  font-size: 0.94rem;
  color: var(--text-soft);
  margin-bottom: 0.6rem;
}

/* Lists */

.section ul {
  padding-left: 1.1rem;
  margin: 0.2rem 0 0.6rem;
}

.section li {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 0.35rem;
}

/* Steps (How It Works and Home) */

.steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

.step {
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.85);
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* Small text helper */

.small {
  font-size: 0.78rem;
  color: var(--text-soft);
  opacity: 0.9;
  margin-top: 0.5rem;
}

/* ===========================
   Home Feature Cards
   =========================== */

.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: 0.6rem;
}

.card {
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow-soft);
}

.card-icon {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.card-text {
  font-size: 0.88rem;
  color: var(--text-soft);
}

/* ===========================
   Buttons
   =========================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.12);
  background: radial-gradient(circle at top left, #0ea5e9, #38bdf8 45%, #22c55e 100%);
  color: #020617;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.8);
  text-decoration: none;
  white-space: normal;   /* allow wrapping on very small screens */
  max-width: 100%;
  text-align: center;
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* ===========================
   Footer
   =========================== */

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.8rem 1.2rem 2.4rem;
  font-size: 0.8rem;
  color: var(--text-soft);
  opacity: 0.8;
}

/* ===========================
   Responsive Tweaks
   =========================== */

/* Slightly larger screens */
@media (min-width: 640px) {
  .hero {
    padding-top: 2.6rem;
  }

  .hero h1 {
    font-size: 2.1rem;
  }
}

/* Tablet */
@media (min-width: 768px) {
  .nav {
    flex-wrap: nowrap;
  }

  .hero {
    padding: 3rem 1.8rem 2rem;
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .section {
    padding: 1.3rem 1.6rem 1.4rem;
  }

  .steps {
    flex-direction: row;
  }

  .step {
    flex: 1;
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .hero {
    padding-top: 4rem;
    padding-bottom: 3rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .hero h1 {
    font-size: 2.7rem;
    line-height: 1.15;
  }

  .hero .lead {
    font-size: 1.06rem;
    max-width: 42rem;
  }

  .section {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .section p,
  .section li {
    font-size: 0.96rem;
  }
}
/* ============================
   GUIDE PAGE: TOC + ACCORDIONS
   ============================ */

/* TOC WRAPPER */
.toc-wrapper {
  max-width: var(--max-width);
  margin: 0 auto 1.75rem;
  padding: 0 1.25rem;
}

.toc {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top left,
              rgba(15, 23, 42, 0.98),
              rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow-soft);
  padding: 0.9rem 1.1rem 1.1rem;
  font-size: 0.9rem;
}

.toc h3 {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
}

.toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc li + li {
  margin-top: 0.25rem;
}

.toc a {
  color: var(--text-soft);
  text-decoration: none;
}

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

/* Desktop: keep TOC nicely sized */
@media (min-width: 768px) {
  .toc-wrapper {
    padding: 0 1.75rem;
  }

  .toc {
    font-size: 0.9rem;
  }
}

/* ============================
   ACCORDION SECTIONS
   ============================ */

.section .accordion {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0;
  margin: 0 0 0.5rem;
}

/* little arrow indicator */
.section .accordion::after {
  content: "▾";
  font-size: 0.85rem;
  color: var(--text-soft);
  transition: transform 0.25s ease, color 0.25s ease;
}

.section .accordion.open::after {
  transform: rotate(-180deg);
  color: var(--accent);
}

/* PANEL CONTENT */
.section .panel {
  overflow: hidden;
  max-height: none; /* content visible by default; JS can still toggle */
  transition: max-height 0.3s ease;
}

.section .panel p,
.section .panel ul,
.section .panel h3 {
  margin-top: 0.35rem;
}

/* small note style used in guide */
.small-note {
  font-size: 0.82rem;
  color: var(--text-soft);
  opacity: 0.9;
}
/* ============================
   GUIDE PAGE: TOC + ACCORDIONS
   ============================ */

/* TOC WRAPPER (same as before) */
.toc-wrapper {
  max-width: var(--max-width);
  margin: 0 auto 1.75rem;
  padding: 0 1.25rem;
}

.toc {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top left,
              rgba(15, 23, 42, 0.98),
              rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow-soft);
  padding: 0.9rem 1.1rem 1.1rem;
  font-size: 0.9rem;
}

.toc h3 {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
}

.toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc li + li {
  margin-top: 0.25rem;
}

.toc a {
  color: var(--text-soft);
  text-decoration: none;
}

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

@media (min-width: 768px) {
  .toc-wrapper {
    padding: 0 1.75rem;
  }

  .toc {
    font-size: 0.9rem;
  }
}

/* ============================
   ACCORDION BEHAVIOR
   ============================ */

.section .accordion {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0;
  margin: 0 0 0.5rem;
}

/* arrow indicator */
.section .accordion::after {
  content: "▾";
  font-size: 0.85rem;
  color: var(--text-soft);
  transition: transform 0.25s ease, color 0.25s ease;
}

.section .accordion.open::after {
  transform: rotate(-180deg);
  color: var(--accent);
}

/* panels are collapsed by default */
.section .panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

/* when the header has .open, show the next .panel */
.section .accordion.open + .panel {
  max-height: 2000px; /* big enough for content, animated */
}

/* inner spacing */
.section .panel p,
.section .panel ul,
.section .panel h3 {
  margin-top: 0.35rem;
}

/* small note style */
.small-note {
  font-size: 0.82rem;
  color: var(--text-soft);
  opacity: 0.9;
}
