/* OPI Labs — company splash page.
   Umbrella-brand page for two products (HabiSync, HabiTent), so it uses a
   neutral dark/circuit system rather than either product's own visual
   language — the same validated dark palette and self-hosted type as
   terrarium.css, in a lighter, splash-scoped set of components. */

@font-face {
  font-family: 'Chivo';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('../fonts/chivo-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Chivo';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/chivo-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Franklin';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/librefranklin-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Franklin';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/librefranklin-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/plexmono-500.woff2') format('woff2');
}

:root {
  --void: #080E14;
  --panel: #14243274;
  --glass-line: rgba(110, 201, 230, 0.22);
  --glass-line-strong: rgba(110, 201, 230, 0.4);

  --circuit-cyan: #6EC9E6;
  --circuit-teal: #4FD1C5;

  --ink: #EAF3F6;
  --ink-soft: #9FB7C2;
  --ink-faint: #7593A0;

  --led-available: #58E08A;
  --led-available-glow: rgba(88, 224, 138, 0.55);
  --led-soon: #FFC15E;
  --led-soon-glow: rgba(255, 193, 94, 0.55);

  --focus-ring: 0 0 0 3px rgba(110,201,230,0.45);
  --shadow-soft: 0 20px 50px -24px rgba(0,0,0,0.65);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: 'Libre Franklin', -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Chivo', sans-serif; text-wrap: balance; margin: 0; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--circuit-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--circuit-cyan);
}
.measure { max-width: 38rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
/* Spam-trap field — hidden from everyone (sighted users and screen readers
   alike), unlike .visually-hidden above which sr-only content relies on. */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }

.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.75rem; }
.section-inner { padding: 5rem 0; }
.divider-glow { height: 1px; background: linear-gradient(90deg, transparent, var(--glass-line-strong), transparent); }

/* ============ header ============ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--void) 78%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0; gap: 1.5rem; }
.wordmark-opi { font-family: 'Chivo', sans-serif; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.wordmark-opi .labs { color: var(--circuit-teal); font-weight: 400; }
nav.primary-nav { display: flex; align-items: center; gap: 1.9rem; }
nav.primary-nav .nav-links a { color: var(--ink-soft); font-size: 0.9rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.4rem; }
nav.primary-nav .nav-links a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--circuit-cyan); opacity: 0.6; }
nav.primary-nav .nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 640px) { nav.primary-nav .nav-links { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: 'Libre Franklin', sans-serif; font-weight: 600; font-size: 0.9rem;
  padding: 0.65rem 1.3rem; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--circuit-teal); color: #06201C; box-shadow: 0 0 0 1px rgba(79,209,197,0.4), 0 8px 24px -8px rgba(79,209,197,0.5); }
.btn-primary:hover { background: #6be0d4; }
.btn-ghost { background: transparent; border-color: var(--glass-line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--circuit-cyan); color: var(--circuit-cyan); }

/* ============ hero ============ */
.hero .section-inner { padding: 4.5rem 0 3.5rem; text-align: center; }
.hero-inner { max-width: 42rem; margin: 0 auto; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); line-height: 1.08; margin-top: 0.9rem; }
.hero .measure { margin: 1.3rem auto 0; color: var(--ink-soft); font-size: 1.08rem; }

/* ============ reveal ============ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ product cards ============ */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
@media (max-width: 780px) { .product-grid { grid-template-columns: 1fr; } }
.product-card {
  background: linear-gradient(160deg, rgba(20,38,52,0.7), rgba(10,18,26,0.7));
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  padding: 2.2rem;
  display: flex; flex-direction: column;
}

.badge {
  display: inline-flex; align-items: center; gap: 0.5rem; align-self: flex-start;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.34rem 0.75rem 0.34rem 0.6rem; border-radius: 100px;
  background: rgba(8,14,20,0.55); border: 1px solid var(--glass-line);
  margin-bottom: 1.3rem;
}
.badge .led { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.badge-available { color: var(--led-available); }
.badge-available .led { background: var(--led-available); box-shadow: 0 0 8px 2px var(--led-available-glow); }
.badge-soon { color: var(--led-soon); }
.badge-soon .led { background: var(--led-soon); box-shadow: 0 0 8px 2px var(--led-soon-glow); }
@media (prefers-reduced-motion: no-preference) { .badge-soon .led { animation: led-pulse 1.8s ease-in-out infinite; } }
@keyframes led-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

.product-plate {
  display: inline-flex; align-items: center;
  background: #101E2B;
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  margin-bottom: 1.4rem;
  align-self: flex-start;
}
.product-plate img { height: 30px; width: auto; display: block; }
.product-wordmark {
  font-family: 'Chivo', sans-serif; font-weight: 800; font-size: 1.4rem;
  margin-bottom: 1.4rem; color: var(--ink);
}

.product-card h2 { font-size: 1.4rem; }
.product-card .tagline { font-style: italic; color: var(--ink-soft); margin-top: 0.5rem; }
.product-card p.desc { color: var(--ink-soft); margin-top: 1rem; font-size: 0.98rem; flex-grow: 1; }
.product-card .card-ctas { display: flex; gap: 0.85rem; margin-top: 1.6rem; flex-wrap: wrap; }

/* ============ shared early-access panel ============ */
.access-panel {
  max-width: 34rem; margin: 0 auto; text-align: center;
}
.access-panel h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.access-panel .measure { margin: 1rem auto 0; color: var(--ink-soft); }
.interest-options {
  display: flex; gap: 1.5rem; justify-content: center; margin-top: 1.8rem; flex-wrap: wrap;
}
.interest-options label {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.95rem; color: var(--ink-soft); cursor: pointer;
}
.interest-options input[type="checkbox"] {
  width: 17px; height: 17px; accent-color: var(--circuit-teal); cursor: pointer;
}
.signup-form { display: flex; gap: 0.7rem; max-width: 28rem; margin: 1.5rem auto 0; flex-wrap: wrap; justify-content: center; }
/* Empty until Turnstile renders into it (see assets/js/early-access.js);
   flex-basis:100% makes it wrap to its own line rather than squeeze into
   the email/button row above once it does have content. */
.turnstile-slot { flex-basis: 100%; display: flex; justify-content: center; margin-top: 0.6rem; }
.signup-form input[type="email"] {
  flex: 1 1 15rem; min-width: 0;
  padding: 0.75rem 1.1rem; border-radius: 8px; border: 1px solid var(--glass-line-strong);
  background: rgba(8,14,20,0.6); color: var(--ink); font-family: 'Libre Franklin', sans-serif; font-size: 0.95rem;
}
.signup-form input[type="email"]::placeholder { color: var(--ink-faint); }
.signup-form input[type="email"]:focus-visible { box-shadow: var(--focus-ring); outline: none; }
.signup-status { margin-top: 0.9rem; font-size: 0.87rem; min-height: 1.3em; font-family: 'IBM Plex Mono', monospace; }
.signup-status.ok { color: var(--led-available); }
.signup-status.err { color: #FFC15E; }

/* ============ footer ============ */
.site-footer {
  margin-top: 1rem; padding: 2rem 0 3rem; border-top: 1px solid var(--glass-line);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  font-size: 0.84rem; color: var(--ink-faint);
}
