/* ─── Fonts ──────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('/fonts/outfit-200.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/outfit-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/outfit-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/outfit-600.woff2') format('woff2');
}

/* Body font option A (default): Outfit 300 */
@font-face {
  font-family: 'BodyFont';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/outfit-300.woff2') format('woff2');
}
@font-face {
  font-family: 'BodyFont';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/outfit-400.woff2') format('woff2');
}

/* Body font option B: uncomment the two blocks below and remove the two above
   to switch to Source Serif 4. Tell Stephen to compare both.
@font-face {
  font-family: 'BodyFont';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-serif-4-400.woff2') format('woff2');
}
@font-face {
  font-family: 'BodyFont';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/source-serif-4-400-italic.woff2') format('woff2');
}
*/

/* ─── Custom properties ──────────────────────────────────────────────────── */

:root {
  --navy:       #0a1628;
  --navy-deep:  #060e1a;
  --sky:        #a0c8ff;
  --cream:      #f0ede8;
  --off-white:  #f5f3ef;
  --charcoal:   #1a1a1e;
  --sky-dim:    rgba(160, 200, 255, 0.15);
  --sky-border: rgba(160, 200, 255, 0.2);

  --font-ui: 'Outfit', system-ui, sans-serif;
  --font-body: 'BodyFont', 'Outfit', system-ui, sans-serif;

  --measure: 68ch;
  --container: min(var(--measure), 100% - 3rem);
  --container-wide: min(80rem, 100% - 3rem);
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 68px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--sky);
  text-underline-offset: 3px;
}
a:hover { opacity: 0.8; }
a:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 2px;
}

img, svg { display: block; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */

.container {
  width: var(--container);
  margin-inline: auto;
}

/* ─── Site Nav ───────────────────────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 52px;
  background: rgba(6, 14, 26, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sky-border);
  transition: background 0.2s, box-shadow 0.2s;
}

.site-nav.is-scrolled {
  background: rgba(6, 14, 26, 0.97);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  width: var(--container-wide);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--sky);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.nav-logo:hover { opacity: 0.85; color: var(--sky); }
.nav-logo img { display: block; }

/* Nav links row */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.nav-link {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  padding: 0 0.7rem;
  height: 52px;
  display: inline-flex;
  align-items: center;
  opacity: 0.65;
  transition: opacity 0.15s, color 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
  color: var(--sky);
}

.nav-link--signup {
  color: var(--sky);
  opacity: 0.85;
  margin-left: 0.4rem;
}
.nav-link--signup:hover { opacity: 1; color: var(--sky); }

/* Email Me button */
.nav-btn-email {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-deep);
  background: var(--sky);
  text-decoration: none;
  padding: 0 0.9rem;
  height: 32px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  margin-left: 0.6rem;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.nav-btn-email:hover { opacity: 0.85; color: var(--navy-deep); }


/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 10px;
  flex-shrink: 0;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--sky);
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: center;
}

.nav-hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

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

  .nav-links {
    position: fixed;
    top: 52px;
    right: 0;
    width: min(300px, 85vw);
    height: calc(100dvh - 52px);
    background: var(--navy-deep);
    border-left: 1px solid var(--sky-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 0 max(2rem, env(safe-area-inset-bottom));
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 199;
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-link,
  .nav-dropdown-btn {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    padding: 0 1.5rem;
    height: 56px;
    width: 100%;
    justify-content: flex-start;
    opacity: 0.9;
    border-bottom: 1px solid rgba(160, 200, 255, 0.07);
  }

  .nav-link.active {
    color: var(--sky);
    opacity: 1;
  }

  .nav-link--signup {
    margin-left: 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--sky-border);
    color: var(--sky);
  }

  .nav-btn-email {
    margin: 1rem 1.5rem 0;
    height: 52px;
    border-radius: 3px;
    justify-content: center;
    font-size: 0.82rem;
  }
}

/* ─── Progress bar ───────────────────────────────────────────────────────── */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--sky);
  z-index: 100;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
  padding: clamp(5rem, 12vw, 8rem) 0 clamp(4rem, 8vw, 6rem);
  padding-top: calc(52px + clamp(4rem, 10vw, 7rem));
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

/* Mark */
.mark-wrap {
  margin-bottom: 2.5rem;
}

