/* ============================================================
   Get-Hub.io — Unified Design Tokens ("Modern SaaS Clean")
   Single source of truth for all templates.

   Architecture:
     theme.css (tokens) → tailwind-config.js (extends TW)
       → 56 templates  → app.css (components)

   Naming: --{category}-{property}[-variant]
   Scale:  4px grid (spacing), modular type scale
   ============================================================ */

/* ── Fonts ──────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&1,400;1,500&family=Bricolage+Grotesque:opsz,wght@12..96,300;12..96,400;12..96,600;12..96,700;12..96,800&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

/* ── Light theme (default) ──────────────────────────────────── */
:root {
  /* ─ Surfaces ─ */
  --color-bg:           #FAFBFC;
  --color-surface:      #FFFFFF;
  --color-elevated:     #FFFFFF;
  --color-sunken:       #F3F4F6;   /* inset areas, code blocks, input backgrounds */
  --color-border:       #E2E5EB;
  --color-border-subtle:#F0F1F3;   /* lighter separators, table rows */
  --color-overlay:      rgba(0, 0, 0, 0.45); /* modal/drawer scrim */

  /* ─ Text ─ */
  --color-text:         #111827;
  --color-text-secondary:#4B5563;   /* less prominent than --color-text, more readable than --color-muted */
  --color-muted:        #6B7280;
  --color-link:         #4F46E5;
  --color-link-hover:   #4338CA;

  /* ─ Primary — Indigo ─ */
  --color-accent:       #6366F1;
  --color-accent-hover: #4F46E5;
  --color-accent-active:#4338CA;
  --color-accent-light: rgba(99, 102, 241, 0.08);
  --color-on-accent:    #FFFFFF;

  /* ─ CTA — Emerald (complementary accent for conversion actions) ─ */
  --color-cta:          #059669;
  --color-cta-hover:    #047857;
  --color-cta-active:   #065F46;
  --color-cta-light:    rgba(5, 150, 105, 0.08);
  --color-on-cta:       #FFFFFF;

  /* ─ Semantic ─ */
  --color-success:      #10B981;
  --color-success-light:rgba(16, 185, 129, 0.08);
  --color-on-success:   #FFFFFF;

  --color-warning:      #F59E0B;
  --color-warning-light:rgba(245, 158, 11, 0.08);
  --color-on-warning:   #111827;  /* dark text on yellow */

  --color-danger:       #EF4444;
  --color-danger-light: rgba(239, 68, 68, 0.08);
  --color-on-danger:    #FFFFFF;

  --color-info:         #3B82F6;
  --color-info-light:   rgba(59, 130, 246, 0.08);
  --color-on-info:      #FFFFFF;

  /* ─ Shadows ─ */
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg:     0 12px 40px rgba(0,0,0,0.08);
  --shadow-xl:     0 20px 60px rgba(0,0,0,0.1);
  --shadow-accent: 0 4px 14px rgba(99,102,241,0.25);
  --shadow-cta:    0 4px 14px rgba(5,150,105,0.25);

  /* ─ Typography — Font stacks ─ */
  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* ─ Typography — Modular scale (1.250 major third) ─ */
  --text-xs:   0.75rem;    /* 12px — captions, badges */
  --text-sm:   0.875rem;   /* 14px — helper text, meta */
  --text-base: 1rem;       /* 16px — body text */
  --text-lg:   1.125rem;   /* 18px — lead paragraphs */
  --text-xl:   1.25rem;    /* 20px — card headings */
  --text-2xl:  1.5rem;     /* 24px — section headings */
  --text-3xl:  1.875rem;   /* 30px — page headings */
  --text-4xl:  2.25rem;    /* 36px — hero subheadings */
  --text-5xl:  3rem;       /* 48px — hero display */

  --leading-tight:   1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.75;

  /* ─ Spacing — 4px grid ─ */
  --space-0:   0;
  --space-1:   0.25rem;    /*  4px */
  --space-2:   0.5rem;     /*  8px */
  --space-3:   0.75rem;    /* 12px */
  --space-4:   1rem;       /* 16px */
  --space-5:   1.25rem;    /* 20px */
  --space-6:   1.5rem;     /* 24px */
  --space-8:   2rem;       /* 32px */
  --space-10:  2.5rem;     /* 40px */
  --space-12:  3rem;       /* 48px */
  --space-16:  4rem;       /* 64px */
  --space-20:  5rem;       /* 80px */
  --space-24:  6rem;       /* 96px */

  /* ─ Radius ─ */
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  20px;
  --radius-pill: 9999px;

  /* ─ Z-Index — layered scale ─ */
  --z-base:     0;
  --z-dropdown: 10;
  --z-sticky:   20;
  --z-overlay:  30;
  --z-modal:    40;
  --z-popover:  50;
  --z-toast:    60;

  /* ─ Transitions ─ */
  --ease:            cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in:         cubic-bezier(0.4, 0, 1, 1);
  --ease-out:        cubic-bezier(0, 0, 0.2, 1);
  --ease-spring:     cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 100ms var(--ease);
  --transition:      150ms var(--ease);
  --transition-slow: 300ms var(--ease);

  /* ─ Interactive states ─ */
  --opacity-disabled:      0.4;
  --opacity-hover-overlay: 0.04;

  /* ─ Container widths ─ */
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1280px;

  /* ─ Scrollbar ─ */
  --scrollbar-track: #F3F4F6;
  --scrollbar-thumb: #D1D5DB;
  --scrollbar-hover: #9CA3AF;
}

