/* APANTEC site styles — 2026 reimagining */

/* =========================================================
   Theme tokens (dark is default; light overrides via [data-theme="light"])
   ========================================================= */

:root,
[data-theme="dark"] {
  --bg: #07090f;
  --bg-elev: #0d1119;
  --surface: #131826;
  --surface-2: #1a2032;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --ink: #eef2f7;
  --ink-soft: #b6bfd0;
  --ink-mute: #7a8497;
  --brand: #38bdf8;            /* signal cyan */
  --brand-strong: #0ea5e9;
  --brand-deep: #0369a1;
  --accent: #fbbf24;           /* warm amber for energy */
  --success: #34d399;
  --danger: #fb7185;
  --grid-line: rgba(56, 189, 248, 0.08);
  --glow: 0 0 0 1px rgba(56, 189, 248, 0.18), 0 8px 32px -8px rgba(56, 189, 248, 0.28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(7, 9, 15, 0.72);
  --hero-mesh-1: rgba(56, 189, 248, 0.18);
  --hero-mesh-2: rgba(124, 58, 237, 0.18);
  --hero-mesh-3: rgba(251, 191, 36, 0.10);
  --code-bg: #0a0e17;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f5fb;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.18);
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-mute: #94a3b8;
  --brand: #0284c7;
  --brand-strong: #0369a1;
  --brand-deep: #0c4a6e;
  --accent: #d97706;
  --success: #059669;
  --danger: #e11d48;
  --grid-line: rgba(2, 132, 199, 0.06);
  --glow: 0 0 0 1px rgba(2, 132, 199, 0.18), 0 12px 28px -10px rgba(2, 132, 199, 0.22);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.12);
  --header-bg: rgba(255, 255, 255, 0.85);
  --hero-mesh-1: rgba(2, 132, 199, 0.16);
  --hero-mesh-2: rgba(124, 58, 237, 0.10);
  --hero-mesh-3: rgba(217, 119, 6, 0.08);
  --code-bg: #f1f5fb;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', -apple-system, system-ui, sans-serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.25rem); letter-spacing: -0.035em; font-weight: 700; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); letter-spacing: -0.025em; font-weight: 700; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
h6 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  font-weight: 600;
}

p { margin: 0 0 1rem; color: var(--ink-soft); }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--brand-strong); text-decoration: underline; }

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

::selection { background: var(--brand); color: var(--bg); }

/* =========================================================
   Layout primitives
   ========================================================= */

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 6rem 0; position: relative; }
.section-tight { padding: 3rem 0; }

@media (max-width: 768px) {
  .section { padding: 4rem 0; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.section-head h2 { margin-bottom: 1rem; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
  border: none;
}

/* =========================================================
   Header / nav
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 2rem;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.nav-logo:hover { text-decoration: none; color: var(--ink); }

.nav-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px -4px var(--brand);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0 auto 0 0;
  padding: 0 0 0 2rem;
}

.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--brand);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }

[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-elev);
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.85rem 1rem; }
  .nav-toggle { display: inline-flex; }
  .nav { gap: 0.5rem; }
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  padding: 7rem 0 6rem;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, var(--hero-mesh-1) 0%, transparent 40%),
    radial-gradient(circle at 80% 30%, var(--hero-mesh-2) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, var(--hero-mesh-3) 0%, transparent 50%);
  z-index: -2;
  filter: blur(20px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, black 30%, transparent 80%);
  z-index: -1;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.hero h1 {
  background: linear-gradient(180deg, var(--ink) 30%, var(--ink-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 700px;
  margin: 1.5rem auto 0;
  line-height: 1.55;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}

@media (max-width: 700px) {
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
}

.metric {
  text-align: center;
}

.metric .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric .label {
  font-size: 0.82rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.35rem;
}

.compact-hero {
  padding: 5rem 0 3.5rem;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border 0.15s ease;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: var(--bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 24px -8px var(--brand);
}

.btn-primary:hover {
  background: var(--brand-strong);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 14px 32px -10px var(--brand);
}

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

.btn-ghost:hover {
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  border-color: var(--brand);
}

.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* =========================================================
   Cards / grids
   ========================================================= */

.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1000px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card h3, .card h4, .card h5 { margin-top: 0; }

/* Market card */
.market-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
}

.market-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, var(--hero-mesh-1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.market-card:hover::before { opacity: 1; }

.market-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 14px -4px var(--brand);
}

.market-card .icon svg { width: 26px; height: 26px; }

.market-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0;
}

