/* ============================================================
   WRITESEA — GLOBAL DESIGN SYSTEM
   Loaded sitewide. Works alongside Elementor Pro.
   Apply utility classes via Elementor's "CSS Classes" field.
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Backgrounds */
  --ws-bg-base:       #07070C;
  --ws-bg-elevated:   #0D0D16;
  --ws-bg-card:       #111119;
  --ws-bg-card-hover: #16161F;

  /* Borders */
  --ws-border-subtle:  rgba(255, 255, 255, 0.05);
  --ws-border-default: rgba(255, 255, 255, 0.10);
  --ws-border-strong:  rgba(255, 255, 255, 0.18);

  /* Text */
  --ws-text-primary:   #F2F2FF;
  --ws-text-secondary: #9898AC;
  --ws-text-muted:     #5C5C72;

  /* Accent — Indigo */
  --ws-accent:             #6366F1;
  --ws-accent-hover:       #818CF8;
  --ws-accent-glow:        rgba(99, 102, 241, 0.12);
  --ws-accent-glow-strong: rgba(99, 102, 241, 0.25);
  --ws-accent-border:      rgba(99, 102, 241, 0.25);

  /* Semantic */
  --ws-success: #10B981;
  --ws-warning: #F59E0B;

  /* Typography */
  --ws-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radius */
  --ws-radius-sm:   6px;
  --ws-radius:      10px;
  --ws-radius-lg:   16px;
  --ws-radius-xl:   24px;
  --ws-radius-full: 9999px;

  /* Transitions */
  --ws-transition:      150ms ease;
  --ws-transition-slow: 300ms ease;

  /* Max widths */
  --ws-max-w:    1200px;
  --ws-max-w-lg: 1400px;
  --ws-max-w-sm: 720px;
}

/* ============================================================
   2. BASE RESETS & BODY
   ============================================================ */
html { scroll-behavior: smooth; }

body {
  font-family: var(--ws-font) !important;
  background-color: var(--ws-bg-base);
  color: var(--ws-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ============================================================
   3. ELEMENTOR OVERRIDES
   Force Inter font across all Elementor widgets.
   ============================================================ */
.elementor-widget-heading .elementor-heading-title,
.elementor-widget-text-editor,
.elementor-widget-text-editor p,
.elementor-widget-button .elementor-button,
.elementor-widget-icon-box .elementor-icon-box-title,
.elementor-widget-icon-box .elementor-icon-box-description,
.elementor-widget-counter .elementor-counter,
.elementor-widget-testimonial {
  font-family: var(--ws-font) !important;
}

/* Elementor sections: kill stray left/right padding from theme */
.elementor-section.elementor-top-section {
  padding-right: 0;
  padding-left: 0;
}

/* ============================================================
   4. COLOR UTILITY CLASSES
   Apply via Elementor > Advanced > CSS Classes
   ============================================================ */
.ws-text-primary   { color: var(--ws-text-primary)   !important; }
.ws-text-secondary { color: var(--ws-text-secondary) !important; }
.ws-text-muted     { color: var(--ws-text-muted)     !important; }
.ws-text-accent    { color: var(--ws-accent)         !important; }

.ws-text-gradient {
  background: linear-gradient(135deg, var(--ws-accent) 0%, var(--ws-accent-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ws-bg-base     { background-color: var(--ws-bg-base)     !important; }
.ws-bg-elevated { background-color: var(--ws-bg-elevated) !important; }
.ws-bg-card     { background-color: var(--ws-bg-card)     !important; }
.ws-bg-accent   { background-color: var(--ws-accent)      !important; }

/* ============================================================
   5. BORDER & RADIUS UTILITIES
   ============================================================ */
.ws-border        { border: 1px solid var(--ws-border-default) !important; }
.ws-border-subtle { border: 1px solid var(--ws-border-subtle)  !important; }
.ws-border-top    { border-top: 1px solid var(--ws-border-subtle) !important; }
.ws-border-bottom { border-bottom: 1px solid var(--ws-border-subtle) !important; }

.ws-rounded    { border-radius: var(--ws-radius)    !important; }
.ws-rounded-lg { border-radius: var(--ws-radius-lg) !important; }
.ws-rounded-xl { border-radius: var(--ws-radius-xl) !important; }
.ws-rounded-full { border-radius: var(--ws-radius-full) !important; }

/* ============================================================
   6. SECTION LABEL
   Usage: add class ws-section-label to an HTML widget
   ============================================================ */
.ws-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ws-accent);
  font-family: var(--ws-font);
}

.ws-section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--ws-accent);
  flex-shrink: 0;
}

/* ============================================================
   7. BUTTONS & CTAs
   Elementor buttons render as <a> tags — Fathom-trackable.
   Add these classes to Elementor button "CSS Classes" field.
   ============================================================ */
.ws-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: var(--ws-font) !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  transition: all var(--ws-transition) !important;
  text-decoration: none !important;
  line-height: 1 !important;
}

