/* ============================================================
   THE DIGITAL AGENCY LIMITED — Global Stylesheet
   Design system: dark, proof-led, modern AI/automation consultancy
   ============================================================ */

/* ── Tokens ── */
:root {
  --bg-primary:    #09090F;
  --bg-secondary:  #111119;
  --bg-card:       #15151E;
  --border:        #23233A;
  --border-light:  #2E2E45;
  --accent-green:  #00E87A;
  --accent-indigo: #6366F1;
  --accent-amber:  #F59E0B;
  --text-primary:  #F0F0F8;
  --text-secondary:#94949E;
  --text-muted:    #5A5A72;
  --white:         #FFFFFF;
  --nav-height:    72px;
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     22px;
  --transition:    0.22s ease;
  --max-width:     1160px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ── */
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.025em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; }
h4 { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
p { color: var(--text-secondary); line-height: 1.75; }
.text-accent  { color: var(--accent-green); }
.text-indigo  { color: var(--accent-indigo); }
.text-amber   { color: var(--accent-amber); }
.text-white   { color: var(--white); }
.text-muted   { color: var(--text-muted); }

/* ── Layout ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section    { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flex    { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.text-center { text-align: center; }

/* ── Navigation ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(9, 9, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 58px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--white); }

/* dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.nav-dropdown > a::after { content: '↓'; font-size: 0.7rem; opacity: 0.5; }
.nav-dropdown-menu {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute; top: 100%; left: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 6px 6px; /* top padding bridges the gap between trigger and menu */
  margin-top: 0;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transition: opacity 0.15s ease, visibility 0.15s ease;
}
.nav-dropdown:hover .nav-dropdown-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: rgba(255,255,255,0.05); color: var(--white); }
.nav-cta {
  background: var(--accent-green);
  color: var(--bg-primary) !important;
  font-weight: 700 !important;
  font-size: 0.875rem;
  padding: 10px 20px !important;
  border-radius: 999px;
  transition: opacity var(--transition), transform var(--transition) !important;
}
.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); background: var(--accent-green) !important; }
.nav-hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.95rem; font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-green);
  color: var(--bg-primary);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,232,122,0.25); }
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-outline:hover { border-color: var(--accent-green); color: var(--accent-green); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: var(--border-light); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.card-sm { padding: 24px; border-radius: var(--radius-md); }

/* ── Labels / Tags ── */
.label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.label-green  { background: rgba(0,232,122,0.12); color: var(--accent-green); }
.label-indigo { background: rgba(99,102,241,0.15); color: var(--accent-indigo); }
.label-amber  { background: rgba(245,158,11,0.15); color: var(--accent-amber); }
.label-muted  { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* ── Stat / Proof numbers ── */
.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--accent-green);
  line-height: 1;
}
.stat-label { font-size: 0.875rem; color: var(--text-muted); margin-top: 6px; }

