/**
 * Shared landing page styles.
 * All landing pages link to this file instead of duplicating CSS.
 * Page-specific styles remain inline in each page's <style> block.
 *
 * Design tokens live in brand-tokens.css (single source of truth — DUX-015).
 */
@import url('./brand-tokens.css');

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-size: 16px;
}

/* ── Background Glow ── */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(34, 197, 94, 0.04), transparent);
  pointer-events: none;
}

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

/* ── Section Spacing ── */
section { position: relative; z-index: 1; }
.section-pad { padding: 100px 0; }
.section-pad-lg { padding: 120px 0; }

/* ── Section Headers ── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -1px; line-height: 1.15; margin-bottom: 12px; }
.section-header p { font-size: 18px; color: var(--text-dim); max-width: 560px; margin: 0 auto; }
.section-label { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin-bottom: 12px; }

/* ── Animations ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animate-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; font-size: 15px; font-weight: 600; border: none; border-radius: 10px; cursor: pointer; text-decoration: none; transition: all 0.2s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-hover); background: var(--surface2); }
.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: var(--radius); }

/* ── Sticky Navigation ── */
.nav-wrapper { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease; border-bottom: 1px solid transparent; }
.nav-wrapper.scrolled { background: rgba(10, 10, 15, 0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: var(--border); }
nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; max-width: 1200px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo img:first-child { height: 36px; width: 36px; border-radius: 8px; }
.logo .logo-text { height: 22px !important; width: auto !important; }
.logo span { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links > a { font-size: 14px; font-weight: 500; color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.nav-links > a:hover { color: var(--text); }
.nav-links .btn-nav { padding: 9px 20px; background: var(--accent); color: #fff; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; transition: all 0.2s; }
.nav-links .btn-nav:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }

/* ── Nav Dropdowns ── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle { color: var(--text); }
.nav-chevron { font-size: 10px; transition: transform 0.2s; }
.nav-dropdown.open .nav-chevron { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: none;
  box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.4);
  z-index: 110;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
  font-size: 14px;
  line-height: 1.3;
}
.nav-dropdown-menu a strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.nav-dropdown-menu a span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}
.nav-dropdown-menu a:hover { background: var(--surface3); color: var(--text); }
.nav-dropdown-menu a:hover strong { color: var(--accent); }

.nav-dropdown-menu-wide {
  left: auto;
  right: 0;
  min-width: 600px;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.nav-dropdown.open .nav-dropdown-menu-wide { display: grid; }
.nav-dropdown-col { display: flex; flex-direction: column; }
.nav-dropdown-menu-wide .nav-dropdown-col a {
  padding: 8px 12px;
  font-size: 13px;
}
.nav-dropdown-menu-wide .nav-dropdown-col a:hover { color: var(--accent); background: transparent; }

/* Mobile nav toggle */
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Hero ── */
.hero { padding: 140px 0 80px; text-align: center; }
.hero h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 20px; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero h1 .gradient { background: linear-gradient(135deg, var(--accent), var(--green)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero .subtitle { font-size: 18px; line-height: 1.7; color: var(--text-dim); margin-bottom: 36px; max-width: 620px; margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.hero-note { font-size: 14px; color: var(--text-muted); }

/* ── Pain Points Grid ── */
.pain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pain-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; transition: border-color 0.3s, transform 0.3s; }
.pain-card:hover { border-color: rgba(239, 68, 68, 0.3); transform: translateY(-2px); }
.pain-icon { width: 44px; height: 44px; background: rgba(239, 68, 68, 0.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.pain-icon svg { width: 22px; height: 22px; stroke: #ef4444; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pain-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.pain-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* ── Solution Grid ── */
.solution-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.solution-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; transition: border-color 0.3s, transform 0.3s; }
.solution-card:hover { border-color: var(--accent-glow-strong); transform: translateY(-2px); }
.solution-icon { width: 44px; height: 44px; background: var(--accent-glow); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.solution-icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.solution-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.solution-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* ── Use Cases Grid ── */
.use-cases-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.use-case-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; transition: border-color 0.3s, transform 0.3s; }
.use-case-card:hover { border-color: rgba(34, 197, 94, 0.3); transform: translateY(-2px); }
.use-case-icon { width: 44px; height: 44px; background: var(--green-glow); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.use-case-icon svg { width: 22px; height: 22px; stroke: var(--green); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.use-case-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.use-case-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* ── FAQ Accordion ──
   Every landing page now uses the native <details class="faq-item"> + <summary>
   pattern, with FAQ styling defined inline per page. The old shared rules for
   the legacy .faq-toggle / .faq-answer.open JS pattern were silently clipping
   every <details> .faq-answer to max-height: 0 because the .open modifier
   never got applied — that class only existed on the old JS-driven version.
   Shared rules removed; individual pages own their FAQ CSS. */

/* ── CTA Section ── */
.cta-section { text-align: center; padding: 100px 0; }
.cta-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 60px 40px; max-width: 640px; margin: 0 auto; }
.cta-box h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.cta-box p { color: var(--text-dim); margin-bottom: 32px; font-size: 16px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-note { font-size: 14px; color: var(--text-muted); margin-top: 16px; }

/* ── More Industries Cross-link ── */
.more-industries-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.more-card { display: block; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; transition: border-color 0.3s, transform 0.3s; }
.more-card:hover { border-color: var(--accent-glow-strong); transform: translateY(-2px); }
.more-card-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.more-card strong { font-size: 14px; }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 64px 0 32px; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(5, 1fr); gap: 40px; margin-bottom: 48px; }
.footer-brand .tagline { font-size: 14px; color: var(--text-dim); margin-top: 12px; line-height: 1.6; transition: opacity 0.3s ease; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text); margin-bottom: 4px; }
.footer-col a { font-size: 13px; color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-industries { padding: 32px 0; border-top: 1px solid var(--border); margin-bottom: 0; }
.footer-industries > h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text); margin-bottom: 16px; }
.footer-industries-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }

/* ── Accessibility ── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pain-grid, .solution-grid, .use-cases-grid { grid-template-columns: repeat(2, 1fr); }
  .more-industries-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-industries-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .pain-grid, .solution-grid, .use-cases-grid { grid-template-columns: 1fr; }
  .more-industries-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-industries-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 120px 0 60px; }
  .section-pad { padding: 60px 0; }
  .cta-box { padding: 40px 24px; }
}
@media (max-width: 960px) {
  .nav-dropdown-menu-wide { min-width: 420px; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-mobile-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .nav-wrapper.mobile-open .nav-links { display: flex; }
  .nav-links > a,
  .nav-links .nav-dropdown-toggle {
    padding: 12px 8px;
    width: 100%;
    text-align: left;
    justify-content: space-between;
  }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-menu,
  .nav-dropdown-menu-wide {
    position: static;
    min-width: 0;
    width: 100%;
    box-shadow: none;
    border: none;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    padding: 6px;
    margin-bottom: 8px;
  }
  .nav-dropdown-menu-wide { grid-template-columns: 1fr; }
  .nav-links .btn-nav { margin-top: 8px; text-align: center; }
}
@media (max-width: 640px) {
  .footer-industries-grid { grid-template-columns: 1fr; }
}

/* ── Reduced Motion (A11Y-007) ──
   WCAG-recommended pattern: collapse durations to 0.01ms rather than
   `none` so animations still fire (one frame) — preserves logic that
   relies on transitionend / animationend events while honoring user
   preference for 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;
  }
  .animate-on-scroll { opacity: 1; transform: none; }
}