.market-card .stamp {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.25rem;
}

.market-card p {
  flex: 1;
  margin-bottom: 0.75rem;
}

.market-card .examples {
  font-size: 0.85rem;
  color: var(--ink-mute);
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
  margin: 0;
}

.market-card .examples strong {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.35rem;
}

/* Feature card */
.feature-card {
  text-align: left;
}

.feature-card .icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--brand);
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.feature-card .icon svg { width: 22px; height: 22px; }
.feature-card h4 { font-size: 1.15rem; margin-bottom: 0.5rem; }

/* Capability card */
.cap-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.cap-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--hero-mesh-1) 200%);
  pointer-events: none;
}

.cap-card .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}

.cap-card .label {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Product tile */
.product-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
}

.product-tile:hover {
  border-color: var(--brand);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.product-tile img {
  max-height: 160px;
  width: auto;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.25));
}

[data-theme="light"] .product-tile img {
  filter: drop-shadow(0 8px 24px rgba(15,23,42,0.12));
}

.product-tile h4 {
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
  color: var(--ink);
}

.product-tile .tag {
  font-size: 0.78rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========================================================
   Two-col block
   ========================================================= */

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.two-col.reverse > :first-child { order: 2; }

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .two-col.reverse > :first-child { order: 0; }
}

.visual-frame {
  position: relative;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem;
  overflow: hidden;
}

.visual-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, var(--hero-mesh-1) 0%, transparent 40%),
    radial-gradient(circle at 70% 80%, var(--hero-mesh-2) 0%, transparent 40%);
  pointer-events: none;
}

.visual-frame img {
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

/* =========================================================
   Quote / testimonial
   ========================================================= */

.quote-block {
  border-left: 3px solid var(--brand);
  padding: 1rem 0 1rem 1.5rem;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 1.5rem 0;
}

/* =========================================================
   Lists / chips
   ========================================================= */

.list-clean {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.list-clean li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
}
.list-clean li:last-child { border-bottom: none; }
.list-clean li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 12px;
  height: 2px;
  background: var(--brand);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1.5rem;
}

.chips a, .chips span {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}

.chips a:hover {
  background: var(--brand);
  color: var(--bg);
  border-color: var(--brand);
  text-decoration: none;
}

/* =========================================================
   Logo strip
   ========================================================= */

.logo-strip {
  text-align: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.logo-strip .label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--ink-mute);
  margin-bottom: 1.5rem;
}

.logo-strip .row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  opacity: 0.65;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink-soft);
}

.logo-strip .row span {
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* =========================================================
   Accordion
   ========================================================= */

.accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  margin: 1rem 0 1.5rem;
}

.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border-bottom: none; }

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 1.1rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s ease;
}

.accordion-trigger:hover { background: var(--surface-2); }

.accordion-trigger .chev {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--brand);
}

.accordion-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

.accordion-panel {
  display: none;
  padding: 0 1.25rem 1.25rem;
  color: var(--ink-soft);
}
.accordion-panel.open { display: block; }

/* =========================================================
   Sidebar TOC
   ========================================================= */

.layout-with-toc {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 4rem;
}

@media (max-width: 1000px) {
  .layout-with-toc { grid-template-columns: 1fr; }
  .toc { display: none; }
}

.toc {
  position: sticky;
  top: 100px;
  align-self: start;
  font-size: 0.9rem;
}

.toc h6 { margin-bottom: 0.85rem; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0.2rem 0; }

.toc a {
  display: block;
  padding: 0.45rem 0.8rem;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: all 0.15s ease;
}

.toc a:hover, .toc a.active {
  color: var(--brand);
  background: var(--surface);
  border-left-color: var(--brand);
  text-decoration: none;
}

/* =========================================================
   News card
   ========================================================= */

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  transition: all 0.2s ease;
}

.news-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.news-card h3 {
  margin: 0.25rem 0 0.5rem;
  color: var(--ink);
  font-size: 1.25rem;
}

