:root {
  color-scheme: light;
  --ink: #1a1a2e;
  --ink-soft: #4a4a63;
  --paper: #ffffff;
  --paper-alt: #faf7ff;
  --border: rgba(26, 26, 46, 0.1);
  --border-soft: rgba(26, 26, 46, 0.08);
  --header-bg: rgba(255, 255, 255, 0.85);
  --shadow: 0 12px 30px rgba(26, 26, 46, 0.12);
  --btn-bg: #1a1a2e;
  --btn-fg: #ffffff;
  --pip-border: rgba(26, 26, 46, 0.2);
  --pip-off: rgba(26, 26, 46, 0.4);
  --link-underline: rgba(114, 9, 183, 0.5);
  --link-underline-hover: #7209b7;
  --logo-chip: #ffffff;
  --rainbow: linear-gradient(
    90deg,
    #e63946 0%,
    #f77f00 18%,
    #ffd60a 36%,
    #2a9d8f 54%,
    #4361ee 72%,
    #7209b7 100%
  );
  --radius: 16px;
}

/* Dark palette — follows the OS setting unless the toggle forces light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #f1f1f7;
    --ink-soft: #b4b4c8;
    --paper: #14141f;
    --paper-alt: #1c1c2b;
    --border: rgba(255, 255, 255, 0.15);
    --border-soft: rgba(255, 255, 255, 0.1);
    --header-bg: rgba(20, 20, 31, 0.85);
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    --btn-bg: #f1f1f7;
    --btn-fg: #14141f;
    --pip-border: rgba(255, 255, 255, 0.3);
    --pip-off: rgba(255, 255, 255, 0.42);
    --link-underline: rgba(179, 157, 255, 0.6);
    --link-underline-hover: #b39dff;
  }
}

/* Dark palette — forced on by the toggle. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1f1f7;
  --ink-soft: #b4b4c8;
  --paper: #14141f;
  --paper-alt: #1c1c2b;
  --border: rgba(255, 255, 255, 0.15);
  --border-soft: rgba(255, 255, 255, 0.1);
  --header-bg: rgba(20, 20, 31, 0.85);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  --btn-bg: #f1f1f7;
  --btn-fg: #14141f;
  --pip-border: rgba(255, 255, 255, 0.3);
  --pip-off: rgba(255, 255, 255, 0.42);
  --link-underline: rgba(179, 157, 255, 0.6);
  --link-underline-hover: #b39dff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--logo-chip);
  padding: 3px;
}

.brand-name {
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.nav-cta {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg) !important;
  font-weight: 600;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

.theme-toggle .icon {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.theme-toggle .icon-moon {
  fill: currentColor;
}

.theme-toggle[data-mode="dark"] .icon-sun {
  display: block;
}

.theme-toggle[data-mode="dark"] .icon-moon {
  display: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--ink-soft);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 5rem 1.5rem 5.5rem;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(
    circle at 50% -10%,
    rgba(114, 9, 183, 0.12),
    transparent 60%
  );
}

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

.hero-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  background: var(--logo-chip);
  padding: 8px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 1.1rem;
  letter-spacing: -0.02em;
}

/* Kept for later use — not currently applied in the markup. */
.grad-text {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.7;
  color: var(--ink-soft);
  text-align: left;
  margin: 0 auto 1.15rem;
  max-width: 54ch;
}

.hero-tagline {
  margin: 0.9rem auto 1.9rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.hero-note {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */
.section {
  padding: 4.75rem 1.5rem;
  scroll-margin-top: 80px;
}

.section-alt {
  background: var(--paper-alt);
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  line-height: 1.2;
  margin: 0 0 1.4rem;
  letter-spacing: -0.01em;
}

.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 0.8rem;
  border-radius: 999px;
  background: var(--rainbow);
}

.lead {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 0 0 1.15rem;
}

.lead:last-child {
  margin-bottom: 0;
}

.lead strong,
.lead em {
  color: var(--ink);
}

/* Inline links in body copy */
.lead a,
.timeline-body a,
.path-step p a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease;
}

