/*
Theme Name: SalesWaly Child
Theme URI: https://saleswaly.themoppsters.com
Description: Child theme of Astra for SalesWaly — light/dark mode token system, single source of truth for all colors & fonts.
Author: SalesWaly
Template: astra
Version: 1.1.0
Text Domain: sw-child
*/

/* ============================================================
   1. DESIGN TOKENS — every color/font used anywhere on the site
   lives here. Pages, Elementor widgets, and WP Code snippets
   must reference these via var() — never hardcode a hex value.
   ============================================================ */

:root {
  /* Light mode (default) */
  --bg-primary: #FFFFFF;
  --bg-surface: #F7F7F5;
  --bg-elevated: #F0EFEB;
  --text-heading: #1F1F1F;
  --text-body: #5A5A60;
  --text-muted: #9A9AA0;
  --border: #E5E4E0;
  --accent: #F47D1F;
  --accent-hover: #F59447;
  --accent-active: #D66E1B;
  --accent-soft: #FDF2E8;
  --accent-contrast: #FFFFFF;

  /* Fonts */
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Shared */
  --radius: 14px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
  --bg-primary: #121214;
  --bg-surface: #1B1B1F;
  --bg-elevated: #24242B;
  --text-heading: #F5F5F3;
  --text-body: #B7B7BD;
  --text-muted: #7E7E86;
  --border: #2D2D33;
  --accent: #F48730;
  --accent-hover: #F7A15D;
  --accent-active: #D66E1B;
  --accent-soft: #351B06;
  --accent-contrast: #FFFFFF;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   2. BASE RESET / GLOBAL ELEMENTS
   ============================================================ */

body {
  background-color: var(--bg-primary);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading) !important;
  color: var(--text-heading) !important;
  line-height: 1.2;
  margin: 0 0 var(--space-md);
}

h1 { font-weight: 800; font-size: clamp(28px, 5vw, 64px); }
h2 { font-weight: 800; font-size: clamp(24px, 4vw, 44px); }
h3 { font-weight: 700; font-size: clamp(20px, 3vw, 30px); }

p { margin: 0 0 var(--space-md); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover { color: var(--accent-hover); }

::selection { background: var(--accent-soft); color: var(--text-heading); }

/* Smooth, flash-free switch between modes — applied broadly so every
   element (headings, text, borders, cards, buttons) fades together,
   not just a few container classes. */
*, *::before, *::after {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

/* ============================================================
   3. LAYOUT HELPERS
   ============================================================ */

.sw-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================================
   3.1 ELEMENTOR WRAPPER NEUTRALISER
   Elementor wraps every HTML widget in its own container/section
   div (.elementor-element, .e-con, .elementor-widget-wrap, etc.)
   and assigns that wrapper a default WHITE background. That
   wrapper sits OUTSIDE our own <section> tags, so our dark-mode
   tokens never reach it — causing random white bands in dark
   mode regardless of what our own CSS says.
   This rule forces every Elementor wrapper to be transparent so
   our token-based background (set on body / our own <section>)
   is always what actually shows. Safe to keep permanently —
   applies to all current and future sections automatically.
   ============================================================ */
.elementor-element,
.elementor-widget-wrap,
.elementor-container,
.elementor-section-wrap,
.e-con,
.e-con-inner,
.elementor-widget-html {
  background: transparent !important;
  background-color: transparent !important;
}

.sw-section {
  padding: var(--space-2xl) 0;
}
.sw-section--surface { background: var(--bg-surface); }
.sw-section--elevated { background: var(--bg-elevated); }

/* ============================================================
   4. COMPONENTS — buttons, cards
   ============================================================ */

.sw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none !important;
}

.sw-btn--primary {
  background: var(--accent);
  color: var(--accent-contrast) !important;
}
.sw-btn--primary:hover {
  background: var(--accent-hover);
  color: var(--accent-contrast) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244, 125, 31, 0.35);
}
.sw-btn--primary:active { background: var(--accent-active); color: var(--accent-contrast) !important; }

