/* ============================================
   DATAHOOKS — Global Styles
   Light Theme / Dark Navy + Coral Red Accent
   Matches dhooks MVP spec branding
   ============================================ */

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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f9f9fc;
  --navy: #1a1a2e;
  --navy-light: #2d2d44;
  --text-primary: #1a1a2e;
  --text-secondary: #555568;
  --text-muted: #8888a0;
  --accent: #d6456b;
  --accent-light: #e8668a;
  --accent-dark: #b83a5a;
  --accent-glow: rgba(214, 69, 107, 0.15);
  --accent-bg: rgba(214, 69, 107, 0.06);
  --border-color: #e5e5ee;
  --border-light: #f0f0f5;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 8px 40px rgba(26, 26, 46, 0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-dark); }

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.gradient-text {
  color: var(--accent);
  background: none;
  -webkit-text-fill-color: var(--accent);
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 3rem;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
  position: relative;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo:hover { color: var(--navy); }

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--navy);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}
.logo-icon svg {
  width: 22px;
  height: 27px;
}
.logo-icon img {
  width: 22px;
  height: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--navy-light);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
}
.nav-links .btn-primary {
  color: #fff !important;
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Mobile menu */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(214, 69, 107, 0.25);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--navy);
  color: var(--navy);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 0.5rem 0;
}
.btn-ghost:hover { color: var(--accent-dark); }
.btn-ghost .arrow { transition: transform var(--transition); }
.btn-ghost:hover .arrow { transform: translateX(4px); }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.card h3 { margin-bottom: 0.6rem; }

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Grid helpers --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.08;
}
.hero-bg .orb-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  right: -100px;
}
.hero-bg .orb-2 {
  width: 400px;
  height: 400px;
  background: var(--navy);
  bottom: -100px;
  left: -100px;
}
.hero-bg .grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,26,46,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,26,46,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 720px;
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 560px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-color);
}

.hero-stat .number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}
.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* --- Value Props Section --- */
.value-props {
  background: var(--bg-secondary);
}

.value-prop-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
}
.value-prop-item:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}
.value-prop-item.reverse {
  direction: rtl;
}
.value-prop-item.reverse > * {
  direction: ltr;
}

.value-prop-number {
  font-size: 5rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 1rem;
}

.value-prop-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.value-prop-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

.value-prop-visual {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.value-prop-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0.02;
}

/* --- Data Sources / Integrations --- */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.integration-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all var(--transition);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy);
}
.integration-item:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.integration-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
  background: #f4f4f8;
}
.integration-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--bg-secondary);
  text-align: center;
}

.cta-box {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
}
.cta-box h2 {
  margin-bottom: 1rem;
  color: #fff;
}
.cta-box .gradient-text {
  color: var(--accent-light);
  -webkit-text-fill-color: var(--accent-light);
}
.cta-box p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  border-top: none;
  padding: 4rem 0 2rem;
}

.footer .logo {
  color: #fff;
}
.footer .logo:hover { color: #fff; }
.footer .logo-icon {
  background: var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.5);
  margin-top: 1rem;
  font-size: 0.9rem;
  max-width: 300px;
  line-height: 1.7;
}

.footer h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

/* --- Form Styles --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1.2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23555568' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

/* --- Page Header (internal pages) --- */
.page-header {
  padding: 10rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.05;
}
.page-header .container { position: relative; z-index: 1; }
.page-header p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 1rem auto 0;
}

/* --- Divider (like the red rule in the spec) --- */
.accent-rule {
  width: 80px;
  height: 3px;
  background: var(--accent);
  border: none;
  margin: 1.5rem auto;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Data flow animation --- */
.data-flow {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.data-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;
  background: rgba(26, 26, 46, 0.04);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  animation: slideIn 0.5s ease forwards;
  opacity: 0;
}
.data-row:nth-child(1) { animation-delay: 0.1s; }
.data-row:nth-child(2) { animation-delay: 0.2s; }
.data-row:nth-child(3) { animation-delay: 0.3s; }
.data-row:nth-child(4) { animation-delay: 0.4s; }
.data-row:nth-child(5) { animation-delay: 0.5s; }

.data-row .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .value-prop-item { grid-template-columns: 1fr; gap: 2rem; }
  .value-prop-item.reverse { direction: ltr; }
}

@media (max-width: 768px) {
  section { padding: 4rem 0; }

  .nav-links { display: none; }
  .mobile-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1.2rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .integrations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
