@import url("colors_and_type.css");

/* =========================================================================
   ElectroSpotmatic — Editorial site stylesheet (Direction C)
   Re-skins the shared marketing + documentation page system.
   Linked from every page in place of the old inline gradient styles.
   ========================================================================= */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-paper);
  color: var(--fg-on-light);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Top navigation (injected on every page) ---------- */
.es-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 14px clamp(20px, 5vw, 60px);
  background: rgba(243, 244, 246, 0.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--fg-on-light);
}
.es-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg-on-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.es-nav__brand img { width: 28px; height: 28px; border-radius: 7px; display: block; }
.es-nav__right { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.es-nav__links { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 26px); }
.es-nav__links a {
  text-decoration: none;
  color: var(--fg-on-light-2);
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--dur-base) var(--ease-standard);
}
.es-nav__links a:hover { color: var(--brand-blue); }
.es-nav__links a.is-current { color: var(--fg-on-light); }
.es-lang {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.es-lang a {
  text-decoration: none;
  color: var(--fg-on-light-3);
  padding: 4px 6px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  transition: color var(--dur-base), background var(--dur-base);
}
.es-lang a:hover { color: var(--fg-on-light); background: rgba(0,0,0,0.05); }
.es-lang a.is-current { color: #fff; background: var(--brand-lens); }
@media (max-width: 780px) {
  .es-nav { flex-wrap: wrap; gap: 10px 16px; padding: 12px 20px; }
  .es-nav__right { width: 100%; justify-content: space-between; }
}
@media (max-width: 460px) {
  .es-nav__links { gap: 12px; }
  .es-nav__links a { font-size: 11px; letter-spacing: 0.06em; }
}

/* ---------- Page shell ---------- */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 40px) 80px;
}

/* Page header — replaces the old centered gradient banner */
.header {
  margin-bottom: clamp(28px, 4vw, 44px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--fg-on-light);
}
.header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--fg-on-light);
  margin: 0;
}
.header p { margin: 18px 0 0; }
.header p a {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-blue);
  text-decoration: none;
}
.header p a:hover { text-decoration: underline; }

/* Content surface */
.content-card {
  background: var(--bg-elev);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 4vw, 52px);
}
/* In-card duplicated <h1> reads as the article lede */
.content-card > h1:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  padding-bottom: 0;
  color: var(--fg-on-light);
}

/* ---------- Long-form typography ---------- */
.content-card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--fg-on-light);
  margin: 44px 0 16px;
  padding-top: 20px;
  border-top: 2px solid var(--fg-on-light);
}
.content-card > .toc + h2,
.content-card > h1 + h2 { border-top: none; padding-top: 0; margin-top: 8px; }
.content-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 21px);
  letter-spacing: -0.01em;
  color: var(--fg-on-light);
  margin: 28px 0 12px;
}
.content-card h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--fg-on-light);
  margin: 0 0 10px;
}
.content-card p { margin: 0 0 16px; color: var(--fg-on-light-2); max-width: 72ch; }
.content-card a { color: var(--brand-blue); text-decoration: none; }
.content-card a:hover { text-decoration: underline; }
.content-card strong { color: var(--fg-on-light); font-weight: 600; }
.content-card em { color: var(--fg-on-light-3); }
.content-card ul, .content-card ol { margin: 0 0 18px; padding-left: 1.3em; color: var(--fg-on-light-2); }
.content-card li { margin: 6px 0; }
.content-card hr { border: none; border-top: 1px solid var(--hairline-light); margin: 32px 0; }
.effective-date { font-family: var(--font-mono); font-size: 13px; color: var(--fg-on-light-3); margin-bottom: 24px !important; }

/* Code / monospace */
.content-card code, .content-card .mono {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-paper-2);
  border: 1px solid var(--hairline-light);
  border-radius: 5px;
  padding: 1px 6px;
}

