/* ============================================================
   Fast Lightcurve Inspector — Landing page
   Self-contained (no Bootstrap): utility classes are defined
   here, so heading colors can never be overridden by a later
   stylesheet. Dark "observatory" base + editorial layout.
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #080b12;
  --bg-2: #0b0f18;
  --surface: #10151f;
  --surface-2: #141b28;
  --surface-3: #18202f;

  /* Lines */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #e8ecf4;
  --text-2: #9aa6bd;
  --text-3: #64708a;

  /* Accents — "flux" teal/cyan signal + a sparing star gold */
  --accent: #2dd4bf;          /* teal-400 */
  --accent-2: #58b7ff;        /* sky */
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-line: rgba(45, 212, 191, 0.35);
  --star: #fcd34d;            /* transit marker / star highlight */

  /* Status */
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.12);

  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;

  --mono: ui-monospace, "SF Mono", "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Star-field / grid backdrop — very subtle, fixed */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(45, 212, 191, 0.10), transparent 60%),
    radial-gradient(900px 600px at 10% 4%, rgba(88, 183, 255, 0.08), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.4px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 50% 22%, black, transparent 72%);
          mask-image: radial-gradient(circle at 50% 22%, black, transparent 72%);
}

/* ---------- utility (own, not Bootstrap) ---------- */
.d-none { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

a { color: inherit; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand-name { font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-name small {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-top: -2px;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-ghost:hover { color: var(--text); background: var(--surface-2); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary {
  color: #05201c;
  background: linear-gradient(180deg, #45e0cf, var(--accent));
  box-shadow: 0 8px 24px -12px rgba(45, 212, 191, 0.9);
}
.btn-primary:hover { box-shadow: 0 12px 30px -10px rgba(45, 212, 191, 0.85); transform: translateY(-1px); }

.btn-ghost {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--surface-3); border-color: var(--text-3); }

.btn-lg { padding: 15px 26px; font-size: 1rem; border-radius: 12px; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: 66px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 54px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.15rem, 4.6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--text);
  margin: 18px 0 0;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent); /* fallback if clip unsupported */
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-2);
  max-width: 40ch;
  margin: 20px 0 0;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }

/* ---------- Hero "plot panel" (product-led, real-looking) ---------- */
.panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.panel-bar .tt {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-2);
}
.panel-bar .tt b { color: var(--text); font-weight: 600; }
.panel-bar .badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 999px;
}
.dotrow { display: flex; gap: 6px; }
.dotrow i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); display: inline-block; }
.panel-body { padding: 14px 16px 18px; }

/* Light-curve SVG in the hero panel */
.lc-svg { width: 100%; height: auto; display: block; }
.lc-grid line { stroke: var(--line); stroke-width: 1; }
.lc-axis { stroke: var(--line-strong); stroke-width: 1; }
.lc-pts circle { fill: var(--text-3); opacity: 0.55; }
.lc-model {
  fill: none;
  stroke: url(#fluxgrad);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: draw 2.6s ease-out 0.2s forwards;
  filter: drop-shadow(0 0 6px rgba(45, 212, 191, 0.5));
}
.lc-marker {
  fill: var(--star);
  opacity: 0;
  animation: pop 0.5s ease-out 2.2s forwards;
  filter: drop-shadow(0 0 6px rgba(252, 211, 77, 0.8));
}
.lc-label {
  font-family: var(--mono);
  font-size: 11px;
  fill: var(--text-3);
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }

.panel-foot {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}
.stat { font-family: var(--mono); font-size: 0.76rem; color: var(--text-3); }
.stat b { color: var(--text); font-weight: 600; }

/* ============================================================
   Credibility strip
   ============================================================ */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}
