/* ============================================================
   Center2Center — connection-first communication
   Design language: deep-space field, editorial serif, protocol mono
   ============================================================ */

:root {
  --bg0: #04050c;
  --bg1: #0a0d1c;
  --ink: #eef0fa;
  --dim: #a7aec9;
  --faint: #7d85a4;
  --line: rgba(238, 240, 250, 0.1);
  --line-strong: rgba(238, 240, 250, 0.2);
  --mint: #5ff2b6;
  --ice: #8fb8ff;
  --amber: #ffb95e;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% -10%, rgba(95, 242, 182, 0.07), transparent 38rem),
    radial-gradient(circle at 12% 30%, rgba(143, 184, 255, 0.06), transparent 42rem),
    var(--bg0);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.02rem;
  overflow-x: hidden;
}

/* film grain — kills the flat digital look */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* ============ the field ============ */

#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

/* ============ header ============ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px clamp(18px, 4vw, 44px);
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.brand,
.brand-foot {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}

.brand-2 {
  color: var(--amber);
  padding: 0 0.06em;
}

.nav {
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(4, 5, 12, 0.55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(238, 240, 250, 0.07);
}

.header-cta {
  padding: 9px 16px;
  border: 1px solid rgba(95, 242, 182, 0.35);
  border-radius: 999px;
  background: rgba(4, 5, 12, 0.55);
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: background 160ms ease, border-color 160ms ease;
}

.header-cta:hover {
  border-color: rgba(95, 242, 182, 0.7);
  background: rgba(95, 242, 182, 0.08);
}

/* ============ hero ============ */

.hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  padding: 120px clamp(18px, 4vw, 44px) 96px;
  pointer-events: none;
}

.hero-copy {
  max-width: 660px;
  pointer-events: auto;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(3rem, 7.4vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
}

h1 em,
h2 em {
  font-style: italic;
  color: var(--amber);
}

h2 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 360;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.hero-lede {
  max-width: 540px;
  margin: 0;
  color: var(--dim);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--mint);
  color: #052015;
  box-shadow: 0 0 34px rgba(95, 242, 182, 0.25);
}

.button-primary:hover {
  box-shadow: 0 0 48px rgba(95, 242, 182, 0.4);
}

.button-ghost {
  border: 1px solid var(--line-strong);
  background: rgba(4, 5, 12, 0.45);
  color: var(--ink);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.button-ghost:hover {
  border-color: rgba(238, 240, 250, 0.4);
}

.hero-hint {
  position: absolute;
  right: clamp(18px, 4vw, 44px);
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  transition: opacity 600ms ease;
}

.hero-hint.is-done {
  opacity: 0;
}

.hint-ring {
  width: 12px;
  height: 12px;
  border: 1px solid var(--amber);
  border-radius: 50%;
  animation: hint-pulse 2.4s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.35); opacity: 1; }
}

/* ============ ticker ============ */

.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 5, 12, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ticker-scroll 48s linear infinite;
}

.ticker-track span {
  padding: 13px 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.ticker-track span::after {
  content: "◦";
  padding: 0 26px;
  color: rgba(95, 242, 182, 0.5);
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ content shell ============ */

.content {
  position: relative;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(4, 5, 12, 0.92), rgba(4, 5, 12, 0.98) 240px);
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) 0 0;
}

.section-heading {
  max-width: 760px;
}

.section-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--dim);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.65;
}

/* ============ laws ============ */

.laws-section > .eyebrow {
  margin-bottom: 8px;
}

.law {
  display: grid;
  grid-template-columns: minmax(90px, 200px) 1fr;
  gap: clamp(1rem, 4vw, 4rem);
  padding: clamp(2.6rem, 5vw, 4.2rem) 0;
  border-bottom: 1px solid var(--line);
}

.law:first-of-type {
  border-top: 1px solid var(--line);
}

.law-alt .law-body {
  margin-left: clamp(0px, 6vw, 110px);
}

