/*
Theme Name: Ratonix
Theme URI: https://ratonix.ai
Author: Robert Guajardo
Author URI: https://robertguajardo.com
Description: Custom marketing site theme for Ratonix — full-width immersive design with Flexible Content page builder powered by Secure Custom Fields.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ratonix
*/

/* ============================================================
   DESIGN TOKENS
   All colors, fonts, spacing live here. Never hardcode below.
   ============================================================ */
:root {
  /* Surfaces */
  --color-bg:            #08080F;
  --color-bg-alt:        #0C0C16;
  --color-surface:       #111120;
  --color-surface-alt:   #191930;
  --color-border:        #252540;
  --color-border-hover:  #303055;

  /* Text */
  --color-ink:           #EEEEF5;
  --color-muted:         #9898B5;
  --color-faded:         #5A5A75;

  /* Brand accents */
  --color-primary:       #7C3AED;
  --color-secondary:     #3B82F6;
  --color-accent-purple: #9D5CFF;
  --color-accent-blue:   #60A5FA;
  --color-success:       #10B981;

  /* Gradients */
  --grad-brand:          linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  --grad-brand-hover:    linear-gradient(135deg, #8B4CF0, #4A90F7);
  --grad-text:           linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-blue));

  /* Tinted surfaces */
  --tint-purple:         rgba(124, 58, 237, 0.12);
  --tint-purple-border:  rgba(124, 58, 237, 0.20);
  --tint-success:        rgba(16, 185, 129, 0.10);
  --tint-success-border: rgba(16, 185, 129, 0.18);

  /* Shadows */
  --shadow-cta:          0 4px 16px rgba(124, 58, 237, 0.2);
  --shadow-cta-hover:    0 12px 36px rgba(124, 58, 237, 0.35);
  --shadow-card:         0 16px 48px rgba(0, 0, 0, 0.4);

  /* Typography */
  --font-body:           'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:        'Outfit', var(--font-body);

  /* Radii */
  --radius-sm:           7px;
  --radius-md:           10px;
  --radius-lg:           14px;
  --radius-pill:         100px;

  /* Containers */
  --container-sm:        460px;
  --container-md:        520px;
  --container-lg:        900px;
  --container-xl:        960px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Accessible skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { top: 8px; }

/* Focus states (accessibility baseline) */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-accent-purple);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   NAV (header.php)
   ============================================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid var(--color-border);
}
.nav-logo { display: flex; align-items: center; gap: 9px; }
.nav-logo img { width: 32px; height: 32px; object-fit: contain; }
.nav-logo span {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-links a {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-ink); }
.nav-links .launch,
.nav-links a.launch {
  background: var(--grad-brand);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

/* Mobile menu toggle (progressive enhancement) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--color-ink);
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================
   SHARED UTILITIES
   ============================================================ */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tint-purple);
  border: 1px solid var(--tint-purple-border);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  margin-bottom: 20px;
}
.pill .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-success);
}
.pill span {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent-purple);
  letter-spacing: 0.05em;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--grad-brand);
  color: #fff;
  padding: 14px 30px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.3s;
  box-shadow: var(--shadow-cta);
  border: none;
}
.cta-btn:hover {
  background: var(--grad-brand-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cta-hover);
}
.cta-btn svg { transition: transform 0.2s; }
.cta-btn:hover svg { transform: translateX(3px); }
.cta-btn.sm { padding: 10px 22px; font-size: 13px; }

.sec-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--color-accent-purple);
  padding: 14px 30px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}
.sec-btn:hover { background: var(--tint-purple); }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
}
.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 10%, transparent 65%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 10%, transparent 65%);
}

.surface-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s;
}
.surface-card:hover { border-color: var(--color-border-hover); }

.icon-box {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--tint-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-alt { background: var(--color-bg-alt); }
.fd { font-family: var(--font-display); }

/* ============================================================
   HERO (template-parts/flexible-content/hero.php)
   ============================================================ */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 70px 24px 44px;
  overflow: hidden;
  background: linear-gradient(180deg,
    rgba(124, 58, 237, 0.1) 0%,
    rgba(59, 130, 246, 0.04) 35%,
    transparent 75%);
}
.hero-orb {
  width: 480px;
  height: 480px;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle,
    rgba(124, 58, 237, 0.16) 0%,
    rgba(59, 130, 246, 0.06) 50%,
    transparent 70%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  margin-bottom: 26px;
  font-size: 12px;
  font-weight: 500;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 20px;
  max-width: 720px;
  letter-spacing: -0.04em;
}
.hero-subhead {
  font-size: 17px;
  color: var(--color-muted);
  line-height: 1.6;
  max-width: 510px;
  margin: 0 auto 36px;
}
.hero-features {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--color-faded);
  font-size: 12px;
}
.hero-features > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   FEATURES 4-COLUMN (features-4col.php)
   ============================================================ */
