/* FixFlex — home redesign 2026-07
   Palette: ink-navy base, brand cyan as electric signal, violet depth,
   phosphor green = "running", amber = "new / open-source".
   Type: Unbounded (display) / Inter (body) / JetBrains Mono (status voice). */

:root {
  --bg0: #04060c;
  --bg1: #0a101d;
  --ink: #0d1526;
  --line: rgba(140, 170, 220, 0.13);
  --cyan: #00e5ff;
  --violet: #7c5cff;
  --green: #3cf5a6;
  --amber: #ffb547;
  --t1: #eaf1fb;
  --t2: #93a1b8;
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg0);
  color: var(--t1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.mono { font-family: var(--font-mono); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.nav.scrolled {
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--t1);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.nav-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-links a {
  color: var(--t2);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--t1); background: rgba(140, 170, 220, 0.08); }
.nav-links a.active { color: var(--cyan); }
.nav-links a.nav-ebooks { color: var(--amber); font-weight: 600; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--t1);
  margin: 4px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 40px) 0 40px;
  overflow: hidden;
}
.hero-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 600px at 78% 32%, rgba(0, 229, 255, 0.09), transparent 60%),
    radial-gradient(900px 700px at 20% 85%, rgba(124, 92, 255, 0.08), transparent 60%),
    var(--bg0);
}
.hero-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 24%, rgba(234, 241, 251, 0.5), transparent 100%),
    radial-gradient(1px 1px at 68% 12%, rgba(234, 241, 251, 0.35), transparent 100%),
    radial-gradient(1.5px 1.5px at 84% 46%, rgba(0, 229, 255, 0.5), transparent 100%),
    radial-gradient(1px 1px at 42% 68%, rgba(234, 241, 251, 0.3), transparent 100%),
    radial-gradient(1px 1px at 92% 78%, rgba(124, 92, 255, 0.45), transparent 100%),
    radial-gradient(1.5px 1.5px at 28% 42%, rgba(234, 241, 251, 0.4), transparent 100%),
    radial-gradient(1px 1px at 55% 33%, rgba(0, 229, 255, 0.35), transparent 100%);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
#hero-canvas.on { opacity: 1; }
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}
.statusline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--t2);
  border: 1px solid var(--line);
  background: rgba(10, 16, 29, 0.6);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 28px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(60, 245, 166, 0.6);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(60, 245, 166, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(60, 245, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(60, 245, 166, 0); }
}
.statusline .ok { color: var(--green); }
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.3rem, 5.6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}
.hero-title .accent {
  background: linear-gradient(100deg, var(--cyan) 20%, var(--violet) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  color: var(--t2);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 560px;
  margin-bottom: 38px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 64px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: linear-gradient(100deg, #00c8e0, var(--violet));
  color: #fff;
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.22);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0, 229, 255, 0.32); }
.btn-ghost {
  background: rgba(10, 16, 29, 0.5);
  border-color: var(--line);
  color: var(--t1);
}
.btn-ghost:hover { border-color: rgba(0, 229, 255, 0.5); transform: translateY(-2px); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 64px);
}
.hstat { font-family: var(--font-mono); }
.hstat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  color: var(--t1);
  line-height: 1.2;
}
.hstat > span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t2);
}
.hstat.green b { color: var(--green); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--t2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.6; }
  50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* ---------- stack marquee ---------- */

.stack-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 16, 29, 0.55);
  overflow: hidden;
  position: relative;
  padding: 16px 0;
}
.stack-strip::before,
.stack-strip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}
.stack-strip::before { left: 0; background: linear-gradient(to right, var(--bg0), transparent); }
.stack-strip::after { right: 0; background: linear-gradient(to left, var(--bg0), transparent); }
.stack-track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: strip 36s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--t2);
  white-space: nowrap;
}
.stack-track i { color: rgba(0, 229, 255, 0.55); font-style: normal; }
@keyframes strip {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- sections ---------- */

.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 70px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  display: block;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-sub { color: var(--t2); font-size: 1.05rem; }

/* ---------- product deck ---------- */

.deck { display: flex; flex-direction: column; gap: 20px; }
.deck-item { position: sticky; }
.deck-item:nth-child(1) { top: calc(var(--nav-h) + 8px); }
.deck-item:nth-child(2) { top: calc(var(--nav-h) + 22px); }
.deck-item:nth-child(3) { top: calc(var(--nav-h) + 36px); }
.deck-item:nth-child(4) { top: calc(var(--nav-h) + 50px); }
.deck-item:nth-child(5) { top: calc(var(--nav-h) + 64px); }

.panel {
  position: relative;
  min-height: min(620px, calc(100svh - var(--nav-h) - 90px));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(28px, 4vw, 64px);
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #0e1628 0%, #0a101d 55%, #080d18 100%);
  overflow: hidden;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.55);
}
.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 420px at 82% 20%, var(--tint, rgba(0, 229, 255, 0.1)), transparent 65%);
  pointer-events: none;
}
.panel-ghost {
  position: absolute;
  right: -0.05em;
  bottom: -0.28em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(9rem, 24vw, 21rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(140, 170, 220, 0.1);
  pointer-events: none;
  user-select: none;
}
.panel-body { position: relative; z-index: 1; }
.panel-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.panel-status.live {
  color: var(--green);
  border: 1px solid rgba(60, 245, 166, 0.35);
  background: rgba(60, 245, 166, 0.07);
}
.panel-status.oss {
  color: var(--amber);
  border: 1px solid rgba(255, 181, 71, 0.4);
  background: rgba(255, 181, 71, 0.07);
}
.panel-status .pulse-dot { width: 7px; height: 7px; }
.panel-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 8px;
}
.panel-tag {
  font-family: var(--font-mono);
  color: var(--t2);
  font-size: 0.88rem;
  margin-bottom: 22px;
}
.panel-desc { color: var(--t2); max-width: 480px; margin-bottom: 26px; }
.panel-tech { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--t1);
  border: 1px solid var(--line);
  background: rgba(140, 170, 220, 0.07);
  border-radius: 8px;
  padding: 5px 12px;
}
.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--t1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 24px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.panel-link:hover {
  border-color: rgba(0, 229, 255, 0.55);
  background: rgba(0, 229, 255, 0.07);
  transform: translateY(-2px);
}
.panel-link .arr { transition: transform 0.2s ease; }
.panel-link:hover .arr { transform: translateX(4px); }

