/* ══════════════════════════════════════════════════════════════
   CardForge — Master Design System v1
   Brand-agnostic, reusable design system for customer sites.
   Include responsive-base.css BEFORE this file.
   
   Usage: <link rel="stylesheet" href="responsive-base.css">
          <link rel="stylesheet" href="cardforge-master.css">
   ══════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ─── */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap&font-display=swap");

/* ══════════════════════════════════════════════════════════════
   DESIGN TOKENS — Customize these per client site
   ══════════════════════════════════════════════════════════════ */
:root {
  /* Brand colors */
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #d97706;

  /* Surfaces (dark theme) */
  --bg-darker: #0a0f1a;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-elevated: #334155;

  /* Text */
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Borders & UI */
  --border: rgba(255,255,255,0.06);
  --border-light: rgba(255,255,255,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.4);

  /* States */
  --success: #10b981;
  --danger: #ef4444;

  /* Layout */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --nav-height: 68px;
}

/* Light theme — toggle with data-theme="light" on <html> */
[data-theme="light"] {
  --bg-darker: #f0f4f8;
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border: #e2e8f0;
  --border-light: #cbd5e1;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.1);
}

/* ─── Base ─── */
body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  overflow-x: hidden;
}

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

/* ══════════════════════════════════════════════════════════════
   NAVIGATION — Fixed, glassmorphism, responsive
   ══════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(10, 15, 26, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.nav.scrolled {
  background: rgba(7, 12, 23, 0.96);
  border-bottom-color: var(--border-light);
}

[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .nav.scrolled {
  background: rgba(255, 255, 255, 0.96);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

[data-theme="light"] .nav-logo { color: var(--text); }

.nav-logo span {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav logo images — height-based for compact nav */
.nav-logo-img {
  display: block;
  max-height: clamp(44px, 6vh, 60px);
  height: auto;
  width: auto;
  flex-shrink: 0;
}

/* Dark/light logo variants */
.nav-logo-dark { display: block; }
.nav-logo-light { display: none; }
[data-theme="light"] .nav-logo-dark { display: none; }
[data-theme="light"] .nav-logo-light { display: block; }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

[data-theme="light"] .nav-links a {
  color: #64748b;
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

/* CTA button in nav */
.nav-links .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff !important;
  margin-left: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.nav-links .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

[data-theme="light"] .hamburger span { background: #1e293b; }

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Theme toggle */
.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  transition: all var(--transition);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 60px) 24px 100px;
  background: var(--bg-darker);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(37, 99, 235, 0.12), transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(245, 158, 11, 0.08), transparent 60%);
  animation: heroGlow 12s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes heroGlow {
  0%   { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-2%, -2%) rotate(3deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero h1 { max-width: none !important; 
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #1e293b;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
}

.btn-lg { padding: 18px 40px; font-size: 18px; }

/* ══════════════════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════════════════ */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
}

.section-wide {
  padding: 80px 24px;
}

.section-dark {
  background: var(--bg-darker);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: var(--text-micro, 0.78rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   CARD GRIDS
   ══════════════════════════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.card-icon.blue   { background: rgba(37, 99, 235, 0.1);  color: var(--primary-light); }
.card-icon.green  { background: rgba(16, 185, 129, 0.1);  color: var(--success); }
.card-icon.amber  { background: rgba(245, 158, 11, 0.1);  color: var(--accent); }
.card-icon.purple { background: rgba(139, 92, 246, 0.1);  color: #a78bfa; }
.card-icon.red    { background: rgba(239, 68, 68, 0.1);    color: var(--danger); }

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ══════════════════════════════════════════════════════════════
   CTA SECTION
   ══════════════════════════════════════════════════════════════ */
.cta-section {
  padding: 100px 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(245,158,11,0.06));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-section h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

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

/* ══════════════════════════════════════════════════════════════
   CONTACT FORM
   ══════════════════════════════════════════════════════════════ */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-light);
}

/* ══════════════════════════════════════════════════════════════
   FAQ ACCORDION
   ══════════════════════════════════════════════════════════════ */
.faq-list { max-width: 780px; margin: 0 auto; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover { border-color: var(--border-light); }

.faq-question {
  padding: 18px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.faq-question .icon {
  flex-shrink: 0;
  color: var(--text-dim);
  transition: transform var(--transition);
  font-size: 1.1rem;
}

.faq-item.open .faq-question .icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 22px;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 22px 18px;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border);
  padding: 60px 24px 32px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--primary-light); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ══════════════════════════════════════════════════════════════
   SCROLL ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: repeat(3, 1fr); text-align: center; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; right: -300px;
    width: 280px; height: 100vh;
    background: var(--bg-darker);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 80px 20px 20px;
    gap: 2px;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }

  .nav-links.open { right: 0; }
  .nav-links a { padding: 12px 16px; font-size: 0.95rem; }
  .nav-links .nav-cta { margin: 8px 0 0 0; justify-content: center; }

  .hero { padding: calc(var(--nav-height) + 40px) 20px 60px; min-height: auto; }

  .card-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); gap: 24px; text-align: center; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 60px 20px; }
}

@media (max-width: 480px) {
  .nav-links { width: 100%; right: -100%; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; justify-content: center; }
  .section { padding: 48px 16px; }
}
