/* =============================================
   Freelancer Automation - Main Stylesheet
   Matching ai-workshops.online style
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-deep: #1e40af;
  --blue-electric: #3b82f6;
  --blue-light: #60a5fa;
  --blue-pale: #dbeafe;

  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-blue: 0 4px 24px rgba(59,130,246,0.25);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --nav-height: 72px;
  --transition: 200ms cubic-bezier(0.4,0,0.2,1);
}

html.dark {
  --bg-primary: #0c1222;
  --bg-secondary: #111827;
  --bg-card: #131d30;
  --bg-card-hover: #182236;
  --border: #1e293b;
  --border-strong: #2d3f5c;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

/* --- Gradient text --- */
.gradient-text {
  background: linear-gradient(135deg, var(--blue-electric) 0%, var(--blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Section labels --- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-electric);
  margin-bottom: 16px;
}

.section-label svg { width: 16px; height: 16px; }

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 56px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--blue-electric);
  color: #ffffff;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(59,130,246,0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--blue-electric);
}

.btn-large {
  padding: 16px 36px;
  font-size: 17px;
  border-radius: var(--radius-lg);
}

/* =============================================
   NAV
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(12, 18, 34, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

html:not(.dark) .nav {
  background: rgba(248, 250, 252, 0.9);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.wordmark {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}
.wordmark-accent { color: var(--blue-electric); }
.wordmark-dash { color: var(--text-muted); }
.wordmark-main { color: var(--text-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-card); }

.nav-cta {
  background: var(--blue-electric) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
}
.nav-cta:hover { background: #2563eb !important; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--blue-electric); }
.theme-toggle svg { width: 16px; height: 16px; }

html.dark .icon-sun { display: block; }
html.dark .icon-moon { display: none; }
html:not(.dark) .icon-sun { display: none; }
html:not(.dark) .icon-moon { display: block; }

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
}
.hamburger svg { width: 18px; height: 18px; }

/* =============================================
   HERO
   ============================================= */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 96px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  z-index: -1;
}

html:not(.dark) .hero-bg-grid { opacity: 0.25; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue-electric);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 32px;
}
.hero-badge svg { width: 14px; height: 14px; }

.hero-headline {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 40px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
  max-width: 500px;
  margin: 0 auto;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--blue-electric);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* =============================================
   FEATURES
   ============================================= */
.features { background: var(--bg-secondary); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
  display: block;
}
.feature-card:hover {
  border-color: var(--blue-electric);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(59,130,246,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-electric);
  margin-bottom: 20px;
}
.feature-icon svg { width: 22px; height: 22px; }

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-electric);
}
.feature-link svg { width: 14px; height: 14px; }

/* =============================================
   LATEST POSTS
   ============================================= */
.latest { background: var(--bg-primary); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
  display: block;
}
.post-card:hover {
  border-color: rgba(59,130,246,0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.post-section {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-electric);
  background: rgba(59,130,246,0.1);
  padding: 4px 10px;
  border-radius: 100px;
}

.post-date {
  font-size: 13px;
  color: var(--text-muted);
}

.post-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* =============================================
   CTA SECTION
   ============================================= */
.cta-section { background: var(--bg-secondary); }

.cta-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.cta-bg-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.cta-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-note {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.email-text {
  color: var(--text-secondary);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding-top: 64px;
  padding-bottom: 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 12px;
  margin-bottom: 20px;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.footer-social a:hover {
  color: var(--blue-electric);
  border-color: var(--blue-electric);
}
.footer-social svg { width: 16px; height: 16px; }

.footer-links-group h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links-group ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-group a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-links-group a:hover { color: var(--blue-electric); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

.footer-legal a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-legal a:hover { color: var(--blue-electric); }

/* =============================================
   LIST PAGES (Daily, Guides, etc.)
   ============================================= */
.list-hero {
  padding: calc(var(--nav-height) + 60px) 0 60px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

.list-hero-inner { max-width: 760px; }

.list-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.list-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
}

.list-body {
  padding: 60px 0;
}

/* =============================================
   SINGLE POST PAGES
   ============================================= */
.single-hero {
  padding: calc(var(--nav-height) + 60px) 0 40px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}

.single-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s;
}
.single-back:hover { color: var(--blue-electric); }
.single-back svg { width: 16px; height: 16px; }

.single-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.single-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
  max-width: 760px;
}

.single-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
}

.single-body {
  padding: 60px 0;
}

.single-content {
  max-width: 760px;
}

.single-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.02em;
}

.single-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.single-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.single-content ul, .single-content ol {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.single-content li { margin-bottom: 0.5rem; list-style: disc; }
.single-content ol li { list-style: decimal; }

.single-content strong { color: var(--text-primary); }

.single-content code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.single-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.single-content pre code {
  background: none;
  padding: 0;
}

.single-content a {
  color: var(--blue-electric);
}
.single-content a:hover {
  text-decoration: underline;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    z-index: 99;
  }
  .nav-links.open a { padding: 12px 16px; border-radius: var(--radius-sm); }
  .hamburger { display: flex; }
  .stats-bar { padding: 16px 24px; gap: 0; }
  .stat { padding: 0 16px; }
  .stat-divider { height: 30px; }
  .stat-value { font-size: 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
