/* ============================================
   DACS — dacs.finance
   Shared styles
   ============================================ */

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

/* --- Tokens --- */
:root {
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --dark: #0a1628;
  --dark-muted: #1a2744;
  --text: #111827;
  --text-secondary: #4b5563;
  --text-tertiary: #9ca3af;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f8fafb;
  --bg-subtle: #f1f5f4;
  --accent: #0f766e;
  --accent-hover: #0d6560;
  --accent-subtle: rgba(15, 118, 110, 0.08);
  --radius: 3px;
  --section-gap: 120px;
  --content-width: 1120px;
  --nav-height: 64px;
}

/* --- Base --- */
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Utilities --- */
.container { max-width: var(--content-width); margin: 0 auto; padding: 0 32px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* --- Typography --- */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.125rem; }
p { color: var(--text-secondary); }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height); display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.nav.on-dark .nav-logo, .nav.on-dark .nav-link { color: #fff; }
.nav.on-dark .nav-link:hover { color: rgba(255,255,255,0.7); }
.nav.scrolled .nav-logo, .nav.scrolled .nav-link, .nav.light .nav-logo, .nav.light .nav-link { color: var(--text); }
.nav.scrolled .nav-link:hover, .nav.light .nav-link:hover { color: var(--accent); }

.nav-inner {
  max-width: var(--content-width); margin: 0 auto; padding: 0 32px;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.08em; color: var(--text); transition: color 0.3s; }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-link { font-size: 0.875rem; font-weight: 500; color: var(--text); transition: color 0.2s; }
.nav-link:hover { color: var(--accent); }
.nav-link.active { color: var(--accent); }

.nav-cta {
  display: inline-flex; align-items: center; padding: 8px 20px;
  font-size: 0.8125rem; font-weight: 600; border-radius: var(--radius); transition: all 0.2s;
}
.nav.on-dark .nav-cta { background: #fff; color: var(--dark); }
.nav.on-dark .nav-cta:hover { background: rgba(255,255,255,0.85); color: var(--dark); }
.nav.scrolled .nav-cta, .nav.light .nav-cta { background: var(--text); color: #fff; }
.nav.scrolled .nav-cta:hover, .nav.light .nav-cta:hover { background: var(--dark); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; transition: all 0.3s; }
.nav.on-dark .nav-toggle span { background: #fff; }
.nav.scrolled .nav-toggle span, .nav.light .nav-toggle span { background: var(--text); }

/* ============================================
   HERO (homepage dark)
   ============================================ */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: var(--dark); overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(15, 118, 110, 0.10) 0%, transparent 60%),
              linear-gradient(to bottom, rgba(10, 22, 40, 0.3) 0%, rgba(10, 22, 40, 0.8) 100%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; padding-top: var(--nav-height); }
.hero-eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 24px; padding: 6px 14px;
  border: 1px solid rgba(15, 118, 110, 0.3); border-radius: 2px;
}
.hero h1 { color: #fff; max-width: 680px; margin-bottom: 24px; }
.hero p { color: rgba(255, 255, 255, 0.6); font-size: 1.125rem; line-height: 1.7; max-width: 540px; margin-bottom: 40px; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ============================================
   PAGE HERO (inner pages — light)
   ============================================ */
.page-hero {
  padding: calc(var(--nav-height) + 80px) 0 80px;
  border-bottom: 1px solid var(--border);
}
.page-hero .section-label { margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; max-width: 640px; }
.page-hero p { font-size: 1.125rem; line-height: 1.7; max-width: 560px; }
.page-hero .hero-actions { margin-top: 32px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font);
  font-size: 0.875rem; font-weight: 600; padding: 12px 28px;
  border-radius: var(--radius); border: none; cursor: pointer; transition: all 0.2s;
}
.btn-primary { background: #fff; color: var(--dark); }
.btn-primary:hover { background: rgba(255,255,255,0.88); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.2); }
.btn-secondary:hover { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: var(--dark); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-arrow::after { content: '\2192'; transition: transform 0.2s; }
.btn-arrow:hover::after { transform: translateX(3px); }

/* ============================================
   SECTIONS — shared
   ============================================ */
.section { padding: var(--section-gap) 0; }
.section-header { margin-bottom: 64px; }
.section-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { font-size: 1.0625rem; max-width: 560px; }

/* ============================================
   CONTENT — inner pages
   ============================================ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.content-block h3 { margin-bottom: 12px; font-size: 1.25rem; }
.content-block p { font-size: 0.9375rem; line-height: 1.7; margin-bottom: 16px; }
.content-block p:last-child { margin-bottom: 0; }

.feature-list { list-style: none; }
.feature-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  display: flex; gap: 16px; align-items: flex-start;
}
.feature-list li:first-child { padding-top: 0; }
.feature-list li:last-child { border-bottom: none; }
.feature-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0; margin-top: 7px;
}
.feature-list h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 4px; letter-spacing: -0.01em; }
.feature-list p { font-size: 0.875rem; line-height: 1.6; margin: 0; }

/* Spec table */
.spec-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.spec-table th, .spec-table td {
  text-align: left; padding: 14px 16px; font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}
.spec-table th { font-weight: 600; color: var(--text); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.spec-table td { color: var(--text-secondary); }
.spec-table td:first-child { color: var(--text); font-weight: 500; }

/* Three-column features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.feature-card h3 { font-size: 1rem; margin-bottom: 10px; }
.feature-card p { font-size: 0.9375rem; line-height: 1.65; }
.feature-icon {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); background: var(--accent-subtle); margin-bottom: 20px;
}
.feature-icon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Two-column text */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.two-col h3 { margin-bottom: 12px; }
.two-col p { font-size: 0.9375rem; line-height: 1.7; }

/* Related pages */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.related-card {
  padding: 32px 28px; border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.related-card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.related-card .section-label { margin-bottom: 8px; }
.related-card h3 { font-size: 1rem; margin-bottom: 8px; }
.related-card p { font-size: 0.875rem; line-height: 1.6; }

/* ============================================
   PLATFORM — product cards (homepage)
   ============================================ */
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); }
.platform-card { background: var(--bg); padding: 48px 40px; transition: background 0.2s; }
.platform-card:hover { background: var(--bg-alt); }
.platform-card:first-child { border-radius: var(--radius) 0 0 0; }
.platform-card:nth-child(2) { border-radius: 0 var(--radius) 0 0; }
.platform-card:nth-child(3) { border-radius: 0 0 0 var(--radius); }
.platform-card:last-child { border-radius: 0 0 var(--radius) 0; }
.platform-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); background: var(--accent-subtle); margin-bottom: 24px; }
.platform-icon svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.platform-card h3 { color: var(--text); margin-bottom: 12px; font-size: 1.125rem; }
.platform-card p { font-size: 0.9375rem; line-height: 1.65; }
.platform-card-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 600; color: var(--accent); margin-top: 20px; transition: gap 0.2s; }
.platform-card:hover .platform-card-link { gap: 10px; }

/* ============================================
   LIFECYCLE (homepage)
   ============================================ */
.lifecycle { background: var(--bg-alt); }
.lifecycle-steps { display: flex; align-items: stretch; gap: 0; position: relative; }
.lifecycle-step { flex: 1; text-align: center; padding: 32px 16px; position: relative; }
.lifecycle-step::after { content: ''; position: absolute; top: 46px; right: -1px; width: 24px; height: 1px; background: var(--border); }
.lifecycle-step:last-child::after { display: none; }
.lifecycle-number { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 0.75rem; font-weight: 700; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 50%; }
.lifecycle-step h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.lifecycle-step p { font-size: 0.8125rem; line-height: 1.55; color: var(--text-tertiary); }

/* ============================================
   SOLUTIONS (homepage)
   ============================================ */
.solutions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.solution-card { padding: 36px 28px; border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.2s, box-shadow 0.2s; }
.solution-card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.solution-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.solution-icon svg { width: 24px; height: 24px; stroke: var(--text); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.solution-card h3 { font-size: 1rem; margin-bottom: 10px; }
.solution-card p { font-size: 0.875rem; line-height: 1.6; }

/* ============================================
   TECHNOLOGY (homepage)
   ============================================ */
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.tech-item h3 { font-size: 1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.tech-item h3::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.tech-item p { font-size: 0.9375rem; line-height: 1.65; padding-left: 18px; }
.tech-tag { display: inline-block; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; margin-top: 12px; margin-left: 18px; }
.tech-tag.live { background: rgba(15, 118, 110, 0.1); color: var(--accent); }
.tech-tag.roadmap { background: rgba(0,0,0,0.04); color: var(--text-tertiary); }

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section { background: var(--dark); text-align: center; }
.cta-section h2 { color: #fff; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.5); font-size: 1.0625rem; margin-bottom: 36px; }

/* ============================================
   FOOTER
   ============================================ */
.footer { border-top: 1px solid var(--border); padding: 64px 0 48px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 48px; margin-bottom: 48px; }
.footer-brand p { font-size: 0.875rem; margin-top: 12px; color: var(--text-tertiary); max-width: 260px; line-height: 1.6; }
.footer-col h4 { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { font-size: 0.875rem; color: var(--text-secondary); transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 32px; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 0.8125rem; color: var(--text-tertiary); }
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { font-size: 0.8125rem; color: var(--text-tertiary); transition: color 0.2s; }
.footer-bottom-links a:hover { color: var(--text); }

/* ============================================
   ANIMATIONS
   ============================================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  :root { --section-gap: 80px; }
  .platform-grid { grid-template-columns: 1fr; }
  .platform-card:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .platform-card:nth-child(2), .platform-card:nth-child(3) { border-radius: 0; }
  .platform-card:last-child { border-radius: 0 0 var(--radius) var(--radius); }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid, .features-grid { grid-template-columns: 1fr; gap: 32px; }
  .content-grid, .two-col { grid-template-columns: 1fr; gap: 40px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: var(--nav-height); left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 24px 32px; gap: 16px;
  }
  .nav-links.open .nav-link { color: var(--text); }
  .nav-links.open .nav-cta { background: var(--text); color: #fff; text-align: center; justify-content: center; }
  .hero { min-height: auto; padding: 120px 0 80px; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .page-hero { padding: calc(var(--nav-height) + 48px) 0 48px; }
  .lifecycle-steps { flex-direction: column; }
  .lifecycle-step::after { top: auto; bottom: -1px; right: 50%; width: 1px; height: 16px; transform: translateX(50%); }
  .solutions-grid { grid-template-columns: 1fr; }
  .spec-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
