/* =========================================
   D|2 Resilient Tech — Brand Design System
   ========================================= */

:root {
  --coral: #5BA4D9;
  --coral-light: #8DC4F0;
  --coral-dark: #3A7AB8;
  --bg: #EDECEA;
  --bg-white: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #5C5A57;
  --text-light: #8C8A87;
  --border: #D8D6D3;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Open Sans', system-ui, sans-serif;
  --max-w: 1160px;
  --radius: 6px;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---- Typography ---- */
.h-display {
  font-family: var(--font-heading);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
}

.h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.h3 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.h4 {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--font-body);
}

.body-lg {
  font-size: 1.125rem;
  line-height: 1.7;
}

.body-sm {
  font-size: 0.875rem;
  color: var(--text-muted);
}

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

.section {
  padding: 96px 0;
}

.section--sm {
  padding: 64px 0;
}

.section--coral {
  background: var(--coral);
  color: white;
}

.section--white {
  background: var(--bg-white);
}

.section--bg {
  background: var(--bg);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--coral);
  color: white;
  border-color: var(--coral);
}

.btn--primary:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

.btn--outline:hover {
  background: var(--text);
  color: white;
}

.btn--outline-white {
  background: transparent;
  color: white;
  border-color: white;
}

.btn--outline-white:hover {
  background: white;
  color: var(--coral);
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  transition: background 0.3s;
}

.nav--scrolled .nav__inner {
  height: 52px;
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 68px;
  gap: 40px;
  transition: height 0.3s;
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__logo-img {
  height: 36px;
  width: auto;
  display: block;
  transition: opacity 0.3s;
}

/* Default: hide dark variant and all compact logos */
.nav__logo-img--dark,
.nav__logo-img--compact {
  display: none;
}

/* Dark mode: swap light/dark */
body.dark-mode .nav__logo-img--light.nav__logo-img--full {
  display: none;
}

body.dark-mode .nav__logo-img--dark.nav__logo-img--full {
  display: block;
}

/* Scrolled state: hide full logos, show compact */
.nav--scrolled .nav__logo-img--full {
  display: none !important;
}

.nav--scrolled .nav__logo-img--compact.nav__logo-img--light {
  display: block;
}

body.dark-mode .nav--scrolled .nav__logo-img--compact.nav__logo-img--light {
  display: none;
}

body.dark-mode .nav--scrolled .nav__logo-img--compact.nav__logo-img--dark {
  display: block;
}

.nav__links {
  display: flex;
  gap: 32px;
  align-items: center;
  flex: 1;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__links .nav__divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 8px;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav__cta {
  padding: 9px 20px;
  font-size: 0.875rem;
}

.nav__theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav__theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* Show sun in dark mode, moon in light mode */
.nav__theme-icon--sun {
  display: none;
}

body.dark-mode .nav__theme-icon--sun {
  display: block;
}

body.dark-mode .nav__theme-icon--moon {
  display: none;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  background: var(--bg);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero__bg-text {
  display: none;
}

.hero__bg-img-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 52%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero__bg-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 45%);
  pointer-events: none;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.35;
  display: block;
}

.hero__bg-img:not([src]),
.hero__bg-img[src=""] {
  background: var(--border);
}

.hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 3;
}

.hero__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 20px;
}

.hero__title {
  max-width: 820px;
  margin-bottom: 24px;
  color: var(--text);
}

.hero__sub {
  max-width: 540px;
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.65;
}

/* =========================================
   SOCIAL PROOF BAR
   ========================================= */
.proof-bar {
  background: var(--bg-white);
  padding: 36px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.proof-bar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.proof-bar__stats {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
  justify-content: center;
}

.proof-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.proof-stat__num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  color: var(--coral);
  line-height: 1;
}

.proof-stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.proof-bar__divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

.proof-bar__awards {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.award-badge {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 12px;
}

/* =========================================
   PROBLEM SECTION
   ========================================= */
.problem__title-wrap {
  margin-bottom: 56px;
}

.problem__title-wrap .section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral-light);
  margin-bottom: 16px;
}

