/* Homepage layout refinements — loaded after index.css. Remove the <link> to revert.
   Everything except the overflow fix is scoped below 1180px; large desktop is unchanged. */

/* ---------- Global: no sideways scroll on phones ---------- */
html {
  overflow-x: clip;
}

.foot__nav {
  flex-wrap: wrap;
}

/* ---------- Hero: phones (390 / 412) ---------- */
@media (max-width: 767px) {
  .hero-wide__layout {
    padding-top: 32px;
    padding-bottom: 56px;
  }

  .hero-wide__reasons {
    margin-top: 14px;
  }

  .hero-wide__support {
    gap: 18px;
    margin-top: 18px;
    padding-top: 18px;
  }

  .hero-wide__steps {
    gap: 10px;
  }

  .hero-wide__footer {
    margin-top: 16px;
    padding-top: 20px;
  }

  .hero-wide__actions {
    max-width: none;
  }

  .hero-wide__actions .btn {
    min-height: 54px;
  }

  .hero-wide__actions .cta-note {
    max-width: none;
  }

  .hero-wide__visual {
    margin-top: 40px;
  }
}

/* ---------- Hero: what-we-do line reads as the product statement ---------- */
@media (max-width: 1179px) {
  .hero-wide__promise {
    padding-left: 16px;
    border-left: 3px solid var(--hero-terra);
  }

  .hero-wide__promise .hero-wide__payoff {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0;
  }

  .hero-wide__promise .hero-wide__payoff em {
    color: inherit;
    font-style: normal;
  }

  .hero-wide__step-accent {
    color: #fff;
  }
}

/* ---------- Hero: phones — hook leads, steps recede, CTA + note above the fold ---------- */
@media (max-width: 767px) {
  .hero-wide__title-em {
    margin-top: 2px;
  }

  .hero-wide__reasons {
    margin-top: 12px;
    font-size: 17px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.78);
  }

  .hero-wide__support {
    gap: 16px;
    margin-top: 16px;
    padding-top: 18px;
  }

  .hero-wide__hook {
    font-size: 26px;
    line-height: 1.2;
  }

  .hero-wide__steps {
    gap: 8px;
  }

  .hero-wide__steps li {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    line-height: 1.4;
  }

  .hero-wide__step-num {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .hero-wide__footer {
    margin-top: 16px;
    padding-top: 18px;
  }

  .hero-wide__actions .cta-note {
    margin-top: 8px;
  }
}

/* ---------- Hero: tablets (780 / 1032) — centred, no dead space ---------- */
@media (min-width: 768px) and (max-width: 1179px) {
  .hero-wide__layout {
    align-items: center;
    min-height: min(calc(100svh - var(--nav-height)), 880px);
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .hero-wide__visual {
    align-self: center;
    justify-content: center;
  }
}

@media (min-width: 960px) and (max-width: 1179px) {
  .hero-wide__layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 36%);
    gap: clamp(32px, 4vw, 56px);
  }

  .hero-wide__phone {
    width: min(100%, 330px);
  }

  .hero-wide__phone .hero-phone {
    aspect-ratio: 372 / 680;
  }

  .hero-wide .hero-phone__msg {
    font-size: 17px;
    line-height: 1.5;
  }

  .hero-wide .hero-phone__name {
    font-size: 29px;
  }

  .hero-wide__support {
    gap: 24px;
  }
}

/* ---------- "143+ names vs. a dentist" — phones: photo, one stacked comparison card, list ---------- */
@media (max-width: 720px) {
  .one.one--reframed {
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .one.one--reframed .one__split {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: auto;
    margin: 0;
    background: none;
    box-shadow: none;
  }

  .one.one--reframed .one__photo-wrap {
    order: -1;
  }

  .one.one--reframed .one__photo {
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px -28px rgba(31, 26, 18, 0.45);
  }
}

/* Comparison card: "The usual way" stacked over "MatchMyDentist" — phones and portrait tablets */
@media (max-width: 720px), (min-width: 721px) and (max-width: 1024px) and (orientation: portrait) {
  .one.one--reframed .one__contrast {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    border: 1px solid var(--hair);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 40px -30px rgba(31, 26, 18, 0.4);
  }

  .one.one--reframed .one__contrast::after {
    display: none;
  }

  .one.one--reframed .one__before,
  .one.one--reframed .one__after {
    display: block;
    grid-row: auto;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 28px 24px;
  }

  .one.one--reframed .one__before {
    padding-bottom: 36px;
    border-radius: 17px 17px 0 0;
    background: #ece6da;
  }

  .one.one--reframed .one__after {
    position: relative;
    padding-top: 38px;
    border-top: 3px solid var(--terra);
    box-shadow: none;
  }

  .one.one--reframed .one__after::before {
    content: "vs";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bone);
    border: 1.5px solid var(--hair);
    box-shadow: 0 4px 12px rgba(31, 26, 18, 0.12);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--terra);
  }

  .one.one--reframed .one__before-label,
  .one.one--reframed .one__after-label {
    margin-bottom: 14px;
  }

  .one.one--reframed .one__before .one__kicker {
    display: block;
    margin: 0;
  }

  .one.one--reframed .one__before .one__kicker-lead {
    font-size: 22px;
    line-height: 1.25;
  }

  .one.one--reframed .one__before .one__kicker-count {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 10px;
  }

  .one.one--reframed .one__before .one__kicker-number {
    font-size: 84px;
    line-height: 0.95;
  }

  .one.one--reframed .one__before .one__kicker-label {
    font-size: 26px;
  }

  .one.one--reframed .one__before .one__kicker-note {
    display: block;
    margin-top: 12px;
    font-size: 14px;
  }

  .one.one--reframed .one__after .one__payoff {
    display: block;
    margin: 0;
  }

  .one.one--reframed .one__after .one__kicker-after {
    font-size: 22px;
    line-height: 1.25;
  }

  .one.one--reframed .one__after .one__word.one__word--phrase {
    font-size: 48px;
    line-height: 1.05;
    margin: 2px 0 4px;
  }

  .one.one--reframed .one__after .one__intro-sub {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.5;
  }
}