/* ── Proof strip ── */
.proof-strip {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.proof-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.proof-strip-item {
  padding: 0 32px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.proof-strip-item:last-child { border-right: none; }

/* ── Section labels ── */
.section-eyebrow {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 16px;
}

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── Page hero (inner pages) ── */
.page-hero {
  padding: calc(var(--nav-height) + 80px) 0 80px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(99,102,241,0.08) 0%, transparent 70%);
}

/* ── CTA band ── */
.cta-band {
  background: linear-gradient(135deg, rgba(0,232,122,0.06) 0%, rgba(99,102,241,0.06) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 0;
  text-align: center;
}

/* ── Case study card ── */
.cs-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all var(--transition);
}
.cs-card:hover { border-color: var(--accent-green); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.cs-card-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.cs-stat { font-size: 2rem; font-weight: 900; letter-spacing: -0.04em; color: var(--accent-green); line-height: 1; }
.cs-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* ── Footer ── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.03em; color: var(--white); margin-bottom: 12px; }
.footer-logo span { color: var(--accent-green); }
.footer-tagline { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; }
.footer-col h5 { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.footer-col ul li + li { margin-top: 10px; }
.footer-col ul li a { font-size: 0.9rem; color: var(--text-secondary); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--accent-green); }
.footer-bottom { padding-top: 32px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* ── Responsive ── */

/* ── Tablet (≤900px) ── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .proof-strip-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .proof-strip-item:nth-child(2) { border-right: none; }
  .proof-strip-item:nth-child(3) { border-top: 1px solid var(--border); }
  .proof-strip-item:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { padding: 64px 0; }
  .section-sm { padding: 48px 0; }
  .cta-band { padding: 64px 0; }
  .page-hero { padding: calc(var(--nav-height) + 56px) 0 56px; }
}

/* ── Mobile (≤640px) ── */
@media (max-width: 640px) {
  /* Typography */
  h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  h2 { font-size: clamp(1.5rem, 6vw, 1.9rem); }
  body { font-size: 16px; }

  /* Layout */
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .section-sm { padding: 36px 0; }
  .cta-band { padding: 52px 0; }
  .page-hero { padding: calc(var(--nav-height) + 40px) 0 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }

  /* Proof strip */
  .proof-strip { padding: 36px 0; }
  .proof-strip-grid { grid-template-columns: 1fr 1fr; gap: 0; }
  .proof-strip-item { border-right: none; border-bottom: 1px solid var(--border); padding: 20px 12px; }
  .proof-strip-item:last-child { border-bottom: none; }
  .proof-strip-item:nth-child(odd) { border-right: 1px solid var(--border); }

  /* Cards */
  .card { padding: 24px; }
  .cs-card { padding: 24px; }

  /* Buttons */
  .btn-lg { padding: 16px 28px; font-size: 1rem; }
  .hero-btns { flex-direction: column; gap: 12px; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .cta-band .btn + .btn { margin-top: 0; }
  .cta-band div[style*="display:flex"] { flex-direction: column; align-items: center; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* ── Mobile Navigation ── */
  .nav-links { display: none; }
  .nav-hamburger { display: flex; padding: 8px; }
  .nav-logo-img { height: 46px; }

  /* Full-screen mobile menu */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0; bottom: 0;
    background: var(--bg-primary);
    padding: 20px 16px 40px;
    gap: 2px;
    overflow-y: auto;
    z-index: 99;
  }
  .nav-links.open > li > a {
    display: block;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open > li:last-child > a { border-bottom: none; }

  /* Mobile nav CTA button */
  .nav-links.open .nav-cta {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding: 16px 28px !important;
    font-size: 1rem !important;
    border-radius: 999px;
    background: var(--accent-green) !important;
    color: var(--bg-primary) !important;
    border-bottom: none !important;
  }

  /* Mobile dropdown — expand inline instead of hover */
  .nav-links.open .nav-dropdown > a::after { content: ' +'; }
  .nav-links.open .nav-dropdown.open-mobile > a::after { content: ' −'; }
  .nav-dropdown-menu {
    visibility: hidden; opacity: 0; pointer-events: none;
    position: absolute;
  }
  .nav-links.open .nav-dropdown-menu {
    visibility: hidden; opacity: 0; pointer-events: none;
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
    padding: 4px 0 4px 12px;
    margin: 4px 0 4px 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .nav-links.open .nav-dropdown.open-mobile .nav-dropdown-menu {
    visibility: visible; opacity: 1; pointer-events: auto;
    max-height: 200px;
  }
  .nav-links.open .nav-dropdown-menu a {
    padding: 10px 14px;
    font-size: 0.9rem;
    border-bottom: none;
    color: var(--text-secondary);
  }
}

/* ── Utilities ── */
.rounded-full { border-radius: 999px; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.w-full { width: 100%; }
.inline-block { display: inline-block; }
.block { display: block; }
.border-t { border-top: 1px solid var(--border); }
.pt-6 { padding-top: 24px; }
.pt-8 { padding-top: 32px; }
.pl-4 { padding-left: 16px; }
.border-l-accent { border-left: 3px solid var(--accent-green); }
.bg-card { background: var(--bg-card); }
.bg-secondary { background: var(--bg-secondary); }
