/*
 * sp-base.css — Sprintly Design System v2
 * Design tokens, reset, typography, spacing
 */

/* ============================================================
   FONTS — Geist Variable (self-hosted via jsDelivr) + fallback
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Cormorant+Garamond:ital,wght@1,400;1,600&display=swap');

/* ============================================================
   DESIGN TOKENS — dark mode default (Palette A)
   ============================================================ */
:root {
  /* Core palette */
  --sp-bg:        #0a0a0a;
  --sp-bg-2:      #141414;
  --sp-bg-3:      #1a1a1a;
  --sp-line:      #1f1f1f;
  --sp-line-2:    #2a2a2a;
  --sp-fg:        #f5f1ea;
  --sp-fg-2:      #c8c2b8;
  --sp-mute:      #8a857d;

  /* Accent — Sprintly Designs brand purple (consistent with FB / marketing materials).
     NO mint/gold/teal accent — Adam decision 2026-05-12: fiolet i złoto nie współgra. */
  --sp-accent:    #7c5cff;   /* primary brand */
  --sp-accent-h:  #9b7fff;   /* hover lighter */
  --sp-accent-2:  #b3a1ff;   /* light purple highlight (was mint #7ce5b2 — removed) */
  --sp-accent-2h: #c9bbff;

  /* Semantic */
  --sp-surface:   var(--sp-bg-2);
  --sp-border:    var(--sp-line);
  --sp-text:      var(--sp-fg);
  --sp-sub:       var(--sp-fg-2);

  /* Spacing scale — 8px base */
  --sp-1:   8px;
  --sp-2:  16px;
  --sp-3:  24px;
  --sp-4:  32px;
  --sp-5:  48px;
  --sp-6:  64px;
  --sp-7:  96px;
  --sp-8: 128px;

  /* Type scale */
  --sp-t-xs:   12px;
  --sp-t-sm:   14px;
  --sp-t-base: 16px;
  --sp-t-md:   18px;
  --sp-t-lg:   22px;
  --sp-t-xl:   28px;
  --sp-t-2xl:  40px;
  --sp-t-3xl:  64px;
  --sp-t-4xl:  96px;
  --sp-t-5xl: 128px;

  /* Border radii */
  --sp-r-xs:  4px;
  --sp-r-sm:  8px;
  --sp-r-md: 16px;
  --sp-r-lg: 24px;
  --sp-r-full: 999px;

  /* Transitions */
  --sp-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sp-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --sp-ease-out: cubic-bezier(0, 0, 0.2, 1);

  /* Shadows */
  --sp-shadow-sm: 0 1px 4px rgba(0,0,0,0.4);
  --sp-shadow-md: 0 4px 24px rgba(0,0,0,0.5);
  --sp-shadow-lg: 0 12px 48px rgba(0,0,0,0.6);
  --sp-shadow-accent: 0 8px 32px rgba(124,92,255,0.25);
}

/* DAY theme */
[data-theme="day"] {
  --sp-bg:        #faf9f7;
  --sp-bg-2:      #f2f0ec;
  --sp-bg-3:      #e8e5e0;
  --sp-line:      #e0ddd8;
  --sp-line-2:    #d0ccc6;
  --sp-fg:        #1a1714;
  --sp-fg-2:      #3d3830;
  --sp-mute:      #7a746b;
  --sp-accent:    #5c3dff;
  --sp-accent-h:  #7c5cff;
  --sp-accent-2:  #0fa858;
  --sp-shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --sp-shadow-md: 0 4px 24px rgba(0,0,0,0.12);
  --sp-shadow-lg: 0 12px 48px rgba(0,0,0,0.15);
}

/* DIMMED / sepia editorial */
[data-theme="dimmed"] {
  --sp-bg:        #13110e;
  --sp-bg-2:      #1c1914;
  --sp-bg-3:      #24201a;
  --sp-line:      #2e2a22;
  --sp-line-2:    #3a3528;
  --sp-fg:        #ede6d8;
  --sp-fg-2:      #c4b99e;
  --sp-mute:      #857c6a;
  --sp-accent:    #7c5cff;
  --sp-accent-h:  #9b7fff;
  --sp-accent-2:  #b3a1ff;
}

/* ============================================================
   MINIMAL RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  background: var(--sp-bg);
  color: var(--sp-fg);
  font-family: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: var(--sp-t-base);
  line-height: 1.6;
  transition: background 0.2s var(--sp-ease), color 0.2s var(--sp-ease);
  overflow-x: hidden;
}

img, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   GLOBAL LAYOUT HELPERS
   ============================================================ */
.sp-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

@media (min-width: 768px) {
  .sp-container {
    padding: 0 var(--sp-4);
  }
}

@media (min-width: 1200px) {
  .sp-container {
    padding: 0 var(--sp-5);
  }
}

.sp-section {
  padding: var(--sp-7) 0;
}

@media (max-width: 768px) {
  .sp-section {
    padding: var(--sp-6) 0;
  }
}

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.sp-eyebrow {
  font-size: var(--sp-t-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sp-accent);
}

.sp-title {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.sp-title-italic {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sp-lead {
  font-size: var(--sp-t-md);
  color: var(--sp-fg-2);
  line-height: 1.65;
  max-width: 640px;
}

/* ============================================================
   GLOBAL BUTTON STYLES
   ============================================================ */
.sp-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 12px 24px;
  border-radius: var(--sp-r-full);
  font-family: 'Inter Tight', sans-serif;
  font-size: var(--sp-t-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: all 0.2s var(--sp-ease);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.sp-btn-primary {
  background: var(--sp-accent);
  color: #fff;
  border-color: var(--sp-accent);
}
.sp-btn-primary:hover {
  background: var(--sp-accent-h);
  border-color: var(--sp-accent-h);
  transform: translateY(-1px);
  box-shadow: var(--sp-shadow-accent);
}

.sp-btn-ghost {
  background: transparent;
  color: var(--sp-fg);
  border-color: var(--sp-line-2);
}
.sp-btn-ghost:hover {
  border-color: var(--sp-fg-2);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}

.sp-btn-sm {
  padding: 8px 16px;
  font-size: var(--sp-t-xs);
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#sp-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--sp-accent);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ============================================================
   PROMO BAR
   ============================================================ */
.sp-promo-bar {
  background: var(--sp-accent);
  color: #fff;
  text-align: center;
  font-size: var(--sp-t-sm);
  font-weight: 500;
  padding: 8px var(--sp-3);
  position: relative;
  z-index: 200;
}

.sp-promo-bar a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

/* ============================================================
   DIVIDER UTILITY
   ============================================================ */
.sp-divider {
  height: 1px;
  background: var(--sp-line);
  border: none;
}

/* ============================================================
   SCROLL MARGIN — offset sticky nav (60px nav + 16px buffer)
   ============================================================ */
section[id],
[id^="pricing"],
[id^="features"],
[id^="templates"],
[id^="process"],
[id^="testimonials"],
[id^="bigcta"] {
  scroll-margin-top: 76px;
}

h2[id],
h3[id] {
  scroll-margin-top: 76px;
}
