/* ============================================================
   AI Unafraid — custom styles
   Built on Tailwind + brand design tokens (see index.html config)
   Brand palette: Rich black #001011 · Yellow green #98ce00 ·
   Pale azure #6ccff6 · Payne's gray #4f6367 · Honeydew #e5f4e3
   Typography: Jost (display, ≈ Century Gothic) · Inter (body)
   ============================================================ */

:root {
  --ink: #001011;
  --accent: #98ce00;
  --accent-dk: #84b500;
  --payne: #4f6367;
}

html { scroll-behavior: smooth; }

body { -webkit-font-smoothing: antialiased; }

/* Heading rhythm ≈ brand tracking (-20 for headings) */
.font-display { letter-spacing: -0.02em; }

/* Header height helper */
.h-18 { height: 4.5rem; }

/* ---------- Header states ---------- */
#site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 1px 0 0 rgba(0, 16, 17, 0.06), 0 10px 30px -20px rgba(0, 16, 17, 0.25);
}

/* ---------- Nav links ---------- */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--ink); }

.mobile-link {
  display: block;
  padding: 0.625rem 0.5rem;
  border-radius: 0.75rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.mobile-link:hover { background: #e5f4e3; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.625rem 1.25rem;
  font-size: 0.95rem;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 8px 24px -10px rgba(152, 206, 0, 0.7);
}
.btn-primary:hover {
  background: var(--accent-dk);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(152, 206, 0, 0.65);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid #e2e6ea;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-dk);
  transform: translateY(-2px);
}

.btn-lg { padding: 0.85rem 1.6rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* Focus visibility (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Section helpers ---------- */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dk);
}
.section-title {
  font-family: 'Jost', 'Century Gothic', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  line-height: 1.12;
  color: var(--ink);
}

/* ---------- Page background ---------- */
/* Slow, elegant animated brand gradient across the whole homepage.
   Fixed layer behind all content; transparent sections reveal it. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, #dff3da 0%, #eef8ec 28%, #eaf6f9 60%, #d3ecf3 100%);
  background-size: 200% 200%;
  animation: hero-pan 22s ease-in-out infinite;
}
@keyframes hero-pan {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ---------- Hero ---------- */
/* Soft radial gradient glow behind the hero content */
.hero-glow {
  background:
    radial-gradient(55% 46% at 50% 10%, rgba(152, 206, 0, 0.20), transparent 70%),
    radial-gradient(46% 46% at 82% 26%, rgba(108, 207, 246, 0.20), transparent 72%),
    radial-gradient(44% 44% at 16% 30%, rgba(184, 216, 216, 0.20), transparent 72%);
}

/* Shimmering gradient accent on the headline */
.hero-shine { color: var(--accent); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-shine {
    background: linear-gradient(90deg, #98ce00, #6ccff6, #98ce00);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: hero-shine 6s linear infinite;
  }
}
@keyframes hero-shine {
  to { background-position: 200% center; }
}

/* Staggered entrance (delay set inline per element) */
.hero-anim {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes hero-rise {
  to { opacity: 1; transform: none; }
}

/* ---------- Section background effects ----------
   Each section from About onward gets a distinct backdrop. */
/* About: soft green glow fading to white */
.sec-about {
  background:
    radial-gradient(75% 60% at 15% 0%, rgba(152, 206, 0, 0.14), transparent 60%),
    linear-gradient(180deg, #edf8ea 0%, #ffffff 100%);
}
/* Products: azure glow rising into a blue tint */
.sec-products {
  background:
    radial-gradient(65% 60% at 85% 8%, rgba(108, 207, 246, 0.18), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #e7f4f8 100%);
}
/* Contact: subtle dot-grid pattern on a light wash */
.sec-contact {
  background-color: #f4faf6;
  background-image: radial-gradient(rgba(79, 99, 103, 0.10) 1px, transparent 1.5px);
  background-size: 22px 22px;
}
/* Privacy: rich black with a soft accent glow up top */
.sec-privacy {
  background-color: var(--ink);
  background-image: radial-gradient(70% 55% at 50% 0%, rgba(152, 206, 0, 0.12), transparent 60%);
}
/* Footer: light neutral gradient */
.sec-footer {
  background: linear-gradient(180deg, #ffffff 0%, #eceff2 100%);
}

/* ---------- Contact form ---------- */
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 0.4rem; }
.form-input {
  width: 100%;
  border: 1px solid #e2e6ea;
  background: #fbfcfc;
  border-radius: 0.9rem;
  padding: 0.7rem 0.95rem;
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.form-input::placeholder { color: #9aa7a8; }
.form-input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(152, 206, 0, 0.15);
  outline: none;
}
.form-input.invalid { border-color: #e0556b; box-shadow: 0 0 0 4px rgba(224, 85, 107, 0.12); }
.form-error { margin-top: 0.35rem; font-size: 0.78rem; color: #d23b54; min-height: 0; }

/* ---------- Privacy policy ---------- */
.policy-h { font-family: 'Jost', sans-serif; font-weight: 600; font-size: 1.05rem; color: #ffffff; }
.policy-p { margin-top: 0.5rem; color: #b8d8d8; font-size: 0.95rem; line-height: 1.6; }
.policy-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.policy-link:hover { color: #b6f000; }

/* ---------- Footer ---------- */
.footer-h { font-family: 'Jost', sans-serif; font-weight: 600; font-size: 0.9rem; color: var(--ink); letter-spacing: 0.02em; }
.footer-link {
  color: var(--payne);
  transition: color 0.18s ease;
  background: none; border: none; padding: 0; font: inherit; cursor: pointer; text-align: left;
}
.footer-link:hover { color: var(--accent-dk); }

/* ---------- Cookie toggles ---------- */
.toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 3rem; height: 1.65rem;
  background: #cdcfd1;
  border-radius: 9999px;
  position: relative;
  transition: background-color 0.22s ease;
}
.toggle-thumb {
  position: absolute;
  top: 0.2rem; left: 0.2rem;
  width: 1.25rem; height: 1.25rem;
  background: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.22s ease;
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(1.35rem); }
.cookie-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e2e6ea;
  border-radius: 1.1rem;
  background: #fbfcfc;
}
.cookie-row-h { font-family: 'Jost', sans-serif; font-weight: 600; color: var(--ink); font-size: 0.98rem; }
.cookie-row-p { margin-top: 0.3rem; font-size: 0.84rem; color: var(--payne); line-height: 1.5; }

/* ---------- Scroll reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: none; }

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  body::before, .hero-shine { animation: none !important; }
  .hero-anim { animation: none !important; opacity: 1 !important; transform: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.05ms !important; }
}
