/* ==========================================================================
   Digitaloza — foundation: tokens, reset, base, layout, buttons, header, footer
   ========================================================================== */

:root {
  /* Color */
  --ink: #0A0E1A;
  --ink-2: #11162A;
  --ink-3: #1B2138;
  --brand: #6D28D9;
  --brand-700: #5B21B6;
  --brand-400: #8B5CF6;
  --action: #10E08C;
  --action-700: #0BB873;
  --bg: #FFFFFF;
  --surface: #F7F8FB;
  --surface-2: #EEF0F6;
  --line: #E6E8EF;
  --line-dark: rgba(255,255,255,.12);
  --text: #1A1F33;
  --muted: #5A6178;
  --muted-light: #9AA2BD;
  --white: #FFFFFF;

  --grad: linear-gradient(135deg, #6D28D9 0%, #4F46E5 55%, #10E08C 130%);
  --grad-text: linear-gradient(100deg, #8B5CF6, #10E08C);

  /* Radius */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(10,14,26,.06), 0 1px 3px rgba(10,14,26,.05);
  --sh: 0 8px 30px rgba(10,14,26,.08);
  --sh-lg: 0 24px 60px rgba(10,14,26,.14);
  --sh-brand: 0 16px 40px rgba(109,40,217,.28);

  /* Type */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Sora', var(--font);

  /* Layout */
  --container: 1200px;
  --pad: clamp(20px, 5vw, 40px);
  --section: clamp(64px, 9vw, 120px);

  --header-h: 76px;
}

/* Reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; height: auto; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { color: var(--brand); }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; }

/* Typography -------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.35rem; }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); line-height: 1.6; }
strong { font-weight: 600; color: var(--ink); }

.hl { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Layout ------------------------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--section); }
.section--surface { background: var(--surface); }
.section--ink { background: var(--ink); color: #C9CEDE; }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--ink h2, .section--ink h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: .8rem;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 14px;
}
.section--ink .eyebrow { color: var(--action); }

/* Section heading */
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head__lead { margin-top: 16px; font-size: 1.15rem; color: var(--muted); }
.sec-head--light .sec-head__title { color: #fff; }
.sec-head--light .sec-head__lead { color: var(--muted-light); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--brand-400); outline-offset: 2px; border-radius: 4px; }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 15px 26px; border-radius: var(--r-pill);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap; cursor: pointer;
}
.btn .icon { width: 19px; height: 19px; }
.btn--action { background: var(--action); color: var(--ink); box-shadow: 0 8px 22px rgba(16,224,140,.32); }
.btn--action:hover { background: var(--action-700); color: var(--ink); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16,224,140,.4); }
.btn--brand { background: var(--brand); color: #fff; box-shadow: var(--sh-brand); }
.btn--brand:hover { background: var(--brand-700); color: #fff; transform: translateY(-2px); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); color: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand); }
.btn--ghost-light { background: rgba(255,255,255,.06); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }
.btn--ghost-light:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn--sm { padding: 11px 18px; font-size: .92rem; }
.btn--lg { padding: 17px 32px; font-size: 1.06rem; }
.btn--block { width: 100%; }

/* Utility bar ------------------------------------------------------------- */
.utility { background: var(--ink); color: var(--muted-light); font-size: .85rem; }
.utility__row { display: flex; align-items: center; justify-content: space-between; height: 38px; gap: 16px; }
.utility__item { display: inline-flex; align-items: center; gap: 8px; }
.utility .i { width: 15px; height: 15px; color: var(--action); }
.utility__contact { display: inline-flex; gap: 20px; }
.utility__contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted-light); }
.utility__contact a:hover { color: #fff; }

/* Header / nav ------------------------------------------------------------ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.header.is-stuck { box-shadow: var(--sh); }
.header__row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.header__brand { display: inline-flex; }

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark { flex: none; }
.logo__word { font-family: var(--font-display); font-weight: 800; font-size: 1.34rem; color: var(--ink); letter-spacing: -.02em; }
.logo__accent { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo--light .logo__word { color: #fff; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: 4px; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 14px; border-radius: var(--r-sm);
  font-weight: 500; color: var(--text); font-size: .98rem;
}
.nav__link:hover { color: var(--brand); background: var(--surface); }
.nav__item.is-active > .nav__link { color: var(--brand); }
.nav__caret { width: 16px; height: 16px; transition: transform .2s ease; opacity: .7; }
.nav__item.is-open .nav__caret { transform: rotate(180deg); }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__cta { margin-left: 4px; }

/* Mega menu */
.mega {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 640px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 22px;
  opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease; z-index: 120;
}
.mega--industries, .mega--tools { min-width: 560px; }
.nav__item.has-mega:hover .mega,
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.mega__inner { display: flex; gap: 14px; }
.mega--services .mega__inner { display: grid; grid-template-columns: repeat(3, 1fr) 1.05fr; gap: 10px 22px; }
.mega__head { font-family: var(--font-display); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.mega__col ul li a { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px; color: var(--text); font-weight: 500; font-size: .95rem; }
.mega__col ul li a:hover { background: var(--surface); color: var(--brand); }
.mega__icon { width: 20px; height: 20px; color: var(--brand); flex: none; }
.mega__cta { background: var(--ink); color: #fff; border-radius: var(--r); padding: 18px; }
.mega__cta .mega__head { color: var(--action); }
.mega__note { font-size: .9rem; color: var(--muted-light); margin-bottom: 14px; }
.mega__all { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: #fff; font-weight: 600; font-size: .9rem; }
.mega__all .i { width: 16px; height: 16px; }
.mega__all:hover { color: var(--action); }
.mega__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mega__tile { display: flex; gap: 12px; padding: 12px; border-radius: 12px; color: var(--text); }
.mega__tile:hover { background: var(--surface); }
.mega__tile span { display: flex; flex-direction: column; }
.mega__tile strong { font-size: .96rem; color: var(--ink); }
.mega__tile em { font-style: normal; font-size: .82rem; color: var(--muted); line-height: 1.4; }

.burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; }
.burger:hover { background: var(--surface); }
.burger .icon { width: 26px; height: 26px; }
.burger__close { display: none; }
body.menu-open .burger__open { display: none; }
body.menu-open .burger__close { display: block; }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(88vw, 380px); z-index: 130;
  background: var(--ink); color: #fff; padding: 92px 24px 32px; overflow-y: auto;
  transform: translateX(100%); transition: transform .28s ease;
}
body.menu-open .drawer { transform: translateX(0); }
.drawer__nav { display: flex; flex-direction: column; gap: 2px; }
.drawer__link { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; padding: 12px 0; border-bottom: 1px solid var(--line-dark); }
.drawer__link:hover { color: var(--action); }
.drawer__sub { display: flex; flex-direction: column; padding: 6px 0 14px 12px; }
.drawer__sub a { color: var(--muted-light); padding: 7px 0; font-size: .96rem; }
.drawer__sub a:hover { color: #fff; }
.drawer__cta { margin-top: 22px; }
.drawer__backdrop { position: fixed; inset: 0; background: rgba(10,14,26,.5); z-index: 125; opacity: 0; transition: opacity .25s ease; }
body.menu-open .drawer__backdrop { display: block !important; opacity: 1; }

/* Sticky mobile CTA */
.mobile-cta {
  display: none; position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 90;
  background: var(--action); color: var(--ink); font-weight: 700;
  align-items: center; justify-content: center; gap: 8px;
  padding: 15px; border-radius: var(--r-pill); box-shadow: 0 10px 30px rgba(16,224,140,.45);
}
.mobile-cta .i { width: 19px; height: 19px; }

/* Footer ------------------------------------------------------------------ */
.footer { background: var(--ink); color: var(--muted-light); padding-top: clamp(56px, 7vw, 88px); }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.1fr; gap: 32px; padding-bottom: 48px; }
.footer__brand { max-width: 320px; }
.footer__logo { display: inline-flex; margin-bottom: 16px; }
.footer__tag { font-size: .95rem; line-height: 1.6; margin-bottom: 20px; }
.footer__social { display: flex; gap: 10px; margin-top: 18px; }
.footer__social a { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255,255,255,.06); color: #fff; font-size: .72rem; font-weight: 700; }
.footer__social a:hover { background: var(--brand); }
.footer__head { font-family: var(--font-display); color: #fff; font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 16px; }
.footer__col ul li { margin-bottom: 10px; }
.footer__col a { color: var(--muted-light); font-size: .94rem; }
.footer__col a:hover { color: var(--action); }
.footer__contact li { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: .94rem; }
.footer__contact .i { width: 17px; height: 17px; color: var(--action); flex: none; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line-dark); font-size: .86rem; }
.footer__legal { display: flex; gap: 22px; }
.footer__legal a { color: var(--muted-light); }
.footer__legal a:hover { color: #fff; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
  .nav, .header__cta { display: none; }
  .burger { display: inline-flex; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer__brand { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 760px) {
  .utility__contact { display: none; }
  .utility__item { font-size: .8rem; }
  .mobile-cta { display: flex; }
  .footer { padding-bottom: 84px; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 520px) {
  .footer__top { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