.lead a:hover,
.timeline-body a:hover,
.path-step p a:hover {
  text-decoration-color: var(--link-underline-hover);
}

/* ---------- Membership pips ---------- */
.pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--pip-border);
  background: transparent;
  color: var(--pip-off);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.pip.is-on {
  border-color: transparent;
  color: #fff;
}

.pip-p.is-on {
  background: #e63946;
}
.pip-a.is-on {
  background: #f77f00;
}
.pip-c.is-on {
  background: #2a9d8f;
}

/* ---------- Membership path ---------- */
.path-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.path {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.path-step {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow);
}

.path-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -1.75rem;
  top: 2.1rem;
  width: 1.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.25rem;
  line-height: 1;
}

.path-pips {
  display: inline-flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.path-step h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.path-price {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
}

.path-price span {
  margin-left: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.path-step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* PAC — the three held as one */
.path-step.is-pac {
  border-color: transparent;
  background: linear-gradient(var(--paper), var(--paper)) padding-box,
    var(--rainbow) border-box;
  border: 2px solid transparent;
}

.path-step.is-pac .path-pips {
  gap: 0;
}

.path-step.is-pac .pip {
  box-shadow: 0 0 0 2px var(--paper);
}

.path-step.is-pac .pip + .pip {
  margin-left: -8px;
}

.pac-mark {
  font-weight: 700;
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(
    #e63946,
    #f77f00,
    #ffd60a,
    #2a9d8f,
    #4361ee,
    #7209b7
  );
}

.timeline-item {
  position: relative;
  padding: 0 0 1.9rem 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dot, #4361ee);
  box-shadow: 0 0 0 4px var(--paper);
}

.timeline-year {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.45rem;
}

.timeline-body p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 64ch;
}

/* ---------- Team ---------- */
.team-heading {
  margin: 2.5rem 0 0;
  font-size: 1.15rem;
}

.team-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

.team-member {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.team-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  background: var(--dot, #4361ee);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.team-name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
}

.team-role {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.team-member.is-open {
  border-style: dashed;
  box-shadow: none;
  background: transparent;
}

.team-member.is-open .team-avatar {
  background: transparent;
  border: 2px dashed var(--border);
  color: var(--ink-soft);
  font-size: 1.6rem;
  font-weight: 400;
}

.team-member.is-open .team-name {
  color: var(--ink-soft);
}

.team-invite {
  margin-top: 2.75rem;
  text-align: center;
}

.team-invite p {
  font-weight: 600;
  margin: 0 0 1rem;
}

/* ---------- Contact ---------- */
.section-contact {
  text-align: center;
  background: var(--paper-alt);
}

.section-contact .section-title::after {
  margin-left: auto;
  margin-right: auto;
}

.section-contact .lead {
  margin: 0 auto 2rem;
}

.section-contact .lead-secondary {
  margin-top: 2rem;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  background: var(--logo-chip);
  padding: 4px;
}

.footer-version {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---------- Policy pages ---------- */
.policy {
  max-width: 720px;
}

.policy h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

.policy h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.4rem;
}

.policy p,
.policy li {
  color: var(--ink-soft);
  line-height: 1.7;
}

.policy p {
  margin: 0 0 1rem;
}

.policy ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.policy li {
  margin-bottom: 0.4rem;
}

.policy strong {
  color: var(--ink);
}

.policy a,
.footer-links a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.policy a:hover,
.footer-links a:hover {
  text-decoration-color: var(--link-underline-hover);
}

.policy-date {
  font-size: 0.95rem;
}

.footer-links {
  margin: 0.35rem 0 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .path {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .path-step:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    gap: 0.6rem;
  }
  .hero {
    padding: 3.25rem 1.25rem 3.75rem;
  }
  .hero-logo {
    width: 96px;
    height: 96px;
    margin-bottom: 1.4rem;
  }
  .section {
    padding: 3.5rem 1.25rem;
  }
  .path {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }
  .path-step:not(:last-child)::after {
    display: block;
    content: "↓";
    right: auto;
    left: 50%;
    top: auto;
    bottom: -2rem;
    transform: translateX(-50%);
  }
}
