:root {
  --ink: #0f172a;
  --brand: #0b7d6f;
  --brand-2: #0f9f8d;
  --accent: #f97316;
  --surface: #f5f7fb;
  --fs-display: clamp(2rem, 4vw + 1rem, 4rem);
  --fs-h2: clamp(1.75rem, 2.3vw + 1rem, 2.5rem);
  --fs-h3: clamp(1.125rem, 1vw + 0.9rem, 1.5rem);
  --fs-body: clamp(1rem, 0.25vw + 0.95rem, 1.125rem);
}

html {
  scroll-behavior: smooth;
}

[x-cloak] {
  display: none !important;
}

body.brand-theme {
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 80% -10%, #d8fff0 0%, rgba(216, 255, 240, 0) 60%),
    radial-gradient(900px 400px at 0% 20%, #eaf2ff 0%, rgba(234, 242, 255, 0) 60%),
    #ffffff;
}

.feature-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.feature-card:focus-visible {
  outline: 3px solid #0d9488;
  outline-offset: 4px;
}

.hero-grid {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
}

.glass {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.75);
}

.brand-gradient {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.brand-text-gradient {
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.cta-gradient-bg,
.icon-gradient-bg {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.panel-gradient-bg {
  background: linear-gradient(125deg, #0f172a 0%, #0b7d6f 100%);
}

.highlight-accent-bg {
  background: var(--accent);
}

.whatsapp-fab-bg {
  background: #22c55e;
}

/* ===== UX/Accessibility P0 Improvements ===== */

/* Skip to main content link (screen reader only) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0f766e;
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus-visible styles for buttons and links */
.btn-focus-visible:focus-visible,
a:focus-visible,
button:focus-visible,
article:focus-visible {
  outline: 3px solid #0d9488 !important;
  outline-offset: 2px !important;
}

.btn-focus-visible:focus,
a:focus,
button:focus,
article:focus {
  outline: 3px solid #0d9488 !important;
  outline-offset: 2px !important;
}

/* Contrast-safe text colors */
.text-contrast-safe {
  color: #1e293b !important;
}

.text-contrast-medium {
  color: #475569 !important;
}

/* Readable paragraph width */
.readable-text {
  max-width: 65ch;
  line-height: 1.6;
}

/* Active states for navigation */
.nav-link {
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: #0f766e !important;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.nav-link:focus {
  color: #0f766e !important;
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

.nav-link:active {
  color: #0d5e57 !important;
  transform: translateY(1px);
}

/* Minimum tap target size (44x44px) */
.tap-target-safe {
  min-width: 44px;
  min-height: 44px;
}

/* ===== UX P1 Improvements ===== */
.hero-title-fluid {
  font-size: var(--fs-display);
}

.section-title-fluid {
  font-size: var(--fs-h2);
}

.card-title-fluid {
  font-size: var(--fs-h3);
}

.body-fluid {
  font-size: var(--fs-body);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
