/* Hostinger responsive update — keeps every section inside the viewport. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

main {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.site-header,
.hero,
.philosophy,
.onboarding,
.guide-intro,
.guide-shell,
.closing,
footer {
  width: 100%;
  max-width: 100%;
}

.hero-copy,
.hero-devices,
.philosophy-grid > *,
.chapter-panel,
.chapter-title > *,
.screen-feature > *,
.instruction-card {
  min-width: 0;
}

.hero h1,
.tagline,
.hero-lead,
.philosophy h2,
.onboarding h2,
.guide-intro h2,
.chapter-title h2,
.chapter-title span,
.instruction-card h3,
.screen-intro,
.instruction-card li p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

img {
  max-width: 100%;
}

/* All screen steps remain visible without horizontal scrolling. */
.screen-tabs {
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  display: grid;
  overflow: visible;
}

.screen-tabs button {
  justify-content: center;
  width: 100%;
  max-width: none;
  min-width: 0;
  gap: 0;
  font-size: 0;
  white-space: nowrap;
}

.screen-tabs button span {
  display: none;
}

.screen-tabs button::after {
  font-size: 14px;
  font-weight: 700;
}

.screen-tabs button:nth-child(1)::after { content: "Step 1"; }
.screen-tabs button:nth-child(2)::after { content: "Step 2"; }
.screen-tabs button:nth-child(3)::after { content: "Step 3"; }
.screen-tabs button:nth-child(4)::after { content: "Step 4"; }
.screen-tabs button:nth-child(5)::after { content: "Step 5"; }
.screen-tabs button:nth-child(6)::after { content: "Step 6"; }
.screen-tabs button:nth-child(7)::after { content: "Step 7"; }
.screen-tabs button:nth-child(8)::after { content: "Step 8"; }
.screen-tabs button:nth-child(9)::after { content: "Step 9"; }
.screen-tabs button:nth-child(10)::after { content: "Step 10"; }

@media (max-width: 850px) {
  .site-header {
    gap: 10px;
    overflow: hidden;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand span {
    min-width: 0;
  }

  .site-header nav {
    flex: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-copy {
    width: 100%;
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(35px, 10.5vw, 52px);
    letter-spacing: -.03em;
    line-height: 1.1;
  }

  .kicker {
    gap: 8px;
    letter-spacing: .1em;
    font-size: 11px;
  }

  .kicker span {
    flex: none;
    width: 28px;
  }

  .primary-btn {
    justify-content: space-between;
    max-width: 100%;
    gap: 18px;
    padding: 15px 18px;
    font-size: 15px;
  }

  .trust-row {
    width: 100%;
    min-width: 0;
  }

  .trust-row > div {
    min-width: 0;
  }

  .trust-row span {
    overflow-wrap: anywhere;
  }

  /* The complete chapter index is a two-row grid on mobile. */
  .chapter-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    display: grid;
    overflow: visible;
    box-shadow: none;
  }

  .chapter-nav > button {
    border: 1px solid var(--line);
    border-radius: 9px;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 10px 5px;
    display: flex;
    position: relative;
    overflow: hidden;
  }

  .chapter-nav > button > span,
  .chapter-nav > button > div,
  .chapter-nav > button > i {
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    position: absolute !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  .chapter-nav > button::after {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }

  .chapter-nav > button:nth-of-type(1)::after { content: "Step 1"; }
  .chapter-nav > button:nth-of-type(2)::after { content: "Step 2"; }
  .chapter-nav > button:nth-of-type(3)::after { content: "Step 3"; }
  .chapter-nav > button:nth-of-type(4)::after { content: "Step 4"; }
  .chapter-nav > button:nth-of-type(5)::after { content: "Step 5"; }
  .chapter-nav > button:nth-of-type(6)::after { content: "Step 6"; }
  .chapter-nav > button:nth-of-type(7)::after { content: "Step 7"; }
  .chapter-nav > button:nth-of-type(8)::after { content: "Step 8"; }

  .screen-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px;
    overflow: visible;
  }

  .screen-tabs button {
    min-height: 44px;
    padding: 10px 6px;
  }

  .screen-feature {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }

  .instruction-card {
    width: 100%;
    max-width: 100%;
  }

  .instruction-card li {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .phone-shell {
    max-width: calc(100vw - 52px);
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    font-size: 9px;
  }

  .site-header .nav-cta {
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .hero {
    gap: 30px;
    padding: 45px 18px 38px;
  }

  .hero h1 {
    font-size: clamp(34px, 10.2vw, 43px);
  }

  .tagline {
    font-size: 23px;
  }

  .hero-lead {
    font-size: 17px;
    line-height: 1.65;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-devices {
    width: 100%;
    max-width: 100%;
    min-height: 430px;
    margin: 0;
    transform: none;
  }

  .phone-compact {
    width: min(58vw, 205px);
  }

  .hero-phone-back {
    top: 72px;
    left: 0;
    transform: rotate(-6deg) scale(.9);
  }

  .hero-phone-front {
    top: 0;
    right: 0;
    transform: rotate(4deg);
  }

  .hero-badge {
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .hero-badge span {
    max-width: none;
  }

  .trust-row {
    gap: 12px;
  }

  .trust-row strong {
    font-size: 25px;
  }

  .trust-row span {
    font-size: 10px;
  }

  .philosophy,
  .onboarding {
    padding-left: 18px;
    padding-right: 18px;
  }

  .guide-shell {
    padding-left: 9px;
    padding-right: 9px;
  }

  .chapter-nav {
    gap: 6px;
  }

  .chapter-nav > button::after {
    font-size: 12px;
  }

  .screen-tabs {
    gap: 7px;
    padding: 10px;
  }

  .screen-tabs button::after {
    font-size: 13px;
  }

  .chapter-title {
    padding-left: 16px;
    padding-right: 16px;
  }

  .screen-feature {
    padding: 30px 11px 42px;
  }

  .instruction-card h3 {
    font-size: 29px;
  }

  .instruction-card li p {
    font-size: 17px;
  }

  .phone-shell {
    width: min(88vw, 360px);
    max-width: calc(100vw - 40px);
  }
}
