/* HabiSync — "Interactive Reptile Tank" redesign
   A single committed dark-glass world matching the brand mark's navy/circuit-cyan
   language, rather than the nature/atmospheric system on index.html. The whole
   page reads as one terrarium viewed through glass; the hero's day/night switch
   is an in-page lighting control (not a light/dark theme), so the environment
   stays intentionally dark throughout — see README for the rationale. */

@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');
}

/* ============ tokens ============ */
:root {
  --void: #080E14;
  --tank-navy: #101E2B;
  --panel: #14243274;
  --panel-solid: #14263480;
  --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);
  --led-future: #7690A0;
  --led-future-glow: rgba(100, 121, 138, 0.3);

  --focus-ring: 0 0 0 3px rgba(110,201,230,0.45);
}

/* ============ base ============ */
* { 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);
}
.lede { font-style: italic; color: var(--ink-soft); }
.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 { position: relative; }
.section-inner { position: relative; padding: 5.5rem 0; z-index: 1; }
.section-head { max-width: 40rem; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin-top: 0.6rem; }
.section-head .measure { color: var(--ink-soft); margin-top: 0.9rem; font-size: 1.05rem; }
.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; }
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-plate {
  display: inline-flex; align-items: center;
  background: var(--tank-navy);
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  padding: 0.4rem 0.8rem;
  flex-shrink: 0;
}
.brand-plate img { display: block; height: 26px; width: auto; }
.brand-plate.nav-secondary { padding: 0.3rem 0.65rem; }
.brand-plate.nav-secondary img { height: 18px; }
.wordmark-opi { font-family: 'Chivo', sans-serif; font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; color: var(--ink); }
.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.nav-badge-link::before { content: none; }
nav.primary-nav .nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 720px) { 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 ============ */
.tank-hero .section-inner { padding: 3.5rem 0 4.5rem; }
.hero-stack { display: flex; flex-direction: column; align-items: center; gap: 2.75rem; }
.tank-copy { max-width: 40rem; text-align: center; }
.tank-copy h1 { font-size: clamp(2.5rem, 5.2vw, 4rem); line-height: 1.03; margin-top: 0.9rem; }
.tank-copy h1 em { font-style: normal; color: var(--circuit-teal); }
.hero-copy { margin: 1.5rem auto 0; font-size: 1.08rem; color: var(--ink-soft); max-width: 34rem; }
.hero-copy p + p { margin-top: 0.9rem; }
.hero-ctas { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2.1rem; flex-wrap: wrap; }
.hero-note { margin-top: 0.9rem; font-size: 0.83rem; color: var(--ink-faint); }

.hero-visual {
  width: 100%;
  max-width: 52rem;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-line);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7), 0 0 0 1px rgba(110,201,230,0.08);
}
.hero-visual img { width: 100%; height: auto; }

/* ============ 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; }
}

/* ============ specimen cards (applications) ============ */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
@media (max-width: 900px) { .app-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .app-grid { grid-template-columns: 1fr; } }
.specimen-card {
  position: relative;
  background: linear-gradient(160deg, rgba(20,38,52,0.7), rgba(10,18,26,0.7));
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  padding: 1.7rem 1.6rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.specimen-card:hover { border-color: var(--glass-line-strong); transform: translateY(-2px); }
.specimen-card::before, .specimen-card::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border-color: var(--circuit-cyan); opacity: 0.55;
}
.specimen-card::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; border-radius: 14px 0 0 0; }
.specimen-card::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; border-radius: 0 0 14px 0; }
.specimen-card .icon { width: 38px; height: 38px; margin-bottom: 1rem; color: var(--circuit-cyan); }
.specimen-card h3 { font-size: 1.1rem; margin-bottom: 0.55rem; }
.specimen-card p { color: var(--ink-soft); font-size: 0.95rem; }


/* ============ LED status badges ============ */
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  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);
}
.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; } }
.badge-future { color: var(--led-future); }
.badge-future .led { background: transparent; border: 1.4px dashed var(--led-future); }

/* ============ panel readouts (dev sections) ============ */
.dev-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
@media (max-width: 860px) { .dev-layout { grid-template-columns: 1fr; } }
.dev-copy p { color: var(--ink-soft); margin-top: 0.9rem; }
.dev-copy p:first-of-type { margin-top: 0; }
.panel-readout {
  background: linear-gradient(160deg, rgba(20,38,52,0.7), rgba(10,18,26,0.7));
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  padding: 1.7rem 1.8rem;
  align-self: start;
}
.panel-readout h4 { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1rem; font-weight: 500; }
.cap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.cap-list.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .cap-list.two-col { grid-template-columns: 1fr; } }
.cap-list li { font-size: 0.9rem; color: var(--ink); display: flex; gap: 0.5rem; align-items: flex-start; }
.cap-list li::before { content: ""; width: 5px; height: 5px; margin-top: 0.55em; border-radius: 50%; background: var(--circuit-cyan); flex-shrink: 0; opacity: 0.8; }
.future .cap-list li::before { background: var(--led-future); }
.concept-mark { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; color: var(--ink-faint); margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--glass-line); }

