
/* ==========================================
   ADGUARDDNS.ORG
   SECTION 02 — HERO + DNS CHECKER
   Responsive Desktop, Tablet & Mobile
========================================== */

.dns-hero {
  position: relative;
  width: 100%;

  background:
    radial-gradient(
      ellipse 520px 380px at 100% 0%,
      rgba(84, 33, 119, 0.075),
      transparent 72%
    ),
    #FAF9FC;

  padding: 38px 0 42px;
  scroll-margin-top: 115px;
}

/* MAIN HERO CONTAINER */

.dns-hero__inner {
  position: relative;
  width: calc(100% - 36px);
  max-width: 1080px;
  min-width: 0;
  margin-inline: auto;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================
   HERO EYEBROW
========================================== */

.dns-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  max-width: 100%;
  margin: 0 0 18px;

  color: var(--color-primary, #542177);
  font-family: var(--font-body, "Inter", sans-serif);

  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.dns-hero__eyebrow svg {
  flex: none;
  box-sizing: content-box;

  padding: 7px;

  color: #542177;
  background: #EFE4F6;
  border-radius: 9px;
}

/* ==========================================
   MAIN HEADING
========================================== */

.dns-hero h1 {
  position: relative;
  z-index: 1;

  max-width: 860px;
  margin: 0 0 18px;

  color: var(--color-heading, #24212B);

  font-family:
    var(--font-heading, "Plus Jakarta Sans", sans-serif);

  font-size: clamp(34px, 8.5vw, 44px);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.045em;

  overflow-wrap: normal;
}

.dns-hero h1 span {
  color: var(--color-primary, #542177);
}

/* ==========================================
   HERO DESCRIPTION
========================================== */

.dns-hero__intro {
  position: relative;
  z-index: 1;

  max-width: 760px;
  margin: 0 0 25px;

  color: var(--color-text, #403948);
  font-family: var(--font-body, "Inter", sans-serif);

  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}

/* ==========================================
   RESPONSIVE HERO ILLUSTRATION
========================================== */

.dns-hero__illustration {
  display: none;
  pointer-events: none;
}

/* ==========================================
   DNS CHECKER CARD
========================================== */

.dns-start {
  position: relative;
  z-index: 2;

  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 16px;

  width: 100%;
  min-width: 0;
  padding: 20px;

  background: #FFFFFF;
  border: 1px solid #E4DCE9;
  border-radius: 15px;

  box-shadow:
    0 12px 32px rgba(49, 20, 80, 0.05);
}

/* CHECKER INFORMATION */

.dns-start__intro {
  display: flex;
  align-items: center;
  gap: 13px;

  min-width: 0;
}

.dns-start__intro > div {
  min-width: 0;
}

/* CHECKER ICON */

.dns-start__icon {
  display: grid;
  place-items: center;

  flex: 0 0 43px;
  height: 43px;

  background: #F2EAF8;
  color: #542177;
  border-radius: 11px;
}

/* CHECKER HEADING */

.dns-start h2 {
  margin: 0 0 5px;

  color: #24212B;

  font-family:
    var(--font-heading, "Plus Jakarta Sans", sans-serif);

  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.035em;
}

/* CHECKER STATUS */

.dns-start__status {
  margin: 0;

  color: #615A69;
  font-family: var(--font-body, "Inter", sans-serif);

  font-size: 14px;
  line-height: 1.55;
}

.dns-start__status.is-unavailable {
  color: #9C3424;
  font-weight: 600;
}

/* ==========================================
   CHECK MY DNS BUTTON
========================================== */

.dns-start__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;

  width: 100%;
  min-height: 54px;
  padding: 13px 22px;

  background: var(--color-accent, #C83824);
  color: #FFFFFF;

  border: 0;
  border-radius: 10px;

  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;

  cursor: pointer;

  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.dns-start__button:hover {
  background: var(--color-accent-hover, #A92D1B);
}

.dns-start__button:active {
  transform: translateY(1px);
}

.dns-start__button:focus-visible {
  outline: 3px solid #542177;
  outline-offset: 4px;
}

.dns-start__button svg {
  flex-shrink: 0;
}

/* ==========================================
   INTEGRATED DNS RESULTS
   Results remain inside Hero
========================================== */

.dns-hero .dns-results {
  width: 100%;
  margin-top: 18px;
  padding: 0;

  background: transparent;
  border: none;
  scroll-margin-top: 115px;
}

.dns-hero .dns-results__panel {
  width: 100%;
  background: #FFFFFF;

  border: 1px solid #E9E4EF;
  border-radius: 14px;

  box-shadow:
    0 8px 25px rgba(49, 20, 80, 0.04);
}

.dns-hero .dns-results__note {
  margin: 10px 0 0;
  color: #696571;
  font-size: 13px;
  line-height: 1.6;
}

/* ==========================================
   TABLET
   700px — 999px
========================================== */

@media (min-width: 700px) {

  .dns-hero {
    padding: 48px 0 48px;
  }

  .dns-hero__inner {
    width: calc(100% - 48px);
  }

  .dns-hero h1 {
    font-size: clamp(42px, 5vw, 52px);
    line-height: 1.12;
  }

  .dns-hero__intro {
    font-size: 17px;
  }

  .dns-start {
    grid-template-columns:
      minmax(0, 1fr) auto;

    gap: 22px;
    padding: 22px 25px;
  }

  .dns-start__button {
    width: auto;
    min-width: 210px;
    min-height: 52px;
    font-size: 15px;
  }
}

/* ==========================================
   LAPTOP AND DESKTOP
   1000px AND ABOVE
========================================== */

@media (min-width: 1000px) {

  .dns-hero {
    padding-top: 46px;
    padding-bottom: 48px;
  }

  .dns-hero__inner {
    width: calc(100% - 64px);
    max-width: 1080px;
  }

  .dns-hero__eyebrow {
    margin-bottom: 16px;
    font-size: 12px;
    letter-spacing: 0.045em;
  }

  /* Reserve room for the illustration */

  .dns-hero h1 {
    max-width: calc(100% - 220px);
    margin-bottom: 18px;

    font-size: clamp(43px, 3.7vw, 52px);
    line-height: 1.13;
  }

  .dns-hero__intro {
    max-width: calc(100% - 220px);
    margin-bottom: 25px;

    font-size: 17px;
    line-height: 1.7;
  }

  /* Desktop Illustration */

  .dns-hero__illustration {
    display: block;

    position: absolute;
    top: 4px;
    right: 0;

    width: clamp(175px, 19vw, 235px);
    aspect-ratio: 1;

    background-image:
      url("../images/dns-hero-illustration.webp");

    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;

    z-index: 0;
  }

  /* Desktop Checker */

  .dns-start {
    grid-template-columns:
      minmax(0, 1fr) auto;

    gap: 28px;
    padding: 20px 25px;
  }

  .dns-start__intro {
    gap: 14px;
  }

  .dns-start__icon {
    flex-basis: 45px;
    height: 45px;
  }

  .dns-start h2 {
    font-size: 19px;
  }

  .dns-start__button {
    min-width: 210px;
    min-height: 52px;
    padding: 12px 22px;
    font-size: 15px;
  }

}

/* ==========================================
   LARGE DESKTOP
   1440px AND ABOVE
========================================== */

@media (min-width: 1440px) {

  .dns-hero__inner {
    max-width: 1140px;
  }

  .dns-hero h1 {
    max-width: calc(100% - 280px);
    font-size: 54px;
  }

  .dns-hero__intro {
    max-width: 760px;
  }

  .dns-hero__illustration {
    width: 255px;
    top: 0;
    right: 0;
  }

}

/* ==========================================
   MOBILE — 699px AND BELOW
========================================== */

@media (max-width: 699px) {

  .dns-hero {
    padding: 34px 0 38px;
  }

  .dns-hero__inner {
    width: calc(100% - 32px);
  }

  .dns-hero__eyebrow {
    font-size: 10px;
    letter-spacing: 0.025em;
  }

  .dns-hero h1 {
    font-size: clamp(32px, 8.5vw, 40px);
    line-height: 1.16;
    margin-bottom: 17px;
  }

  .dns-hero__intro {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 22px;
  }

  .dns-hero__illustration {
    display: none;
  }

  .dns-start {
    gap: 17px;
    padding: 20px 18px;
    border-radius: 14px;
  }

  .dns-start h2 {
    font-size: 17px;
  }

  .dns-start__button {
    width: 100%;
    min-height: 52px;
  }

  .dns-hero .dns-results {
    margin-top: 14px;
  }

  .dns-hero .dns-results__panel {
    padding: 18px;
    border-radius: 12px;
  }

}

/* ==========================================
   EXTRA SMALL MOBILE — 359px BELOW
========================================== */

@media (max-width: 359px) {

  .dns-hero {
    padding-top: 28px;
  }

  .dns-hero h1 {
    font-size: 32px;
    letter-spacing: -0.035em;
  }

  .dns-start {
    padding: 17px 15px;
  }

  .dns-start h2 {
    font-size: 16px;
  }

  .dns-hero__eyebrow {
    font-size: 10px;
    letter-spacing: 0;
  }

}

/* ==========================================
   ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion: reduce) {

  .dns-start__button {
    transition: none;
  }

}

/* RESPONSIVE DNS ILLUSTRATION — TABLET */

@media (min-width: 700px) and (max-width: 999px) {

  .dns-hero__illustration {
    display: block;
    position: absolute;
    top: 0;
    right: 0;

    width: 140px;
    height: 140px;

    background-image:
      url("../images/dns-hero-illustration.webp");

    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;

    pointer-events: none;
  }

  .dns-hero h1,
  .dns-hero__intro {
    max-width: calc(100% - 155px);
  }

}

/* ==========================================
   DNS HERO — TABLET & DESKTOP IMAGE FIX
   Prevent Illustration / Checker Overlap
========================================== */

@media (min-width: 1000px) {

  /* Create a proper two-column intro area */
  .dns-hero__inner {
    display: grid;
    grid-template-columns:
      minmax(0, 1fr)
      minmax(190px, 250px);
    column-gap: 28px;
    align-items: start;
  }

  /* Text occupies the first column */
  .dns-hero__eyebrow,
  .dns-hero h1,
  .dns-hero__intro {
    grid-column: 1;
    max-width: 100%;
  }

  /* Illustration occupies the second column */
  .dns-hero__illustration {
    position: static;
    grid-column: 2;
    grid-row: 1 / span 3;

    width: 100%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 1;

    align-self: center;
    justify-self: center;

    margin: 0;
  }

  /* Checker and results span both columns */
  .dns-start,
  .dns-results {
    grid-column: 1 / -1;
  }

}

/* Safer sizing for medium desktops */

@media (min-width: 1000px) and (max-width: 1299px) {

  .dns-hero__inner {
    grid-template-columns:
      minmax(0, 1fr)
      210px;
    column-gap: 24px;
  }

  .dns-hero__illustration {
    max-width: 210px;
  }

}
