/* Korvix Prime site styles.
   Palette sampled from the locked brand kit. */

:root {
  --signal-orange: #F55702;
  --ion-cyan: #2CB4D6;
  --void-navy: #02050E;
  --void-navy-elevated: #0A101C;
  --void-navy-card: #0E1626;
  --white: #FFFFFF;
  --neutral-grey: #87898D;
  --text-muted: #A8ADB6;
  --border-subtle: rgba(44, 180, 214, 0.18);
  --orange-glow: rgba(245, 87, 2, 0.35);
  --cyan-glow: rgba(44, 180, 214, 0.28);
  --max-width: 1080px;
  --radius: 14px;
  --font-display: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --font-body: Inter, "Segoe UI", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--white);
  background-color: var(--void-navy);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(44, 180, 214, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(245, 87, 2, 0.08), transparent 50%),
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 28% 42%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 67% 12%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 81% 38%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 45% 72%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 92% 78%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 8% 88%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 55% 55%, rgba(255, 255, 255, 0.35), transparent);
  background-attachment: fixed;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ion-cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--signal-orange);
}

a:focus-visible,
.btn:focus-visible,
.skip-link:focus-visible {
  outline: 2px solid var(--ion-cyan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--void-navy-card);
  color: var(--white);
  border: 1px solid var(--ion-cyan);
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(2, 5, 14, 0.82);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(44, 180, 214, 0.35), 0 0 18px var(--cyan-glow);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-text .name span {
  color: var(--signal-orange);
}

.brand-text .handle {
  font-size: 0.78rem;
  color: var(--neutral-grey);
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--white);
}

.nav .nav-current {
  color: var(--white);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

/* Hero */
.hero {
  position: relative;
  padding: 3.5rem 0 3rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 75% 40%, rgba(44, 180, 214, 0.10), transparent 60%),
    radial-gradient(ellipse 55% 45% at 80% 55%, rgba(245, 87, 2, 0.08), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 800px) {
  .hero .wrap {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.hero-copy h1 .prime {
  color: var(--signal-orange);
}

.tagline {
  margin: 0 0 0.5rem;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 600;
  color: var(--white);
}

.tagline-sub {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--signal-orange);
  color: var(--white);
  box-shadow: 0 0 24px var(--orange-glow);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #ff6a1a;
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--border-subtle);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--ion-cyan);
  color: var(--ion-cyan);
}

.hero-mark {
  justify-self: center;
  width: min(280px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 0.35rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(44, 180, 214, 0.35), transparent 45%),
    radial-gradient(circle at 70% 65%, rgba(245, 87, 2, 0.3), transparent 50%),
    var(--void-navy-elevated);
  box-shadow:
    0 0 0 1px rgba(44, 180, 214, 0.35),
    0 0 40px var(--cyan-glow),
    0 0 80px var(--orange-glow);
}

.hero-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.horizon-rule {
  height: 2px;
  width: 100%;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--ion-cyan), var(--signal-orange));
  opacity: 0.85;
}

/* Sections */
section {
  padding: 3rem 0;
}

.section-label {
  display: inline-block;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ion-cyan);
}

section h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.lede {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  max-width: 40rem;
}