.problem__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.problem__body {
  font-size: 1.05rem;
  line-height: 1.75;
  opacity: 0.9;
  margin-bottom: 32px;
}

.failure-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* .failure-pill styles moved to FAILURE DETAIL PANEL section */

/* impact-grid replaced by .failure-detail interactive panel */

/* =========================================
   SOLUTION SECTION
   ========================================= */
.section-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 580px;
  margin-top: 16px;
}

.solution-section {
  padding-bottom: 0;
}

.solution__result-banner {
  background: var(--coral);
  text-align: center;
  padding: 72px 24px;
  margin-top: 64px;
}

.solution__result-banner__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral-light);
  margin-bottom: 20px;
}

.solution__result-banner__text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  text-transform: uppercase;
  color: white;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.principle-card {
  background: var(--bg-white);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.principle-card__title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}

.principle-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.section-header {
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 12px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.service-card {
  background: var(--bg-white);
  padding: 40px;
}

.service-card__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.service-card__desc {
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.65;
}

.service-card__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.service-card__list li::before {
  content: "→ ";
  color: var(--coral);
  font-weight: 600;
}

.service-card__cta {
  margin-top: 24px;
}

/* =========================================
   INDUSTRIES SECTION
   ========================================= */
.industries-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.industry-row {
  background: var(--bg-white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 380px;
  gap: 0;
}

.industry-row:nth-child(even) .industry-row__text {
  order: 2;
}

.industry-row:nth-child(even) .industry-row__visual {
  order: 1;
}

.industry-row__text {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.industry-row__visual {
  background: var(--bg);
  display: flex;
  align-items: stretch;
  min-height: 280px;
}

.industry-row__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder {
  width: 100%;
  min-height: 280px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.industry-row__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
}

.industry-row__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  text-transform: uppercase;
  line-height: 1;
}

.industry-row__desc {
  color: var(--text-muted);
  line-height: 1.65;
}

.industry-row__focus {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.industry-row__focus li::before {
  content: "→ ";
  color: var(--coral);
  font-weight: 600;
}

/* =========================================
   WHY D|2 SECTION
   ========================================= */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.why-card {
  background: var(--bg-white);
  padding: 36px 28px;
}

.why-card__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 10px;
}

.why-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =========================================
   SCENARIO SECTION
   ========================================= */
.scenario__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral-light);
  margin-bottom: 16px;
}

.scenario__title {
  margin-bottom: 48px;
}

.scenario__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.scenario-col {
  border-radius: var(--radius);
  overflow: hidden;
}