.strip-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  padding: 18px 24px;
}
.strip-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.strip-items { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.strip-items span {
  font-size: 0.92rem;
  color: var(--text-2);
  font-weight: 500;
}
.strip-items .strip-sep {
  width: 1px;
  height: 16px;
  padding: 0;
  background: var(--line-strong);
}
.strip-items .pipe { color: var(--text); }

/* ============================================================
   Section scaffolding
   ============================================================ */
section.block { padding: 76px 0; }
.section-head { max-width: 60ch; margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
  margin: 12px 0 0;
}
.section-head p {
  color: var(--text-2);
  margin-top: 12px;
  font-size: 1.02rem;
}

/* ---------- How it works (3 steps) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
}
.step .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.step p { color: var(--text-2); font-size: 0.92rem; margin-top: 6px; }

/* ============================================================
   Tools showcase
   ============================================================ */
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tools .wide { grid-column: 1 / -1; }

.tool {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.tool:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -34px rgba(45, 212, 191, 0.6);
}
.tool-figure {
  height: 128px;
  background:
    radial-gradient(420px 160px at 50% -40%, rgba(45, 212, 191, 0.10), transparent 70%),
    var(--surface-2);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.tool-figure svg { width: 100%; height: 100%; }
.tool-body { padding: 18px 20px 20px; }
.tool-body h3 {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 9px;
}
.tool-body p { color: var(--text-2); font-size: 0.92rem; margin-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 7px;
}

/* mini-figure shared strokes */
.mini-grid { stroke: var(--line); stroke-width: 1; }
.mini-axis { stroke: var(--line-strong); stroke-width: 1; }
.mini-flux { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mini-flux-2 { fill: none; stroke: var(--accent-2); stroke-width: 2; stroke-linecap: round; }
.mini-pt { fill: var(--text-3); }
.mini-pt-a { fill: var(--accent); }
.mini-star { fill: var(--star); }
.mini-fill { fill: var(--accent-soft); }

/* ============================================================
   Final CTA
   ============================================================ */
.cta {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 54px 32px;
  text-align: center;
  background:
    radial-gradient(700px 300px at 50% -30%, rgba(45, 212, 191, 0.14), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  overflow: hidden;
}
.cta h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
}
.cta p { color: var(--text-2); margin: 12px auto 0; max-width: 46ch; }
.cta .hero-cta { justify-content: center; margin-top: 26px; }

/* ============================================================
   Footer
   ============================================================ */
.foot {
  border-top: 1px solid var(--line);
  padding: 30px 0 40px;
  margin-top: 10px;
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot small { color: var(--text-3); font-size: 0.85rem; }
.foot-links { display: flex; gap: 18px; align-items: center; }
.foot-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.15s ease;
}
.foot-links a:hover { color: var(--text); }

/* ============================================================
   Auth modal (IDs/classes consumed by landing.js — keep names)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 9, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.auth-modal {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 30px 28px 28px;
  position: relative;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.85);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease;
}
.modal-overlay.active .auth-modal { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.modal-close:hover { color: var(--text); background: var(--surface-2); }

.modal-header { text-align: center; margin-bottom: 22px; }
.modal-logo { width: 44px; height: 44px; border-radius: 10px; margin-bottom: 12px; }
.modal-title { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.modal-subtitle { font-size: 0.9rem; color: var(--text-2); margin-top: 6px; }

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 12px;
  background: #fff;
  color: #1f2430;
  font-weight: 600;
  font-size: 0.94rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.btn-google:hover { box-shadow: 0 10px 26px -14px rgba(255, 255, 255, 0.5); transform: translateY(-1px); }
.btn-google:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.google-icon { width: 18px; height: 18px; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-3);
  font-size: 0.78rem;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-form { display: flex; flex-direction: column; gap: 11px; }
.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.94rem;
  font-family: var(--sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input::placeholder { color: var(--text-3); }
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn-submit {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
  color: #05201c;
  background: linear-gradient(180deg, #45e0cf, var(--accent));
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -12px rgba(45, 212, 191, 0.8); }
.form-toggle { text-align: center; margin-top: 14px; font-size: 0.86rem; color: var(--text-2); }
.form-toggle a { color: var(--accent); text-decoration: none; font-weight: 600; }
.form-toggle a:hover { text-decoration: underline; }

/* alerts (created by landing.js: .alert .alert-danger/-success) */
.alert {
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 0.86rem;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert-danger { color: var(--danger); background: var(--danger-bg); border-color: rgba(248, 113, 113, 0.3); }
.alert-success { color: var(--success); background: var(--success-bg); border-color: rgba(52, 211, 153, 0.3); }
.alert-warning { color: var(--warning); background: var(--warning-bg); border-color: rgba(251, 191, 36, 0.3); }
.alert-info { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }

/* spinner */
.spinner-container { display: flex; justify-content: center; padding: 14px 0; }
.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero { padding: 44px 0 20px; }
  .hero-sub { max-width: none; }
  .steps { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr; }
  .brand-name small { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  section.block { padding: 56px 0; }
  .nav-ghost.hide-sm { display: none; }
  .cta { padding: 40px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
  .lc-model { stroke-dashoffset: 0; }
  .lc-marker { opacity: 1; }
}
