/* SmarTekAI — refined dark editorial
   Palette: deep ink, warm copper, soft parchment text — not generic AI purple */

:root {
  --ink-950: #0a0c10;
  --ink-900: #10141c;
  --ink-800: #161c28;
  --ink-700: #1e2636;
  --ink-600: #2a3448;
  --copper-400: #d4a574;
  --copper-500: #c4894a;
  --copper-600: #a86f35;
  --copper-glow: rgba(212, 165, 116, 0.15);
  --teal-400: #6bb3b0;
  --teal-500: #4a9a96;
  --parchment: #e8e2d6;
  --parchment-muted: #a8a296;
  --parchment-dim: #6e6a62;
  --line: rgba(232, 226, 214, 0.08);
  --line-strong: rgba(232, 226, 214, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Consolas", "Liberation Mono", monospace;
  --max: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  font-family: var(--font-sans);
  background: var(--ink-950);
  color: var(--parchment);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle starfield / grain via layered gradients */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(106, 179, 176, 0.07), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(212, 165, 116, 0.06), transparent 45%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(74, 154, 150, 0.04), transparent 50%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--copper-400);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--parchment);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--copper-400);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--copper-500);
  color: var(--ink-950);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

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

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

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 12, 16, 0.82);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--parchment);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  line-height: 0;
}

.logo-img {
  display: block;
  height: 2rem; /* ~32px */
  width: auto;
  max-width: min(220px, 48vw);
}

.logo-mark {
  /* retained for compatibility if referenced elsewhere */
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--copper-500), var(--teal-500));
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--ink-950);
  flex-shrink: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  list-style: none;
}

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

.nav a:hover {
  color: var(--parchment);
}

.nav-cta {
  color: var(--copper-400) !important;
}

/* —— Hero —— */
.hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-400);
  background: rgba(106, 179, 176, 0.1);
  border: 1px solid rgba(106, 179, 176, 0.25);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.badge--copper {
  color: var(--copper-400);
  background: var(--copper-glow);
  border-color: rgba(212, 165, 116, 0.3);
}

.hero-brand {
  margin: 0 0 1rem;
}

.hero-logo {
  display: block;
  height: 2.5rem; /* ~40px */
  width: auto;
  max-width: min(340px, 90vw);
}

.hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 18ch;
  margin-bottom: 1.1rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--copper-400);
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--parchment-muted);
  max-width: 42rem;
  margin-bottom: 0.85rem;
}

.hero-support {
  font-size: 0.95rem;
  color: var(--parchment-dim);
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.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.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.925rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--copper-500);
  color: var(--ink-950);
  border-color: var(--copper-500);
}

.btn-primary:hover {
  background: var(--copper-400);
  color: var(--ink-950);
}

.btn-ghost {
  background: transparent;
  color: var(--parchment);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--copper-400);
  color: var(--copper-400);
}

/* —— Stats strip —— */
.stats {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 20, 28, 0.55);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem 1.25rem;
}

.stat {
  text-align: left;
  padding: 0.5rem 0;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-weight: 700;
  color: var(--parchment);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-value .tilde {
  color: var(--copper-400);
  font-weight: 500;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--parchment-dim);
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* —— Sections —— */
.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--line);
}

.section-header {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 0.5rem;
}

.section h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -0.025em;
  margin-bottom: 0.65rem;
  font-weight: 700;
}

.section-lead {
  color: var(--parchment-muted);
  font-size: 1.02rem;
}

/* —— Fleet —— */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.fleet-card {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.fleet-card:hover {
  border-color: rgba(212, 165, 116, 0.35);
  background: var(--ink-700);
}

.fleet-rank {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--parchment-dim);
  margin-bottom: 0.35rem;
}

.fleet-name {
  font-weight: 650;
  font-size: 1.02rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.fleet-theme {
  font-size: 0.85rem;
  color: var(--parchment-muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.fleet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--copper-400);
}

.fleet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.chip {
  font-size: 0.78rem;
  color: var(--parchment-muted);
  background: var(--ink-800);
  border: 1px solid var(--line);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

/* —— Themes —— */
.theme-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.theme-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.theme-label {
  font-size: 0.92rem;
  font-weight: 500;
}

.theme-bar-wrap {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--ink-600);
  border-radius: 999px;
  overflow: hidden;
}

.theme-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--copper-600), var(--teal-400));
  border-radius: 999px;
  min-width: 2px;
  transition: width 0.8s var(--ease);
}

.theme-nums {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--parchment-dim);
  white-space: nowrap;
  text-align: right;
}

.theme-nums strong {
  color: var(--parchment);
  font-weight: 600;
}

.callout {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--teal-500);
  background: rgba(106, 179, 176, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--parchment-muted);
  font-size: 0.925rem;
}

.callout strong {
  color: var(--parchment);
  font-weight: 600;
}

/* —— Insight cards —— */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.insight-card {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color 0.2s var(--ease);
}

.insight-card:hover {
  border-color: rgba(106, 179, 176, 0.35);
}

.insight-id {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--parchment-dim);
  letter-spacing: 0.03em;
}

.insight-card h3 {
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
  font-weight: 650;
}

.insight-block {
  font-size: 0.88rem;
  color: var(--parchment-muted);
  line-height: 1.5;
}

.insight-block dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal-400);
  margin-bottom: 0.2rem;
}

.insight-block dd {
  margin-bottom: 0.65rem;
}

.insight-block dd:last-child {
  margin-bottom: 0;
}

