
/* ==========================================
   ADGUARDDNS.ORG
   SECTION 04 — HOW THE DNS CHECK WORKS
   Custom Icons + Responsive Cartoon Layout
========================================== */

.how-dns,
.how-dns * {
  box-sizing: border-box;
}

/* MAIN SECTION */

.how-dns {
  --how-purple: #542177;
  --how-dark: #24212B;
  --how-muted: #5A5368;

  padding: clamp(58px, 6vw, 88px) 0;

  background: linear-gradient(
    115deg,
    #FFFFFF 0%,
    #FDFBFF 45%,
    #F8F3FF 100%
  );

  scroll-margin-top: 115px;
  overflow: clip;
}

/* MAIN TWO-COLUMN LAYOUT */

.how-dns__container {
  display: grid;

  grid-template-columns:
    minmax(0, 0.98fr)
    minmax(0, 1.02fr);

  align-items: center;
  gap: clamp(24px, 3.5vw, 54px);

  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
}

.how-dns__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

/* ==========================================
   EYEBROW
========================================== */

.how-dns__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  margin: 0 0 20px;
  padding: 9px 15px;

  border-radius: 999px;
  background: #F1E7FA;
  color: var(--how-purple);

  font: 800 12px/1.35
    var(--font-body, "Inter", sans-serif);

  letter-spacing: 0.025em;
}

.how-dns__eyebrow svg {
  flex: none;
}

/* ==========================================
   SECTION HEADING
========================================== */

.how-dns h2 {
  max-width: 590px;
  margin: 0 0 16px;

  color: var(--how-dark);

  font-family:
    var(--font-heading, "Plus Jakarta Sans", sans-serif);

  font-size: clamp(37px, 3.6vw, 51px);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.045em;
}

.how-dns h2 span {
  color: var(--how-purple);
}

/* SHORT DESCRIPTION */

.how-dns__lead {
  max-width: 500px;
  margin: 0 0 32px;

  color: var(--how-muted);

  font-family:
    var(--font-body, "Inter", sans-serif);

  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
}

/* ==========================================
   THREE-STEP TIMELINE
========================================== */

.how-dns__steps {
  position: relative;

  display: grid;
  gap: 23px;

  margin: 0;
  padding: 0;
  list-style: none;
}

/* VERTICAL CONNECTOR */

.how-dns__steps::before {
  content: "";

  position: absolute;
  top: 44px;
  bottom: 44px;
  left: 37px;

  width: 2px;

  background: linear-gradient(
    #E0CAEF,
    #CBA8E7,
    #E0CAEF
  );
}

/* INDIVIDUAL STEP */

.how-dns__step {
  position: relative;

  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);

  align-items: center;
  gap: 16px;
  min-width: 0;
}

/* ==========================================
   CUSTOM IMAGE ICONS
========================================== */

.how-dns__icon {
  position: relative;
  z-index: 1;

  display: block;

  width: 76px;
  height: 76px;

  padding: 0;
  border: 0;
  border-radius: 0;

  background: transparent;
  overflow: visible;
}

.how-dns__icon img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

/* ==========================================
   STEP NUMBER + TITLE
========================================== */

.how-dns__step-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 11px;
  margin: 0 0 6px;
}