.panel-visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.panel-logo {
  width: clamp(160px, 18vw, 250px);
  height: clamp(160px, 18vw, 250px);
  border-radius: 32px;
  object-fit: cover;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px var(--line),
    0 0 90px var(--tint, rgba(0, 229, 255, 0.16));
  animation: float 7s ease-in-out infinite;
}
.panel-logo.contain { object-fit: contain; background: #fff; padding: 18px; }
.panel-logo.contain-dark { object-fit: contain; background: #0f172a; padding: 18px; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50% { transform: translateY(-16px) rotate(1.2deg); }
}

/* ---------- deploy / services ---------- */

.deploy { background: linear-gradient(180deg, var(--bg0), var(--bg1) 40%, var(--bg0)); }
.deploy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.svc-list { list-style: none; display: flex; flex-direction: column; }
.svc {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease, padding-left 0.2s ease;
}
.svc:first-child { border-top: 1px solid var(--line); }
.svc:hover { background: rgba(0, 229, 255, 0.04); padding-left: 12px; }
.svc code {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--cyan);
  min-width: 76px;
}
.svc h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 2px; }
.svc p { color: var(--t2); font-size: 0.88rem; margin: 0; }

.term {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #060a13;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 229, 255, 0.05);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 21, 38, 0.7);
}
.term-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2a3650;
}
.term-bar i:nth-child(1) { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--t2);
}
.term-body {
  padding: 22px 20px 26px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 2.1;
  min-height: 300px;
  color: var(--t2);
}
.term-body .ln { display: block; white-space: pre-wrap; }
.term-body .cmd { color: var(--t1); }
.term-body .cmd::before { content: '$ '; color: var(--cyan); }
.term-body .out::before { content: '  → '; color: rgba(140, 170, 220, 0.5); }
.term-body .ok { color: var(--green); }
.term-body .ok::before { content: '  ✓ '; }
.term-caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--cyan);
  vertical-align: -2px;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* ---------- ebook band ---------- */

.ebook-band {
  border-top: 1px solid rgba(255, 181, 71, 0.22);
  border-bottom: 1px solid rgba(255, 181, 71, 0.22);
  background: linear-gradient(100deg, rgba(255, 181, 71, 0.06), rgba(124, 92, 255, 0.05));
  padding: 26px 0;
}
.ebook-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 22px;
  text-align: center;
}
.ebook-inner .lbl { font-family: var(--font-mono); font-size: 0.78rem; color: var(--amber); letter-spacing: 0.08em; text-transform: uppercase; }
.ebook-inner .ttl { font-weight: 700; }
.btn-amber {
  background: linear-gradient(100deg, var(--amber), #ff8a00);
  color: #1a1206;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
}
.btn-amber:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(255, 181, 71, 0.3); }

/* ---------- cta ---------- */

.cta { text-align: center; overflow: hidden; }
.cta-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.12;
  margin-bottom: 18px;
}
.cta-sub { color: var(--t2); max-width: 520px; margin: 0 auto 36px; }
.cta .glow {
  position: absolute;
  left: 50%;
  bottom: -220px;
  transform: translateX(-50%);
  width: 900px;
  height: 400px;
  background: radial-gradient(closest-side, rgba(0, 229, 255, 0.14), rgba(124, 92, 255, 0.08), transparent);
  pointer-events: none;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg1);
  padding: 64px 0 32px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.footer-brand b { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.footer p { color: var(--t2); }
.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t1);
  margin-bottom: 16px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul a { color: var(--t2); transition: color 0.2s ease; }
.footer ul a:hover { color: var(--cyan); }
.footer .oss-note { color: var(--green); font-size: 0.78rem; }
.footer-contact li { color: var(--t2); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--t2);
  font-size: 0.82rem;
}
.footer-bottom a { color: var(--cyan); }

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 992px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(4, 6, 12, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; font-size: 1rem; }
  .panel { grid-template-columns: 1fr; min-height: 0; gap: 8px; }
  .panel-visual { order: -1; justify-content: flex-start; margin-bottom: 18px; }
  .panel-logo { width: 110px; height: 110px; border-radius: 22px; animation: none; }
  .panel-ghost { font-size: 8rem; }
  .deck-item { position: static; }
  .deploy-grid { grid-template-columns: 1fr; }
  .term { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .container { width: calc(100% - 36px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stack-track { animation: none; }
  .panel-logo { animation: none; }
  .pulse-dot { animation: none; }
  .scroll-cue { animation: none; }
  .term-caret { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