.sw-btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-heading) !important;
}
.sw-btn--ghost:hover {
  background: var(--bg-surface);
  border-color: var(--accent);
}

.sw-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
}

.sw-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}

/* ============================================================
   5. MODE TOGGLE BUTTON
   (markup for this button lives in the WP Code header snippet —
   built in the next step. This is just its styling.)
   ============================================================ */

.sw-mode-btn {
  /* Reset ALL Astra button defaults first */
  all: unset;
  /* Then apply our styles */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  border: 1px solid var(--border) !important;
  background: transparent !important;
  color: var(--text-heading) !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}
.sw-mode-btn:hover {
  background: var(--bg-surface) !important;
  color: var(--text-heading) !important;
}
.sw-mode-btn:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* SVG icon color inherits from button color */
.sw-mode-btn svg {
  display: block;
  flex-shrink: 0;
  color: inherit;
  stroke: currentColor;
}

.sw-mode-btn .icon-moon { display: none !important; }
.sw-mode-btn .icon-sun  { display: block !important; }

[data-theme="dark"] .sw-mode-btn .icon-sun  { display: none !important; }
[data-theme="dark"] .sw-mode-btn .icon-moon { display: block !important; }

/* ============================================================
   6. MOTION / ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   7. HEADER + NAVIGATION
   ============================================================ */

/* Failsafe: hide Astra default header always */
.site-header { display: none !important; }

/* Header v2 is fully self-contained in WP Code snippet.
   Only global token overrides or additions go here. */

/* Logo dark mode — handled per-instance in header HTML via sw-logo-light/dark classes */
.sw-logo-light,
.sw-logo-dark { display: block; height: 36px; width: auto; }
.sw-logo-dark { display: none; }
[data-theme="dark"] .sw-logo-light { display: none; }
[data-theme="dark"] .sw-logo-dark  { display: block; }

/* Mode toggle button — global, used in header v2 */
.sw-mode-btn {
  all: unset;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 1px solid var(--border) !important;
  background: transparent !important;
  color: var(--text-heading) !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}
.sw-mode-btn:hover { background: var(--bg-surface) !important; }
.sw-mode-btn svg { display: block; color: inherit; stroke: currentColor; }
.sw-mode-btn .icon-moon { display: none !important; }
.sw-mode-btn .icon-sun  { display: block !important; }
[data-theme="dark"] .sw-mode-btn .icon-sun  { display: none !important; }
[data-theme="dark"] .sw-mode-btn .icon-moon { display: block !important; }

/* Hamburger — global base, shown/hidden via header v2 media queries */
.sw-nav-toggle {
  all: unset;
  display: none;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 5px !important;
  width: 38px !important;
  height: 38px !important;
  background: transparent !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}
.sw-nav-toggle:hover { background: var(--bg-surface) !important; }
.sw-nav-toggle span {
  display: block !important;
  width: 18px !important;
  height: 2px !important;
  background: var(--text-heading) !important;
  border-radius: 2px !important;
}

/* Body scroll lock */
body.sw-menu-open { overflow: hidden; }

/* ============================================================
   8. FOOTER — Premium dark design with gradients + floating orbs
   ============================================================ */

/* Hide Astra's default footer */
.site-footer { display: none !important; }

.sw-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0f0f12 0%, #1a1014 50%, #0f0f12 100%);
  color: var(--text-body);
  border-top: 1px solid rgba(244, 125, 31, 0.15);
}

/* Light mode footer override */
[data-theme="light"] .sw-footer {
  background: linear-gradient(160deg, #1a1a1f 0%, #22181a 50%, #1a1a1f 100%);
}

/* Floating ambient orbs — decorative background glows */
.sw-footer::before,
.sw-footer::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: sw-float 8s ease-in-out infinite;
}
.sw-footer::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244, 125, 31, 0.08) 0%, transparent 70%);
  top: -120px;
  left: -100px;
  animation-delay: 0s;
}
.sw-footer::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(244, 125, 31, 0.06) 0%, transparent 70%);
  bottom: -80px;
  right: -80px;
  animation-delay: -4s;
}

