:root {
  --blue: #11459f;
}

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

html, body {
  height: 100%;
}

body {
  background: #fff;
  color: var(--blue);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Helvetica, Arial, sans-serif;
}

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

a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

/* ── HEADER ── */

.site-header {
  position: relative;
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 20px 0 28px;
  gap: 16px;
}

.home-mark {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  width: 40px;
}

.home-mark img {
  width: 40px;
  height: auto;
  display: block;
}

/* marquee-wrap: dashed border, clips canvas */
.marquee-wrap {
  flex: 1 1 auto;
  height: 44px;
  border: 2px dashed rgba(17, 69, 159, .5);
  position: relative;
  overflow: hidden;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(17, 69, 159, .85);
  text-align: center;
}

.status-sep {
  opacity: .3;
}

/* ── HOME STAGE ── */

.home-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 68px);
  padding: 40px 32px;
}

.script-logo {
  display: block;
  width: min(260px, 22vw);
  height: auto;
}

.science-word {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 48px);
  margin-top: 40px;
  font-size: 26px;
  font-weight: 900;
  color: var(--blue);
}

/* ── GLOBE NAV ── */

.globe-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  margin-top: 0;
  position: relative;
}

/* Outer globes arc upward — orbital arrangement around white-space "sun" */
.globe-nav .globe-link:nth-child(1),
.globe-nav .globe-link:nth-child(3) {
  transform: translateY(-52px);
}

/* House mark floats in white space between SCIENCE text and globe arc */
.orbit-sun {
  display: block;
  width: 72px;
  height: auto;
  margin: 20px auto 20px;
  opacity: 0.9;
  pointer-events: none;
}

/* Home page header: marquee runs full width, no logo slot */
.home-header {
  padding-left: 20px;
  padding-right: 20px;
}

.globe-link {
  position: relative;
  display: block;
  width: 138px;
  height: 138px;
  border-radius: 50%;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  flex: 0 0 auto;
}

.globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.globe-label {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

/* ── SUB-PAGES ── */

.sub-page {
  min-height: 100vh;
  position: relative;
}

.site-header.compact {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 92px;
}

.site-header.compact .marquee-wrap {
  display: none;
}

.page-shell {
  width: min(100% - 56px, 960px);
  margin: 0 auto;
  padding: 110px 0 80px;
}

/* Hero block — text in upper third, card just below the fold */
.page-hero {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0;
}

.eyebrow {
  margin-bottom: 26px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(70px, 7.5vw, 118px);
  font-weight: 900;
  line-height: .9;
  color: var(--blue);
}

.rule {
  width: 100%;
  height: 7px;
  margin: 46px 0;
  background: var(--blue);
}

.stationery {
  position: relative;
  width: 100%;
  min-height: 560px;
  padding: 58px 76px 68px;
  background: #fff;
  border: 1px solid rgba(17, 69, 159, .14);
  box-shadow: 0 18px 42px rgba(17, 69, 159, .1);
  overflow: hidden;
}

/* Archival metadata bar — top of stationery card */
.doc-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 0 18px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(17, 69, 159, .2);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(17, 69, 159, .5);
  position: relative;
  z-index: 1;
}

.doc-meta-date {
  margin-left: auto;
}

.stationery::after {
  content: "";
  position: absolute;
  width: 680px;
  height: 680px;
  right: -310px;
  top: 52%;
  z-index: 0;
  background: url("globe-watermark.svg") center / contain no-repeat;
  opacity: .86;
  transform: translateY(-50%);
  pointer-events: none;
}

.letter-copy {
  position: relative;
  z-index: 1;
  color: #123c7c;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

.letterhead {
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(18, 60, 124, .28);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.letter-copy p {
  margin: 0 0 28px;
}

.letter-copy label {
  display: block;
  margin: 24px 0 8px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.letter-copy input,
.letter-copy textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(18, 60, 124, .45);
  background: rgba(255, 255, 255, .72);
  color: #123c7c;
  font: inherit;
  padding: 10px 0;
  outline: none;
}

.letter-copy textarea {
  min-height: 170px;
  resize: vertical;
  border: 1px solid rgba(18, 60, 124, .32);
  padding: 14px 16px;
}

.letter-copy input:focus,
.letter-copy textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.letter-copy button {
  margin-top: 8px;
  border: 2px solid var(--blue);
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font: 800 15px/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", Helvetica, Arial, sans-serif;
  letter-spacing: .08em;
  padding: 14px 18px;
  text-transform: uppercase;
}

/* ── MISSION PAGE ── */

.mission-page {
  background: #04091a;
}

.mission-header {
  position: fixed;
  z-index: 20;
  background: transparent;
}

.mission-header .home-mark img {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.eye-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#eye-canvas {
  position: absolute;
  inset: 0;
  display: block;
}

/* Halftone dot overlay — two interlaced layers for richness */
.halftone-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.halftone-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(17,69,159,0.32) 1px, transparent 1px);
  background-size: 7px 7px;
}

