/* Fennix Store — landing page (HTML/CSS/JS puro) */

:root {
  --radius: 10px;
  --background: #ffffff;
  --foreground: #0b1220;
  --primary: #3b82c4;
  --primary-hover: #3474b1;
  --primary-foreground: #ffffff;
  --secondary: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e5e9f0;
  --max: 1152px;
}

html.dark {
  --background: #0b1220;
  --foreground: #f8fafc;
  --primary: #6fb2e8;
  --primary-hover: #85bfee;
  --primary-foreground: #0b1220;
  --secondary: #1c2637;
  --muted-foreground: #9aa8bd;
  --border: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; border-color: var(--border); }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3 { font-family: "Sora", "Inter", sans-serif; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
img { display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-sm { padding: 10px 16px; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { border-color: var(--border); color: var(--foreground); }
.btn-outline:hover { background: var(--secondary); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { background: var(--secondary); color: var(--foreground); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Loading screen ---------- */
.loader-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--background);
  transition: opacity 0.5s ease;
}
.loader-screen.hidden { opacity: 0; pointer-events: none; }
.loader-logo { width: 56px; height: 56px; object-fit: contain; }

.fx-loader .fx-container { overflow: visible; }
.fx-loader .track,
.fx-loader .car { fill: none; stroke-width: 2.5; }
.fx-loader .track { stroke: var(--border); }
.fx-loader .car {
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-dasharray: 25 75;
  animation: fxBorderMove 2s linear infinite;
}
.fx-loader .lines line {
  stroke: var(--muted-foreground);
  stroke-width: 3;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: fxTypeLine 2.4s ease-in-out infinite;
}
.fx-loader .lines .indent { stroke: var(--primary); }
.fx-loader .lines line:nth-child(1) { --len: 20; animation-delay: 0s; }
.fx-loader .lines line:nth-child(2) { --len: 14; animation-delay: 0.3s; }
.fx-loader .lines line:nth-child(3) { --len: 24; animation-delay: 0.6s; }
.fx-loader .lines line:nth-child(4) { --len: 10; animation-delay: 0.9s; }

@keyframes fxBorderMove { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes fxTypeLine {
  0% { stroke-dashoffset: var(--len); opacity: 0.3; }
  35%, 70% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0.15; }
}

/* ---------- Navbar ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.header.scrolled {
  background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.brand img { width: 32px; height: 32px; object-fit: contain; }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted-foreground); transition: color 0.2s ease; }
.nav-links a:hover { color: var(--foreground); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.only-mobile { display: none; }

.mobile-menu[hidden] { display: none; }
.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  background: var(--background);
}
.mobile-menu a:not(.btn) {
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.mobile-menu a:not(.btn):hover { color: var(--foreground); }
.mobile-menu .btn { margin-top: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 176px 24px 96px; }
.hero-glow {
  position: absolute;
  top: -224px;
  left: 50%;
  width: 34rem;
  height: 34rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  filter: blur(64px);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 768px; margin: 0 auto; text-align: center; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.hero h1 { margin-top: 28px; font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.1; font-weight: 600; }
.accent { color: var(--primary); }
.lead { max-width: 36rem; margin: 20px auto 0; font-size: 17px; color: var(--muted-foreground); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.fineprint { margin-top: 20px; font-size: 12px; color: var(--muted-foreground); }

/* ---------- Sections ---------- */
.section { border-top: 1px solid var(--border); padding: 96px 24px; }
.section h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 600; }
.section-sub { max-width: 36rem; margin-top: 12px; color: var(--muted-foreground); }
.cta { max-width: 768px; margin: 0 auto; text-align: center; }
.cta .section-sub { margin-left: auto; margin-right: auto; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 48px; margin-top: 56px; }
.grid-3 h3 { font-size: 15px; font-weight: 600; }
.grid-3 p { margin-top: 8px; font-size: 14px; color: var(--muted-foreground); }
.step { border-top: 1px solid var(--border); padding-top: 20px; }
.step-n { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; color: var(--primary); }
.step h3 { margin-top: 12px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer .brand img { width: 24px; height: 24px; }
.footer .brand span { font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; color: var(--muted-foreground); }
.footer-links a:hover { color: var(--foreground); }
.copy { font-size: 12px; color: var(--muted-foreground); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 1024px) {
  .mobile-menu { display: none !important; }
}
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .only-mobile { display: grid; }
}
@media (max-width: 767px) {
  .grid-3 { grid-template-columns: 1fr; }
  .hero { padding-top: 144px; }
  .actions .btn { width: 100%; }
}
@media (max-width: 639px) {
  .hide-mobile { display: none; }
  .footer-inner { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
