:root {
  --orig-bg: #0d0e10;
  --orig-surface: #24272c;
  --orig-surface-2: #3a3e44;
  --orig-border: rgba(255,255,255,0.08);
  --orig-text: #ffffff;
  --orig-text-muted: #a2a2ab;
  --orig-grad-start: #2db8ed;
  --orig-grad-end: #00ce7d;
  --orig-grad: linear-gradient(270deg, #29b8ed 0%, #00ce7d 100%);
  --orig-radius: 40px;
  --orig-radius-sm: 16px;
  --orig-font: Exo, sans-serif;
}

/* ─── Base reset for sub-pages ─────────────────────────────────────────── */
.subpage-body {
  font-family: var(--orig-font);
  background: var(--orig-bg);
  color: var(--orig-text);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.subpage-body::before,
.subpage-body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 0;
}

.subpage-body::before {
  top: 0;
  left: 0;
  width: 100vw;
  height: 40vh;
  background-image: url("../constellation-top.svg");
  background-position: left top;
}

.subpage-body::after {
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 40vh;
  background-image: url("../constellation-bottom.svg");
  background-position: right bottom;
}

/* ─── Page wrapper ──────────────────────────────────────────────────────── */
.subpage-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .subpage-wrapper {
    padding: 0 2.5rem 5rem;
  }
}

@media (min-width: 1024px) {
  .subpage-wrapper {
    padding: 0 4rem 6rem;
  }
}

/* ─── Header / Nav ──────────────────────────────────────────────────────── */
.subpage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--orig-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.subpage-logo img {
  height: 38px;
  display: block;
}

.subpage-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.subpage-nav a {
  font-family: var(--orig-font);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--orig-text-muted);
  position: relative;
  transition: color 0.25s;
  padding-bottom: 2px;
}

.subpage-nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--orig-grad);
  opacity: 0;
  transition: opacity 0.25s;
}

.subpage-nav a:hover {
  color: var(--orig-text);
}

.subpage-nav a:hover::after {
  opacity: 1;
}

