/* ============================================================
   Rica Global Technologies — custom.css
   Companion to Tailwind CDN Play. Defines utility classes
   and animations referenced across all templates.
   ============================================================ */

/* ————————————————————————————————————————————
   Custom properties (mirrors Tailwind theme extension)
   ———————————————————————————————————————————— */
:root {
  --navy-950: #05091a;
  --navy-900: #080d1a;
  --navy-800: #0d1526;
  --navy-700: #111e35;
  --cyan:      #22d3ee;
  --cyan-dark: #0891b2;
  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --border-subtle:  rgba(34,211,238,0.10);
  --border-hover:   rgba(34,211,238,0.30);
}

/* ————————————————————————————————————————————
   Base
   ———————————————————————————————————————————— */
html { scroll-behavior: smooth; }
body { background: var(--navy-900); }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--navy-800); }
::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #22d3ee44; }

/* Selection */
::selection { background: rgba(34,211,238,0.25); color: #fff; }

/* ————————————————————————————————————————————
   Typography helpers
   ———————————————————————————————————————————— */
.text-gradient {
  background: linear-gradient(135deg, #22d3ee 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-warm {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.75;
  max-width: 40rem;
}

/* ————————————————————————————————————————————
   Buttons
   ———————————————————————————————————————————— */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cyan);
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.875rem 1.75rem;
  border-radius: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(34,211,238,0.20);
  white-space: nowrap;
}
.btn-primary:hover {
  background: #67e8f9;
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(34,211,238,0.30);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.875rem 1.75rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(148,163,184,0.20);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-ghost:hover {
  border-color: rgba(34,211,238,0.40);
  color: var(--cyan);
  background: rgba(34,211,238,0.05);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.625rem;
}

/* ————————————————————————————————————————————
   Navigation
   ———————————————————————————————————————————— */
.nav-link {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
  text-decoration: none;
  position: relative;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: var(--cyan); }

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  color: #94a3b8;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
}
.mobile-nav-link:hover {
  background: rgba(34,211,238,0.05);
  color: #fff;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.12s;
  text-decoration: none;
}
.dropdown-item:hover {
  background: rgba(34,211,238,0.08);
  color: #fff;
}

/* ————————————————————————————————————————————
   Cards
   ———————————————————————————————————————————— */
.feature-card {
  background: rgba(13,21,38,0.80);
  border: 1px solid rgba(34,211,238,0.08);
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 40px rgba(34,211,238,0.06);
  transform: translateY(-2px);
}

.product-card {
  background: var(--navy-800);
  border: 1px solid rgba(34,211,238,0.08);
  border-radius: 1.5rem;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.product-card:hover {
  border-color: rgba(34,211,238,0.25);
  box-shadow: 0 8px 48px rgba(34,211,238,0.08);
  transform: translateY(-3px);
}

.blog-card {
  background: var(--navy-800);
  border: 1px solid rgba(148,163,184,0.07);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.blog-card:hover {
  border-color: rgba(34,211,238,0.20);
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

.testimonial-card {
  background: var(--navy-800);
  border: 1px solid rgba(34,211,238,0.07);
  border-radius: 1.5rem;
  padding: 2rem;
}

.service-mini-card {
  background: rgba(13,21,38,0.60);
  border: 1px solid rgba(34,211,238,0.07);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: border-color 0.2s, background 0.2s;
}
.service-mini-card:hover {
  background: rgba(13,21,38,0.90);
  border-color: rgba(34,211,238,0.20);
}

.pricing-card {
  background: var(--navy-800);
  border: 1px solid rgba(34,211,238,0.08);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: border-color 0.25s;
}
.pricing-card.featured {
  border-color: var(--cyan);
  box-shadow: 0 0 60px rgba(34,211,238,0.08);
}

/* ————————————————————————————————————————————
   Footer
   ———————————————————————————————————————————— */
.footer-link {
  color: #64748b;
  font-size: 0.875rem;
  transition: color 0.15s;
  text-decoration: none;
}
.footer-link:hover { color: #94a3b8; }

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(148,163,184,0.12);
  color: #64748b;
  transition: all 0.15s;
  text-decoration: none;
}
.social-icon:hover {
  border-color: rgba(34,211,238,0.30);
  color: var(--cyan);
  background: rgba(34,211,238,0.05);
}

/* ————————————————————————————————————————————
   Forms
   ———————————————————————————————————————————— */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  background: rgba(13,21,38,0.80);
  border: 1px solid rgba(100,116,139,0.30);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: #f8fafc;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input::placeholder { color: #475569; }
.form-input:focus {
  border-color: rgba(34,211,238,0.50);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.08);
}

.form-select {
  width: 100%;
  background: rgba(13,21,38,0.80);
  border: 1px solid rgba(100,116,139,0.30);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--text-primary) !important;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 2.5rem;
}
.form-select:focus { border-color: rgba(34,211,238,0.50); }

.form-textarea {
  width: 100%;
  background: rgba(13,21,38,0.80);
  border: 1px solid rgba(100,116,139,0.30);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: #f8fafc;
  font-size: 0.9375rem;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-textarea::placeholder { color: #475569; }
.form-textarea:focus {
  border-color: rgba(34,211,238,0.50);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.08);
}

.form-error {
  color: #f87171;
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

/* ————————————————————————————————————————————
   Pagination
   ———————————————————————————————————————————— */
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(148,163,184,0.12);
  color: #94a3b8;
  background: transparent;
  transition: all 0.15s;
  text-decoration: none;
  cursor: pointer;
}
.pagination-btn:hover {
  border-color: rgba(34,211,238,0.30);
  color: var(--cyan);
  background: rgba(34,211,238,0.05);
}
.pagination-btn.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--navy-900);
  font-weight: 700;
}