@media (min-width: 721px) and (max-width: 1024px) and (orientation: portrait) {
  .one.one--reframed .one__split {
    align-items: stretch;
  }

  .one.one--reframed .one__photo-wrap,
  .one.one--reframed .one__photo {
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }

  .one.one--reframed .one__photo {
    border-radius: 18px;
    overflow: hidden;
  }

  .one.one--reframed .one__photo img {
    object-position: 22% center;
  }
}

@media (max-width: 720px) {
  .one.one--reframed .one__body {
    margin-top: 40px;
  }

  .one.one--reframed .one__stat {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .one.one--reframed .one__stat-line {
    font-size: 24px;
    line-height: 1.25;
    text-align: left;
  }

  .one.one--reframed .one__compare {
    margin-top: 16px;
    padding-top: 0;
    border-top: 0;
  }

  .one.one--reframed .one__compare-list {
    gap: 12px;
  }

  .one.one--reframed .one__compare-list li,
  .one.one--reframed .one__compare-list li:first-child,
  .one.one--reframed .one__compare-list li:last-child {
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--hair);
    border-radius: 14px;
    background: #fff;
    font-size: 17px;
    line-height: 1.4;
  }

  .one.one--reframed .one__compare-list li::before {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
  }
}

/* ---------- Match profiles — phones: stacked full-width cards, heading sits with its reasons ---------- */
@media (max-width: 720px) {
  .match--cards .match__fit-heading {
    order: 4;
    margin: 12px 0 0;
  }

  .match--cards .match__beats {
    order: 5;
  }

  .match--cards .match__conclude {
    order: 6;
  }

  .match--cards .match__photos {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .match--cards .match-phone {
    max-width: none;
  }

  .match--cards .match-phone__card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
    padding: 22px 20px;
    text-align: left;
  }

  .match--cards .match-phone__avatar {
    grid-row: 1 / 3;
    width: 56px;
    height: 56px;
    margin: 0;
  }

  .match--cards .match-phone__name,
  .match--cards .match-phone__role {
    grid-column: 2;
    margin: 0;
    text-align: left;
  }

  .match--cards .match-phone__name {
    align-self: end;
    font-size: 17px;
  }

  .match--cards .match-phone__role {
    align-self: start;
    margin-top: 2px;
  }

  .match--cards .match-phone__list,
  .match--cards .match-phone__aside {
    grid-column: 1 / -1;
  }

  .match--cards .match-phone__list {
    min-height: 0;
    margin-top: 18px;
  }

  .match--cards .match-phone__list li {
    font-size: 15px;
    line-height: 1.45;
  }

  .match--cards .match-phone__list li + li {
    margin-top: 8px;
  }

  .match--cards .match-phone__quote {
    padding: 14px 16px;
    font-size: 16px;
    line-height: 1.5;
  }
}

/* ---------- Match profiles: keep bullet lists left-aligned ---------- */
@media (max-width: 1179px) {
  .match-phone__list {
    text-align: left;
  }

  .match-phone__list li {
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }
}

/* ---------- Touch targets: larger hit areas, same visuals ---------- */
@media (max-width: 1179px) {
  .voices-carousel__dot {
    position: relative;
  }

  .voices-carousel__dots {
    gap: 20px;
  }

  .voices-carousel__dot::before {
    content: "";
    position: absolute;
    inset: -16px -10px;
  }

  .voices__all {
    display: inline-block;
    padding-block: 10px;
    margin-block: -10px;
  }
}

/* ---------- Testimonials: card fills the visible window on phones ---------- */
@media (max-width: 720px) {
  .tcard {
    flex-basis: 100%;
  }
}

@media (min-width: 721px) and (max-width: 959px) {
  .tcard {
    flex-basis: calc((100% - 20px) / 2);
  }
}

@media (min-width: 960px) and (max-width: 1179px) {
  .tcard {
    flex-basis: calc((100% - 40px) / 3);
  }
}

.hero-wide {
  background:
    radial-gradient(ellipse 900px 560px at 0% 0%, rgba(197, 75, 30, 0.16), transparent 66%),
    radial-gradient(ellipse 1100px 320px at 50% 100%, rgba(197, 75, 30, 0.08), transparent 75%),
    var(--ink);
}

.hero-wide__glow {
  top: 46%;
  width: min(150vw, 580px);
  height: 680px;
  background: radial-gradient(
    ellipse at center,
    rgba(242, 149, 104, 0.68) 0%,
    rgba(242, 149, 104, 0.52) 34%,
    rgba(197, 75, 30, 0.3) 52%,
    rgba(197, 75, 30, 0.09) 64%,
    transparent 72%
  );
  filter: blur(24px);
}

@media (min-width: 768px) {
  .hero-wide__glow {
    width: 640px;
    height: 760px;
  }
}

@media (min-width: 1180px) {
  .hero-wide__glow {
    width: 820px;
    height: 900px;
    filter: blur(28px);
  }
}