/* ── Dark theme ─────────────────────────────────────────────── */
[data-theme="dark"],
.dark {
  --color-bg:           #0C0F17;
  --color-surface:      #141825;
  --color-elevated:     #1A1F2E;
  --color-sunken:       #0A0D14;
  --color-border:       #252B3B;
  --color-border-subtle:#1E2331;
  --color-overlay:      rgba(0, 0, 0, 0.6);

  --color-text:         #F3F4F6;
  --color-text-secondary:#D1D5DB;
  --color-muted:        #9CA3AF;
  --color-link:         #818CF8;
  --color-link-hover:   #A5B4FC;

  --color-accent:       #818CF8;
  --color-accent-hover: #6366F1;
  --color-accent-active:#4F46E5;
  --color-accent-light: rgba(129, 140, 248, 0.1);
  --color-on-accent:    #FFFFFF;

  --color-cta:          #34D399;
  --color-cta-hover:    #10B981;
  --color-cta-active:   #059669;
  --color-cta-light:    rgba(52, 211, 153, 0.1);
  --color-on-cta:       #111827;  /* dark text on bright green */

  --color-success:      #34D399;
  --color-success-light:rgba(52, 211, 153, 0.1);
  --color-on-success:   #111827;

  --color-warning:      #FBBF24;
  --color-warning-light:rgba(251, 191, 36, 0.1);
  --color-on-warning:   #111827;

  --color-danger:       #F87171;
  --color-danger-light: rgba(248, 113, 113, 0.1);
  --color-on-danger:    #FFFFFF;

  --color-info:         #60A5FA;
  --color-info-light:   rgba(96, 165, 250, 0.1);
  --color-on-info:      #111827;

  --shadow-sm:     0 1px 2px rgba(0,0,0,0.2);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg:     0 12px 40px rgba(0,0,0,0.4);
  --shadow-xl:     0 20px 60px rgba(0,0,0,0.5);
  --shadow-accent: 0 4px 14px rgba(129,140,248,0.2);
  --shadow-cta:    0 4px 14px rgba(52,211,153,0.2);

  --opacity-hover-overlay: 0.08;

  --scrollbar-track: #141825;
  --scrollbar-thumb: #252B3B;
  --scrollbar-hover: #374151;
}