.ws-btn-primary {
  background: var(--ws-accent) !important;
  color: #fff !important;
  border-color: var(--ws-accent) !important;
}
.ws-btn-primary:hover {
  background: var(--ws-accent-hover) !important;
  border-color: var(--ws-accent-hover) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 28px var(--ws-accent-glow-strong) !important;
}

.ws-btn-secondary {
  background: var(--ws-bg-card) !important;
  color: var(--ws-text-primary) !important;
  border: 1px solid var(--ws-border-default) !important;
}
.ws-btn-secondary:hover {
  background: var(--ws-bg-card-hover) !important;
  border-color: var(--ws-border-strong) !important;
  color: var(--ws-text-primary) !important;
}

/* Text link style */
.ws-text-link {
  color: var(--ws-accent) !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all var(--ws-transition) !important;
  font-size: 0.875rem !important;
}
.ws-text-link::after { content: ' →'; }
.ws-text-link:hover {
  color: var(--ws-accent-hover) !important;
  gap: 8px !important;
}

/* ============================================================
   8. HERO COMPONENTS
   ============================================================ */

/* Badge — wrap in a centered div via HTML widget */
.ws-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ws-bg-card);
  border: 1px solid var(--ws-border-default);
  border-radius: var(--ws-radius-full);
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ws-text-secondary);
  font-family: var(--ws-font);
}
.ws-hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--ws-success);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--ws-success);
  display: inline-block;
  flex-shrink: 0;
}

/* Background radial glow — add ws-hero-glow to Elementor section */
.ws-hero-glow {
  position: relative;
  overflow: hidden;
}
.ws-hero-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.13) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%,  rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.ws-hero-glow > .elementor-container { position: relative; z-index: 1; }

/* Subtle dot-grid overlay — add ws-hero-grid to same section */
.ws-hero-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
  z-index: 0;
}

/* CTA section glow */
.ws-cta-glow {
  position: relative;
  overflow: hidden;
}
.ws-cta-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.ws-cta-glow > .elementor-container { position: relative; z-index: 1; }

/* ============================================================
   9. SERVICE CARDS
   Use ws-service-card on a Custom HTML widget or Elementor
   widget wrapper CSS class.
   ============================================================ */
.ws-service-card {
  background: var(--ws-bg-card);
  border: 1px solid var(--ws-border-subtle);
  border-radius: var(--ws-radius-lg);
  padding: 32px;
  transition: background var(--ws-transition), border-color var(--ws-transition), transform var(--ws-transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--ws-font);
}
.ws-service-card:hover {
  background: var(--ws-bg-card-hover);
  border-color: var(--ws-border-default);
  transform: translateY(-2px);
}
.ws-service-card .card-icon {
  width: 44px;
  height: 44px;
  background: var(--ws-accent-glow);
  border: 1px solid var(--ws-accent-border);
  border-radius: var(--ws-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.ws-service-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ws-text-primary);
  margin: 0 0 10px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.ws-service-card p {
  font-size: 0.875rem;
  color: var(--ws-text-secondary);
  line-height: 1.65;
  margin: 0 0 20px;
  flex: 1;
}
.ws-service-card a {
  color: var(--ws-accent);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--ws-transition);
  margin-top: auto;
}
.ws-service-card a::after { content: ' →'; }
.ws-service-card a:hover  { color: var(--ws-accent-hover); gap: 8px; }

/* ============================================================
   10. PAIN POINT CARDS
   ============================================================ */
.ws-pain-card {
  background: var(--ws-bg-card);
  border: 1px solid var(--ws-border-subtle);
  border-radius: var(--ws-radius-lg);
  padding: 32px;
  transition: border-color var(--ws-transition);
  font-family: var(--ws-font);
  height: 100%;
}
.ws-pain-card:hover { border-color: var(--ws-border-default); }
.ws-pain-card .pain-icon {
  font-size: 1.5rem;
  margin-bottom: 18px;
}
.ws-pain-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ws-text-primary);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.ws-pain-card p {
  font-size: 0.9rem;
  color: var(--ws-text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   11. STEP CARDS (How It Works)
   ============================================================ */
.ws-step {
  text-align: center;
  font-family: var(--ws-font);
}
.ws-step-number {
  width: 56px;
  height: 56px;
  background: var(--ws-accent-glow);
  border: 1px solid var(--ws-accent-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ws-accent);
  margin: 0 auto 24px;
}
.ws-step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ws-text-primary);
  margin: 0 0 12px;
}
.ws-step p {
  font-size: 0.9rem;
  color: var(--ws-text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   12. METRIC CARDS
   ============================================================ */
.ws-metric-card {
  background: var(--ws-bg-card);
  border: 1px solid var(--ws-border-subtle);
  border-radius: var(--ws-radius-lg);
  padding: 36px 24px;
  text-align: center;
  font-family: var(--ws-font);
}
.ws-metric-value {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ws-text-primary);
  line-height: 1;
  margin-bottom: 10px;
  font-family: var(--ws-font);
}
.ws-metric-value .accent { color: var(--ws-accent); }
.ws-metric-label {
  font-size: 0.875rem;
  color: var(--ws-text-muted);
  line-height: 1.4;
}

/* ============================================================
   13. TESTIMONIAL
   ============================================================ */
.ws-testimonial {
  background: var(--ws-bg-elevated);
  border: 1px solid var(--ws-border-default);
  border-radius: var(--ws-radius-xl);
  padding: 56px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--ws-font);
}
.ws-testimonial-quote {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ws-text-primary);
  line-height: 1.7;
  margin: 0 0 32px;
  font-style: italic;
}
.ws-testimonial-quote::before { content: '\201C'; color: var(--ws-accent); }
.ws-testimonial-quote::after  { content: '\201D'; color: var(--ws-accent); }
.ws-testimonial-author {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ws-text-primary);
  margin: 0 0 4px;
}
.ws-testimonial-title {
  font-size: 0.8125rem;
  color: var(--ws-text-muted);
  margin: 0;
}