.halftone-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(200,130,40,0.1) 1px, transparent 1px);
  background-size: 7px 7px;
  background-position: 3.5px 3.5px;
}

.eye-stage-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}

.eye-stage-tagline {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Helvetica, Arial, sans-serif;
  font-size: clamp(40px, 5.5vw, 80px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  text-align: center;
  text-shadow: 0 2px 32px rgba(0,0,0,0.6);
}

.scroll-cue--light {
  color: rgba(255, 255, 255, 0.55);
}

.mission-shell {
  padding-top: 80px;
  padding-bottom: 100px;
}

/* ── SCROLL CUE ── */

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

.scroll-cue {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(17, 69, 159, .45);
  animation: scrollBounce 1.6s ease-in-out infinite;
  transition: opacity .4s ease;
  z-index: 10;
}

.scroll-cue.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-cue-label {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* ── ANNIE STAGE ── */

.annie-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  width: min(100% - 56px, 960px);
  margin: 80px auto 100px;
}

.annie-terminal {
  flex: 0 0 auto;
  width: min(360px, 100%);
  border: 1px solid var(--blue);
  background: #fff;
  padding: 20px 24px;
  transform: rotate(1deg);
  box-shadow: 2px 2px 0 rgba(17,69,159,.08);
}

.annie-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.annie-terminal-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(17,69,159,.5);
}

.annie-terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
}

.annie-terminal-body {
  font-family: "SF Mono", "Fira Mono", "Menlo", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #1a1a2e;
  min-height: 148px;
}

.annie-terminal-body p { margin: 0 0 4px; }

.annie-log-lines p { margin: 0 0 4px; }

.annie-blue { color: var(--blue); }

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.annie-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--blue);
  margin-left: 3px;
  vertical-align: middle;
  animation: cursorBlink 1s steps(1) infinite;
}

.annie-cat-wrap {
  flex: 1 1 auto;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.annie-cat-img {
  width: min(320px, 100%);
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

.annie-cat-message {
  position: absolute;
  top: 6%;
  left: -180px;
  border: 1px solid var(--blue);
  padding: 14px 20px;
  transform: rotate(-1.5deg);
  max-width: 240px;
  background: #fff;
  z-index: 1;
}

.annie-cat-message p {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Helvetica, Arial, sans-serif;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.15;
  color: var(--blue);
  margin: 0;
}

/* ── RESPONSIVE ── */

@media (max-width: 820px) {
  .site-header {
    height: 104px;
    padding: 0 18px 0 20px;
    gap: 16px;
  }

  .home-mark {
    width: 54px;
  }

  .home-mark img {
    width: 54px;
  }

  .marquee-wrap {
    height: 58px;
  }

  .marquee-track span {
    font-size: 20px;
    line-height: 58px;
  }

  .home-stage {
    min-height: calc(100vh - 104px);
    padding-top: 40px;
  }

  .script-logo {
    width: min(340px, 76vw);
  }

  .science-word {
    gap: clamp(18px, 5vw, 42px);
    margin-top: 44px;
    font-size: 34px;
  }

  .globe-nav {
    gap: 12px;
    margin-top: 44px;
  }

  .globe-link {
    width: min(29vw, 174px);
    height: min(29vw, 174px);
  }

  .globe-label {
    font-size: clamp(20px, 6vw, 34px);
  }

  .page-shell {
    width: min(100% - 36px, 960px);
    padding-top: 104px;
  }

  h1 {
    font-size: clamp(54px, 16vw, 84px);
  }

  .rule {
    margin: 36px 0;
  }

  .stationery {
    padding: 34px 24px 42px;
    min-height: 0;
  }

  .stationery::after {
    width: 520px;
    height: 520px;
    right: -315px;
  }

  .letter-copy {
    font-size: 15px;
  }
}
