/* ============================================================
   Cleenie — landing page styles
   Premium, calm, alive. Blues on near-white.
   ============================================================ */

:root {
  --blue: #4A90E2;
  --blue-deep: #2D6FC4;
  --blue-ink: #16365c;
  --ink: #16263d;
  --ink-soft: #51647e;
  --ink-faint: #7d8da3;
  --bg: #fafcff;
  --surface: #ffffff;
  --line: #e3ecf7;
  --tint: #eef5fd;
  --green: #57c690;
  --amber: #f4b740;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-sm: 0 1px 2px rgba(22, 54, 92, 0.05), 0 2px 8px rgba(22, 54, 92, 0.05);
  --shadow-md: 0 2px 6px rgba(22, 54, 92, 0.06), 0 12px 32px rgba(22, 54, 92, 0.10);
  --shadow-lg: 0 4px 12px rgba(22, 54, 92, 0.08), 0 24px 64px rgba(22, 54, 92, 0.16);
  --motion-scale: 1; /* tweakable: 1 = full, 0.4 = subtle, 0 = off */
}

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

/* .no-anim is set by JS when the environment freezes CSS transitions —
   reveals then snap instantly instead of staying invisible */
html.no-anim .reveal { transition: none !important; }

body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wordmark {
  font-family: "Pacifico", cursive;
  color: var(--blue);
  font-weight: 400;
}

::selection { background: rgba(74, 144, 226, 0.22); }

/* ---------- Animated background (hero + final CTA) ---------- */

.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: calc(0.55 * var(--orb-o, 1));
  will-change: transform;
}

.orb-a {
  width: 56vw; height: 56vw; min-width: 540px; min-height: 540px;
  left: -14vw; top: -22vw;
  background: radial-gradient(circle at 35% 35%, rgba(74, 144, 226, 0.36), rgba(74, 144, 226, 0) 68%);
  animation: drift-a 22s ease-in-out infinite alternate;
}
.orb-b {
  width: 44vw; height: 44vw; min-width: 460px; min-height: 460px;
  right: -12vw; top: -6vw;
  background: radial-gradient(circle at 60% 40%, rgba(125, 196, 255, 0.34), rgba(125, 196, 255, 0) 70%);
  animation: drift-b 26s ease-in-out infinite alternate;
}
.orb-c {
  width: 38vw; height: 38vw; min-width: 380px; min-height: 380px;
  left: 28vw; bottom: -18vw;
  background: radial-gradient(circle at 50% 50%, rgba(168, 214, 255, 0.30), rgba(168, 214, 255, 0) 70%);
  animation: drift-c 19s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(calc(6vw * var(--motion-scale)), calc(4vw * var(--motion-scale)), 0) scale(1.08); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(calc(-5vw * var(--motion-scale)), calc(5vw * var(--motion-scale)), 0) scale(0.96); }
}
@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(calc(4vw * var(--motion-scale)), calc(-3vw * var(--motion-scale)), 0) scale(1.1); }
}

/* grain overlay for a non-flat finish */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.35 0 0 0 0 0.45 0 0 0 0 0.6 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .aurora .orb { animation: none !important; }
}

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

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--rd, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
.no-motion .reveal { opacity: 1; transform: none; transition: none; }
.no-motion .aurora .orb { animation: none !important; }
.no-motion .btn-pulse::before { animation: none !important; }

/* ---------- Layout primitives ---------- */

.shell { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-deep);
}
.kicker::before {
  content: "";
  width: 22px; height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 14px 0 14px;
  text-wrap: balance;
}
.section-head p { color: var(--ink-soft); font-size: 17px; line-height: 1.65; text-wrap: pretty; }
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.centered .kicker::before { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15.5px;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background-color 0.18s ease, border-color 0.18s ease;
  will-change: transform;
}
.btn:active { transform: scale(0.97); transition-duration: 0.08s; }

.btn-primary {
  background: linear-gradient(180deg, #58a0ef, var(--blue) 55%, #3f84d6);
  color: #fff;
  box-shadow: 0 1px 2px rgba(45, 111, 196, 0.4), 0 6px 18px rgba(74, 144, 226, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(45, 111, 196, 0.4), 0 12px 30px rgba(74, 144, 226, 0.5);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--blue-ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: #c9dcf2;
  box-shadow: var(--shadow-md);
}

.btn-lg { padding: 17px 34px; font-size: 16.5px; }

/* soft, slow attention pulse for trial CTAs */
.btn-pulse { position: relative; }
.btn-pulse::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.35);
  animation: cta-glow 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
  50% { box-shadow: 0 0 0 7px rgba(74, 144, 226, calc(0.16 * var(--motion-scale))); }
}
@media (prefers-reduced-motion: reduce) { .btn-pulse::before { animation: none; } }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.nav.is-scrolled {
  background: rgba(250, 252, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(22, 54, 92, 0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  height: 74px;
}
.nav-logo { font-size: 27px; text-decoration: none; line-height: 1; padding-top: 2px; }
.nav-links { display: flex; gap: 28px; margin-left: 12px; }
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--blue-deep); }
.nav-cta { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.nav-cta .btn { padding: 10px 20px; font-size: 14px; }

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  margin-left: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer — hidden by default */
.nav-mobile-menu {
  display: none;
  position: absolute;
  top: 74px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid rgba(74, 144, 226, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  z-index: 49;
  flex-direction: column;
  padding: 8px 0 20px;
}
.nav-mobile-menu nav {
  display: flex;
  flex-direction: column;
}
.nav-mobile-menu nav a {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background 0.15s ease;
}
.nav-mobile-menu nav a:hover { background: rgba(74, 144, 226, 0.05); }
.nav-mobile-menu nav a.active { color: var(--blue-deep); }
.nav-mobile-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 24px 0;
}
.nav-mobile-cta .btn { text-align: center; width: 100%; justify-content: center; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile-menu.is-open { display: flex; }
}
