/* ---------- Fonts ---------- */

@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/Space_Grotesk/SpaceGrotesk-VariableFont_wght.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/IBM_Plex_Mono/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/IBM_Plex_Mono/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/IBM_Plex_Mono/IBMPlexMono-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Site theme: Patina Ky (default) ---------- */

:root {
  --bg: #0d0f14;
  --panel: #161a22;
  --ink: #64748b;
  --ink-strong: #e2e8f0;
  --accent: #4deeea;
  --accent-soft: #0e4a48;
  --line: #1e293b;
  --glow: rgba(77, 238, 234, 0.22);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-strong);
  font-family: var(--font-display);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0.4rem 0 0.75rem;
}

section > .wrap > p.lede {
  color: var(--ink);
  max-width: 62ch;
  font-size: 1.05rem;
}

section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- Background texture ---------- */

.rain-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(circle at 12% 20%, var(--glow) 0, transparent 45%),
    radial-gradient(circle at 88% 12%, var(--glow) 0, transparent 40%),
    repeating-linear-gradient(
      transparent 0 22px,
      rgba(148, 163, 184, 0.05) 22px 23px
    );
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 20, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink-strong);
  font-size: 1.05rem;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

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

.nav-links a.active,
.nav-links a:hover {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--ink-strong);
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  border-color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: #04120d;
  border-color: var(--accent);
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-strong);
  padding: 0.45rem 0.6rem;
  font-size: 1.1rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--accent-soft);
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 1.1rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--ink);
  max-width: 52ch;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  width: min(360px, 100%);
  filter: drop-shadow(0 0 60px var(--glow));
}

/* ---------- Ecosystem / hub-spoke ---------- */

.hub {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.hub-node {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
}

.hub-node.hub-center {
  grid-column: span 4;
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 20px 60px -30px var(--glow);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hub-node.hub-center .hub-icon {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.hub-node h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.hub-node p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
}

.hub-arrow {
  grid-column: span 4;
  text-align: center;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin: -0.5rem 0;
}

.hub-spokes {
  grid-column: span 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ---------- Platform grid ---------- */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.platform-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem;
}

.platform-card .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.platform-card h3 {
  margin: 0.5rem 0 0.4rem;
  font-size: 1rem;
}

.platform-card p {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
}

.platform-note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.92rem;
}

/* ---------- Privacy cards ---------- */

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  align-items: start;
}

.privacy-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem;
  height: 100%;
}

.privacy-card .step {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.privacy-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.privacy-card p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
}

/* ---------- Customization / theme demo ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 3rem 0 4rem;
}

.pillar {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  background: var(--panel);
}

.pillar h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.pillar p {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
}

.theme-demo-scroller {
  position: relative;
  height: 600vh;
}

.theme-demo-sticky {
  position: sticky;
  top: 4.25rem;
  height: calc(100vh - 4.25rem);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.theme-demo-sticky .wrap {
  width: 100%;
}

.theme-demo-caption {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.theme-demo-caption strong {
  color: var(--accent);
}

.theme-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 2392 / 970;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.6);
}

.theme-layer {
  position: absolute;
  inset: 0;
  will-change: clip-path;
}

.theme-layer[data-layer="0"] {
  clip-path: inset(0 0 0 0);
}

.theme-layer:not([data-layer="0"]) {
  clip-path: inset(0 0 0 100%);
}

.theme-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.theme-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-strong);
  background: rgba(13, 15, 20, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.theme-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.theme-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.3s ease;
}

.theme-dots span.active {
  background: var(--accent);
}

/* ---------- Project lineup ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem;
}

.project-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.project-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.project-card .tech {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink);
  margin-top: 0.35rem;
  display: block;
}

.status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid;
}

.status-beta {
  color: #4deeea;
  border-color: #0e4a48;
  background: rgba(77, 238, 234, 0.08);
}

.status-testing {
  color: #e0ab4f;
  border-color: #7a5a26;
  background: rgba(224, 171, 79, 0.08);
}

.status-dev {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(148, 163, 184, 0.06);
}

.project-card p {
  color: var(--ink);
  font-size: 0.92rem;
  margin: 0 0 1.1rem;
}

.project-card .btn {
  font-size: 0.8rem;
  padding: 0.5rem 0.9rem;
}

/* ---------- Footer ---------- */

footer {
  padding: 3rem 0;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  .hub-spokes,
  .platform-grid,
  .privacy-grid,
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hub-spokes,
  .platform-grid,
  .privacy-grid,
  .pillars {
    grid-template-columns: 1fr;
  }

  .theme-stage {
    margin: 0 -1.5rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .theme-label {
    font-size: 0.6rem;
    padding: 0.25rem 0.5rem;
  }

  section {
    padding: 3.5rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .theme-layer {
    transition: none !important;
  }
}
