@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@600;700&display=swap');

:root {
  /* ─── Brand Design Tokens ───────────────────────────────────────── */
  --brand-primary:       #1B4F65; /* Deep teal – primary brand color          */
  --brand-primary-hover: #16404F; /* Hover/darkened state                      */
  --brand-accent:        #7AC1A2; /* Seafoam green – secondary accent          */
  --brand-accent-light:  #DAF0E6; /* Light tint for accent backgrounds         */
  --brand-bg:            #F7FAF9; /* Page background base                      */
  --brand-surface:       #FFFFFF; /* Card / glass surface                      */
  --brand-text:          #102B36; /* Primary text                              */
  --brand-text-muted:    #4A6B77; /* Muted / secondary text                    */
  --brand-border:        #C8E0D8; /* Subtle border                             */
}

body {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

/* Base layouts */
.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

@media (min-width: 1280px){
  .container { width: min(1280px, 92%); }
  .header-inner { padding: 10px 0; }
  .nav { gap: 22px; }
  .nav a { font-size: 15px; }
}

@media (min-width: 1536px){
  .container { width: min(1360px, 90%); }
  .header-inner { padding: 12px 0; }
  .nav { gap: 24px; }
  .nav a { font-size: 15px; }
}

@media (min-width: 1920px){
  .container { width: min(1440px, 85%); }
  .header-inner { padding: 14px 0; }
  .nav { gap: 28px; }
  .nav a { font-size: 16px; }
}

/* Header & Nav */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  backdrop-filter: saturate(140%) blur(12px);
  background: color-mix(in oklab, var(--brand-bg) 90%, transparent);
  border-block-end: 1px solid var(--brand-border);
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  position: relative;
}

/* 61px + the 1px border = the hero's 62px top offset (pt-[62px] in index.html). */
@media (min-width: 768px) {
  .header-inner { min-height: 61px; }
}

.brand {
  display: flex;
  gap: clamp(6px, 1.5vw, 8px);
  align-items: center;
  color: var(--brand-text);
  text-decoration: none;
  z-index: 21;
}

.brand:focus, .brand:focus-visible { outline: none; }

/* The wordmark's face: "bio" at 800, "nocular" at 500. Self-hosted, licence in fonts/. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  font-weight: 500 800;
  font-display: swap;
}

/* The brand lockup, matching web/src/components/Logo.tsx: every length in em of
   the wordmark's size, so the mark keeps its proportion to the text. Set the
   size with font-size and the colour with color. .brand-text is the wordmark
   alone, also used inline in headings. */
