/* ==========================================================================
   DPL — Home page
   Self-hosted variable webfonts, then the custom layer on Bootstrap 5.3.
   Bootstrap handles grid, spacing, dropdown, pills, carousel, offcanvas and
   form validation; this file adds the brand tokens and the components
   Bootstrap does not ship. Ported 1:1 from the Figma handoff's main.css.
   ========================================================================== */

@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/roboto-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Brand */
  --dpl-red: #ED1C24;
  --dpl-red-dark: #C4141B;
  --dpl-yellow: #FFC800;
  --dpl-yellow-dark: #E6B400;
  --dpl-black: #17181C;
  --dpl-ink: #101114;
  --dpl-body: #5A6069;
  --dpl-line: #E4E6EA;
  --dpl-surface: #F4F5F7;

  /* Type */
  --dpl-font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --dpl-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  /* Layout */
  --dpl-header-h: 80px;
  --dpl-section-y: 96px;
  --dpl-radius: 2px;

  /* Bootstrap overrides */
  --bs-primary: var(--dpl-red);
  --bs-body-font-family: var(--dpl-font);
  --bs-body-color: var(--dpl-body);
  --bs-link-color: var(--dpl-red);
  --bs-link-hover-color: var(--dpl-red-dark);
}

/* Base ------------------------------------------------------------------- */
body { font-family: var(--dpl-font); color: var(--dpl-body); background: #fff; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { color: var(--dpl-ink); font-weight: 700; letter-spacing: -0.02em; text-wrap: pretty; }
.section { padding-block: var(--dpl-section-y); }
.section-dark { background: var(--dpl-black); color: rgba(255, 255, 255, 0.72); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-surface { background: var(--dpl-surface); }
.mono { font-family: var(--dpl-mono); }

.eyebrow { font-family: var(--dpl-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dpl-red); margin-bottom: 0.75rem; }
.label-sm { font-family: var(--dpl-mono); font-size: 0.8125rem; color: var(--dpl-body); }
.lead-body { font-size: 1rem; line-height: 1.7; }

/* Buttons ---------------------------------------------------------------- */
.btn { --bs-btn-border-radius: var(--dpl-radius); font-family: var(--dpl-mono); font-weight: 500; font-size: 0.9375rem; padding: 0.75rem 1.5rem; }
.btn-dpl { background: var(--dpl-yellow); color: var(--dpl-ink); border: 1px solid var(--dpl-yellow); display: inline-flex; align-items: center; gap: 0.5rem; }
.btn-dpl:hover, .btn-dpl:focus-visible { background: var(--dpl-yellow-dark); border-color: var(--dpl-yellow-dark); color: var(--dpl-ink); }
.btn-dpl::after { content: "→"; transition: transform 0.2s ease; }
.btn-dpl:hover::after { transform: translateX(3px); }
.btn-white { background: #fff; color: var(--dpl-ink); border: 1px solid #fff; }
.btn-white:hover { background: var(--dpl-ink); color: #fff; border-color: var(--dpl-ink); }
.btn-outline-ink { border: 1px solid var(--dpl-line); color: var(--dpl-ink); background: #fff; }
.btn-outline-ink:hover { border-color: var(--dpl-ink); color: var(--dpl-ink); }

.link-underline-mono {
  font-family: var(--dpl-mono); font-size: 0.9375rem; color: var(--dpl-ink);
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.link-underline-mono:hover { color: var(--dpl-red); }
.link-arrow { font-family: var(--dpl-mono); font-size: 0.9375rem; color: var(--dpl-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; }
.link-arrow::after { content: "→"; transition: transform 0.2s ease; }
.link-arrow:hover { color: var(--dpl-red); }
.link-arrow:hover::after { transform: translateX(4px); }

/* Header ----------------------------------------------------------------- */
.site-header { padding:0px; position: sticky; top: 0; z-index: 1030; background: #fff; border-bottom: 1px solid var(--dpl-line); }
.site-header .navbar { min-height: var(--dpl-header-h); }
.site-header .navbar-brand img { height: 42px; width: auto; }
.site-header .nav-link {
  font-family: var(--dpl-mono); font-size: 1rem; color: var(--dpl-ink);
  padding: 0.5rem 1rem; display: flex; align-items: center; gap: 0.375rem;
}
.site-header .nav-link:hover, .site-header .show > .nav-link { color: var(--dpl-red); }
.site-header .dropdown-toggle::after { border-top-color: currentColor; margin-left: 0.125rem; }

.navbar-nav .dropdown-menu { margin-top: 0px !important; }
@media (min-width: 992px) {
  .navbar-nav .dropdown-menu { margin-top: 32px; }
}

/* Mega menu -------------------------------------------------------------- */
.mega {
  border: 0; border-top: 1px solid var(--dpl-line); border-radius: 0; padding: 0; margin: 0;
  position: fixed !important; top: var(--dpl-header-h) !important; left: 0 !important; right: 0 !important;
  width: 100vw !important; max-width: 100vw !important; transform: none !important;
  box-shadow: 0 20px 40px rgba(16, 17, 20, 0.12);
  background: #fff;
}
.mega__grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 480px; }
.mega__list { border-right: 1px solid var(--dpl-line); display: flex; flex-direction: column; padding-top: 1rem; }
.mega__list .nav-link {
  font-family: var(--dpl-mono); font-size: 1rem; color: var(--dpl-ink);
  display: flex; align-items: center; gap: 1rem; border-radius: 0;
  padding: 1rem 1.5rem; width: 100%; text-align: left; position: relative;
}
.mega__list .nav-link img { width: 24px; height: 24px; flex: 0 0 24px; }
.mega__list .nav-link.active {
  background: linear-gradient(90deg, var(--dpl-red) 0%, #F0565C 100%);
  color: #fff;
}
.mega__list .nav-link.active img { filter: brightness(0) invert(1); }
.mega__list .nav-link.active::after { content: "→"; margin-left: auto; }
.mega__list-footer { margin-top: auto; padding: 1.5rem; border-top: 1px solid var(--dpl-line); }
.mega__list-footer .btn { width: 100%; justify-content: center; }

.mega__panel { padding: 2.5rem 3rem; display: flex; flex-direction: column; max-height: 480px;
    overflow: auto; }
.mega__item { display: block; text-decoration: none; padding-right: 2rem; }
.mega__item strong { display: block; font-family: var(--dpl-mono); font-size: 1rem; font-weight: 400; color: var(--dpl-ink); margin-bottom: 0.5rem; }
.mega__item span { display: block; font-size: 0.875rem; line-height: 1.5; color: var(--dpl-body); }
.mega__item:hover strong { color: var(--dpl-red); }
.mega__subhead { font-size: 0.9375rem; color: var(--dpl-body); border-top: 1px solid var(--dpl-line); padding-top: 1.5rem; }
.mega__links { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: auto; padding-top: 2rem; }

.mega__aside { border-left: 1px solid var(--dpl-line); display: flex; flex-direction: column; }
.mega__aside-top { padding: 2rem; }
.mega__aside-label { font-size: 1rem; color: var(--dpl-ink); margin-bottom: 1.25rem; }
.mega__aside-logos { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.mega__aside-logos img { max-height: 30px; width: auto; }
.mega__aside-bottom { background: var(--dpl-surface); padding: 2rem; flex: 1; }
.mega__card {
  height: 100%; padding: 1.75rem; display: flex; flex-direction: column; align-items: flex-start;
  color: rgba(255, 255, 255, 0.85); background: var(--dpl-ink);
}
.mega__card--ai { background: linear-gradient(140deg, #123C9E 0%, #1B57D6 100%); }
.mega__card--cloud { background: linear-gradient(140deg, #0A5A32 0%, #10794A 100%); }
.mega__card--iot { background: linear-gradient(140deg, #2B1668 0%, #4B2AA8 100%); }
.mega__card--software { background: linear-gradient(140deg, #5C0A0E 0%, #A31018 100%); }
.mega__card--strategy { background: linear-gradient(140deg, #23252A 0%, #3A3D44 100%); }
.mega__card--engagement { background: linear-gradient(140deg, #7A5C00 0%, #C79A00 100%); }
.mega__card small { font-size: 0.9375rem; }
.mega__card h3 { color: #fff; font-size: 1.375rem; line-height: 1.35; margin: 0.5rem 0 auto; }
.mega__card .btn { margin-top: 1.75rem; }

/* Hero ------------------------------------------------------------------- */
.hero { background: var(--dpl-black); color: rgba(255, 255, 255, 0.75); overflow: hidden; }
.hero h1 { color: #fff; font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.15; }
.hero__visual { position: relative; padding:20px; }
.hero__visual img.hero-img { width: 100%; height: auto; }
.trusted { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.trusted__label { font-family: var(--dpl-mono); font-size: 0.8125rem; color: rgba(255, 255, 255, 0.6); }
.trusted__logos { display: flex; flex-wrap: wrap; align-items: center; gap: 2.5rem; }
.trusted__logos img { height: 30px; width: auto; opacity: 1; }
.trusted__badge { max-height: 64px; width: auto; }

/* Services tabs ---------------------------------------------------------- */
.service-tabs { border: 1px solid var(--dpl-line); }
.service-tabs .nav-link {
  width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--dpl-line); border-radius: 0;
  padding:2rem 1.25rem; display: flex; align-items: center; gap: 0.875rem;
  color: var(--dpl-ink); font-family: var(--dpl-mono); font-size: 0.9375rem;
}
.service-tabs .nav-link:last-child { border-bottom: 0; }
.service-tabs .nav-link img { width: 26px; height: 26px; }
.service-tabs .nav-link small { display: block; font-family: var(--dpl-font); font-size: 0.8125rem; color: var(--dpl-body); margin-top: 0.25rem; }
.service-tabs .nav-link.active { background: var(--dpl-surface); color: var(--dpl-red); box-shadow: inset 3px 0 0 var(--dpl-red); }
.service-tabs .nav-link.active small { color: var(--dpl-body); }
.service-panel img { width: 100%; height: auto; }

/* AI-native band --------------------------------------------------------- */
.ai-band { background: #10233F; color: #fff; }
.ai-band h2 { color: #fff; font-size: clamp(1.125rem, 2vw, 1.5rem); margin: 0; }
.ai-band .metric { display: flex; align-items: center; gap: 0.75rem; }
.ai-band .metric img { width: 28px; height: 28px; filter: brightness(0) invert(1); }
.ai-band .metric strong { color: #fff; display: block; font-size: 1.0625rem; }
.ai-band .metric span { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.7); }

/* Why DPL ---------------------------------------------------------------- */
.why-card { background: #fff; border: 1px solid var(--dpl-line); padding: 1.5rem; height: 100%; color: var(--dpl-body); transition: border-color 0.2s ease, transform 0.2s ease; }
.why-card:hover { border-color: var(--dpl-ink); transform: translateY(-3px); }
.why-card img { width: 36px; height: 36px; margin-bottom: 1rem; }
.why-card h3 { font-size: 1.0625rem; margin-bottom: 0.5rem; color: var(--dpl-ink); }
.why-card p { font-size: 0.875rem; margin: 0; }
.stat-box { border: 1px solid var(--dpl-line); background: #fff; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-box > div { padding: 1.5rem; border-left: 1px solid var(--dpl-line); }
.stat-box > div:first-child { border-left: 0; }
.stat__value { font-size: clamp(1.375rem, 2.4vw, 1.875rem); font-weight: 700; letter-spacing: -0.02em; color: var(--dpl-red); }
.stat__label { font-size: 0.875rem; color: var(--dpl-body); margin-top: 0.25rem; }
@media (max-width: 767.98px) {
  .stat-box { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-box > div:nth-child(3) { border-left: 0; }
  .stat-box > div:nth-child(n+3) { border-top: 1px solid var(--dpl-line); }
}

/* CTA band --------------------------------------------------------------- */
.cta-band { background: linear-gradient(90deg, var(--dpl-red) 0%, #C0176B 60%, #7A2CB4 100%); color: #fff; }
.cta-band h2 { color: #fff; font-size: clamp(1.25rem, 2.4vw, 1.875rem); margin: 0; }

/* Case studies ----------------------------------------------------------- */
.case-card { background: #fff; border: 1px solid var(--dpl-line); }
.case-card__media { position: relative; background: var(--dpl-surface); min-height: 320px; }
.case-card__media img.case-img { width: 100%; height: 100%; object-fit: cover; }
.case-card__play { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: transparent; }
.case-card__play img { width: 52px; height: 52px; }
.case-card__body { padding: clamp(1.5rem, 3vw, 2.5rem); }
.case-card__logo { height: 34px; width: auto; }
.case-tag { font-family: var(--dpl-mono); font-size: 0.75rem; color: var(--dpl-red); }
.case-figures { border-top: 1px solid var(--dpl-line); padding-top: 1.25rem; }
.case-figures .value { font-family: var(--dpl-mono); font-size: 1.125rem; color: var(--dpl-ink); }
.case-figures .label { font-size: 0.8125rem; }
.carousel-btn { width: 40px; height: 40px; border: 1px solid var(--dpl-line); background: #fff; color: var(--dpl-ink); display: grid; place-items: center; }
.carousel-btn:hover { background: var(--dpl-ink); color: #fff; border-color: var(--dpl-ink); }

/* Recognitions / partners grid ------------------------------------------- */
.logo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--dpl-line); border: 1px solid var(--dpl-line); }
.logo-grid > div { background: #fff; display: grid; place-items: center; padding: 4rem 1.5rem; min-height: 120px; }
.logo-grid img { width: 100%; height: 60px; }

/* Insights --------------------------------------------------------------- */
.insight-card { background: #fff; border: 1px solid var(--dpl-line); height: 100%; display: flex; flex-direction: column; }
.insight-card img { width: 100%; aspect-ratio: 1024 / 525; object-fit: cover; }
.insight-card__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.insight-card h3 { font-size: 1rem; line-height: 1.45; margin: 0.75rem 0 1.5rem; }
.insight-card .link-arrow { margin-top: auto; }

/* Contact + footer ------------------------------------------------------- */
.contact-form .form-control { background: transparent; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.25); border-radius: 0; color: #fff; padding: 0.75rem 0; font-size: 0.9375rem; }
.contact-form .form-control:focus { background: transparent; color: #fff; border-color: var(--dpl-yellow); box-shadow: none; }
.contact-form .form-control::placeholder { color: rgba(255, 255, 255, 0.45); }
.contact-form .form-check-label { color: rgba(255, 255, 255, 0.8); }
.site-footer { background: var(--dpl-black); color: rgba(255, 255, 255, 0.65); }
.site-footer h4 { font-family: var(--dpl-mono); font-size: 0.875rem; color: #fff; letter-spacing: 0; }
.site-footer a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 0.875rem; }
.site-footer a:hover { color: var(--dpl-yellow); }
.office img { width: 26px; height: 26px; margin-bottom: 0.75rem; }
.office strong { color: #fff; display: block; font-family: var(--dpl-mono); font-size: 0.9375rem; }
.office p { font-size: 0.8125rem; margin: 0.375rem 0 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.8125rem; }

/* Mobile navigation ----------------------------------------------------- */
.mobile-nav .accordion-button { font-family: var(--dpl-mono); font-size: 1rem; color: var(--dpl-ink); background: transparent; box-shadow: none; padding: 1rem 0; }
.mobile-nav .accordion-button:not(.collapsed) { color: var(--dpl-red); }
.mobile-nav .accordion-item { border: 0; border-bottom: 1px solid var(--dpl-line); }
.mobile-nav .accordion-body { padding: 0 0 1rem; }
.mobile-nav .accordion-body a { display: block; padding: 0.625rem 0; color: var(--dpl-body); text-decoration: none; font-size: 0.9375rem; }
.mobile-nav .accordion-body a:hover { color: var(--dpl-red); }
.mobile-nav .top-link { font-family: var(--dpl-mono); font-size: 1rem; color: var(--dpl-ink); text-decoration: none; display: block; padding: 1rem 0; border-bottom: 1px solid var(--dpl-line); }

/* Scroll reveal (content stays visible without JS) ----------------------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Breakpoints ------------------------------------------------------------ */
@media (max-width: 1399.98px) {
  .mega__grid { grid-template-columns: 260px minmax(0, 1fr); }
  .mega .tab-pane .mega__grid { grid-template-columns: minmax(0, 1fr) 320px !important; }
  .mega__panel { padding: 2rem; }
}
@media (max-width: 1299.98px) {
  .mega .tab-pane .mega__grid { grid-template-columns: minmax(0, 1fr) !important; }
  .mega__aside { display: none; }
}
@media (max-width: 991.98px) {
  :root { --dpl-section-y: 64px; --dpl-header-h: 68px; }
  .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-card__media { min-height: 240px; }
}
@media (max-width: 575.98px) {
  .site-header .navbar-brand img { height: 34px; }
  .trusted__logos { gap: 1.5rem; }
  .trusted__logos img { height: 20px; }
  .logo-grid > div { padding: 1.5rem 1rem; min-height: 96px; }
}

/* Mobile menu: second-level service accordion --------------------------- */
.mobile-sub .accordion-button { font-family: var(--dpl-mono); font-size: 0.9375rem; padding: 0.875rem 0; }
.mobile-sub .accordion-body { padding: 0 0 0.5rem 1rem; }
.mobile-sub .accordion-body a { font-size: 0.875rem; padding: 0.5rem 0; }

/* Secondary mega panels (Why DPL / Insights / Careers) ------------------- */
.mega-sm { border: 0; border-radius: 0; width: min(600px, calc(100vw - 2rem)); box-shadow: 0 20px 40px rgba(16, 17, 20, 0.12); }
.mega-sm img { display: block; height: auto; }
.mega-sm__label { font-family: var(--dpl-mono); font-size: 1.0625rem; color: #A7ADB5; margin-bottom: 1.25rem; }
.mega-sm__link { font-family: var(--dpl-mono); font-size: 0.9375rem; color: var(--dpl-ink); text-decoration: none; display: block; padding: 0.375rem 0; }
.mega-sm__link:hover { color: var(--dpl-red); }
@media (max-width: 575.98px) { .mega-sm { width: calc(100vw - 2rem); } }

/* Logo grids: 3-up, no empty cells -------------------------------------- */
.logo-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.logo-grid--auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.logo-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 767.98px) { .logo-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .logo-grid--4 > div { min-height: 140px; } }
@media (max-width: 767.98px) { .logo-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479.98px) { .logo-grid--3 { grid-template-columns: 1fr; } }

/* Footer form: segmented control + validation -------------------------- */
.contact-form textarea.form-control { resize: vertical; }
.contact-form .form-control:invalid.is-flagged, .contact-form .was-validated .form-control:invalid { border-bottom-color: var(--dpl-red); }
.contact-form .invalid-feedback { color: #FF8A8F; }
.btn-group.seg { flex-wrap: wrap; }
.btn-group.seg .invalid-feedback { flex: 0 0 100%; margin-top: 0.5rem; }
.btn-seg {
  --bs-btn-bg: transparent; --bs-btn-color: rgba(255, 255, 255, 0.8);
  --bs-btn-border-color: rgba(255, 255, 255, 0.25);
  --bs-btn-hover-bg: transparent; --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--dpl-yellow);
  --bs-btn-active-bg: var(--dpl-yellow); --bs-btn-active-color: var(--dpl-ink); --bs-btn-active-border-color: var(--dpl-yellow);
  font-family: var(--dpl-mono); font-size: 0.875rem; padding: 0.625rem 1.5rem;
}