/* Cover cards */
.cover-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .cover-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.cover-card {
  background: linear-gradient(165deg, rgba(14, 22, 38, 0.95), rgba(10, 16, 28, 0.98));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.cover-card h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cover-card.cyber h3 {
  color: var(--signal-orange);
}

.cover-card.research h3 {
  color: var(--ion-cyan);
}

.cover-card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.topic-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.topic-list li {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(135, 137, 141, 0.35);
  background: rgba(2, 5, 14, 0.55);
  color: var(--white);
  font-size: 0.82rem;
}

/* Latest */
.latest-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.latest-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  background: var(--void-navy-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.latest-item:hover,
a.latest-item:focus-visible {
  border-color: rgba(245, 87, 2, 0.45);
  box-shadow: 0 0 24px rgba(245, 87, 2, 0.12);
  transform: translateY(-1px);
  color: inherit;
}

.desk-pill {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.desk-pill.cyber {
  color: var(--signal-orange);
  background: rgba(245, 87, 2, 0.12);
  border: 1px solid rgba(245, 87, 2, 0.35);
}

.desk-pill.research {
  color: var(--ion-cyan);
  background: rgba(44, 180, 214, 0.12);
  border: 1px solid rgba(44, 180, 214, 0.35);
}

.latest-body strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.latest-body span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.latest-meta {
  color: var(--neutral-grey);
  font-size: 0.8rem;
  white-space: nowrap;
  margin-top: 0.2rem;
}

.latest-note {
  margin: 1.25rem 0 0;
  color: var(--neutral-grey);
  font-size: 0.88rem;
}

/* About strip */
.about {
  padding-top: 1rem;
}

.about-box {
  padding: 1.5rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background:
    linear-gradient(135deg, rgba(44, 180, 214, 0.08), transparent 40%),
    linear-gradient(315deg, rgba(245, 87, 2, 0.08), transparent 45%),
    var(--void-navy-elevated);
}

.about-box p {
  margin: 0;
  max-width: 46rem;
  color: var(--text-muted);
}

.about-box p + p {
  margin-top: 0.85rem;
}


/* Homepage team strip */
.home-team {
  padding-top: 1rem;
  scroll-margin-top: 5rem;
}

.home-honorary {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.25rem 1.15rem;
  align-items: center;
  max-width: 36rem;
  margin: 0 0 1.75rem;
  padding: 0.85rem;
  background: linear-gradient(165deg, rgba(14, 22, 38, 0.95), rgba(10, 16, 28, 0.98));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.home-honorary .portrait {
  width: 120px;
  height: 120px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--void-navy-elevated);
}

.home-honorary .card-body {
  padding: 0;
}

.home-honorary .card-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.home-team-subhead {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ion-cyan);
}

.home-agent-row {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 0.85rem;
}

.home-agent {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 6.4rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.home-agent:hover,
.home-agent:focus-visible {
  color: inherit;
}

.home-agent img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin-bottom: 0.45rem;
  border: 1px solid var(--border-subtle);
  background: var(--void-navy-elevated);
}

.home-agent .card-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.home-agent .ai-badge {
  align-self: center;
  margin: 0.3rem 0 0;
  padding: 0.12rem 0.4rem;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
}

.home-team-more {
  margin: 1.5rem 0 0;
}

@media (max-width: 640px) {
  .home-honorary {
    grid-template-columns: 96px 1fr;
    padding: 0.75rem;
    max-width: none;
  }

  .home-honorary .portrait {
    width: 96px;
    height: 96px;
  }
}

/* Footer */
.site-footer {
  margin-top: 1rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--neutral-grey);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ion-cyan);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.footer-brand span {
  color: var(--signal-orange);
}

/* 404 */
.page-404 {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}

.page-404 h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  letter-spacing: 0.08em;
}

.page-404 p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

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

  .nav .nav-current {
    display: none;
  }

  .brand-text .handle {
    display: none;
  }

  .latest-item {
    grid-template-columns: auto 1fr;
  }

  .latest-meta {
    grid-column: 2;
    white-space: normal;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero-mark {
    order: -1;
    width: min(180px, 48vw);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  a.latest-item,
  .btn {
    transition: none;
  }

  a.latest-item:hover,
  a.latest-item:focus-visible {
    transform: none;
  }
}

/* Team page */
.team-section {
  padding: 1.75rem 0 3rem;
}

.team-section h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.page-note {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1.05rem;
  max-width: 46rem;
  border-radius: var(--radius);
  border: 1px solid rgba(44, 180, 214, 0.4);
  background:
    linear-gradient(135deg, rgba(44, 180, 214, 0.10), transparent 50%),
    var(--void-navy-elevated);
  color: var(--white);
  font-size: 0.98rem;
  line-height: 1.55;
}

.team-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .team-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.team-card {
  background: linear-gradient(165deg, rgba(14, 22, 38, 0.95), rgba(10, 16, 28, 0.98));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.team-card .portrait {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  background: var(--void-navy-elevated);
}

.card-body {
  padding: 0.95rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.team-card .card-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: none;
}

/* Visible "AI teammate" badge immediately under the name, including on mobile. Not a tooltip or footer. */
.ai-badge {
  display: inline-block;
  align-self: flex-start;
  margin: 0.45rem 0 0.55rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ion-cyan);
  background: rgba(44, 180, 214, 0.14);
  border: 1px solid rgba(44, 180, 214, 0.5);
}

/* Distinct from .ai-badge: honorary members are real people, not AI teammates. */
.honorary-badge {
  display: inline-block;
  align-self: flex-start;
  margin: 0.45rem 0 0.55rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--signal-orange);
  background: rgba(245, 87, 2, 0.14);
  border: 1px solid rgba(245, 87, 2, 0.5);
}

.honorary-section {
  margin-top: 2.25rem;
  padding: 0;
}

h2.honorary-heading {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ion-cyan);
}

.card-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.card-role {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.footer-meta {
  margin: 0;
  max-width: 28rem;
}

.footer-meta + .footer-meta {
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .team-section {
    padding: 1.15rem 0 2.25rem;
  }

  .page-note {
    font-size: 0.92rem;
    padding: 0.8rem 0.9rem;
    margin-bottom: 1.15rem;
  }
}
