/* Electron Flight — /new sample redesign
   Dark, techy, clean. Brand cyan retained. */

:root {
  --bg: #07090c;
  --bg-elevated: #0e1218;
  --bg-card: #121820;
  --bg-card-hover: #161e28;
  --border: rgba(47, 176, 229, 0.18);
  --border-strong: rgba(47, 176, 229, 0.35);
  --text: #c5ced8;
  --text-muted: #8a96a4;
  --text-bright: #f2f5f8;
  --accent: #2fb0e5;
  --accent-hover: #4fc3f0;
  --accent-dim: rgba(47, 176, 229, 0.12);
  --accent-glow: rgba(47, 176, 229, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --header-h: 64px;
  --max: 1120px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "Consolas", "Liberation Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
  html {
    overflow-y: scroll;
  }
}

/* Menu open: body is position:fixed via JS (mobile only). Do NOT set overflow:hidden
   on html — toggling that on the scrolling element resets scrollY to 0 in Chrome when
   scrollbar-gutter: stable is also set. Gutter on html stays reserved either way. */
html.nav-locked body {
  /* padding-right may also be set inline when scrollbar-gutter is unsupported */
  padding-right: var(--nav-scrollbar-comp, 0px);
  overscroll-behavior: none;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(47, 176, 229, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 30% at 100% 20%, rgba(47, 176, 229, 0.05), transparent 50%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

h1, h2, h3, h4 {
  color: var(--text-bright);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.65rem, 3.5vw, 2.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; color: var(--accent); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

strong { color: var(--accent); font-weight: 600; }

ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

li { margin-bottom: 0.35em; }

hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 2.5rem 0;
}

/* ---------- Layout ---------- */
.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

main {
  flex: 1;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(7, 9, 12, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-bright);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand:hover { color: var(--text-bright); }

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav-toggle {
  display: inline-flex;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  color: var(--accent);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-toggle:hover {
  border-color: var(--border-strong);
  background: var(--accent-dim);
}

.nav-toggle-bars {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

.site-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.75rem 1rem 1.15rem;
  background: rgba(10, 13, 18, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.site-nav.is-open {
  display: flex;
}

.nav-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
}

.nav-group + .nav-group {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.nav-group-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.35rem 1rem 0.25rem;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  white-space: normal;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text-bright);
  background: var(--accent-dim);
}

/* ---------- Hero / Intro ---------- */
.hero {
  padding: 3rem 0 1.5rem;
}

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

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.intro-blurb {
  max-width: 42rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.intro-blurb strong {
  color: var(--text-bright);
}

/* ---------- Product spotlight ---------- */
.section {
  padding: 1.5rem 0 3rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(47, 176, 229, 0.06), transparent 45%);
  pointer-events: none;
}

.product-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0d12;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
  align-self: start;
  min-width: 0;
}

.product-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.product-body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-body h1 {
  margin-bottom: 0.75rem;
}

.product-body .lede {
  color: var(--text);
  margin-bottom: 1.25rem;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
}

.shipping-badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}

.btn-primary {
  background: var(--accent);
  color: #041018;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #041018;
  box-shadow: 0 0 24px var(--accent-glow);
}

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

.btn-ghost:hover {
  background: var(--accent-dim);
  color: var(--accent-hover);
}

/* Shopify buy button host — keep compact */
.shopify-host {
  margin-top: 0.5rem;
  min-height: 48px;
}

.shopify-host iframe,
.shopify-host > div {
  max-width: 100%;
}

/* ---------- Tech cards ---------- */
.tech-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.tech-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tech-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.tech-media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
  align-self: start;
  min-width: 0;
}

.tech-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tech-body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tech-body p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Tech card rows reused on inner pages (e.g. SCOPIC): labelled group below intro card */
.tech-section {
  margin-top: 2.25rem;
}

.tech-section .tech-body > :last-child {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 2rem 0 1.5rem;
}

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

.footer-nav,
.social-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.footer-nav a,
.social-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-nav a:hover,
.social-nav a:hover {
  color: var(--accent);
}

.copyright {
  width: 100%;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.sample-banner {
  background: linear-gradient(90deg, rgba(47, 176, 229, 0.15), rgba(47, 176, 229, 0.05));
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.45rem 1rem;
}

.sample-banner strong {
  color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .product-card {
    grid-template-columns: 1fr;
    padding: 1.15rem;
  }

  .product-media img {
    aspect-ratio: 4 / 3;
  }

  .tech-card {
    grid-template-columns: 1fr;
  }

  .tech-media {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }

  .hero { padding-top: 2rem; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Inner pages / prose ---------- */
.page-hero {
  padding: 2.5rem 0 1rem;
}

.page-hero h1 {
  margin-bottom: 0.75rem;
}

.page-hero .lede {
  max-width: 42rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  width: 100%;
}

.prose {
  /* Full-width within container; padding on .content-card keeps readable inset. */
  max-width: none;
  width: 100%;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.media-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
  align-items: start;
}

.media-row > .media-frame {
  width: 100%;
  min-width: 0;
}

.media-row > .media-frame img,
.media-row > .media-frame video {
  width: 100%;
  height: auto;
  display: block;
}

.media-row.single {
  grid-template-columns: 1fr;
}

.media-frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0a0d12;
  border: 1px solid var(--border);
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: auto;
  display: block;
}

.media-frame.manual img {
  width: 100%;
}

.split-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1.5rem;
  align-items: stretch;
  margin: 1.25rem 0;
}

.split-block > .content-card {
  height: 100%;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.split-block > .media-frame {
  margin: 0;
  width: 100%;
  max-width: 100%;
  align-self: start;
  min-width: 0;
}

.split-block > .media-frame > * {
  width: 100%;
  height: auto;
  display: block;
}

.feature-list {
  margin: 0 0 1.25rem;
  padding-left: 1.15em;
  color: var(--text);
}

.feature-list li {
  margin-bottom: 0.45em;
}

.meta-block h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.meta-block h3:first-child {
  margin-top: 0;
}

.link-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
}

.link-stack a {
  font-weight: 500;
}

/* FAQ */
.faq-section {
  margin-top: 2rem;
  padding-top: 0.5rem;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}

.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text-bright);
}

.faq-item p,
.faq-item ul {
  color: var(--text-muted);
  margin-bottom: 0.5em;
}

.faq-item ul:last-child,
.faq-item p:last-child {
  margin-bottom: 0;
}

/* Store product rows */
.store-grid {
  display: grid;
  gap: 1.25rem;
}

.store-card {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.store-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.store-card .media-frame {
  aspect-ratio: 1;
  width: 100%;
  max-width: 100%;
  align-self: start;
  min-width: 0;
}

.store-card .media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-card > :not(.media-frame) {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Buttons inside stretched flex-column boxes: keep them short and left-aligned */
.tech-body > .btn,
.store-card > :not(.media-frame) > .btn,
.content-card > .btn,
.product-body > .btn {
  align-self: flex-start;
}

/* Forms */
.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  align-items: stretch;
}

.contact-panel > .content-card {
  height: 100%;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.contact-panel > .form {
  height: 100%;
}

.form {
  display: grid;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.form input,
.form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  font: inherit;
  padding: 0.7rem 0.85rem;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form button[type="submit"] {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.35rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #041018;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.form button[type="submit"]:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow);
}

.alert-error {
  color: #ff8a8a;
  background: rgba(176, 0, 32, 0.12);
  border: 1px solid rgba(176, 0, 32, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.alert-ok {
  color: var(--text);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.hero-shot {
  margin: 0 0 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0d12;
}

.hero-shot img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

@media (max-width: 860px) {
  .split-block,
  .store-card,
  .contact-panel,
  .media-row {
    grid-template-columns: 1fr;
  }
}
