/* =========================================================
   DataLink Smart Core - Refined Minimalist Design
   Blue-Black · Elegant · Understated
   ========================================================= */

:root {
  /* ---- Color: deep blue-black canvas ---- */
  --bg:           #0a0e17;
  --surface-1:    #10141e;
  --surface-2:    #161b27;
  --surface-3:    #1c2230;

  /* ---- Color: text (cool off-white scale) ---- */
  --ink-1:        #e8e9eb;
  --ink-2:        #9b9da2;
  --ink-3:        #6a6c72;
  --ink-4:        #46484d;

  /* ---- Color: single subtle accent ---- */
  --accent:       #7a9fff;
  --accent-soft:  rgba(122, 159, 255, 0.14);
  --accent-line:  rgba(122, 159, 255, 0.28);

  /* ---- Color: borders (very subtle) ---- */
  --line:         rgba(255, 255, 255, 0.05);
  --line-2:       rgba(255, 255, 255, 0.10);
  --line-3:       rgba(255, 255, 255, 0.16);

  /* ---- Type ---- */
  --sans:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --serif:        'Fraunces', 'Times New Roman', Georgia, serif;
  --mono:         'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* ---- Spacing ---- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;
  --s-11: 10rem;

  /* ---- Container ---- */
  --max: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms;
  --t-base: 320ms;
  --t-slow: 600ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-1);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-base) var(--ease);
}

button {
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}

ul, ol { list-style: none; }

::selection {
  background: var(--accent-soft);
  color: var(--ink-1);
}

/* ---- Custom scrollbar (very subtle) ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }

/* =====================================================
   Typography
   ===================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink-1);
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 6.5vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-feature-settings: 'ss01';
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  letter-spacing: -0.025em;
  font-weight: 500;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: -0.015em;
  font-weight: 500;
}

h4 {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

p {
  color: var(--ink-2);
  line-height: 1.75;
  font-size: 1rem;
  max-width: 64ch;
}

code, pre {
  font-family: var(--mono);
  font-size: 0.875em;
}

/* =====================================================
   Layout
   ===================================================== */

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

.section {
  padding: clamp(5rem, 10vw, 9rem) 0;
  position: relative;
}

.section-sm {
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.section-narrow {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-header {
  max-width: 720px;
  margin: 0 auto clamp(3rem, 5vw, 5rem);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s-5);
  position: relative;
  padding-left: 28px;
}

.eyebrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 1px;
  background: var(--ink-4);
}

.eyebrow.center {
  padding-left: 0;
  padding-top: 18px;
}

.eyebrow.center::before {
  left: 50%;
  top: 0;
  width: 1px;
  height: 12px;
  transform: translateX(-50%);
}

.section-title {
  margin-bottom: var(--s-5);
}

.section-lead {
  color: var(--ink-2);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 60ch;
  margin: 0 auto;
}

.accent {
  color: var(--accent);
  font-style: italic;
  font-family: var(--serif);
  font-weight: 400;
}

/* =====================================================
   Header / Navigation (refined, minimal)
   ===================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(10, 14, 23, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: all var(--t-base) var(--ease);
}

.site-header.scrolled {
  background: rgba(10, 14, 23, 0.85);
  border-bottom-color: var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-1);
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-7);
}

.nav-link {
  font-size: 0.9rem;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
  transition: color var(--t-base) var(--ease);
}

.nav-link:hover, .nav-link.active { color: var(--ink-1); }

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--ink-1);
  transform: translateX(-50%);
  transition: width var(--t-base) var(--ease);
}

.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--ink-1);
  padding: 9px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: all var(--t-base) var(--ease);
}

.cta-link:hover {
  border-color: var(--ink-1);
  background: var(--surface-1);
}

.cta-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--t-base) var(--ease);
}

.cta-link:hover svg { transform: translateX(3px); }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--ink-1);
}

/* =====================================================
   Buttons
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-base) var(--ease);
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--ink-1);
  color: var(--bg);
  border-color: var(--ink-1);
}

.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-1);
  border-color: var(--line-2);
}

.btn-ghost:hover {
  border-color: var(--line-3);
  background: var(--surface-1);
  transform: translateY(-1px);
}

.btn-arrow {
  width: 14px;
  height: 14px;
  transition: transform var(--t-base) var(--ease);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* =====================================================
   Hero
   ===================================================== */

.hero {
  position: relative;
  padding: calc(72px + clamp(5rem, 10vw, 9rem)) 0 clamp(5rem, 10vw, 9rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}

.hero-bg .orb-1 { width: 480px; height: 480px; top: -120px; right: -80px; background: #4f6fbf; }
.hero-bg .orb-2 { width: 360px; height: 360px; bottom: -80px; left: -60px; background: #2a4a85; }

/* Hero inner now spans the full container width so it aligns with the
   sections below. Per-element readability limits still apply to h1 and
   hero-lead via max-width on those rules. */
.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: var(--s-6);
  background: var(--surface-1);
}

.hero-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-soft);
  animation: pulse-soft 2.4s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.hero h1 {
  margin-bottom: var(--s-6);
  max-width: 22ch;
}

.hero h1 .italic {
  font-style: italic;
  color: var(--accent);
}

.hero-lead {
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  max-width: 64ch;
  margin-bottom: var(--s-7);
  font-weight: 400;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-9);
}

/* Stats span the full hero-inner so they align edge-to-edge with
   the content sections below. */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-7);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
}

.stat-num {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  line-height: 1;
  margin-bottom: var(--s-2);
  display: block;
}