.law-index {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 240, 250, 0.28);
}

.law-body h2 {
  margin-bottom: 16px;
}

.law-body p {
  max-width: 620px;
  margin: 0;
  color: var(--dim);
  line-height: 1.7;
}

/* ============ layers ============ */

.layers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-top: 56px;
}

.layer-fig {
  margin: 0;
  padding: clamp(1.4rem, 2.5vw, 2.4rem);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(238, 240, 250, 0.025);
}

.layer-fig svg {
  display: block;
  width: 100%;
  height: auto;
}

.layer-fig figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.layer-fig strong {
  font-family: var(--serif);
  font-weight: 420;
  font-size: 1.25rem;
}

.layer-fig .mono {
  color: var(--faint);
}

.dash-ring {
  transform-origin: center;
  transform-box: fill-box;
  animation: ring-rotate 40s linear infinite;
}

.dash-ring.slow {
  animation-duration: 55s;
  animation-direction: reverse;
}

@keyframes ring-rotate {
  to { transform: rotate(360deg); }
}

.edge-pulse {
  animation: edge-glow 3.4s ease-in-out infinite;
}

@keyframes edge-glow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.edge-msg {
  opacity: 0;
  animation: edge-travel 3.4s ease-in-out infinite;
}

@keyframes edge-travel {
  0% { transform: translateX(118px); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(242px); opacity: 0; }
}

/* ============ ceremony ============ */

.ceremony-demo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(238, 240, 250, 0.02);
  overflow: hidden;
}

.cd-dot {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  border: 1.4px solid rgba(238, 240, 250, 0.75);
  border-radius: 50%;
  transform: translateY(-50%);
}

.cd-a { left: calc(50% - 130px); animation: cd-dot-a 7s ease-in-out infinite; }
.cd-b { left: calc(50% + 96px); animation: cd-dot-b 7s ease-in-out infinite; }

.cd-line {
  position: absolute;
  top: 50%;
  left: calc(50% - 96px);
  width: 192px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(95, 242, 182, 0.2), var(--mint), rgba(95, 242, 182, 0.2));
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  animation: cd-line 7s ease-in-out infinite;
}