/* ============ roadmap: three mini tanks ============ */
.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 860px) { .roadmap-grid { grid-template-columns: 1fr; } }
.mini-tank {
  border-radius: 18px; padding: 1.7rem 1.6rem; border: 1px solid var(--glass-line);
  position: relative; overflow: hidden;
}
.mini-tank .tank-window {
  display: block; width: 100%; height: 90px; border-radius: 10px; margin-bottom: 1.3rem;
  border: 1px solid var(--glass-line);
}
.mini-tank.state-available { background: linear-gradient(160deg, rgba(30,56,42,0.55), rgba(10,18,26,0.7)); }
.mini-tank.state-soon { background: linear-gradient(160deg, rgba(46,38,20,0.5), rgba(10,18,26,0.7)); }
.mini-tank.state-future { background: rgba(10,16,22,0.5); border-style: dashed; }
@media (prefers-reduced-motion: no-preference) {
  .tw-pulse { animation: led-pulse 1.8s ease-in-out infinite; }
}
.mini-tank h3 { font-size: 1.1rem; margin: 0.9rem 0 0.2rem; }
.mini-tank .tagline { font-size: 0.84rem; color: var(--ink-faint); margin-bottom: 1.2rem; display: block; }
.roadmap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.roadmap-list li { font-size: 0.94rem; display: flex; gap: 0.6rem; align-items: flex-start; }
.state-available .roadmap-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--led-available); box-shadow: 0 0 6px 1px var(--led-available-glow); margin-top: 0.45em; flex-shrink: 0; }
.state-soon .roadmap-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--led-soon); box-shadow: 0 0 6px 1px var(--led-soon-glow); margin-top: 0.45em; flex-shrink: 0; }
.state-future .roadmap-list li { color: var(--ink-faint); }
.state-future .roadmap-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1.4px dashed var(--led-future); margin-top: 0.45em; flex-shrink: 0; }

/* Tier variants of the mini-tank — same component, reused on habisync.html's
   Tiers section for Lite/Plus/AI Keeper. Kept as separate classes from
   state-available/soon/future above (which keep their original "shipped vs.
   coming vs. future" meaning on roadmap.html) rather than overloading one
   set of names with two different meanings. */
.mini-tank.tier-lite { background: linear-gradient(160deg, rgba(30,56,42,0.55), rgba(10,18,26,0.7)); }
.mini-tank.tier-plus { background: linear-gradient(160deg, rgba(46,38,20,0.5), rgba(10,18,26,0.7)); }
/* Solid border, teal-tinted gradient — reads as premium/confident, not
   speculative. All three tiers ship at launch; this is a price tier, not
   a rollout stage, so it shouldn't borrow roadmap.html's "not real yet"
   dashed-border language. */
.mini-tank.tier-ai { background: linear-gradient(160deg, rgba(20,50,50,0.55), rgba(10,18,26,0.7)); border-color: rgba(79,209,197,0.35); }
.tier-lite .roadmap-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--led-available); box-shadow: 0 0 6px 1px var(--led-available-glow); margin-top: 0.45em; flex-shrink: 0; }
.tier-plus .roadmap-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--led-soon); box-shadow: 0 0 6px 1px var(--led-soon-glow); margin-top: 0.45em; flex-shrink: 0; }
.tier-ai .roadmap-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--circuit-teal); box-shadow: 0 0 6px 1px rgba(79,209,197,0.5); margin-top: 0.45em; flex-shrink: 0; }

/* ============ tier hints (Applications cards) ============ */
.tier-hint { margin-top: 0.75rem; font-size: 0.85rem; color: var(--ink-soft); }
.tier-hint strong { color: var(--ink); }

/* ============ final CTA / access panel ============ */
.cta-panel { max-width: 44rem; margin: 0 auto; text-align: center; }
.cta-panel h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.cta-panel .measure { margin: 1rem auto 0; color: var(--ink-soft); }
.interest-options {
  flex-basis: 100%; 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: 2.2rem 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: var(--led-soon); }
.site-footer {
  margin-top: 4.5rem; padding-top: 2rem; 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);
}
.site-footer .brand-plate { padding: 0.3rem 0.65rem; }
.site-footer .brand-plate img { height: 18px; }