/* ============================================================
   14. TRUSTED LOGOS BAR
   ============================================================ */
.ws-logo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.ws-logo-item {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ws-text-muted);
  opacity: 0.55;
  letter-spacing: -0.01em;
  transition: opacity var(--ws-transition);
  font-family: var(--ws-font);
}
.ws-logo-item:hover { opacity: 0.9; }

/* ============================================================
   15. SERVE / AUDIENCE CARDS
   ============================================================ */
.ws-serve-card {
  background: var(--ws-bg-card);
  border: 1px solid var(--ws-border-subtle);
  border-radius: var(--ws-radius-lg);
  padding: 32px;
  transition: border-color var(--ws-transition), background var(--ws-transition);
  font-family: var(--ws-font);
  height: 100%;
}
.ws-serve-card:hover {
  border-color: var(--ws-border-default);
  background: var(--ws-bg-card-hover);
}
.ws-serve-card .serve-icon { font-size: 2rem; margin-bottom: 18px; }
.ws-serve-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ws-text-primary);
  margin: 0 0 10px;
}
.ws-serve-card p {
  font-size: 0.875rem;
  color: var(--ws-text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   16. FAQ ITEMS (for service pages)
   ============================================================ */
.ws-faq-item {
  border-bottom: 1px solid var(--ws-border-subtle);
  padding: 24px 0;
  font-family: var(--ws-font);
}
.ws-faq-item:first-child { border-top: 1px solid var(--ws-border-subtle); }
.ws-faq-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ws-text-primary);
  margin: 0 0 12px;
}
.ws-faq-answer {
  font-size: 0.9rem;
  color: var(--ws-text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   17. SERVICE PAGE HERO
   ============================================================ */
.ws-page-hero-glow {
  position: relative;
  overflow: hidden;
}
.ws-page-hero-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 0%, rgba(99, 102, 241, 0.11) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.ws-page-hero-glow > .elementor-container { position: relative; z-index: 1; }

/* ============================================================
   18. OUTCOME CHECKLIST (service pages)
   ============================================================ */
.ws-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--ws-font);
}
.ws-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ws-border-subtle);
  font-size: 0.9375rem;
  color: var(--ws-text-secondary);
  line-height: 1.5;
}
.ws-checklist li:last-child { border-bottom: none; }
.ws-checklist li::before {
  content: '✓';
  color: var(--ws-success);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================================
   19. CASE STUDY CARD
   ============================================================ */
.ws-case-card {
  background: var(--ws-bg-card);
  border: 1px solid var(--ws-border-subtle);
  border-radius: var(--ws-radius-lg);
  padding: 36px;
  transition: border-color var(--ws-transition), transform var(--ws-transition);
  font-family: var(--ws-font);
}
.ws-case-card:hover {
  border-color: var(--ws-border-default);
  transform: translateY(-2px);
}
.ws-case-card .case-university {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ws-accent);
  margin-bottom: 12px;
}
.ws-case-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ws-text-primary);
  margin: 0 0 12px;
}
.ws-case-card .case-metric {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ws-accent);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.ws-case-card .case-metric-label {
  font-size: 0.8125rem;
  color: var(--ws-text-muted);
}

/* ============================================================
   20. INTEGRATION BADGE
   ============================================================ */
.ws-integration-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ws-bg-card);
  border: 1px solid var(--ws-border-subtle);
  border-radius: var(--ws-radius);
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ws-text-secondary);
  font-family: var(--ws-font);
  transition: border-color var(--ws-transition);
}
.ws-integration-badge:hover { border-color: var(--ws-border-default); color: var(--ws-text-primary); }

/* ============================================================
   21. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .ws-testimonial         { padding: 32px 24px; }
  .ws-metric-value        { font-size: 2.25rem; }
  .ws-logo-bar            { gap: 24px; }
  .ws-step-number         { width: 48px; height: 48px; font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .ws-testimonial         { padding: 24px 16px; }
  .ws-metric-value        { font-size: 2rem; }
  .ws-service-card,
  .ws-pain-card,
  .ws-serve-card,
  .ws-case-card           { padding: 24px; }
}