.features-section {
  padding: 72px 32px;
}
.features-inner {
  max-width: var(--container-lg);
  margin: 0 auto;
  text-align: center;
}
.features-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  margin: 0 0 44px;
  letter-spacing: -0.02em;
}
.features-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.feature-card {
  padding: 28px 18px;
  text-align: center;
}
.feature-card.accent-primary   { border-top: 2px solid var(--color-primary); }
.feature-card.accent-secondary { border-top: 2px solid var(--color-secondary); }
.feature-card .icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  margin: 0 auto 14px;
}
.feature-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
}
.feature-card p {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   STEPS 3-COLUMN (steps-3col.php)
   ============================================================ */
.steps-section {
  position: relative;
  padding: 72px 32px;
  overflow: hidden;
}
.steps-section .grid-bg { opacity: 0.7; }
.steps-inner {
  max-width: var(--container-lg);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.steps-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  margin: 0 0 48px;
  letter-spacing: -0.02em;
}
.steps-wrap { position: relative; }
.steps-connector {
  position: absolute;
  top: 24px;
  left: 16%;
  right: 16%;
  height: 2px;
  background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
  opacity: 0.3;
}
.steps-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}
.step { text-align: center; }
.step-num {
  font-family: var(--font-display);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 1px var(--color-primary);
}
.step h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
}
.step p {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   PRICING (pricing.php)
   ============================================================ */
.pricing-section {
  position: relative;
  padding: 72px 32px;
  overflow: hidden;
}
.pricing-orb {
  width: 400px;
  height: 400px;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
}
.pricing-inner {
  max-width: var(--container-sm);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.pricing-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  margin: 0 0 32px;
}
.pricing-card {
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}
.pricing-card-stripe {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-brand);
}
.free-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--tint-success);
  border: 1px solid var(--tint-success-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  margin-bottom: 18px;
}
.free-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-success);
}
.free-badge span {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-success);
  letter-spacing: 0.04em;
}
.price-big {
  font-size: 56px;
  font-weight: 800;
  font-family: var(--font-display);
}
.price-period {
  font-size: 16px;
  color: var(--color-faded);
}
.price-subtext {
  font-size: 13px;
  color: var(--color-muted);
  margin: 4px 0 24px;
}
.feature-list {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  margin-bottom: 24px;
  text-align: left;
  list-style: none;
}
.feature-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--color-muted);
}
.feature-check svg { flex-shrink: 0; }

/* ============================================================
   FINAL CTA (cta.php)
   ============================================================ */
.cta-section {
  position: relative;
  padding: 72px 32px;
  overflow: hidden;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(124, 58, 237, 0.06) 50%,
    transparent 100%);
}
.cta-section .grid-bg { opacity: 0.7; }
.cta-inner {
  max-width: var(--container-md);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  margin: 0 0 14px;
}
.cta-inner p {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0 0 32px;
}

/* ============================================================
   FOOTER (footer.php)
   ============================================================ */
.foot {
  padding: 32px;
  border-top: 1px solid var(--color-border);
}
.foot-inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.foot-brand img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.foot-brand .name {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-display);
}
.foot-brand .tagline {
  font-size: 11px;
  color: var(--color-faded);
}
.foot-links {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
  align-items: center;
}
.foot-links a, .foot-links span {
  color: var(--color-faded);
  font-size: 11px;
}
.foot-links a:hover { color: var(--color-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav {
    padding: 14px 20px;
  }
  .nav-links a:not(.launch) {
    display: none;
  }
  .features-4col {
    grid-template-columns: 1fr 1fr;
  }
  .steps-3col {
    grid-template-columns: 1fr;
  }
  .steps-connector {
    display: none;
  }
  .foot-inner {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .features-4col {
    grid-template-columns: 1fr;
  }
  .hero-features {
    flex-direction: column;
    gap: 12px;
  }
}