.insight-takeaway {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--copper-400);
  font-weight: 550;
  line-height: 1.4;
}

.insight-evidence {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--parchment-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

/* —— Method / ethics —— */
.ethics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 700px) {
  .ethics-grid {
    grid-template-columns: 1fr;
  }
}

.ethics-card {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.ethics-card h3 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
  color: var(--parchment);
}

.ethics-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ethics-card li {
  font-size: 0.9rem;
  color: var(--parchment-muted);
  padding-left: 1.1rem;
  position: relative;
}

.ethics-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--copper-500);
}

.ethics-card--ok li::before {
  background: var(--teal-500);
}

.trust-line {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--parchment);
  max-width: 36rem;
  border-left: 3px solid var(--copper-500);
  padding-left: 1rem;
}

/* —— Gaps —— */
.gaps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.gaps-table th,
.gaps-table td {
  text-align: left;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.gaps-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--parchment-dim);
  font-weight: 500;
}

.gaps-table td:first-child {
  font-weight: 600;
  color: var(--parchment);
  white-space: nowrap;
}

.status-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--ink-700);
  color: var(--parchment-muted);
  border: 1px solid var(--line);
}

.status-pill--partial {
  color: var(--copper-400);
  border-color: rgba(212, 165, 116, 0.3);
}

.status-pill--titles {
  color: var(--teal-400);
  border-color: rgba(106, 179, 176, 0.3);
}

.gaps-note {
  margin-top: 1.25rem;
  color: var(--parchment-muted);
  font-size: 0.925rem;
  max-width: 42rem;
}

/* —— Steal / builders —— */
.steal-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  list-style: none;
}

.steal-list li {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
  color: var(--parchment-muted);
  counter-increment: steal;
  position: relative;
  padding-left: 2.75rem;
}

.steal-list {
  counter-reset: steal;
}

.steal-list li::before {
  content: counter(steal);
  position: absolute;
  left: 1rem;
  top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--copper-400);
  font-weight: 700;
}

/* —— CTA —— */
.cta {
  padding: 4.5rem 0;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 80% at 50% 50%, rgba(212, 165, 116, 0.08), transparent 60%);
}

.cta h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.cta p {
  color: var(--parchment-muted);
  max-width: 34rem;
  margin: 0 auto 1.75rem;
  font-size: 1.02rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* —— Footer —— */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--parchment-dim);
  font-size: 0.82rem;
}

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

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

.site-footer a:hover {
  color: var(--copper-400);
}

/* —— Loading / error —— */
.loading {
  color: var(--parchment-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 1.5rem 0;
}

.error-banner {
  background: rgba(180, 60, 60, 0.15);
  border: 1px solid rgba(180, 60, 60, 0.4);
  color: #e8a0a0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

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

  .theme-bar {
    transition: none;
  }

  .btn:active {
    transform: none;
  }
}

/* —— Print —— */
@media print {
  body::before {
    display: none;
  }

  .site-header,
  .hero-actions,
  .cta-actions {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}


/* —— Major win callout —— */
.badge--win {
  background: rgba(106, 179, 176, 0.18);
  color: var(--teal-400);
  border: 1px solid rgba(106, 179, 176, 0.35);
}

.major-win {
  padding-top: 0.5rem;
}

.major-wins-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .major-wins-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
  }
}

@media (min-width: 1200px) {
  .major-wins-grid {
    /* Four major-win cards → stable 2×2 */
    grid-template-columns: 1fr 1fr;
  }
}

.major-wins-grid .major-win-card h2 {
  max-width: none;
}

.major-wins-grid .major-win-lead {
  max-width: none;
}


.major-win-card {
  background:
    linear-gradient(135deg, rgba(106, 179, 176, 0.08), rgba(212, 165, 116, 0.06)),
    var(--ink-800);
  border: 1px solid rgba(106, 179, 176, 0.28);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.06), 0 18px 40px rgba(0, 0, 0, 0.25);
}

.major-win-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.major-win-card h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.85rem;
  max-width: 40rem;
}

.major-win-lead {
  color: var(--parchment-muted);
  font-size: 1.02rem;
  max-width: 46rem;
  margin-bottom: 1.35rem;
}

.major-win-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.mw-stat {
  background: var(--ink-900);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.75rem;
  text-align: center;
}

.mw-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--copper-400);
  letter-spacing: -0.02em;
}

.mw-label {
  font-size: 0.72rem;
  color: var(--parchment-dim);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.major-win-why {
  color: var(--parchment-muted);
  font-size: 0.95rem;
  max-width: 48rem;
  margin-bottom: 0.85rem;
}

.major-win-links {
  font-size: 0.9rem;
}

.chip--win {
  border-color: rgba(106, 179, 176, 0.45);
  color: var(--teal-400);
  background: rgba(106, 179, 176, 0.08);
}

.fleet-card--win {
  border-color: rgba(106, 179, 176, 0.4);
  background:
    linear-gradient(160deg, rgba(106, 179, 176, 0.1), transparent 55%),
    var(--ink-800);
  position: relative;
}

.fleet-card--win::after {
  content: "Major win";
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-400);
  background: rgba(106, 179, 176, 0.12);
  border: 1px solid rgba(106, 179, 176, 0.3);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.insight-card--featured {
  border-color: rgba(212, 165, 116, 0.45);
  box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.08);
}

.insight-card--featured .insight-id {
  color: var(--copper-400);
}