.scenario-col__head {
  padding: 16px 24px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scenario-col--before .scenario-col__head {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
}

.scenario-col--after .scenario-col__head {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.scenario-col__body {
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scenario-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
}

.scenario-step__arrow {
  color: var(--coral-light);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.scenario-col--after .scenario-step__arrow {
  color: white;
}

.scenario-step__text {
  line-height: 1.5;
}

.scenario-col--before .scenario-step__text {
  opacity: 0.8;
}

.scenario__result {
  margin-top: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 24px 28px;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

/* =========================================
   FINAL CTA SECTION
   ========================================= */
.cta-final {
  text-align: center;
  padding: 112px 0 48px;
  background: var(--bg);
}

.cta-final__inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

.cta-final__title {
  margin-bottom: 16px;
}

.cta-final__sub {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* =========================================
   CONTACT SECTION
   ========================================= */
.contact-section {
  background: var(--bg-white);
  padding: 48px 0 96px;
}

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

.contact-info--full {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-info__title {
  margin-bottom: 32px;
}

.contact-card {
  text-align: center;
}

.contact-card__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 4px;
}

.contact-card__role {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.contact-card__org {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 8px;
}

.contact-card__address {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.contact-card__email {
  text-align: center;
  margin-top: 16px;
}

.contact-card__email-img {
  height: 36px;
  width: auto;
  display: inline-block;
  color: var(--coral);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea,
.form-field select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-white);
  color: var(--text);
  transition: border-color 0.15s;
  outline: none;
  width: 100%;
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235C5A57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: var(--bg-white);
  padding-right: 42px;
  cursor: pointer;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--coral);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn[type="submit"] {
  width: 100%;
  justify-content: center;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 40px;
}

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

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 32px;
}

.footer__logo {
  margin-bottom: 12px;
}

.footer__logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.footer__tagline {
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 240px;
}

.footer__col-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 16px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links a {
  font-size: 0.875rem;
  transition: color 0.15s;
}

.footer__links a:hover {
  color: white;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 8px;
}

/* =========================================
   FAILURE DETAIL PANEL
   ========================================= */
.failure-pill {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 8px 16px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.failure-pill:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.7);
}

.failure-pill.active {
  background: white;
  color: var(--coral);
  border-color: white;
  font-weight: 600;
}

.failure-detail {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  border-left: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 280px;
}

@keyframes panel-pop {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.failure-detail.is-animating {
  animation: panel-pop 0.28s ease both;
}

.failure-detail__header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.failure-detail__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  text-transform: uppercase;
  color: white;
  line-height: 1.1;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
}

.failure-detail__desc {
  font-size: 0.975rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.failure-detail__impacts {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: none;
  padding-top: 0;
}

.failure-detail__impact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  font-size: 0.875rem;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.impact-label {
  background: white;
  color: var(--coral);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.impact-text {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

/* =========================================
   ANIMATIONS
   ========================================= */

/* Hero entrance */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__label {
  animation: fade-up 0.55s 0.05s ease both;
}

.hero__title {
  animation: fade-up 0.6s 0.18s ease both;
}

.hero__sub {
  animation: fade-up 0.6s 0.32s ease both;
}

.hero .btn-group {
  animation: fade-up 0.6s 0.46s ease both;
}

/* Hero background text drift */
@keyframes drift {

  0%,
  100% {
    transform: translateX(0) translateY(0);
  }

  50% {
    transform: translateX(-14px) translateY(6px);
  }
}

.hero__bg-text {
  animation: drift 9s ease-in-out infinite;
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

[data-reveal][data-delay="1"] {
  transition-delay: 0.1s;
}

[data-reveal][data-delay="2"] {
  transition-delay: 0.2s;
}

[data-reveal][data-delay="3"] {
  transition-delay: 0.3s;
}

[data-reveal][data-delay="4"] {
  transition-delay: 0.4s;
}

/* Nav scroll shadow */
.nav {
  transition: box-shadow 0.25s ease;
}

.nav--scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.09);
}

.nav--scrolled .nav__inner {
  height: 58px;
}

.nav__inner {
  transition: height 0.25s ease;
}

/* Card hover lifts */
.service-card,
.why-card,
.principle-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.service-card:hover,
.why-card:hover,
.principle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.09);
  background: #fff;
}

/* Button lift */
.btn {
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Industry row accent on hover */
.industry-row {
  transition: box-shadow 0.2s ease;
}

.industry-row:hover {
  box-shadow: inset 4px 0 0 var(--coral);
}

.industry-row:nth-child(even):hover {
  box-shadow: inset -4px 0 0 var(--coral);
}

/* Scenario toggle — hidden by default (desktop), shown in mobile media query */
.scenario-toggle {
  display: none;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .principles-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  /* ---- Global spacing ---- */
  .section {
    padding: 40px 0;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .section-sub {
    font-size: 0.95rem;
    margin-top: 10px;
  }

  /* ---- Typography ---- */
  .h2 {
    font-size: 1.5rem;
  }

  .section-label {
    margin-bottom: 8px;
  }

  /* ---- Nav ---- */
  .nav__links {
    display: none;
  }

  .nav__cta {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  /* ---- Hero ---- */
  .hero__bg-img-wrap { width: 100%; }
  .hero__bg-img { opacity: 0.15; }
  .hero__bg-img-wrap::after {
    background: linear-gradient(to right, var(--bg) 10%, transparent 60%);
  }

  /* ---- Hide proof bar ---- */
  .proof-bar {
    display: none;
  }

  /* ---- Prevent horizontal page overflow ---- */
  body {
    overflow-x: hidden;
  }

  /* ---- Problem section ---- */
  .problem__title-wrap {
    margin-bottom: 16px;
  }

  .problem__body {
    display: none;
  }

  .problem__cols {
    grid-template-columns: 1fr;
    gap: 12px;
    min-width: 0;
  }

  .problem__cols > * {
    min-width: 0;
  }

  .failure-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 4px;
  }

  .failure-pill {
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .failure-detail {
    padding: 14px;
    min-height: auto;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .failure-detail__title {
    font-size: 1rem;
    padding-bottom: 8px;
  }

  .failure-detail__desc {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .failure-detail__impacts {
    display: none;
  }

  /* ---- Solution section ---- */
  .principles-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .principle-card {
    padding: 0;
    flex-direction: column;
    gap: 0;
    cursor: pointer;
  }

  .principle-card__title {
    font-size: 0.85rem;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .principle-card__title::after {
    content: '+';
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
  }

  .principle-card.is-open .principle-card__title::after {
    content: '−';
  }

  .principle-card__desc {
    font-size: 0.8rem;
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
  }

  .principle-card.is-open .principle-card__desc {
    max-height: 120px;
    opacity: 1;
    padding: 0 16px 14px;
  }

  .solution__result-banner {
    padding: 28px 20px;
    margin-top: 24px;
  }

  .solution__result-banner__text {
    font-size: 1.3rem;
  }

  /* ---- Services — collapse to title + short desc, hide lists ---- */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .service-card {
    padding: 20px;
  }

  .service-card__title {
    font-size: 1.1rem;
    margin-bottom: 6px;
  }

  .service-card__desc {
    font-size: 0.85rem;
    margin-bottom: 0;
  }

  .service-card__list {
    display: none;
  }

  /* ---- Industries — compact rows, hide redundant label ---- */
  .industry-row {
    grid-template-columns: 1fr;
  }

  .industry-row__visual {
    display: none;
  }

  .industry-row__text {
    padding: 20px;
    gap: 8px;
  }

  .industry-row__label {
    display: none;
  }

  .industry-row__title {
    font-size: 1.3rem;
  }

  .industry-row__desc {
    display: none;
  }

  .industry-row__focus {
    font-size: 0.8rem;
    gap: 3px;
  }

  .industry-row:nth-child(even) .industry-row__text {
    order: 1;
  }

  .industry-row:nth-child(even) .industry-row__visual {
    order: 2;
  }

  /* ---- Why grid — accordion on mobile ---- */
  .why-grid {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .why-card {
    padding: 0;
    cursor: pointer;
  }

  .why-card__title {
    font-size: 0.85rem;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 52px;
  }

  .why-card__title::after {
    content: '+';
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 12px;
  }

  .why-card.is-open .why-card__title::after {
    content: '−';
  }

  .why-card__desc {
    font-size: 0.8rem;
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
    margin-bottom: 0;
  }

  .why-card.is-open .why-card__desc {
    max-height: 120px;
    opacity: 1;
    padding: 0 16px 14px;
  }

  /* ---- Scenario — toggle between with/without on mobile ---- */
  .scenario__title {
    margin-bottom: 16px;
  }

  .scenario__cols {
    grid-template-columns: 1fr;
    gap: 0;
    position: relative;
  }

  .scenario-col--before,
  .scenario-col--after {
    display: none;
  }

  .scenario-col--before.is-active,
  .scenario-col--after.is-active {
    display: block;
  }

  /* Toggle switch */
  .scenario-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
  }

  .scenario-toggle__label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: color 0.2s, opacity 0.2s;
  }

  .scenario-toggle__label.is-active {
    color: rgba(255, 255, 255, 0.85);
  }

  .scenario-toggle__switch {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s;
  }

  .scenario-toggle__knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease;
  }

  .scenario-toggle__switch.is-on .scenario-toggle__knob {
    transform: translateX(16px);
  }

  .scenario-toggle__switch.is-on {
    background: var(--color-resilient, #5BA4D9);
  }

  .scenario-col__head {
    padding: 10px 14px;
    font-size: 0.7rem;
  }

  .scenario-col__body {
    padding: 12px 14px;
    gap: 6px;
  }

  .scenario-step {
    font-size: 0.85rem;
    gap: 8px;
  }

  .scenario__result {
    padding: 12px;
    font-size: 0.85rem;
    margin-top: 12px;
  }

  /* ---- CTA ---- */
  .cta-final {
    padding: 40px 0;
  }

  .cta-final__title {
    font-size: 1.5rem;
  }

  .cta-final__sub {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .cta-final .btn-group {
    align-items: center;
  }

  /* ---- Contact ---- */
  .contact-section {
    padding: 40px 0;
  }

  .contact-section__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .contact-info__desc {
    display: none;
  }

  /* ---- Footer ---- */
  .footer {
    padding: 32px 0 20px;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 16px;
  }

  .footer__tagline {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 32px 0;
  }

  .h2 {
    font-size: 1.3rem;
  }

  .cta-final {
    padding: 32px 0;
  }

  .footer__top {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================
   DARK MODE
   ========================================= */

/* Dark mode wipe — light overlay that slides away top-to-bottom */
body.dark-wipe::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  background: var(--bg-light, #EDECEA);
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.35s ease-in-out;
}

body.dark-wipe.dark-wipe-go::after {
  clip-path: inset(100% 0 0 0);
}

/* Dark mode variable overrides */
body.dark-mode {
  --coral: #5BA4D9;
  --coral-light: #8DC4F0;
  --coral-dark: #3A7AB8;
  --bg: #0D1117;
  --bg-white: #161B22;
  --text: #E6EDF3;
  --text-muted: #8B949E;
  --text-light: #6E7681;
  --border: #30363D;
  --color-resilient: #5BA4D9;
  --color-failure: #1B3A5C;
}

/* Section overrides that would break with variable swap */
body.dark-mode .section--coral {
  background: #0A1628;
}

body.dark-mode .footer {
  background: #010409;
}

body.dark-mode .solution__result-banner {
  background: rgba(91, 164, 217, 0.15);
}

body.dark-mode .solution__result-banner__text {
  color: var(--color-resilient);
}

body.dark-mode .solution__result-banner__label {
  color: var(--color-resilient);
  opacity: 0.6;
}

/* Nav in dark mode */
body.dark-mode .nav {
  background: #0D1117;
  border-bottom-color: var(--border);
}

body.dark-mode .nav--scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

/* Hero in dark mode */
body.dark-mode .hero {
  background: #0D1117;
}

body.dark-mode .hero__bg-img-wrap::after {
  background: linear-gradient(to right, #0D1117 0%, transparent 45%);
}

/* Matrix rain canvas */
.matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease;
  will-change: opacity;
  transform: translateZ(0);
}

/* D|2 Logo spotlight */
body.dark-mode .hero__bg-text {
  color: #5BA4D9;
  opacity: 0.35;
  text-shadow:
    0 0 20px rgba(91, 164, 217, 0.6),
    0 0 60px rgba(91, 164, 217, 0.4),
    0 0 120px rgba(91, 164, 217, 0.2);
  transition: opacity 1.5s ease, text-shadow 1.5s ease, color 1.5s ease;
  animation: drift 9s ease-in-out infinite, spotlight-pulse 3s ease-in-out infinite;
}

@keyframes spotlight-pulse {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(91, 164, 217, 0.6),
      0 0 60px rgba(91, 164, 217, 0.4),
      0 0 120px rgba(91, 164, 217, 0.2);
  }
  50% {
    text-shadow:
      0 0 30px rgba(91, 164, 217, 0.8),
      0 0 80px rgba(91, 164, 217, 0.5),
      0 0 160px rgba(91, 164, 217, 0.3);
  }
}

/* ---- Matrix Typing Effect ---- */
.matrix-typing {
  min-height: 2.4em;
}

.matrix-cursor {
  color: #5BA4D9;
  font-weight: 400;
  animation: cursor-blink 0.6s step-end infinite;
  text-shadow: 0 0 8px rgba(91, 164, 217, 0.8);
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero__label.hero--hidden,
.hero__sub.hero--hidden,
.hero .btn-group.hero--hidden {
  opacity: 0 !important;
  animation: none !important;
  transition: opacity 0.8s ease;
}

.hero__label.hero--visible,
.hero__sub.hero--visible,
.hero .btn-group.hero--visible {
  opacity: 1 !important;
  animation: none !important;
  transition: opacity 0.8s ease;
}

/* ---- Semantic Color Coding ---- */

/* Scenario: "Without D|2" = failure/broken */
body.dark-mode .scenario-col--before .scenario-col__head {
  background: var(--color-failure);
  color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .scenario-col--before .scenario-col__body {
  background: rgba(27, 58, 92, 0.2);
}

body.dark-mode .scenario-col--before .scenario-step__text {
  opacity: 0.4;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .scenario-col--before .scenario-step__arrow {
  color: var(--color-failure);
}

/* Scenario: "With D|2" = resilient/alive */
body.dark-mode .scenario-col--after .scenario-col__head {
  background: var(--color-resilient);
  color: white;
}

body.dark-mode .scenario-col--after .scenario-col__body {
  background: rgba(91, 164, 217, 0.12);
  border: 1px solid rgba(91, 164, 217, 0.25);
}

body.dark-mode .scenario-col--after .scenario-step__arrow {
  color: var(--color-resilient);
}

body.dark-mode .scenario-col--after .scenario-step__text {
  opacity: 1;
  color: #E6EDF3;
}

body.dark-mode .scenario__result {
  background: rgba(91, 164, 217, 0.2);
  color: var(--color-resilient);
}

/* Failure pills — dark blue */
body.dark-mode .failure-pill {
  border-color: var(--color-failure);
  color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .failure-pill:hover {
  background: rgba(27, 58, 92, 0.4);
  border-color: var(--color-failure);
}

body.dark-mode .failure-pill.active {
  background: var(--color-failure);
  color: white;
  border-color: var(--color-failure);
}

/* Failure detail panel */
body.dark-mode .failure-detail {
  background: rgba(27, 58, 92, 0.3);
  border-left-color: var(--color-failure);
}

body.dark-mode .impact-label {
  background: var(--color-failure);
  color: white;
}

/* Principle/solution cards — resilient capabilities */
body.dark-mode .principle-card__title {
  color: var(--color-resilient);
}

body.dark-mode .principle-card:hover {
  box-shadow: inset 3px 0 0 var(--color-resilient), 0 10px 32px rgba(0, 0, 0, 0.3);
}

/* Service cards — resilient offerings */
body.dark-mode .service-card__title {
  color: var(--color-resilient);
}

body.dark-mode .service-card:hover {
  background: #1C2128;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
}

body.dark-mode .why-card:hover,
body.dark-mode .principle-card:hover {
  background: #1C2128;
}

/* Industry rows */
body.dark-mode .industry-row:hover {
  box-shadow: inset 4px 0 0 var(--color-resilient);
}

body.dark-mode .industry-row:nth-child(even):hover {
  box-shadow: inset -4px 0 0 var(--color-resilient);
}

/* Form inputs */
body.dark-mode .form-field input,
body.dark-mode .form-field textarea,
body.dark-mode .form-field select {
  background: #0D1117;
  border-color: var(--border);
  color: var(--text);
}

body.dark-mode .form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B949E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* CTA section */
body.dark-mode .cta-final {
  background: #0D1117;
}

/* Proof bar */
body.dark-mode .proof-bar {
  background: #161B22;
  border-color: var(--border);
}

/* Image placeholders */
body.dark-mode .img-placeholder {
  background: #1C2128;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  body.dark-mode .hero__bg-text {
    animation: none;
  }

  .matrix-canvas {
    display: none;
  }
}