.brand-lockup { display: inline-block; white-space: nowrap; line-height: 1; color: #1A1A1A; }
.brand-text { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 500; letter-spacing: 0.004em; }
/* The mark stands 1.05em tall, its foot 0.12em below the baseline. */
.brand-lockup-mark { display: inline-block; height: 1.05em; width: auto; vertical-align: -0.12em; margin-right: 0.4em; }
.brand-bio { font-weight: 800; }

.site-header .brand-lockup { font-size: 22px; }
@media (min-width: 1280px) { .site-header .brand-lockup { font-size: 26px; } }
.site-footer .brand-lockup { font-size: 20px; color: #fff; }

/* Nav */
.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-links-wrap {
  position: relative;
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-indicator {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-accent);
  border-radius: 2px;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  pointer-events: none;
}

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

.nav a {
  color: var(--brand-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s ease;
  position: relative;
}

.nav a:hover { color: var(--brand-text); }
.nav a.active { color: var(--brand-text); }
.nav a:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: box-shadow .2s ease, transform .15s ease;
  cursor: pointer;
  min-height: 44px;
}
.btn-small { padding: 8px 12px; border-radius: 8px; min-height: 40px; }
.btn-primary { background: var(--brand-primary); color: #fff; border-color: transparent; }

.site-header .btn-primary {
  color: #fff;
  border-radius: 9999px;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.site-header .btn-primary:hover {
  box-shadow: 0 4px 14px rgba(27,79,101,0.35);
  transform: scale(1.02);
  background: var(--brand-primary-hover);
}

/* Hero Background Atmosphere */
.hero-atmosphere {
  background:
    radial-gradient(ellipse 130% 90% at 15% 50%, rgba(27,79,101,0.92) 0%, transparent 55%),
    radial-gradient(ellipse 80% 70% at 60% 30%, rgba(122,193,162,0.18) 0%, transparent 50%),
    radial-gradient(ellipse 100% 100% at 80% 80%, rgba(27,79,101,0.5) 0%, transparent 60%),
    #0E3547;
}
.hero-atmosphere::after{
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
}

.hero-text-column{
  position: relative;
  padding-left: clamp(1.5rem, 8vw, 6rem);
  padding-right: clamp(1.5rem, 6vw, 4rem);
}

.hero-glass-divider {
  position: absolute;
  top: 0; bottom: 0; right: 0; width: 1px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
  z-index: 2;
}

.hero-video-overlay {
  background: linear-gradient(135deg, rgba(27,79,101,0.18) 0%, rgba(122,193,162,0.1) 100%);
  z-index: 1;
}

/* Mobile Menu & Hamburger */
.mobile-menu-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 19;
  backdrop-filter: blur(4px);
}
.mobile-menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px; z-index: 21;
}
.hamburger { display: flex; flex-direction: column; gap: 5px; width: 24px; height: 18px; }
.hamburger span {
  display: block; width: 100%; height: 2px; background: var(--brand-text);
  transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); border-radius: 2px;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

@media (max-width: 920px) {
  .mobile-menu-toggle { display: block; }
  .nav {
    position: fixed; top: 0; right: -100%; width: 260px; height: 100vh;
    background: #fff; flex-direction: column; align-items: flex-start;
    padding: 80px 24px 24px; transition: right 0.3s ease; z-index: 20;
    box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  }
  .nav.mobile-open { right: 0; }
  .nav-links-wrap { flex-direction: column; align-items: flex-start; width: 100%; gap: 24px; margin-bottom: 24px; }
  .nav a { font-size: 16px; padding: 4px 0; width: 100%; display: block; }
  .mobile-menu-backdrop[style*="display: block"] { display: block; }
}

/* ─── Hero AI Name Animation Block ──────────────────────────────────── */
.hero-ai-name-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em;
  font-family: 'IBM Plex Sans', Inter, sans-serif;
  font-size: clamp(1rem, 1.9vw, 1.25rem);
  font-weight: 700;
  color: var(--brand-accent);
  line-height: 1.3;
  margin: 0;
}

.hero-ai-prefix {
  color: rgba(218,240,230,0.6);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-ai-words {
  position: relative;
  display: inline-flex;
  align-items: baseline;
}

/* "Artificial" – always shown with a red strikethrough */
.hero-ai-artificial {
  color: rgba(218,240,230,0.5);
  text-decoration: line-through;
  text-decoration-color: #E57373;
  text-decoration-thickness: 2px;
  position: relative;
}

/* Strike span no longer needed but kept for markup compatibility */
.hero-ai-strike { display: none; }

/* "Authenticated" – always visible in accent teal */
.hero-ai-authenticated {
  color: #7AC1A2;
  margin-left: 0.25em;
  letter-spacing: 0.01em;
}

.hero-ai-suffix {
  color: rgba(218,240,230,0.9);
}

/* ─── Hero Vision Line ───────────────────────────────────────────────── */
.hero-vision-line {
  font-size: clamp(0.8rem, 1.3vw, 0.92rem);
  color: rgba(218,240,230,0.72);
  line-height: 1.4;
  border-left: 2px solid var(--brand-accent);
  padding-left: 0.85em;
  margin-top: 0 !important;
}

.hero-vision-line em {
  font-style: italic;
  color: rgba(218,240,230,0.92);
  font-weight: 500;
}

.hero-vision-sub {
  font-size: 0.88em;
  color: rgba(218,240,230,0.58);
  letter-spacing: 0.01em;
}

/* ─── Hero Feature Index (chart-styled, not a generic bullet list) ─────── */
.hero-index-list {
  border-top: 1px solid rgba(218,240,230,0.18);
}

.hero-index-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-accent);
  opacity: 0.85;
  padding-top: 10px;
}

.hero-index-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(218,240,230,0.12);
}

.hero-index-row-last {
  border-bottom: none;
}

.hero-index-num {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  color: rgba(218,240,230,0.58);
  padding-top: 2px;
}

.hero-index-desc {
  flex: 1;
  font-size: clamp(0.76rem, 1.2vw, 0.86rem);
  line-height: 1.4;
  font-weight: 600;
  color: rgba(218,240,230,0.78);
}

/* ─── Hero CTA (underline, not pill chrome) ────────────────────────────── */
.hero-cta-underline {
  color: var(--brand-accent);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--brand-accent);
  transition: color 0.2s ease, border-color 0.2s ease, gap 0.2s ease;
}

.hero-cta-underline:hover {
  color: #fff;
  border-color: #fff;
}

.hero-cta-underline:hover .hero-cta-arrow {
  transform: translateX(4px);
}

.hero-cta-arrow {
  transition: transform 0.2s ease;
}

/* ─── Footer Links ───────────────────────────────────────────────────── */
.footer-link {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #fff;
}

/* Sized to match the 1.25rem webfont glyphs these inline SVGs replaced. */
.social-icon {
  height: 1.25rem;
  width: auto;
  vertical-align: -0.125em;
}

/* ─── Reduced Motion ─────────────────────────────────────────────────── */
/* The headline rotator, hero video and smooth scroll are gated in script.js. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