.bbihg-mark {
  width: clamp(160px, 25vw, 240px);
  height: auto;
}

/* Mark animation — JS sets animation-delay per rect */
.bbihg-mark rect {
  opacity: 0;
}
@keyframes markFadeIn {
  to { opacity: 1; }
}

/* Wordmark */
.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.wordmark-top {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: clamp(1.4rem, 4.5vw, 2.4rem);
  letter-spacing: 0.25em;
  color: var(--sky);
  text-transform: uppercase;
}

.wordmark-bottom {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(0.6rem, 1.8vw, 0.95rem);
  letter-spacing: 0.22em;
  color: var(--sky);
  text-transform: uppercase;
  opacity: 0.75;
}

/* Headline */
.hero-headline {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--cream);
  opacity: 0.75;
  margin: 0 0 2.5rem;
  max-width: 44ch;
  letter-spacing: 0.01em;
}

.hero-headline sup {
  font-size: 0.55em;
  vertical-align: super;
  opacity: 0.6;
}

/* Buttons */
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: 3px;
  min-height: 44px;
  min-width: 44px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

.btn-primary {
  background: var(--sky);
  color: var(--navy-deep);
}
.btn-primary:hover { opacity: 0.9; color: var(--navy-deep); }

.btn-secondary {
  background: transparent;
  color: var(--sky);
  border: 1.5px solid var(--sky-border);
}
.btn-secondary:hover { border-color: var(--sky); opacity: 0.85; }

/* ─── Latest update callout ──────────────────────────────────────────────── */

.latest-callout {
  background: var(--sky-dim);
  border-top: 1px solid var(--sky-border);
  border-bottom: 1px solid var(--sky-border);
  padding: 0.85rem 0;
}

.latest-callout .container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.latest-label {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sky);
  white-space: nowrap;
}

.latest-link {
  font-size: 0.95rem;
  color: var(--cream);
  text-decoration: none;
  opacity: 0.85;
}
.latest-link:hover { opacity: 1; color: var(--sky); }
.latest-link time {
  color: var(--sky);
  font-weight: 400;
  opacity: 0.75;
}

/* ─── Main text ──────────────────────────────────────────────────────────── */

.content-wrap {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.main-text {
  max-width: var(--measure);
}

.main-text h1,
.main-text h2,
.main-text h3,
.main-text h4 {
  font-family: var(--font-ui);
  font-weight: 600;
  line-height: 1.25;
  color: var(--off-white);
  margin-top: 2.5em;
  margin-bottom: 0.6em;
}
.main-text h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 200; letter-spacing: 0.02em; }
.main-text h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
.main-text h3 { font-size: clamp(1rem, 2.5vw, 1.2rem); }

.main-text p {
  margin-top: 0;
  margin-bottom: 1.4em;
}

.main-text strong { font-weight: 600; color: var(--off-white); }
.main-text em { font-style: italic; }

.main-text hr {
  border: none;
  border-top: 1px solid var(--sky-border);
  margin: 2.5rem 0;
}

.main-text ul,
.main-text ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4em;
}
.main-text li { margin-bottom: 0.4em; }

.main-text blockquote {
  border-left: 3px solid var(--sky);
  margin: 1.5em 0;
  padding: 0.5em 0 0.5em 1.25em;
  color: var(--cream);
  opacity: 0.8;
  font-style: italic;
}

/* ─── Subscribe section ──────────────────────────────────────────────────── */

.subscribe-section {
  background: var(--navy-deep);
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--sky-border);
}

.subscribe-inner {
  max-width: 56rem;
}

.subscribe-inner h2 {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.03em;
  color: var(--off-white);
  margin: 0 0 0.5rem;
}

.subscribe-lead {
  color: var(--cream);
  opacity: 0.7;
  margin: 0 0 2rem;
  font-size: 1rem;
}

/* Form */
.signup-form {
  max-width: 52rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sky);
  opacity: 0.8;
}

.required-mark {
  color: var(--sky);
  opacity: 0.6;
}

.form-group input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sky-border);
  border-radius: 3px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.875rem;
  min-height: 44px;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
  width: 100%;
}

.form-group input::placeholder { color: var(--cream); opacity: 0.3; }

.form-group input:focus {
  border-color: var(--sky);
  background: rgba(160, 200, 255, 0.07);
}

.form-group input:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: #e88080;
}

