/* ==========================================================================
   DimensionsDI — Design System
   ========================================================================== */

:root {
  --ink: #10161f;
  --ink-soft: #3b4453;
  --muted: #626c7a;
  --line: #e6e9ee;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --navy: #0b1220;
  --navy-soft: #131c2e;
  --teal: #14b8a6;
  --indigo: #6366f1;
  --gradient: linear-gradient(120deg, var(--teal), var(--indigo));
  --amber: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 20px 40px -20px rgba(11, 18, 32, 0.25);
  --shadow-sm: 0 8px 20px -12px rgba(11, 18, 32, 0.2);
  --max: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy p { color: #b7c0d1; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { font-size: 1.08rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: 0 14px 28px -14px rgba(99, 102, 241, 0.55); }
.btn-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-white { background: #fff; color: var(--navy); }
.btn-ghost-light { border-color: rgba(255,255,255,0.35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; }
.btn-lg { padding: 16px 32px; font-size: 1.02rem; }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--indigo); text-decoration: none; }
.nav-cta-item { display: none; }
.nav-cta { display: flex; align-items: center; gap: 18px; flex: none; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin: -10px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: 0.2s;
}

/* Hero */
.hero {
  background: var(--navy);
  color: #fff;
  padding: 96px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(20,184,166,0.35), transparent 65%);
  filter: blur(10px);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -30% -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.35), transparent 65%);
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero p.lead { font-size: 1.2rem; color: #c3cbdb; max-width: 620px; }
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 48px;
  margin-top: 64px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 32px;
}
.hero-stats div strong { display: block; font-size: 1.7rem; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats div span { color: #9aa5b8; font-size: 0.88rem; }

/* Cards / Grid */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card a.card-link { font-weight: 600; font-size: 0.92rem; }

/* Process steps */
.steps { counter-reset: step; }
.step {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }
.step .num {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--teal);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* Case study / portfolio */
.case-study {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.case-study .tag {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--indigo);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  margin-right: 8px;
  margin-bottom: 6px;
}
.domain-map {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 24px 0;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
}
.domain-node {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}
.domain-node.primary { border-color: var(--teal); }
.domain-arrow { color: var(--muted); font-size: 1.3rem; }

/* Blog */
.post-card { display: flex; flex-direction: column; }
.post-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.post-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal);
  margin-bottom: 10px;
}
.post-body { font-size: 1.06rem; }
.post-body h2 { margin-top: 1.6em; }
.post-body h3 { margin-top: 1.4em; }
.post-body ul, .post-body ol { color: var(--ink-soft); padding-left: 1.3em; }
.post-body li { margin-bottom: 0.4em; }
.post-body blockquote {
  margin: 1.5em 0;
  padding: 4px 24px;
  border-left: 4px solid var(--teal);
  background: var(--bg-alt);
  border-radius: 0 8px 8px 0;
}
.post-hero {
  padding: 60px 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

/* Forms */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 0.98rem;
  background: #fff;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-weight: 600;
}
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.hp-field { position: absolute; left: -9999px; }

/* CTA band */
.cta-band {
  background: var(--gradient);
  border-radius: var(--radius);
  padding: 56px;
  text-align: center;
  color: #fff;
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { opacity: 0.95; }

/* Footer */
.site-footer { background: var(--navy); color: #9aa5b8; padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #9aa5b8; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

/* Utilities */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Responsive */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }

  /* Full nav row (7 links + brand + CTA) doesn't fit below ~930px,
     so the hamburger takes over before tablets in portrait break the layout. */
  .nav-links { display: none; }
  .nav-cta > a.btn { display: none; }
  .nav-toggle { display: block; }
  body.nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    gap: 16px;
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }
  .nav-cta-item { display: block; margin-top: 4px; }
  .nav-cta-item .btn { width: 100%; justify-content: center; }
}

@media (max-width: 720px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 28px; }
  .case-study { padding: 26px; }
  .cta-band { padding: 40px 24px; }
  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 80px; }
  .domain-map { flex-direction: column; align-items: stretch; }
  .domain-arrow { transform: rotate(90deg); text-align: center; }
}
