@font-face {
  font-family: 'Berkeley Mono';
  src: url('BerkeleyMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Berkeley Mono';
  src: url('BerkeleyMono-Oblique.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Berkeley Mono';
  src: url('BerkeleyMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Berkeley Mono';
  src: url('BerkeleyMono-Bold-Oblique.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: var(--color-stealth);
  --bg-alt: #0f141a;
  --text: var(--color-fog);
  --muted: var(--color-steel);
  --accent: var(--color-tide);
  --card: var(--color-midnight);
  --border: var(--color-fog);
  --maxw: 1100px;
  --gap: 1.25rem;
  --radius: 12px;
  
  /* Dynamic viewport height for mobile browsers */
  --vh: 1vh;
  --dvh: 1dvh;
  
  /* Brand palette */
  --color-stealth: #0B0C0E;
  --color-midnight: #142233;
  --color-steel: #B6BAC1;
  --color-tide: #8594A8;
  --color-sand: #B1A68C;
  --color-camo: #58614E;
  --color-fog: #E6E7E8;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: 'Berkeley Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; line-height: 1.55; overflow-x: hidden; }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 2rem 1.125rem; }

@media (min-width: 900px) {
  .container { padding: 2.5rem 2rem; }
}

@media (min-width: 1200px) {
  .container { padding: 3rem 2.5rem; }
}

.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--muted); font-family: 'Berkeley Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.logo-text { font-weight: 900; letter-spacing: .2em; font-size: clamp(28px, 4vw, 48px); opacity: .95; font-family: 'Berkeley Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* Logo */
.logo { height: clamp(140px, 22vw, 280px); width: auto; display: block; margin-bottom: .75rem; filter: drop-shadow(0 0 14px rgba(255,255,255,0.25)) drop-shadow(0 0 32px rgba(138,180,255,0.15)); }
/* Inline flag styling */
.flag-sticker { height: clamp(48px, 8vw, 120px); width: auto; display: block; fill: var(--color-tide); }
.logo-flag { padding-block: clamp(8px, 2vw, 16px); }

/* Hero */
.hero {
  position: relative;
  min-height: 50vh;
  display: grid;
  align-items: start;
  padding-top: 6rem;
  padding-bottom: 4rem;
  overflow: hidden;
  background: none;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: #000;
}
.hero__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(1200px 600px at 50% 20%, rgba(255,255,255,0.06), transparent 70%),
              linear-gradient(180deg, rgba(11,12,14,0) 0%, var(--color-stealth) 100%);
}
.hero__blackout { position: absolute; inset: 0; z-index: 3; background: #000; opacity: 0; pointer-events: none; }
.hero__content { 
  max-width: 960px; 
  position: relative; 
  z-index: 2;
  font-size: 1.25rem;
  display: grid; 
  place-items: center; 
  text-align: center; 
  gap: 1rem; 
  align-items: center;
}

@media (min-width: 900px) {
  .hero__content {
    font-size: 1.4rem;
    gap: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .hero__content {
    font-size: 1.5rem;
    gap: 2rem;
  }
}

.hero h1 {
  font-size: clamp(1.4rem, 4.5vw + .4rem, 2.4rem);
  line-height: 1.1;
  margin: .5rem 0 1rem;
}
.adverb-roll {
  margin-top: .25rem;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: .02em;
  display: inline-grid;
  position: relative;
  overflow: hidden;
  height: 1em;
  line-height: 1;
  vertical-align: baseline;
  max-width: 100%;
}
.adverb-roll span { grid-area: 1 / 1; opacity: 0; transform: translateY(100%); transition: transform 220ms ease, opacity 220ms ease; background: var(--color-fog); color: var(--color-stealth); padding: 0 .35em; border-radius: 0px; box-shadow: 0 2px 8px rgba(0,0,0,0.25); align-self: end; }
.adverb-roll span[data-active="true"] { opacity: 1; transform: translateY(0); }

.tagline { margin-top: 1rem; color: var(--muted); font-style: italic; }

/* Sections */

h1 { font-size: clamp(2rem, 2.8vw + 1rem, 3rem); font-weight: 900; margin: 0 0 1rem; letter-spacing: .01em; }
h2 { font-size: clamp(1.4rem, 1.6vw + 1rem, 2rem); font-weight: 700; margin: 0 0 1rem; }
.blink-dot { animation: blink 1.1s steps(1, end) infinite; }
@keyframes blink { 0%, 49% { opacity: 0; } 50%, 100% { opacity: 1; } }
/* Typewriter effect base styles */
.type-on-visible {
  display: inline-block;
  white-space: normal;
  border-right: 2px solid #e8eef6; /* caret */
  overflow: hidden;
  visibility: hidden; /* prevent flash of full text before typing */
}
.type-on-visible[data-typed="true"] {
  border-right-color: transparent; /* hide caret after typing completes */
}
p { margin: 0 0 1rem; color: var(--text); }
.muted { color: var(--muted); }

/* Story steps: normal layout without scroll pinning */
.story-step {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: left;
}
.story-step h2 { margin-bottom: .5rem; }

@media (min-width: 900px) {
  .story-step {
    min-height: 60vh;
    padding: 2rem 0;
  }
}

@media (min-width: 1200px) {
  .story-step {
    min-height: 60vh;
    padding: 3rem 0;
  }
}

/* Generic grid utilities for flexible multi-section grids */
.boxes { display: grid; gap: 1rem; align-items: stretch; }
.boxes > * { 
  border: 1px solid var(--color-steel); 
  border-radius: 0; 
  padding: .75rem; 
  background: var(--color-stealth);
  box-shadow: 4px 4px 0 var(--color-tide);
  align-self: stretch;
  height: 100%;
  font-size: 0.95rem;
  line-height: 1.5;
}
.cols-2 { grid-template-columns: 1fr; }
.cols-3 { grid-template-columns: 1fr; }

/* Desktop responsive enhancements */
@media (min-width: 900px) {
  .cols-2 { grid-template-columns: repeat(2, 1fr); align-items: stretch; }
  .cols-3 { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  
  .boxes { gap: 1.5rem; }
  .boxes > * { 
    padding: 1.5rem 1.25rem;
    font-size: 1.1rem;
    line-height: 1.6;
  }
}

@media (min-width: 1200px) {
  .boxes { gap: 2rem; }
  .boxes > * { 
    padding: 2rem 1.5rem;
    font-size: 1.2rem;
    line-height: 1.65;
  }
}

/* Generic frame header spanning all columns */
.frame-header {
  background: transparent;
  color: var(--color-fog);
  opacity: 70%;
  letter-spacing: .15em;
  font-weight: 800;
  font-size: 1rem;
  padding: .5rem .75rem;
  align-self: start;
}
@media (min-width: 900px) {
  .frame-header { 
    grid-column: 1 / -1; 
    font-size: 1.1rem;
    padding: .75rem 1rem;
  }
}
@media (min-width: 1200px) {
  .frame-header { 
    font-size: 1.25rem;
    padding: 1rem 1.25rem;
  }
}


/* Footer */
footer { padding: 2.5rem 0 4rem; color: var(--muted); margin-bottom: 20vh;}
footer .links { margin-top: .75rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
footer .links a {
  display: inline-block;
  padding: .4rem .75rem;
  border: 1px solid var(--color-fog);
  border-radius: 0;
  background: transparent;
  color: var(--color-fog);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .03em;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
footer .links a:hover,
footer .links a:focus-visible {
  background: var(--color-fog);
  color: var(--color-stealth);
  border-color: var(--color-fog);
  text-decoration: none;
}

/* CTA links in main section (#sec-cta) */
section[aria-labelledby="sec-cta"] .boxes a {
  display: inline-block;
  padding: .4rem .75rem;
  border: 1px solid var(--color-fog);
  border-radius: 0;
  background: transparent;
  color: var(--color-fog);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .03em;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
section[aria-labelledby="sec-cta"] .boxes a:hover,
section[aria-labelledby="sec-cta"] .boxes a:focus-visible {
  background: var(--color-fog);
  color: var(--color-stealth);
  border-color: var(--color-fog);
  text-decoration: none;
}

/* Click flash effect (TIDE) */
@keyframes btn-flash-tide {
  0%, 100% {
    background: transparent;
    color: var(--color-fog);
    border-color: var(--color-fog);
  }
  50% {
    background: var(--color-tide);
    color: var(--color-stealth);
    border-color: var(--color-tide);
  }
}
a.flash-tide {
  animation: btn-flash-tide 300ms ease-in-out 2;
}

/* Headline intro section */
.headline-intro { display: grid; place-items: center; text-align: center; padding-top: 4rem; padding-bottom: 4rem; }
.headline-intro h1 {
  font-size: clamp(1.6rem, 6.5vw + .2rem, 2.8rem);
  line-height: 1.1;
  max-width: min(92vw, var(--maxw));
  margin-left: auto;
  margin-right: auto;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--color-fog);
}


/* Network Background Styles */
main {
  position: relative;
  min-height: 100vh;
}

.network-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.network-svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Content sections above network background */
main section {
  position: relative;
  z-index: 1;
}

/* Network nodes - subtle background effect with drift */
.network-node {
  fill: var(--color-steel);
  opacity: 0.2;
  transition: fill 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.network-node.active {
  fill: var(--color-tide);
  opacity: 0.5;
  filter: drop-shadow(0 0 4px var(--color-tide));
}

.network-node.message-path {
  fill: var(--color-fog);
  opacity: 0.4;
}

/* Subtle drifting animation for nodes */
@keyframes nodeDrift {
  0%, 100% { 
    transform: translate(0, 0);
  }
  25% { 
    transform: translate(3px, -2px);
  }
  50% { 
    transform: translate(-2px, 3px);
  }
  75% { 
    transform: translate(2px, 1px);
  }
}

@keyframes nodeDriftAlt1 {
  0%, 100% { 
    transform: translate(0, 0);
  }
  33% { 
    transform: translate(-3px, 2px);
  }
  66% { 
    transform: translate(2px, -3px);
  }
}

@keyframes nodeDriftAlt2 {
  0%, 100% { 
    transform: translate(0, 0);
  }
  20% { 
    transform: translate(1px, 3px);
  }
  40% { 
    transform: translate(-2px, -1px);
  }
  60% { 
    transform: translate(3px, 0px);
  }
  80% { 
    transform: translate(0px, -2px);
  }
}

/* Network connections - subtle background effect with slight drift */
.network-connection {
  stroke: var(--color-steel);
  stroke-width: 1;
  opacity: 0.1;
  fill: none;
  transition: stroke 0.3s ease, opacity 0.3s ease, filter 0.3s ease, stroke-width 0.3s ease;
}

.network-connection.active {
  stroke: var(--color-tide);
  opacity: 0.3;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 2px var(--color-tide));
}


/* Simple navigation header */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  color: var(--color-fog);
  padding: 0 1rem;
  font-size: .85rem;
  letter-spacing: 0.2em;
  background: var(--color-stealth);
  z-index: 1000;
  box-sizing: border-box;
}

.main-nav .nav-left { 
  justify-self: start;
  font-weight: 700;
}

.main-nav .nav-right { 
  justify-self: end;
}

.main-nav .nav-arr { 
  display: block; 
  height: 16px; 
  width: auto; 
}

/* Copyright in footer */
.copyright {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-steel);
  text-align: center;
  font-size: .75rem;
  color: var(--color-steel);
  letter-spacing: .08em;
}

/* Mobile optimization for navigation */
@media (max-width: 768px) {
  .main-nav {
    padding: 0 0.75rem;
    font-size: .8rem;
  }
  
  .main-nav .nav-arr {
    height: 14px;
  }
}