.form-actions {
  margin-bottom: 0.875rem;
}

.btn-submit {
  position: relative;
}
.btn-submit .btn-loading { display: none; }
.btn-submit.is-loading .btn-label { visibility: hidden; }
.btn-submit.is-loading .btn-loading { display: block; position: absolute; }

.form-fine-print {
  font-size: 0.8rem;
  color: var(--cream);
  opacity: 0.45;
  margin: 0;
}

.form-success {
  background: rgba(100, 200, 120, 0.12);
  border: 1px solid rgba(100, 200, 120, 0.3);
  border-radius: 3px;
  padding: 0.875rem 1rem;
  margin-top: 1rem;
  color: #a8e6b4;
  font-size: 0.95rem;
}

.form-error {
  background: rgba(220, 100, 100, 0.12);
  border: 1px solid rgba(220, 100, 100, 0.3);
  border-radius: 3px;
  padding: 0.875rem 1rem;
  margin-top: 1rem;
  color: #f4b8b8;
  font-size: 0.95rem;
}

/* ─── Updates section ────────────────────────────────────────────────────── */

.updates-section {
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--sky-border);
}

.updates-inner h2 {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.03em;
  color: var(--off-white);
  margin: 0 0 2rem;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: var(--measure);
}

.update-entry {
  border-left: 2px solid var(--sky-border);
  padding-left: 1.5rem;
}

.update-date {
  display: block;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
  opacity: 0.7;
  margin-bottom: 0.4rem;
}

.update-title {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--off-white);
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.update-body {
  font-size: 0.95rem;
  color: var(--cream);
  opacity: 0.8;
}
.update-body p:last-child { margin-bottom: 0; }

.no-updates {
  color: var(--cream);
  opacity: 0.4;
  font-style: italic;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--navy-deep);
  border-top: 1px solid var(--sky-border);
  padding: clamp(2rem, 5vw, 3rem) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--cream);
  opacity: 0.45;
  margin: 0;
  max-width: 60ch;
  line-height: 1.5;
}

.footer-email {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--sky);
  opacity: 0.75;
  text-decoration: none;
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}
.footer-email:hover { opacity: 1; }

.footer-copy {
  font-size: 0.75rem;
  color: var(--cream);
  opacity: 0.3;
  margin: 0;
  font-family: var(--font-ui);
  letter-spacing: 0.04em;
}

/* ─── Hero footnote ─────────────────────────────────────────────────────── */

.hero-footnote {
  position: absolute;
  bottom: 1.75rem;
  left: clamp(1.25rem, 4vw, 3rem);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--cream);
  opacity: 0.4;
  margin: 0;
  letter-spacing: 0.02em;
}

.hero-footnote sup {
  font-size: 0.65em;
  vertical-align: super;
}

/* ─── Interior pages ─────────────────────────────────────────────────────── */

.interior-main {
  padding-top: 52px;
}

.page-header {
  padding: clamp(3rem, 7vw, 5rem) 0 2rem;
  border-bottom: 1px solid var(--sky-border);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.page-title {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: 0.06em;
  color: var(--sky);
  margin: 0;
  text-transform: uppercase;
}

/* Platform tabs */
.platform-tabs-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2.5rem 0 0;
  padding-bottom: 0;
  border-bottom: 1px solid var(--sky-border);
}

.platform-tab {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 1.1rem;
  margin-bottom: -1px;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}

.platform-tab:hover {
  opacity: 0.85;
  color: var(--sky);
}

.platform-tab.active {
  color: var(--sky);
  opacity: 1;
  border-bottom-color: var(--sky);
}

/* Platform panels */
.platform-panels {
  padding-top: clamp(2.5rem, 6vw, 4rem);
}

.platform-panel {
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

/* Sign-up CTA section (About page) */
.signup-cta {
  background: var(--navy-deep);
  border-top: 1px solid var(--sky-border);
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.signup-cta-inner h2 {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.03em;
  color: var(--off-white);
  margin: 0 0 0.75rem;
}

.signup-cta-inner p {
  color: var(--cream);
  opacity: 0.7;
  margin: 0 0 1.75rem;
}

/* ─── Mobile adjustments ─────────────────────────────────────────────────── */

@media (max-width: 600px) {
  :root {
    --container: calc(100% - 2.5rem);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 280px;
  }
  .latest-callout .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}