.cd-msg {
  position: absolute;
  top: 50%;
  left: calc(50% - 100px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px rgba(255, 185, 94, 0.8);
  transform: translateY(-50%);
  opacity: 0;
  animation: cd-msg 7s ease-in-out infinite;
}

@keyframes cd-dot-a {
  0%, 12% { box-shadow: 0 0 0 rgba(95, 242, 182, 0); border-color: rgba(238, 240, 250, 0.75); }
  16% { box-shadow: 0 0 26px rgba(95, 242, 182, 0.7); border-color: var(--mint); }
  52%, 58% { box-shadow: 0 0 30px rgba(95, 242, 182, 0.9); border-color: var(--mint); }
  100% { box-shadow: 0 0 10px rgba(95, 242, 182, 0.25); border-color: rgba(95, 242, 182, 0.6); }
}

@keyframes cd-dot-b {
  0%, 12% { box-shadow: 0 0 0 rgba(95, 242, 182, 0); border-color: rgba(238, 240, 250, 0.75); }
  16% { box-shadow: 0 0 26px rgba(95, 242, 182, 0.7); border-color: var(--mint); }
  52%, 58% { box-shadow: 0 0 30px rgba(95, 242, 182, 0.9); border-color: var(--mint); }
  100% { box-shadow: 0 0 10px rgba(95, 242, 182, 0.25); border-color: rgba(95, 242, 182, 0.6); }
}

@keyframes cd-line {
  0%, 18% { transform: translateY(-50%) scaleX(0); }
  40% { transform: translateY(-50%) scaleX(1); height: 2px; }
  52% { height: 3px; }
  100% { transform: translateY(-50%) scaleX(1); }
}

@keyframes cd-msg {
  0%, 62% { transform: translate(0, -50%); opacity: 0; }
  66% { opacity: 1; }
  86% { opacity: 1; }
  92%, 100% { transform: translate(196px, -50%); opacity: 0; }
}

.ceremony-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.ceremony-steps li {
  padding: 28px 24px 34px 0;
}

.ceremony-steps li + li {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.step-tag {
  color: var(--mint);
}

.ceremony-steps p {
  margin: 14px 0 0;
  color: var(--dim);
  line-height: 1.6;
}

/* ============ wallet ============ */

.wallet-section {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.wallet-copy p:not(.eyebrow) {
  max-width: 480px;
  margin: 0;
  color: var(--dim);
  line-height: 1.7;
}

.wallet-panel {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid rgba(95, 242, 182, 0.22);
  border-radius: 20px;
  background:
    linear-gradient(to bottom, rgba(95, 242, 182, 0.05), transparent 40%),
    rgba(4, 5, 12, 0.6);
  box-shadow: 0 0 60px rgba(95, 242, 182, 0.06);
}

.wallet-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(238, 240, 250, 0.12);
}

.wallet-label {
  color: var(--faint);
  text-transform: uppercase;
}

.wallet-value {
  font-size: 1.05rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.wallet-balance .wallet-value {
  color: var(--amber);
}

.wallet-foot {
  padding-top: 16px;
  color: var(--faint);
}

/* ============ beachhead ============ */

.beachhead-section .section-heading {
  max-width: 820px;
}

/* ============ architecture ============ */

.architecture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 52px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.architecture-grid article {
  min-height: 210px;
  padding: 26px 22px 32px 0;
}

.architecture-grid article + article {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.arch-tag {
  color: var(--ice);
  text-transform: uppercase;
}

.architecture-grid p {
  margin: 16px 0 0;
  color: var(--dim);
  line-height: 1.65;
}

.architecture-grid em {
  color: var(--ink);
}

/* ============ final cta / footer ============ */

.final-cta {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) 0;
  text-align: center;
}

.final-cta h2 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.final-cta p:not(.eyebrow) {
  max-width: 560px;
  margin: 0 auto 34px;
  color: var(--dim);
  line-height: 1.65;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.brand-foot {
  color: var(--dim);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}

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

/* ============ reveal ============ */

/* Linear-style entrance: rise + blur-to-sharp, staggered via --d.
   Gated behind .js so content is never hidden if the script fails. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(7px);
  transition:
    opacity 1000ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 1000ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1000ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--d, 0s);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* hero entrance on load, staggered */
.hero-copy > * {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(7px);
  animation: hero-in 1100ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-copy > *:nth-child(1) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.28s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.44s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.6s; }

.hero-hint {
  opacity: 0;
  animation: hint-in 900ms ease 1.6s forwards;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes hint-in {
  to { opacity: 1; }
}

.hero-hint.is-done {
  animation: none;
  opacity: 0;
}

/* ============ responsive ============ */

@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .layers-grid,
  .wallet-section {
    grid-template-columns: 1fr;
  }

  .ceremony-steps,
  .architecture-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ceremony-steps li:nth-child(3),
  .architecture-grid article:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .ceremony-steps li:nth-child(n + 3),
  .architecture-grid article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .law {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .law-alt .law-body {
    margin-left: 0;
  }

  .law-index {
    font-size: 2.6rem;
  }

  .hero-hint {
    display: none;
  }
}

@media (max-width: 560px) {
  .ceremony-steps,
  .architecture-grid {
    grid-template-columns: 1fr;
  }

  .ceremony-steps li,
  .architecture-grid article {
    min-height: auto;
    padding-right: 0;
    padding-left: 0;
    border-left: 0 !important;
  }

  .ceremony-steps li + li,
  .architecture-grid article + article {
    border-top: 1px solid var(--line);
  }

  .hero {
    padding-bottom: 64px;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .header-cta {
    display: none;
  }
}

/* ============ reduced motion ============ */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }

  [data-reveal],
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .hero-hint {
    display: none;
  }
}
