/* netauth — 1c1c1c / ecebe4 */

/* Sixtyfour variable font — evenly: BLED 0, SCAN 0 */
@font-face {
  font-family: 'Sixtyfour';
  src: url('/fonts/Sixtyfour-Regular-VariableFont_BLED%2CSCAN.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1c1c1c;
  --text: #ecebe4;
  --text-muted: rgba(236, 235, 228, 0.7);
  --border: rgba(236, 235, 228, 0.15);
  --accent: #7dd3fc;
  --card-bg: rgba(236, 235, 228, 0.04);
  --radius: 8px;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-serif: 'DM Serif Text', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-logo: 'Sixtyfour', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Background: full-site ASCII typing animation, seamless loop */
.bg-ascii {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-ascii-grid {
  display: grid;
  grid-template-columns: repeat(80, 1fr);
  grid-template-rows: repeat(28, 1fr);
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-ascii-char {
  font-family: var(--font-mono);
  font-size: clamp(0.35rem, 1.1vw, 0.6rem);
  color: #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

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

a:hover {
  color: var(--accent);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 28, 28, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 1.25rem;
  text-transform: lowercase;
  /* Sixtyfour "Evenly" instance (Photoshop): balanced pixel fill */
  font-variation-settings: "BLED" 15 "SCAN" 0;
}

/* Big hero header: same Sixtyfour Evenly */
.section-title.logo {
  font-family: var(--font-logo);
  font-weight: 400;
  text-transform: lowercase;
  font-variation-settings: "BLED" 33 "SCAN" 0;
}

.hero-intro .section-title.logo {
  cursor: default;
  transition: color 0.15s ease;
  font-size: clamp(3rem, 10vw, 5.5rem);
  display: inline-block;
  margin-left: -9px;
  letter-spacing: -5px;
}

/* Matrix mode: unchanged letters stay white, changed letters rainbow */
#hero-logo.hero-logo-matrix .hero-logo-same {
  color: var(--text);
}

#hero-logo.hero-logo-matrix .hero-logo-rainbow {
  animation: rainbow-char 2.5s linear infinite;
}

@keyframes rainbow-char {
  0%   { color: #ff6b6b; }
  16%  { color: #ffb347; }
  33%  { color: #ffeb3b; }
  50%  { color: #51cf66; }
  66%  { color: #339af0; }
  83%  { color: #cc5de8; }
  100% { color: #ff6b6b; }
}

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

.nav a {
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.nav a.nav-icon {
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a.nav-icon:hover {
  color: #ecebe4;
}

.nav-icon svg {
  display: block;
}

.nav-connect {
  margin-left: 0.25rem;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.nav-connect:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(125, 211, 252, 0.08);
}

.header-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

.header-toggle span {
  width: 20px;
  height: 2px;
  background: currentColor;
}

/* Sections */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-hero {
  min-height: calc(100vh - 4.5rem);
  display: flex;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
  width: 100%;
}

/* Fade-up on first load */
@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-hero .hero-inner > * {
  animation: hero-fade-up 0.55s ease-out both;
}

.section-hero .hero-inner > *:nth-child(1) {
  animation-delay: 0s;
}

.section-hero .hero-inner > *:nth-child(2) {
  animation-delay: 0.12s;
}

.hero-intro {
  min-width: 0;
}


.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.hero-btn:hover {
  border-color: rgba(236, 235, 228, 0.3);
  background: rgba(236, 235, 228, 0.08);
  color: var(--accent);
}

.hero-btn svg {
  flex-shrink: 0;
}

.hero-code {
  margin: 0;
  align-self: stretch;
}

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

/* Section heading fade-up on scroll */
.section-heading-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.section-heading-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Architecture block fade-up on scroll */
.architecture-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

.architecture-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: 2px;
  line-height: 1.2;
  margin: 0 0 1.5rem;
}

.section-title strong {
  font-weight: 700;
}

.section-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0;
}

/* How it works — inline flow, aligned left */
.flow-inline-outer {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-top: 2rem;
}

#how-it-works .flow-inline-wrap {
  max-width: 100%;
}

/* Fade-right on scroll */
.flow-reveal-right {
  opacity: 0;
  transform: translateX(-28px);
}

.flow-reveal-right.is-visible {
  animation: flow-fade-right 0.6s ease-out forwards;
}

@keyframes flow-fade-right {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.flow-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
}

.flow-step {
  flex: 1 1 140px;
  min-width: 0;
}

.flow-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 100%;
  opacity: 0;
  animation: flow-step-reveal 7.5s ease-in-out infinite;
}

.flow-inline > .flow-step:nth-child(1) .flow-box {
  animation-name: flow-step-reveal-first;
  animation-delay: 0s;
}
.flow-inline > .flow-step:nth-child(3) .flow-box { animation-delay: 1.5s; }
.flow-inline > .flow-step:nth-child(5) .flow-box { animation-delay: 3s; }
.flow-inline > .flow-step:nth-child(7) .flow-box { animation-delay: 4.5s; }
.flow-inline > .flow-step:nth-child(9) .flow-box { animation-delay: 6s; }

@keyframes flow-step-reveal-first {
  0%, 90% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes flow-step-reveal {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

.flow-arrow {
  flex: 0 0 auto;
  align-self: center;
  color: var(--text-muted);
  font-size: 1.25rem;
  opacity: 0;
  animation: flow-arrow-reveal 7.5s ease-in-out infinite;
}

.flow-inline > .flow-arrow:nth-child(2) { animation-delay: 0.75s; }
.flow-inline > .flow-arrow:nth-child(4) { animation-delay: 2.25s; }
.flow-inline > .flow-arrow:nth-child(6) { animation-delay: 3.75s; }
.flow-inline > .flow-arrow:nth-child(8) { animation-delay: 5.25s; }

@keyframes flow-arrow-reveal {
  0% { opacity: 0; }
  10% { opacity: 1; color: var(--accent); }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 768px) {
  .flow-arrow {
    display: none;
  }
  .flow-inline {
    flex-direction: column;
  }
}

/* Architecture: flowchart and video centered, side by side; video column wider to avoid crop */
.architecture-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: stretch;
  margin-top: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.flowchart-outer {
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.section-flowchart {
  padding: 3rem 1.5rem;
}

.flowchart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.architecture-video-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0a0a;
  min-height: 0;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.5), 0 0 48px rgba(0, 0, 0, 0.35);
}

.architecture-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flowchart-node {
  padding: 1rem 1.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1rem;
  min-width: 180px;
  text-align: center;
}

.flowchart-connector {
  width: 2px;
  height: 24px;
  background: var(--border);
}

/* Ecosystem / Features cards – sliding ribbon */
.section-ecosystem .section-title {
  margin-bottom: 2rem;
}

.cards-ribbon-wrap {
  position: relative;
  overflow: hidden;
  margin: 0 -1.5rem;
  padding: 0 1.5rem;
}

.cards-ribbon-wrap::before,
.cards-ribbon-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5rem;
  z-index: 1;
  pointer-events: none;
}

.cards-ribbon-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}

.cards-ribbon-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

.cards-ribbon {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: cards-ribbon-slide 40s linear infinite;
}

.cards-ribbon .card {
  flex: 0 0 260px;
  width: 260px;
}

@keyframes cards-ribbon-slide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  display: block;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: rgba(236, 235, 228, 0.25);
  background: rgba(236, 235, 228, 0.06);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Hero right column: code box + scroll prompt */
.hero-code-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
}

.scroll-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.scroll-prompt-arrow {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  animation: scroll-prompt-float 2s ease-in-out infinite;
}

.scroll-prompt-text {
  letter-spacing: 0.02em;
}

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

/* Code box with bash header */
.code-box-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  min-height: 20rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.code-box-wrap:hover {
  box-shadow: 0 0 20px rgba(0, 200, 83, 0.4), 0 0 40px rgba(0, 200, 83, 0.2);
  border-color: rgba(0, 200, 83, 0.4);
}

.code-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.code-box-bash {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-box-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot-red {
  background: #ff5f57;
}

.code-dot-yellow {
  background: #febc2e;
}

.code-dot-green {
  background: #28c840;
}

.code-prompt {
  color: #00c853;
  user-select: none;
}

.code-block {
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  overflow-wrap: break-word;
  border: none;
  border-radius: 0;
}

.code-box-wrap .code-block {
  padding-top: 1rem;
  min-height: 20rem;
  box-sizing: border-box;
}

.code-block code {
  white-space: pre-wrap;
  word-break: break-all;
}

.code-cursor {
  display: inline;
  animation: blink-cursor 1s step-end infinite;
  color: var(--accent);
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

/* Footer */
.footer {
  position: relative;
  background: #161616;
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 2rem;
  overflow: hidden;
}

.footer-topo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.footer-topo-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-topo-lines {
  animation: footer-topo-drift 22s ease-in-out infinite;
}

.footer-topo-lines path {
  fill: none;
  stroke: #2c2c2c;
  stroke-width: 0.5;
  stroke-linecap: round;
}

@keyframes footer-topo-drift {
  0%, 100% {
    transform: translateX(0) translateY(0);
    opacity: 0.85;
  }
  50% {
    transform: translateX(2%) translateY(1%);
    opacity: 1;
  }
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-brand .logo {
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
}

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

.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  .header-toggle {
    display: flex;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    align-self: flex-end;
  }

  .architecture-inner {
    grid-template-columns: 1fr;
  }
}

/* Waitlist page: footer at bottom, full-height layout */
.page-waitlist {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-waitlist main {
  flex: 1;
}

/* Waitlist form */
.waitlist-section {
  max-width: 480px;
  margin: 4rem auto;
  padding: 2rem 1.5rem;
}

.waitlist-section h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
}

.waitlist-section .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 2rem;
}

.waitlist-form .form-group {
  margin-bottom: 1.25rem;
}

.waitlist-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.waitlist-form input[type="email"],
.waitlist-form input[type="text"].wallet-display {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
}

.waitlist-form input.wallet-display {
  color: var(--text-muted);
  cursor: not-allowed;
}

.waitlist-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.waitlist-form .submit-btn {
  margin-top: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}

.waitlist-form .submit-btn:hover {
  opacity: 0.95;
  background: #67c4f0;
}

.waitlist-form .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.waitlist-back {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
}

.waitlist-back a {
  color: var(--text-muted);
}

.waitlist-back a:hover {
  color: var(--text);
}

.waitlist-required {
  margin-top: 2rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.waitlist-required a {
  color: var(--accent);
}