.how-dns__number {
  display: inline-grid;
  place-items: center;

  min-width: 40px;
  min-height: 31px;
  padding: 4px 8px;

  border-radius: 10px;
  background: #FFE4DF;
  color: #B72B1C;

  font-family:
    var(--font-heading, "Plus Jakarta Sans", sans-serif);

  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

/* STEP HEADING */

.how-dns h3 {
  margin: 0;

  color: var(--how-dark);

  font-family:
    var(--font-heading, "Plus Jakarta Sans", sans-serif);

  font-size: clamp(19px, 1.65vw, 23px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.035em;
}

/* STEP DESCRIPTION */

.how-dns__step-body p {
  max-width: 350px;
  margin: 0;

  color: var(--how-muted);

  font-family:
    var(--font-body, "Inter", sans-serif);

  font-size: 15px;
  line-height: 1.55;
}

/* ==========================================
   CARTOON ILLUSTRATION
========================================== */

.how-dns__visual {
  position: relative;

  min-width: 0;
  width: 100%;
  max-width: 585px;

  margin: 0;

  justify-self: center;
  align-self: center;
  line-height: 0;
}

.how-dns__visual img {
  display: block;

  width: 100%;
  max-width: 100%;
  height: auto;

  object-fit: contain;

  -webkit-mask-image: radial-gradient(
    ellipse 77% 77% at 50% 51%,
    #000 65%,
    transparent 100%
  );

  mask-image: radial-gradient(
    ellipse 77% 77% at 50% 51%,
    #000 65%,
    transparent 100%
  );
}

/* SCREEN-READER-ONLY CAPTION */

.how-dns__sr-only {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================
   SMALLER DESKTOP / LAPTOP
   1024px TO 1199px
========================================== */

@media (min-width: 1024px) and (max-width: 1199px) {

  .how-dns__container {
    gap: 24px;
  }

  .how-dns h2 {
    font-size: 39px;
  }

  .how-dns__visual {
    max-width: 490px;
  }

}

/* ==========================================
   TABLET
   768px TO 1023px
========================================== */

@media (min-width: 768px) and (max-width: 1023px) {

  .how-dns {
    padding: 56px 0 68px;
  }

  .how-dns__container {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    width: min(700px, calc(100% - 48px));
    gap: 0;
  }

  .how-dns__copy {
    display: contents;
  }

  .how-dns h2 {
    max-width: 660px;
    font-size: 43px;
  }

  .how-dns__lead {
    margin-bottom: 0;
  }

  .how-dns__visual {
    order: 0;

    max-width: 520px;
    margin: 14px auto 24px;
  }

  .how-dns__steps {
    order: 1;
    max-width: 620px;
    width: 100%;
  }

}

/* ==========================================
   MOBILE
   767px AND BELOW
========================================== */

@media (max-width: 767px) {

  .how-dns {
    padding: 48px 0 58px;
  }

  .how-dns__container {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    width: calc(100% - 32px);
    gap: 0;
  }

  .how-dns__copy {
    display: contents;
  }

  /* MOBILE EYEBROW */

  .how-dns__eyebrow {
    align-self: flex-start;

    margin-bottom: 16px;
    padding: 8px 13px;

    font-size: 11px;
  }

  /* MOBILE HEADING */

  .how-dns h2 {
    font-size: clamp(31px, 8.3vw, 42px);
    margin-bottom: 12px;
    line-height: 1.14;
  }

  /* MOBILE INTRO */

  .how-dns__lead {
    font-size: 15px;
    margin-bottom: 0;
  }

  /* KEEP CARTOON VISIBLE */

  .how-dns__visual {
    order: 0;

    width: 100%;
    max-width: 500px;

    margin: 18px auto 21px;
  }

  /* COMPACT STEPS */

  .how-dns__steps {
    order: 1;
    gap: 15px;
  }

  .how-dns__steps::before {
    left: 29px;
    top: 37px;
    bottom: 37px;
  }

  .how-dns__step {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
  }

  /* MOBILE ICONS */

  .how-dns__icon {
    width: 60px;
    height: 60px;
  }

  /* MOBILE STEP HEADINGS */

  .how-dns__step-heading {
    gap: 7px;
    margin-bottom: 4px;
  }

  .how-dns__number {
    min-width: 35px;
    min-height: 27px;

    font-size: 13px;
    border-radius: 8px;
  }

  .how-dns h3 {
    font-size: clamp(16px, 4.6vw, 20px);
  }

  .how-dns__step-body p {
    font-size: 14px;
    line-height: 1.5;
  }

}

/* ==========================================
   EXTRA SMALL MOBILE
   BELOW 360px
========================================== */

@media (max-width: 359px) {

  .how-dns__container {
    width: calc(100% - 28px);
  }

  .how-dns__step {
    gap: 10px;
  }

  .how-dns h3 {
    font-size: 16px;
  }

}

/* ==========================================
   ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion: reduce) {

  .how-dns *,
  .how-dns *::before,
  .how-dns *::after {
    scroll-behavior: auto;
  }

}

/* ========================================
   SECTION 04 — SOFT FOG IMAGE BLENDING
   Removes visible rectangular image edges
======================================== */

.how-dns__visual {
  position: relative;
  isolation: isolate;
}

/* Fade all four edges into the actual
   section background */

.how-dns__visual img {
  display: block;
  width: 100%;
  height: auto;

  -webkit-mask-image:
    linear-gradient(
      to right,
      transparent 0%,
      #000 7%,
      #000 90%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      #000 11%,
      #000 86%,
      transparent 100%
    );

  mask-image:
    linear-gradient(
      to right,
      transparent 0%,
      #000 7%,
      #000 90%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      transparent 0%,
      #000 11%,
      #000 86%,
      transparent 100%
    );

  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* Gentle white fog at image corners */

.how-dns__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background:
    radial-gradient(
      ellipse 28% 30% at 0% 0%,
      rgba(255,255,255,0.42),
      transparent 100%
    ),
    radial-gradient(
      ellipse 28% 30% at 100% 0%,
      rgba(255,255,255,0.35),
      transparent 100%
    ),
    radial-gradient(
      ellipse 28% 30% at 0% 100%,
      rgba(255,255,255,0.35),
      transparent 100%
    ),
    radial-gradient(
      ellipse 28% 30% at 100% 100%,
      rgba(255,255,255,0.28),
      transparent 100%
    );
}