@keyframes sw-float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-24px) scale(1.04); }
}

/* All footer content sits above orbs */
.sw-footer > * { position: relative; z-index: 1; }

/* Top accent line */
.sw-footer__accent-line {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 40%, #F7A15D 60%, transparent 100%);
  opacity: 0.6;
}

/* Main grid */
.sw-footer__main {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
}

/* Brand column */
.sw-footer__logo img {
  height: 32px;
  width: auto;
  display: block;
  margin-bottom: var(--space-md);
  /* keep logo visible on dark footer always */
  filter: brightness(0) invert(1);
}

.sw-footer__tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  max-width: 220px;
  margin-bottom: var(--space-lg);
}

/* CTA card inside brand col */
.sw-footer__cta-card {
  background: linear-gradient(135deg, rgba(244,125,31,0.12) 0%, rgba(244,125,31,0.04) 100%);
  border: 1px solid rgba(244,125,31,0.2);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: 0 4px 24px rgba(244,125,31,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: box-shadow .3s ease, transform .3s ease;
}
.sw-footer__cta-card:hover {
  box-shadow: 0 8px 32px rgba(244,125,31,0.18), inset 0 1px 0 rgba(255,255,255,0.06);
  transform: translateY(-2px);
}
.sw-footer__cta-card p {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-sm);
}
.sw-footer__cta-card .sw-btn--primary {
  width: 100%;
  justify-content: center;
  font-size: 13px;
  padding: 10px 20px;
}

/* Column headings */
.sw-footer__col-title {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

/* Link lists */
.sw-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sw-footer__links li a,
.sw-footer__links li a:visited {
  color: rgba(255,255,255,0.5) !important;
  font-size: 14px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s ease, gap .2s ease;
}
.sw-footer__links li a::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s ease;
  flex-shrink: 0;
}
.sw-footer__links li a:hover,
.sw-footer__links li a:focus {
  color: #fff !important;
  gap: 10px;
}
.sw-footer__links li a:hover::before { opacity: 1; }

/* Social icons */
.sw-footer__social {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.sw-footer__social a,
.sw-footer__social a:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5) !important;
  text-decoration: none !important;
  transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.sw-footer__social a:hover {
  background: rgba(244,125,31,0.15) !important;
  border-color: rgba(244,125,31,0.4) !important;
  color: var(--accent) !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(244,125,31,0.2);
}

/* Divider */
.sw-footer__divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08) 30%, rgba(255,255,255,0.08) 70%, transparent);
  margin: 0;
  position: relative;
  z-index: 1;
}

/* Bottom bar */
.sw-footer__bottom {
  padding: var(--space-md) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  position: relative;
  z-index: 1;
}

.sw-footer__bottom a,
.sw-footer__bottom a:visited {
  color: rgba(255,255,255,0.3) !important;
  text-decoration: none !important;
  transition: color .2s ease;
}
.sw-footer__bottom a:hover { color: var(--accent) !important; }

.sw-footer__bottom-links {
  display: flex;
  gap: var(--space-lg);
}

/* Responsive */
@media (max-width: 1024px) {
  .sw-footer__main {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
  .sw-footer__brand { grid-column: 1 / -1; }
  .sw-footer__tagline { max-width: 100%; }
}

@media (max-width: 600px) {
  .sw-footer__main { grid-template-columns: 1fr; }
  .sw-footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }
  .sw-footer__bottom-links { justify-content: center; }
}

/* ============================================================
   HIDE DEFAULT WP COMMENTS + POST NAVIGATION ON SINGLE POSTS
   Astra injects these via its single post template — CSS is
   more reliable than WP Discussion settings for this theme.
   ============================================================ */
.post-navigation,
.ast-single-post-navigation,
.comments-area,
.comment-respond,
#comments,
#respond,
.ast-comment-list,
.comment-form,
.comment-notes,
.logged-in-as,
.comment-awaiting-moderation {
  display: none !important;
}