/* ── Base reset ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--leading-normal);
  transition: background-color var(--transition), color var(--transition);
}

/* ── Selection ──────────────────────────────────────────────── */
::selection {
  background: rgba(99, 102, 241, 0.25);
  color: var(--color-text);
}

.dark ::selection,
[data-theme="dark"] ::selection {
  background: rgba(129, 140, 248, 0.3);
}

/* ── Focus ring ─────────────────────────────────────────────── */
*:focus { outline: none; }

*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* ── Utility: text-display ──────────────────────────────────── */
.text-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
}

/* ── Utility: text-mono ─────────────────────────────────────── */
.text-mono {
  font-family: var(--font-mono);
}

/* ── Utility: container-page ────────────────────────────────── */
.container-page {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* ── Alpine.js cloak ────────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── Dot grid background (for public pages) ─────────────────── */
.bg-dot-grid {
  background-image: radial-gradient(circle, var(--color-border) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Glass effect ───────────────────────────────────────────── */
.glass {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
}

.dark .glass,
[data-theme="dark"] .glass {
  background: rgba(20, 24, 37, 0.8);
  border-color: var(--color-border);
}

/* ============================================================
   3D Depth System — Paper Depth + Tilt Cards + Glass Parallax
   Combines realistic elevation shadows, interactive tilt,
   and CSS parallax layers. All CSS-only (JS optional for tilt).
   SEO/GEO-safe: zero canvas/WebGL, all content stays in DOM.
   ============================================================ */

/* ── 3D Elevation tokens (light) ──────────────────────────── */
:root {
  --elevation-1: 0 1px 1px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04), 0 4px 8px rgba(0,0,0,.02);
  --elevation-2: 0 1px 2px rgba(0,0,0,.06), 0 4px 8px rgba(0,0,0,.05), 0 8px 16px rgba(0,0,0,.03), 0 12px 24px rgba(0,0,0,.02);
  --elevation-3: 0 2px 4px rgba(0,0,0,.06), 0 8px 16px rgba(0,0,0,.05), 0 16px 32px rgba(0,0,0,.04), 0 24px 48px rgba(0,0,0,.02);
  --elevation-4: 0 2px 4px rgba(0,0,0,.08), 0 12px 24px rgba(0,0,0,.06), 0 24px 48px rgba(0,0,0,.04), 0 32px 64px rgba(0,0,0,.03);
  --elevation-5: 0 4px 8px rgba(0,0,0,.08), 0 16px 32px rgba(0,0,0,.06), 0 32px 64px rgba(0,0,0,.05), 0 48px 96px rgba(0,0,0,.03);
  --edge-light:  inset 0 1px 0 rgba(255,255,255,.06);
  --tilt-perspective: 800px;
  --tilt-intensity: 12deg;
}

/* ── 3D Elevation tokens (dark) ───────────────────────────── */
[data-theme="dark"],
.dark {
  --elevation-1: 0 1px 1px rgba(0,0,0,.2), 0 2px 4px rgba(0,0,0,.15), 0 4px 8px rgba(0,0,0,.1);
  --elevation-2: 0 1px 2px rgba(0,0,0,.2), 0 4px 8px rgba(0,0,0,.18), 0 8px 16px rgba(0,0,0,.12), 0 12px 24px rgba(0,0,0,.06);
  --elevation-3: 0 2px 4px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.2), 0 16px 32px rgba(0,0,0,.15), 0 24px 48px rgba(0,0,0,.08);
  --elevation-4: 0 2px 4px rgba(0,0,0,.3), 0 12px 24px rgba(0,0,0,.25), 0 24px 48px rgba(0,0,0,.15), 0 32px 64px rgba(0,0,0,.08);
  --elevation-5: 0 4px 8px rgba(0,0,0,.3), 0 16px 32px rgba(0,0,0,.25), 0 32px 64px rgba(0,0,0,.18), 0 48px 96px rgba(0,0,0,.1);
  --edge-light:  inset 0 1px 0 rgba(255,255,255,.04);
}

/* ── Elevation utility classes ────────────────────────────── */
.elevation-1 { box-shadow: var(--elevation-1), var(--edge-light); }
.elevation-2 { box-shadow: var(--elevation-2), var(--edge-light); }
.elevation-3 { box-shadow: var(--elevation-3), var(--edge-light); }
.elevation-4 { box-shadow: var(--elevation-4), var(--edge-light); }
.elevation-5 { box-shadow: var(--elevation-5), var(--edge-light); }

/* ── Tilt card — 3D interactive card ─────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
  will-change: transform;
}

.tilt-card:hover {
  box-shadow: var(--elevation-4), var(--edge-light);
}

/* Inner content floats above the card surface */
.tilt-card .tilt-content {
  transform: translateZ(30px);
  transform-style: preserve-3d;
}

.tilt-card .tilt-icon {
  transform: translateZ(50px);
  transform-style: preserve-3d;
}

/* ── 3D extruded text — hero headings ────────────────────── */
.text-3d {
  text-shadow:
    1px 1px 0 rgba(99,102,241,.25),
    2px 2px 0 rgba(99,102,241,.15),
    3px 3px 0 rgba(99,102,241,.08),
    4px 4px 12px rgba(0,0,0,.1);
}

.dark .text-3d,
[data-theme="dark"] .text-3d {
  text-shadow:
    1px 1px 0 rgba(129,140,248,.3),
    2px 2px 0 rgba(129,140,248,.18),
    3px 3px 0 rgba(129,140,248,.08),
    4px 4px 16px rgba(0,0,0,.4);
}

/* ── Parallax hero container (CSS-only, no JS) ───────────── */
.parallax-hero {
  position: relative;
  overflow: hidden;
}

.parallax-layer-back {
  position: absolute;
  inset: -20% -10%;
  z-index: 0;
  animation: parallaxFloat 25s ease-in-out infinite;
  pointer-events: none;
}

.parallax-layer-mid {
  position: absolute;
  inset: -10% -5%;
  z-index: 1;
  animation: parallaxFloat 18s ease-in-out infinite reverse;
  pointer-events: none;
}

.parallax-layer-front {
  position: relative;
  z-index: 2;
}

@keyframes parallaxFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%      { transform: translate(-8px, 12px) scale(1.01); }
  50%      { transform: translate(5px, -8px) scale(1.005); }
  75%      { transform: translate(10px, 6px) scale(1.01); }
}