.stat-num .suffix {
  color: var(--ink-3);
  font-size: 0.65em;
  margin-left: 2px;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =====================================================
   Sections & Cards
   ===================================================== */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: var(--s-4); }
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: var(--s-6);
  position: relative;
  transition: all var(--t-base) var(--ease);
}

.card:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  margin-bottom: var(--s-5);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  transition: all var(--t-base) var(--ease);
}

.card:hover .card-icon {
  color: var(--accent);
  border-color: var(--accent-line);
}

.card-icon svg { width: 20px; height: 20px; }

.card h3 {
  margin-bottom: var(--s-3);
  color: var(--ink-1);
}

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

/* ---- Feature list (numbered) ---- */

.feature-list { display: flex; flex-direction: column; gap: var(--s-5); }

.feature {
  display: flex;
  gap: var(--s-5);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--line);
}

.feature:last-child { border-bottom: 0; }

.feature-num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  width: 36px;
  flex-shrink: 0;
}

.feature-content h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink-1);
  margin-bottom: var(--s-2);
  letter-spacing: -0.01em;
}

.feature-content p {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.7;
}

/* ---- Pillar cards (alternative to plain cards) ---- */

.pillar {
  text-align: left;
  padding: var(--s-6);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--surface-1), var(--bg));
  border: 1px solid var(--line);
  transition: all var(--t-base) var(--ease);
  position: relative;
  overflow: hidden;
}

.pillar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-3), transparent);
}

.pillar:hover {
  border-color: var(--line-2);
}

.pillar-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin-bottom: var(--s-5);
}

.pillar h3 {
  font-size: 1.35rem;
  margin-bottom: var(--s-3);
  font-weight: 500;
  color: var(--ink-1);
}

.pillar p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-2);
}

/* =====================================================
   Product Cards (for Services page)
   ===================================================== */

.product {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: var(--s-5) var(--s-6) var(--s-6);
  transition: all var(--t-base) var(--ease);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
}

.product-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: var(--s-4);
  align-self: flex-start;
}

.product h3 {
  font-size: 1.25rem;
  margin-bottom: var(--s-3);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.product p {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: var(--s-5);
  flex: 1;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

/* =====================================================
   Quote / Highlight
   ===================================================== */

.quote {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.quote-text {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-1);
  letter-spacing: -0.015em;
  margin-bottom: var(--s-5);
}

.quote-attr {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =====================================================
   Tag pills (for tech stack etc.)
   ===================================================== */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-2);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-1);
  transition: all var(--t-base) var(--ease);
}

.tag:hover {
  border-color: var(--line-3);
  color: var(--ink-1);
}

/* =====================================================
   Section divider (elegant)
   ===================================================== */

.divider {
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* =====================================================
   Two-col split (image + text)
   ===================================================== */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--s-6); }
}

.split h2 { margin-bottom: var(--s-5); }
.split p { margin-bottom: var(--s-4); }

.split-visual {
  aspect-ratio: 4 / 3;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* =====================================================
   CTA section
   ===================================================== */

.cta {
  text-align: center;
  padding: clamp(5rem, 9vw, 8rem) clamp(1.5rem, 4vw, 3rem);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-soft) 0%, transparent 60%);
  opacity: 0.4;
  pointer-events: none;
}

.cta h2 { margin-bottom: var(--s-5); position: relative; }
.cta p { margin: 0 auto var(--s-6); position: relative; }
.cta .btn-group { display: inline-flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; position: relative; }

/* =====================================================
   Footer (minimal, elegant)
   ===================================================== */

.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: var(--s-9) 0 var(--s-6);
  margin-top: var(--s-10);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--s-8);
  margin-bottom: var(--s-9);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand {
  max-width: 360px;
}

.footer-brand .brand { margin-bottom: var(--s-4); }

.footer-desc {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: var(--s-5);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  font-size: 0.85rem;
  color: var(--ink-2);
}

.footer-contact-item svg,
.footer-contact-item img {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
  margin-top: 4px;
  flex-shrink: 0;
}

.footer-contact-item img {
  /* SVG loaded via <img> ignores currentColor; invert the black stroke so it reads on the dark surface */
  filter: invert(1);
  opacity: 0.55;
}

.footer-col-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--s-5);
  font-weight: 400;
}

.footer-list { display: flex; flex-direction: column; gap: var(--s-3); }

.footer-list a {
  font-size: 0.9rem;
  color: var(--ink-2);
  transition: color var(--t-base) var(--ease);
}

.footer-list a:hover { color: var(--ink-1); }

.footer-bottom {
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-4);
  font-size: 0.85rem;
  color: var(--ink-3);
}

.footer-bottom a { color: var(--ink-2); }
.footer-bottom a:hover { color: var(--ink-1); }

.footer-legal { display: flex; gap: var(--s-5); flex-wrap: wrap; }

/* =====================================================
   Reveal animation
   ===================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-1 { transition-delay: 80ms; }
.reveal-2 { transition-delay: 160ms; }
.reveal-3 { transition-delay: 240ms; }
.reveal-4 { transition-delay: 320ms; }

/* =====================================================
   Scroll progress (subtle)
   ===================================================== */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 1px;
  background: var(--ink-1);
  z-index: 200;
  width: 0;
  transition: width 100ms linear;
}

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink-1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--t-base) var(--ease);
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--ink-1);
  color: var(--bg);
}

.back-to-top svg { width: 16px; height: 16px; }