/* Hand-written component layer — recreates the site's look (glass nav,
   gradient CTAs, glow shadows, card surfaces) using the tokens in
   tokens.css. This is a close recreation of the previous Tailwind/shadcn
   output, not a class-for-class port — modern CSS (clamp, grid auto-fit)
   is used instead of hand-duplicating every responsive breakpoint. */

/* ---------- Typography utilities ---------- */

.eyebrow {
  display: inline-block;
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--accent));
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--accent) / 0.3);
  background: hsl(var(--accent) / 0.05);
}

.heading-xl {
  font-size: clamp(2.25rem, 1.25rem + 4.1vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.heading-lg {
  font-size: clamp(2.25rem, 1.25rem + 3.15vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
@media (min-width: 768px) {
  .heading-lg { line-height: 1; }
}

/* Smaller section heading (text-4xl md:text-5xl pattern) */
.heading-lg-sm {
  font-size: clamp(2.25rem, 1.65rem + 1.9vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}
@media (min-width: 768px) {
  .heading-lg-sm { line-height: 1; }
}

.heading-md {
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
}

.text-lead {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: hsl(var(--muted-foreground));
  line-height: 1.625;
}

.text-muted { color: hsl(var(--muted-foreground)); }
.text-accent { color: hsl(var(--accent)); }
.text-center { text-align: center; }

.text-gradient {
  background-image: var(--gradient-electric);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-hot {
  background-image: var(--gradient-hot);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout helpers ---------- */

.section { padding-block: 6rem; padding-inline: 1.5rem; }
.section-lg { padding-block: 8rem; padding-inline: 1.5rem; }
.section-tight { padding-block: 3rem; padding-inline: 1.5rem; }
.max-w-content { max-width: 1280px; margin-inline: auto; }
.max-w-narrow { max-width: 860px; margin-inline: auto; }
.max-w-prose { max-width: 768px; margin-inline: auto; }

.stack { display: flex; flex-direction: column; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; }
.gap-sm { gap: 0.75rem; }
.gap-md { gap: 1.5rem; }
.gap-lg { gap: 2.5rem; }

.grid-auto {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-auto-wide {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ---------- Surfaces ---------- */

.bg-background { background: hsl(var(--background)); }
.bg-surface { background: hsl(var(--surface)); }
.bg-surface-elevated { background: hsl(var(--surface-elevated)); }

.card {
  background: hsl(var(--surface-elevated));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-3xl);
  padding: 2rem;
  box-shadow: var(--shadow-soft, 0 4px 20px hsl(222 47% 11% / 0.06));
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: hsl(var(--accent) / 0.35);
  box-shadow: var(--shadow-elevated);
}

.shadow-premium { box-shadow: var(--shadow-soft); }
.shadow-premium-lg { box-shadow: var(--shadow-elevated); }
.glow-electric { box-shadow: var(--shadow-glow); }
.glow-electric-strong { box-shadow: var(--shadow-glow-strong); }
.glow-hot { box-shadow: var(--shadow-glow-hot); }

.border-glow {
  border: 1px solid hsl(var(--accent) / 0.2);
  box-shadow: inset 0 0 20px hsl(var(--accent) / 0.05), 0 0 40px hsl(var(--accent) / 0.08);
}

.glass {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: hsl(var(--background) / 0.7);
  border: 1px solid hsl(var(--border) / 0.5);
}

.glass-strong {
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  background: hsl(var(--background) / 0.85);
  border: 1px solid hsl(var(--border) / 0.6);
  box-shadow: 0 4px 30px hsl(222 47% 11% / 0.06);
}

.glass-premium {
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  background: linear-gradient(135deg, hsl(var(--background) / 0.85) 0%, hsl(var(--background) / 0.6) 100%);
  border: 1px solid hsl(var(--border) / 0.3);
  box-shadow: var(--shadow-elevated);
}

@media (max-width: 768px) {
  .glass { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: hsl(var(--background) / 0.85); }
  .glass-strong { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: hsl(var(--background) / 0.92); }
}

.noise { position: relative; }
.noise::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
}
@media (max-width: 768px) {
  .noise::before { display: none; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  height: 2.25rem;
  padding-inline: 1.5rem;
  transition: all 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn.is-loading { opacity: 0.7; pointer-events: none; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.btn-accent {
  color: hsl(var(--accent-foreground));
  font-weight: 700;
  background-image: var(--gradient-electric);
  box-shadow: var(--shadow-button);
}
.btn-accent:hover { box-shadow: var(--shadow-button-hover); filter: brightness(1.08); }

.btn-outline {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}
.btn-outline:hover { background: hsl(var(--muted) / 0.5); border-color: hsl(var(--accent) / 0.3); }

.btn-ghost { color: hsl(var(--foreground)); }
.btn-ghost:hover { background: hsl(var(--muted) / 0.5); }

.btn-default {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
}
.btn-default:hover { background: hsl(var(--foreground) / 0.9); }

.btn-sm { height: 2.25rem; padding-inline: 1rem; font-size: 0.8rem; }
.btn-lg { height: 3.5rem; padding-inline: 2rem; font-size: 1rem; }
.btn-xl { height: 4rem; padding-inline: 3rem; font-size: 1.125rem; }
.btn-full { width: 100%; }
.btn-rounded-full { border-radius: 999px; }
.btn-icon { width: 1.25rem; height: 1.25rem; transition: transform 0.2s ease; }
.btn:hover .btn-icon { transform: translateX(3px); }

/* ---------- Animations ---------- */

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}
@keyframes float-complex {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  33% { transform: translateY(-25px) translateX(15px) scale(1.02); }
  66% { transform: translateY(15px) translateX(-20px) scale(0.98); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}
@keyframes marquee-reverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0%); }
}
@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}
@keyframes spin-slow-kf {
  to { transform: rotate(360deg); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-slow { animation: float 8s ease-in-out infinite; }
.animate-float-complex { animation: float-complex 12s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }
.animate-spin-slow { animation: spin-slow-kf 30s linear infinite; }
.animate-gradient { animation: gradient-shift 8s ease infinite; background-size: 200% 200%; }
.animate-fade-in-up { animation: fade-in-up 0.5s ease-out forwards; }
.animate-marquee { animation: marquee 30s linear infinite; }
.animate-marquee-reverse { animation: marquee-reverse 30s linear infinite; }
.animate-blob { animation: blob 7s infinite; }

@media (prefers-reduced-motion: reduce) {
  [class*="animate-"] { animation: none !important; }
}

/* Scroll-reveal — replaces Framer Motion's whileInView fade/slide pattern.
   JS (assets/js/reveal.js) toggles .is-visible when an element intersects. */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="fade"] { transform: none; }
[data-reveal="scale"] { transform: scale(0.96); }
[data-reveal="scale"].is-visible { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

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

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1rem 1.5rem;
  animation: fade-in-up 0.6s ease-out;
}
.site-nav-bar {
  max-width: 1280px;
  margin-inline: auto;
  border-radius: var(--radius-2xl);
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 50;
}
.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
  transition: transform 0.2s ease;
}
.nav-logo:hover { transform: scale(1.03); }

.nav-links { display: none; align-items: center; gap: 0.25rem; }
.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-xl);
  color: hsl(var(--muted-foreground));
  transition: all 0.2s ease;
}
.nav-link:hover { color: hsl(var(--foreground)); background: hsl(var(--muted) / 0.5); }
.nav-link.is-active { color: hsl(var(--accent)); background: hsl(var(--accent) / 0.08); }

.nav-actions { display: none; align-items: center; gap: 0.75rem; }

.nav-toggle {
  display: inline-flex;
  padding: 0.5rem;
  border-radius: var(--radius-xl);
  color: hsl(var(--foreground));
}
.nav-toggle:hover { background: hsl(var(--muted) / 0.5); }
.nav-toggle svg { width: 1.5rem; height: 1.5rem; }

.nav-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: hsl(var(--background) / 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.nav-mobile-backdrop.is-open { opacity: 1; pointer-events: auto; }

.nav-mobile-menu {
  max-width: 1400px;
  margin: 0.75rem auto 0;
  border-radius: var(--radius-2xl);
  padding: 1.5rem;
  position: relative;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 32rem;
}
.nav-mobile-link {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-xl);
  color: hsl(var(--foreground));
}
.nav-mobile-link:hover, .nav-mobile-link.is-active { color: hsl(var(--accent)); background: hsl(var(--accent) / 0.08); }

.nav-mobile-cta-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid hsl(var(--border) / 0.5);
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-actions { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile-menu, .nav-mobile-backdrop, .nav-mobile-cta-bar { display: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 4rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
}
.site-footer .max-w-content { max-width: 1152px; }
.footer-grid {
  display: grid;
  gap: 3rem;
  margin-bottom: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-brand-col { grid-column: span 2; }
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.footer-social a {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.footer-social a:hover { background: hsl(var(--accent) / 0.2); color: hsl(var(--foreground)); transform: translateY(-2px); }
.footer-col h4 { font-weight: 600; color: hsl(var(--foreground)); margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-col a {
  color: hsl(var(--muted-foreground));
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: hsl(var(--foreground)); }
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; }
}

/* ---------- WhatsApp floating button ---------- */

.whatsapp-btn {
  position: fixed;
  bottom: 6rem;
  left: 1.5rem;
  z-index: 60;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-elevated);
  transition: all 0.2s ease;
}
.whatsapp-btn:hover { transform: scale(1.1); box-shadow: var(--shadow-glow); }
.whatsapp-btn svg { width: 2rem; height: 2rem; }
.whatsapp-btn-badge {
  position: absolute;
  top: -0.5rem; right: -0.5rem;
  width: 1.25rem; height: 1.25rem;
  border-radius: 999px;
  background: hsl(var(--destructive));
  border: 2px solid #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.625rem; font-weight: 700;
}
@media (min-width: 768px) {
  .whatsapp-btn { bottom: 1.5rem; }
}

/* ---------- Lead popup modal ---------- */

.lead-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: hsl(222 47% 5% / 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lead-popup-backdrop.is-open { opacity: 1; pointer-events: auto; }

.lead-popup {
  width: 100%;
  max-width: 450px;
  border-radius: 2.5rem;
  padding: 2rem;
  position: relative;
  background: hsl(var(--surface) / 0.95);
  transform: translateY(16px) scale(0.96);
  transition: transform 0.25s ease;
}
.lead-popup-backdrop.is-open .lead-popup { transform: translateY(0) scale(1); }

.lead-popup-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  color: hsl(var(--muted-foreground));
  padding: 0.4rem;
  border-radius: 999px;
}
.lead-popup-close:hover { background: hsl(var(--muted) / 0.5); color: hsl(var(--foreground)); }
.lead-popup-close svg { width: 1.1rem; height: 1.1rem; }

.lead-popup-title { font-size: 1.75rem; font-weight: 800; margin: 0.75rem 0 0.5rem; color: hsl(var(--foreground)); }
.lead-popup-desc { color: hsl(var(--muted-foreground)); margin-bottom: 1.5rem; }

.lead-popup-success { text-align: center; padding-block: 2rem; }
.lead-popup-success-icon {
  width: 5rem; height: 5rem; margin: 0 auto 1.5rem;
  border-radius: 999px;
  background: hsl(142 71% 45% / 0.1);
  border: 1px solid hsl(142 71% 45% / 0.2);
  display: flex; align-items: center; justify-content: center;
}
.lead-popup-success-icon svg { width: 2.5rem; height: 2.5rem; color: hsl(142 71% 45%); }

/* ---------- Forms ---------- */

.form-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
}
.form-label { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.4rem; display: inline-block; color: hsl(var(--foreground)); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-2xl);
  border: 2px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  outline: none;
  transition: border-color 0.2s ease;
}
.form-input::placeholder, .form-textarea::placeholder { color: hsl(var(--muted-foreground)); }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: hsl(var(--accent)); }
.form-textarea { resize: vertical; min-height: 8rem; }

.spinner {
  width: 1.1rem; height: 1.1rem;
  border-radius: 999px;
  border: 2px solid hsl(0 0% 100% / 0.3);
  border-top-color: #fff;
  animation: spin-slow-kf 0.7s linear infinite;
}

.status-message { font-size: 0.9rem; margin-top: 0.75rem; }
.status-message.is-error { color: hsl(var(--destructive)); }
.status-message.is-success { color: hsl(142 71% 40%); }

/* Shared "form submitted" success state (contact.html + index.html's
   homepage contact form use the same markup pattern). */
.contact-success { padding: 3rem 0; text-align: center; }
.contact-success svg { width: 3rem; height: 3rem; color: hsl(142 71% 45%); margin: 0 auto 1rem; }

/* ---------- FAQ / generic accordion ---------- */

.faq-item {
  background: hsl(var(--surface-elevated));
  border-radius: 1rem;
  padding: 0 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s ease;
}
.faq-item.is-open { box-shadow: 0 0 0 2px hsl(var(--accent) / 0.3); }
.faq-trigger {
  width: 100%;
  text-align: left;
  padding: 1.25rem 0;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-trigger svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; transition: transform 0.2s ease; transform: rotate(90deg); }
.faq-item.is-open .faq-trigger svg { transform: rotate(-90deg); }
.faq-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.is-open .faq-content { max-height: 24rem; }
.faq-content p { padding-bottom: 1.25rem; color: hsl(var(--muted-foreground)); font-size: 0.9rem; line-height: 1.7; }

/* ---------- Markdown-rendered content (legacy blog posts) ---------- */

.md-body h1, .md-body h2, .md-body h3, .md-body h4 { scroll-margin-top: 7rem; margin: 2rem 0 1rem; }
.md-body p { color: hsl(var(--muted-foreground)); line-height: 1.75; margin-bottom: 1.25rem; }
.md-body a.md-link { color: hsl(var(--accent)); text-decoration: underline; }
.md-body img { border-radius: 1.5rem; margin: 2rem 0; }
.md-body ul, .md-body ol { margin: 0 0 1.25rem 1.25rem; color: hsl(var(--muted-foreground)); }
.md-body ul { list-style: disc; }
.md-body ol { list-style: decimal; }
.md-body li { margin-bottom: 0.5rem; line-height: 1.7; }
.md-body code { background: hsl(var(--muted)); padding: 0.15rem 0.4rem; border-radius: 0.35rem; font-family: "Space Mono", monospace; font-size: 0.85em; }
.md-btn-wrap { display: flex; justify-content: center; margin: 3rem 0; }
.md-btn { padding: 1.1rem 2.5rem; border-radius: 1rem; background: hsl(var(--accent)); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; box-shadow: var(--shadow-glow); }
.md-video { position: relative; aspect-ratio: 16/9; border-radius: 1.5rem; overflow: hidden; border: 1px solid hsl(var(--border)); margin: 3rem 0; box-shadow: var(--shadow-elevated); }
.md-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