/* ————————————————————————————————————————————
   Reveal animations
   ———————————————————————————————————————————— */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay helpers */
.delay-100 { transition-delay: 0.10s !important; }
.delay-200 { transition-delay: 0.20s !important; }
.delay-300 { transition-delay: 0.30s !important; }
.delay-400 { transition-delay: 0.40s !important; }
.delay-500 { transition-delay: 0.50s !important; }
.delay-600 { transition-delay: 0.60s !important; }

/* Fade in from left / right */
.reveal-left  { opacity: 0; transform: translateX(-28px); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.reveal-right { opacity: 0; transform: translateX( 28px); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.reveal-left.revealed,
.reveal-right.revealed { opacity: 1; transform: translateX(0); }

/* ————————————————————————————————————————————
   Background patterns
   ———————————————————————————————————————————— */
.bg-grid-pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M 60 0 L 0 0 0 60' fill='none' stroke='rgba(34,211,238,0.04)' stroke-width='1'/%3E%3C/svg%3E");
}

.bg-dots-pattern {
  background-image: radial-gradient(circle, rgba(34,211,238,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ————————————————————————————————————————————
   Prose (blog content)
   ———————————————————————————————————————————— */
.prose-dark {
  color: #cbd5e1;
  font-size: 1.0625rem;
  line-height: 1.8;
}
.prose-dark h1, .prose-dark h2, .prose-dark h3,
.prose-dark h4, .prose-dark h5 {
  color: #fff;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.75em;
  letter-spacing: -0.015em;
}
.prose-dark h2 { font-size: 1.5rem; }
.prose-dark h3 { font-size: 1.25rem; }
.prose-dark p  { margin-bottom: 1.5em; }
.prose-dark a  { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(34,211,238,0.4); }
.prose-dark a:hover { text-decoration-color: var(--cyan); }
.prose-dark strong { color: #e2e8f0; font-weight: 600; }
.prose-dark em { font-style: italic; }
.prose-dark ul, .prose-dark ol { padding-left: 1.5rem; margin-bottom: 1.5em; }
.prose-dark li { margin-bottom: 0.5em; }
.prose-dark blockquote {
  border-left: 3px solid var(--cyan);
  padding-left: 1.25rem;
  color: #94a3b8;
  font-style: italic;
  margin: 2em 0;
}
.prose-dark code {
  background: rgba(34,211,238,0.08);
  color: var(--cyan);
  padding: 0.1em 0.4em;
  border-radius: 0.3em;
  font-size: 0.875em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.prose-dark pre {
  background: #0a0f1e;
  border: 1px solid rgba(34,211,238,0.10);
  border-radius: 0.875rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2em 0;
}
.prose-dark pre code {
  background: none;
  color: #a5f3fc;
  padding: 0;
  font-size: 0.9rem;
}
.prose-dark img {
  border-radius: 1rem;
  border: 1px solid rgba(34,211,238,0.08);
  margin: 2em 0;
  width: 100%;
  height: auto;
}
.prose-dark hr {
  border: none;
  border-top: 1px solid rgba(148,163,184,0.12);
  margin: 2.5em 0;
}
.prose-dark table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
.prose-dark th { color: #e2e8f0; font-weight: 600; text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid rgba(148,163,184,0.15); }
.prose-dark td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(148,163,184,0.08); }

/* ————————————————————————————————————————————
   Misc utilities
   ———————————————————————————————————————————— */
.glass {
  background: rgba(13,21,38,0.60);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(34,211,238,0.10);
}

.glow-cyan { box-shadow: 0 0 40px rgba(34,211,238,0.12); }

.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

[x-cloak] { display: none !important; }