.subpage-nav a.active {
  background: var(--orig-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subpage-nav a.active::after {
  opacity: 1;
}

/* ─── Page hero / h1 ────────────────────────────────────────────────────── */
.subpage-hero {
  padding: 3.5rem 0 2rem;
  text-align: center;
}

.subpage-hero h1 {
  font-family: var(--orig-font);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 1rem;
  background: var(--orig-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subpage-hero p {
  font-size: 1.05rem;
  color: var(--orig-text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ─── Section spacing ───────────────────────────────────────────────────── */
.subpage-section {
  margin-top: 3.5rem;
}

@media (min-width: 768px) {
  .subpage-section {
    margin-top: 5rem;
  }
}

/* ─── h2 ────────────────────────────────────────────────────────────────── */
.subpage-section h2 {
  font-family: var(--orig-font);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 1.75rem;
  position: relative;
  display: inline-block;
  background: var(--orig-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subpage-section h2::after {
  content: "";
  display: block;
  margin-top: 0.4rem;
  height: 2px;
  border-radius: 2px;
  background: var(--orig-grad);
  opacity: 0.45;
}

/* ─── Body text inside sections ─────────────────────────────────────────── */
.subpage-section p {
  font-size: 1rem;
  color: var(--orig-text-muted);
  line-height: 1.75;
  margin: 0 0 1.1rem;
}

.subpage-section p:last-child {
  margin-bottom: 0;
}

.subpage-section strong {
  color: var(--orig-text);
  font-weight: 700;
}

.subpage-section a {
  color: var(--orig-grad-start);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.subpage-section a:hover {
  color: var(--orig-grad-end);
}

/* ─── Card surface ──────────────────────────────────────────────────────── */
.subpage-card {
  background: var(--orig-surface);
  border: 1px solid var(--orig-border);
  border-radius: var(--orig-radius-sm);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

/* ─── Two-column grid for FAQ ───────────────────────────────────────────── */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 860px) {
  .faq-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
  }
}

/* ─── FAQ accordion item ────────────────────────────────────────────────── */
.faq-item {
  background: var(--orig-surface);
  border: 1px solid var(--orig-border);
  border-radius: var(--orig-radius-sm);
  overflow: hidden;
  transition: border-color 0.25s;
}

.faq-item:hover {
  border-color: rgba(41, 184, 237, 0.35);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  text-align: left;
  font-family: var(--orig-font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--orig-text);
  line-height: 1.4;
  transition: color 0.2s;
}

.faq-question:focus {
  outline: none;
  box-shadow: none;
}

.faq-question:hover {
  color: var(--orig-grad-start);
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--orig-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, transform 0.3s;
  font-style: normal;
  font-size: 1rem;
  line-height: 1;
  color: var(--orig-grad-start);
  user-select: none;
}

.faq-item.open .faq-question .faq-icon {
  transform: rotate(45deg);
  background: linear-gradient(270deg, #29b8ed 0%, #00ce7d 100%);
  color: #fff;
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: 0.97rem;
  color: var(--orig-text-muted);
  line-height: 1.75;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-answer p {
  margin: 0;
  color: var(--orig-text-muted);
}

/* ─── h3 inside FAQ answers ──────────────────────────────────────────────── */
.faq-answer h3,
.subpage-section h3 {
  font-family: var(--orig-font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--orig-text);
  margin: 0 0 0.4rem;
}

/* ─── Project page: feature/section cards ───────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--orig-surface);
  border: 1px solid var(--orig-border);
  border-radius: var(--orig-radius-sm);
  padding: 1.4rem 1.5rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  border-color: rgba(41, 184, 237, 0.3);
  box-shadow: 0 6px 28px rgba(0, 206, 125, 0.08);
}

.feature-card h3 {
  font-family: var(--orig-font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--orig-text);
  margin: 0 0 0.55rem;
}

.feature-card p {
  font-size: 0.93rem;
  color: var(--orig-text-muted);
  margin: 0;
  line-height: 1.65;
}

/* ─── Stat/numbers strip ─────────────────────────────────────────────────── */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.stat-box {
  flex: 1 1 160px;
  background: var(--orig-surface);
  border: 1px solid var(--orig-border);
  border-radius: var(--orig-radius-sm);
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.stat-box .stat-value {
  font-family: var(--orig-font);
  font-size: 1.7rem;
  font-weight: 700;
  background: var(--orig-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  display: block;
}

.stat-box .stat-label {
  font-size: 0.82rem;
  color: var(--orig-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.35rem;
  display: block;
}

/* ─── Divider ────────────────────────────────────────────────────────────── */
.subpage-divider {
  height: 1px;
  background: var(--orig-border);
  margin: 3rem 0;
  border: none;
}

/* ─── Return-home button ─────────────────────────────────────────────────── */
.btn-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 2rem;
  border-radius: 8px;
  font-family: var(--orig-font);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(270deg, #29b8ed 0%, #2df6a7 100%);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 16px rgba(41, 184, 237, 0.22);
  position: relative;
}

.btn-home::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 6px;
  background: var(--orig-bg);
  transition: opacity 0.2s;
}

.btn-home span {
  position: relative;
  z-index: 1;
  background: linear-gradient(270deg, #29b8ed 0%, #2df6a7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-home:hover {
  opacity: 0.88;
  box-shadow: 0 4px 24px rgba(41, 184, 237, 0.35);
}

.btn-home-wrap {
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.subpage-footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--orig-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.subpage-footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.subpage-footer-links a {
  color: var(--orig-text-muted);
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

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

/* ─── Inline gradient text utility ──────────────────────────────────────── */
.grad-text {
  background: var(--orig-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Breadcrumb ─────────────────────────────────────────────────────────── */
.subpage-breadcrumb {
  font-size: 0.82rem;
  color: var(--orig-text-muted);
  margin: 1.25rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.subpage-breadcrumb a {
  color: var(--orig-grad-start);
  text-decoration: none;
  transition: color 0.2s;
}

.subpage-breadcrumb a:hover {
  color: var(--orig-grad-end);
}

.subpage-breadcrumb span {
  color: var(--orig-text-muted);
}

/* ─── Ordered step list ──────────────────────────────────────────────────── */
.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.step-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.98rem;
  color: var(--orig-text-muted);
  line-height: 1.65;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(270deg, #29b8ed 0%, #00ce7d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  margin-top: 0.1rem;
}

/* ─── Responsive tweaks ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .subpage-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .subpage-hero {
    padding: 2.25rem 0 1.25rem;
    text-align: left;
  }

  .subpage-hero p {
    text-align: left;
  }

  .stat-box .stat-value {
    font-size: 1.4rem;
  }
}