:root {
  --bg: #0c1110;
  --bg-elev: #121a18;
  --ink: #e8f0ec;
  --muted: #8fa399;
  --line: rgba(232, 240, 236, 0.12);
  --accent: #c4f24a;
  --accent-ink: #0c1110;
  --warm: #d4a574;
  --font-display: "Syne", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.phase-field {
  pointer-events: none;
  position: fixed;
  inset: -20% -10% auto;
  height: 85vh;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 70% 20%, rgba(196, 242, 74, 0.09), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 60%, rgba(212, 165, 116, 0.08), transparent 50%),
    linear-gradient(165deg, #101816 0%, var(--bg) 55%);
  animation: drift 18s ease-in-out infinite alternate;
}

.phase-field::after {
  content: "";
  position: absolute;
  inset: 18% 8% 10%;
  background:
    repeating-linear-gradient(
      -12deg,
      transparent 0,
      transparent 46px,
      rgba(232, 240, 236, 0.035) 46px,
      rgba(232, 240, 236, 0.035) 47px
    );
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  animation: phase-shift 14s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 1.5%, 0) scale(1.03); }
}

@keyframes phase-shift {
  from { opacity: 0.55; transform: translateX(0); }
  to { opacity: 0.9; transform: translateX(3%); }
}

.top,
main,
footer {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}

.mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

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

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-cta {
  color: var(--accent-ink) !important;
  background: var(--accent);
  padding: 0.45rem 0.85rem;
  text-decoration: none;
}

.hero {
  min-height: calc(100vh - 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 8vh, 5rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 10vh, 6rem);
  max-width: 52rem;
}

.brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
  animation: rise 0.9s ease both;
}

.hero h1 {
  margin: 0 0 1.25rem;
  max-width: 18ch;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  line-height: 1.2;
  color: var(--ink);
  animation: rise 0.9s ease 0.12s both;
}

.lede {
  margin: 0 0 2rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
  animation: rise 0.9s ease 0.22s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: rise 0.9s ease 0.32s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn.ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn.ghost:hover {
  border-color: rgba(232, 240, 236, 0.35);
}

.block {
  padding: clamp(3.5rem, 10vh, 6rem) clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  max-width: 58rem;
}

.block h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.block-lede {
  margin: 0 0 2rem;
  max-width: 40rem;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.35;
  color: var(--ink);
}

.rails {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 800px) {
  .rails {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.rails article h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.rails article p,
.focus-list {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.focus-list {
  padding-left: 1.15rem;
}

.focus-list li {
  margin-bottom: 0.55rem;
}

.focus-list li::marker {
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.intro-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 32rem;
  margin-top: 0.5rem;
}

.intro-form input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: rgba(18, 26, 24, 0.85);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.intro-form input[type="email"]::placeholder {
  color: var(--muted);
}

.intro-form input[type="email"]:focus {
  border-color: rgba(196, 242, 74, 0.55);
}

.intro-form .btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.intro-status {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.intro-status.ok {
  color: var(--accent);
}

.intro-status.err {
  color: #e8a090;
}

footer {
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 3rem;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  nav a:not(.nav-cta) {
    display: none;
  }

  .brand {
    font-size: clamp(2.4rem, 12vw, 3.4rem);
  }
}