.news-card .date {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* =========================================================
   Product entries (long pages)
   ========================================================= */

.product-entry {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.product-entry:last-child { border-bottom: none; }

.product-entry h3 { color: var(--ink); margin-bottom: 0.5rem; }

.product-entry .download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.product-entry .product-figure {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin: 1rem 0;
}

.product-entry .product-figure img {
  margin: 0 auto;
  max-height: 320px;
  width: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
}
th { background: var(--surface-2); font-weight: 600; color: var(--ink); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr:last-child td { border-bottom: none; }

/* =========================================================
   Contact rows + form
   ========================================================= */

.contact-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-row:last-child { border-bottom: none; }
.contact-row h4 { margin: 0; color: var(--brand); font-size: 1rem; }
.contact-row .meta { margin: 0; }
.contact-row .meta strong { color: var(--ink); }

@media (max-width: 600px) {
  .contact-row { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Contact layout: form + sidebar */
.contact-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 600px) {
  .form-card { padding: 1.5rem; }
}

.form-card h2 { margin-top: 0; font-size: 1.6rem; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-grid.full { grid-template-columns: 1fr; }

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; gap: 1rem; }
}

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

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.form-field label .req { color: var(--danger); margin-left: 0.15rem; }

.form-field input,
.form-field select,
.form-field textarea {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  width: 100%;
}

.form-field textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.55;
}

.form-field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b6bfd0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px;
  padding-right: 2.25rem;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--ink-mute);
  opacity: 1;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
  background: var(--bg);
}

[data-theme="light"] .form-field input:focus,
[data-theme="light"] .form-field select:focus,
[data-theme="light"] .form-field textarea:focus {
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16);
}

.form-field .hint {
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin-top: 0.1rem;
}

.form-field input:invalid:not(:placeholder-shown),
.form-field textarea:invalid:not(:placeholder-shown),
.form-field select:invalid:not(:placeholder-shown) {
  border-color: var(--danger);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.form-actions .privacy {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin: 0;
}

.form-status {
  display: none;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  margin-top: 1.25rem;
  border: 1px solid transparent;
}

.form-status.show { display: block; }

.form-status.success {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--success);
}

.form-status.error {
  background: rgba(251, 113, 133, 0.12);
  border-color: rgba(251, 113, 133, 0.35);
  color: var(--danger);
}

.form-success-card {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
}

.form-success-card.show { display: block; }

.form-success-card .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #10b981);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 24px -8px var(--success);
}

.form-success-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

/* Sidebar info on contact page */
.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-aside .info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-aside .info-card .icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contact-aside .info-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.contact-aside .info-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.contact-aside .info-card a { word-break: break-word; }

/* Bottom info row (HQ, phone, email cards) */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 800px) {
  .contact-info-grid { grid-template-columns: 1fr; }
}

.info-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  text-align: left;
}

.info-tile .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.info-tile h4 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.info-tile p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.info-tile p + p { margin-top: 0.35rem; }
.info-tile a { font-weight: 500; }

/* =========================================================
   CTA banner
   ========================================================= */

.cta-banner {
  position: relative;
  background: linear-gradient(135deg, var(--brand-deep) 0%, #1e1b4b 100%);
  color: #fff;
  border-radius: 24px;
  padding: 4rem 3rem;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

[data-theme="light"] .cta-banner {
  background: linear-gradient(135deg, #0c4a6e 0%, #1e1b4b 100%);
}

.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(56,189,248,0.4) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(251,191,36,0.2) 0%, transparent 50%);
  z-index: -1;
}

.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

.cta-banner .btn-primary {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.4);
}

.cta-banner .btn-primary:hover {
  background: #fff;
  color: #000;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  color: var(--ink-soft);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 800px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; }
}

.site-footer h6 {
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
}

.site-footer p { color: var(--ink-soft); margin: 0 0 0.5rem; font-size: 0.92rem; }

.site-footer a {
  color: var(--ink-soft);
  display: block;
  padding: 0.3rem 0;
  font-size: 0.92rem;
}

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

.site-footer .copyright {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  text-align: center;
  color: var(--ink-mute);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* =========================================================
   Back to top
   ========================================================= */

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--bg);
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 40;
  transition: all 0.15s ease;
}

.back-to-top:hover { background: var(--brand-strong); transform: translateY(-2px); }
.back-to-top.visible { display: inline-flex; }

/* =========================================================
   Utilities
   ========================================================= */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.demo-banner {
  background: linear-gradient(90deg, rgba(56,189,248,0.18), rgba(124,58,237,0.18));
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.02em;
}

.demo-banner strong { color: var(--ink); margin-right: 0.5rem; }

.scroll-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade.in {
  opacity: 1;
  transform: translateY(0);
}
