/* style.css — layout & glassmorphic styles */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% 10%, rgba(59,130,246,0.06), transparent 60%),
              radial-gradient(1200px 800px at 90% 20%, rgba(147,51,234,0.06), transparent 60%),
              var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Glass + utility */
.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.section {
  width: min(1120px, 92%);
  margin: 64px auto;
}

.section-title {
  font-size: clamp(1.3rem, 1.6vw + 1rem, 2rem);
  margin: 0 0 24px;
  text-align: center;
}

/* Header / Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  margin: 12px auto 24px;
  width: min(1120px, 92%);
  padding: 10px 16px;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.logo-emoji {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--gradient);
  color: white;
  box-shadow: var(--glow);
  font-size: 14px;
}
.menu {
  display: flex;
  align-items: center;
  gap: 18px;
}
.menu a {
  text-decoration: none;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  transition: transform var(--speed), background var(--speed), box-shadow var(--speed);
}
.menu a:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.06);
  box-shadow: var(--glow);
}
.menu a.active {
  background: rgba(255,255,255,0.10);
  box-shadow: var(--glow);
}

/* Theme toggle */
.theme-toggle {
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform var(--speed), box-shadow var(--speed), background var(--speed);
}
.theme-toggle:hover { box-shadow: var(--glow); transform: translateY(-2px); }
.theme-toggle .icon-sun { display: none; }
body.light .theme-toggle .icon-sun { display: inline; }
body.light .theme-toggle .icon-moon { display: none; }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
}
.hamburger span {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px; background: var(--text);
  transition: transform var(--speed), opacity var(--speed), top var(--speed);
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 28px; }
.hamburger.active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Hero */
.hero {
  width: min(1120px, 92%);
  margin: 18px auto 0;
  padding: 48px 24px 64px;
  position: relative;
  overflow: hidden;
}
.hero-compact { padding: 32px 24px; }
.hero-inner {
  text-align: center;
}
.logo-wrap { margin: 8px auto 12px; }
.title {
  font-size: clamp(1.8rem, 2.5vw + 1rem, 3rem);
  margin: 8px 0 8px;
}
.subtitle {
  color: var(--muted);
  margin: 0 auto 22px;
  max-width: 760px;
}

/* Gradient background shimmer */
.hero-bg-gradient {
  pointer-events: none;
  position: absolute;
  inset: -30%;
  background: radial-gradient(400px 280px at 15% 20%, rgba(59,130,246,0.18), transparent 60%),
              radial-gradient(560px 380px at 85% 30%, rgba(147,51,234,0.18), transparent 60%);
  filter: blur(20px);
  z-index: -1;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--line);
  color: var(--text);
  transition: transform var(--speed), box-shadow var(--speed), background var(--speed);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.btn.primary {
  background: var(--gradient);
  color: white;
  border: none;
}
.btn.ghost { background: transparent; }
.btn.on-gradient {
  background: white;
  color: #111;
  border: none;
}

/* Grid & cards */
.grid {
  display: grid;
  gap: 18px;
}
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  min-height: 120px;
}
.card h3, .card h2 { margin-top: 4px; }
.hover-glow { transition: transform var(--speed), box-shadow var(--speed), border-color var(--speed); }
.hover-glow:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow);
  border-color: rgba(147,51,234,0.35);
}

/* CTA band */
.cta-band {
  width: 100%;
  margin: 80px 0 0;
  background-image: var(--gradient);
}
.cta-band-inner {
  width: min(1120px, 92%);
  margin: 0 auto;
  padding: 46px 18px;
  text-align: center;
  color: white;
}
.cta-band .btn.on-gradient { margin-top: 10px; }

/* Timeline */
.timeline {
  position: relative;
  width: min(900px, 92%);
  margin: 0 auto;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(59,130,246,0.5), rgba(147,51,234,0.5));
}
.timeline-item {
  position: relative;
  padding-left: 44px;
  margin: 18px 0;
}
.timeline .dot {
  position: absolute;
  left: 6px; top: 10px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: var(--glow);
}
.timeline .content {
  padding: 14px 16px;
}

/* Product pills */
.product-grid .pill {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: white;
  background: var(--gradient);
  box-shadow: var(--glow);
}

/* Forms */
.form .form-row { margin-bottom: 16px; }
.form label { display: block; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 12px;
  outline: none;
  transition: border var(--speed), box-shadow var(--speed), transform var(--speed);
}
.form input:focus, .form textarea:focus {
  border-color: rgba(59,130,246,0.6);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}
.form .checkbox { display: inline-flex; align-items: center; gap: 8px; }
.form .error { color: #ff7b7b; height: 16px; display: block; margin-top: 6px; }

/* Footer */
.footer {
  width: 100%;
  margin-top: 80px;
  padding: 28px 0;
}
.footer-inner {
  width: min(1120px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.footer h4, .footer h5 { margin: 6px 0 10px; }
.footer a { color: var(--text); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Alignment */
.align-center { text-align: center; }

/* Active page helpers (set by JS) */
a[data-nav].active { pointer-events: none; }

/* Logo images */
.logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px; /* softens corners if image is square */
  filter: drop-shadow(0 4px 14px rgba(59,130,246,0.35))
          drop-shadow(0 2px 8px rgba(147,51,234,0.25));
}

.logo-hero {
  width: clamp(120px, 12vw + 80px, 180px);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 10px 30px rgba(59,130,246,0.28))
          drop-shadow(0 6px 16px rgba(147,51,234,0.22));
}

/* Optional: subtle outline in light mode so bright backgrounds don't wash it out */
body.light .logo-img,
body.light .logo-hero {
  outline: 1px solid rgba(0,0,0,0.06);
  outline-offset: 0;
  background: transparent;
  border-radius: 8px;
}

/* --- Responsive polish (fluid type, better hit targets) --- */
html { -webkit-text-size-adjust: 100%; }
body { text-size-adjust: 100%; }

.title { line-height: 1.2; }
.subtitle { line-height: 1.6; }

.menu a, .menu button.theme-toggle { min-height: 40px; }

/* Ensure images don't cause layout shift */
img[width][height] { height: auto; }

/* Improve hero readability on small screens */
@media (max-width: 767px) {
  .subtitle { max-width: 48ch; }
}
/* Prevent accidental layout shift from images on mobile */
img { max-width: 100%; height: auto; display: block; }
img.logo-hero { aspect-ratio: 1 / 1; }

/* Better hit targets in nav regardless of breakpoint */
.menu a, .menu button.theme-toggle { min-height: 40px; }

/* Slightly stronger ghost button text on dark backgrounds */
body.dark .btn.ghost { color: var(--text); border-color: var(--line); }