/* ── Ambient gradient orbs (decorative depth) ────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
  animation: orbPulse 8s ease-in-out infinite;
}

.orb-indigo {
  background: radial-gradient(circle, #6366F1, #4338CA);
}

.orb-violet {
  background: radial-gradient(circle, #8B5CF6, #6D28D9);
}

.orb-cyan {
  background: radial-gradient(circle, #22D3EE, #0891B2);
}

.dark .orb,
[data-theme="dark"] .orb {
  opacity: 0.12;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50%      { transform: scale(1.15); opacity: 0.2; }
}

.dark @keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.12; }
  50%      { transform: scale(1.15); opacity: 0.16; }
}

/* ── Elevation hover transition (cards lift on hover) ─────── */
.hover-lift {
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--elevation-3), var(--edge-light);
}

/* ── Glass card with depth (upgraded glass) ──────────────── */
.glass-depth {
  background: var(--color-surface);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-2), var(--edge-light);
  transition: box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.glass-depth:hover {
  box-shadow: var(--elevation-3), var(--edge-light);
}

.dark .glass-depth,
[data-theme="dark"] .glass-depth {
  background: rgba(20, 24, 37, 0.85);
  border-color: rgba(37, 43, 59, 0.8);
}

/* ── GH Monogram SVG Favicon ────────────────────────────────── */
/* Use as: <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,..."> */
/* SVG: <rect rx="6" fill="#6366F1"/><text fill="white" font-weight="900">GH</text> */