/* ---------- Tables (feature comparison) ---------- */
.content-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 28px;
  font-size: 15px;
}
.content-card thead th {
  text-align: left;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-on-light);
  padding: 12px 14px;
  border-bottom: 2px solid var(--fg-on-light);
}
.content-card tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline-light);
  color: var(--fg-on-light-2);
  vertical-align: top;
}
.content-card tbody tr:hover { background: var(--bg-paper); }

/* ---------- Table of contents ---------- */
.toc {
  background: var(--bg-paper);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-tile);
  padding: 24px 28px;
  margin: 0 0 36px;
}
.toc h3 { margin: 0 0 14px; }
.toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 36px; }
.toc li { margin: 8px 0; break-inside: avoid; }
.toc a { color: var(--brand-blue); text-decoration: none; font-size: 15px; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 600px) { .toc ul { columns: 1; } }

/* ---------- Feature lists ---------- */
.feature-list { list-style: none !important; padding-left: 0 !important; }
.feature-list li {
  position: relative;
  padding-left: 22px;
  margin: 9px 0;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--brand-blue);
  border-radius: 50%;
}

/* ---------- Feature grid + cards (no colored left border, per system) ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 18px;
  margin: 18px 0 28px;
}
.feature-card {
  background: var(--bg-paper);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-tile);
  padding: 22px 22px 6px;
}
.feature-card h4 { margin-bottom: 12px; }

/* Section wrappers used on the doc landing */
.control-system, .computational-features, .video-features, .extension-features { margin: 8px 0; }

/* ---------- Emphasis / accent blocks ---------- */
.highlight-box {
  background: var(--brand-lens);
  color: var(--fg-on-dark);
  border-radius: var(--radius-card);
  padding: 32px clamp(24px, 4vw, 40px);
  margin: 24px 0;
}
.highlight-box h3 { color: var(--brand-cyan); margin: 0 0 14px; }
.highlight-box .feature-list li { color: rgba(255,255,255,0.82); }
.highlight-box .feature-list li::before { border-color: var(--brand-cyan); }
.highlight-box a { color: var(--brand-cyan); }

.tech-specs, .control-system > .feature-grid + *, .info-box, .warning-box, .privacy-box {
  margin: 18px 0;
}
.tech-specs {
  background: var(--bg-paper);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-tile);
  padding: 24px 26px 8px;
}
.tech-specs h4 { margin-bottom: 12px; }

/* Generic note boxes if present */
.info-box, .warning-box, .privacy-box {
  border-radius: var(--radius-tile);
  padding: 20px 24px;
  border: 1px solid var(--hairline-light);
  background: var(--bg-paper);
}
.warning-box { border-left: 3px solid var(--accent-yellow-strong); }
.info-box { border-left: 3px solid var(--brand-blue); }

/* Controls diagram (SVG) */
.controls-diagram { margin: 20px 0 28px; text-align: center; }
.controls-diagram object, .controls-diagram img {
  max-width: 100%;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-tile);
  background: #fff;
}

/* ---------- Support / FAQ ---------- */
.support-section, .contact-info, .contact-method, .troubleshooting {
  border-radius: var(--radius-tile);
  padding: 24px 26px;
  margin: 18px 0;
}
.support-section, .contact-method, .troubleshooting {
  background: var(--bg-paper);
  border: 1px solid var(--hairline-light);
}
.support-section h3, .contact-method h3, .troubleshooting h3 { margin-top: 0; }
.contact-info {
  background: var(--brand-lens);
  color: var(--fg-on-dark);
}
.contact-info h3 { color: var(--brand-cyan); margin-top: 0; }
.contact-info p { color: rgba(255,255,255,0.82) !important; }
.contact-info a { color: var(--brand-cyan); }

.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline-light);
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--fg-on-light);
  margin-bottom: 8px;
}
.faq-answer { color: var(--fg-on-light-2); }

/* ---------- Footer ---------- */
.footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 40px) 56px;
  border-top: 1px solid var(--fg-on-light);
  color: var(--fg-on-light-3);
  font-size: 14px;
}
.footer p { margin: 4px 0; }
.footer a { color: var(--fg-on-light-2); text-decoration: none; }
.footer a:hover { color: var(--brand-blue); }
