@media (max-width: 61.25rem) {
  .hero-copy {
    top: 46%;
    left: clamp(1rem, 3.25vw, 2rem);
    width: min(33.75rem, 54vw);
  }

  .hero-figure,
  .hero-halo {
    left: min(76%, calc(50% + 16rem));
  }

  .hero.is-mentor-open .hero-figure,
  .hero.is-mentor-open .hero-halo {
    left: max(22%, calc(50% - 20.75rem));
  }

  .mentor-panel {
    right: 1.25rem;
    width: min(35rem, 58vw);
  }

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

  .work-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 36px;
  }

  .work-intro .eyebrow {
    grid-column: 1 / -1;
    margin-bottom: -10px;
  }

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

.hero.is-mentor-open + .work {
  margin-top: 0;
}

@media (max-width: 52rem) {
  .nav-links {
    gap: 0;
    font-size: clamp(0.78rem, 1.65vw, 0.86rem);
  }

  .nav-links a {
    padding-inline: clamp(0.35rem, 1vw, 0.55rem);
  }

  .topbar-cta {
    padding-inline: clamp(0.75rem, 1.8vw, 1rem);
  }
}

@media (max-width: 45rem) {
  :root {
    --header-offset: 5.75rem;
    --page-gutter: 1rem;
    --hero-scroll-height: clamp(56rem, 150svh, 78rem);
    --work-overlap: clamp(-28rem, -50svh, -18rem);
  }

  .topbar {
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: clamp(0.5rem, 2vw, 0.75rem);
    padding-inline: clamp(0.625rem, 3.5vw, 0.875rem);
  }

  .nav-links {
    display: none;
  }

  .topbar-cta {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: var(--hero-scroll-height);
  }

  .hero.is-mentor-open {
    min-height: auto;
  }

  .hero-stage {
    position: sticky;
    height: var(--hero-stage-height);
    min-height: 0;
  }

  .hero.is-mentor-open .hero-stage {
    position: relative;
    display: flex;
    height: auto;
    min-height: min(100svh, 56.25rem);
    flex-direction: column;
    padding: 4.625rem var(--page-gutter) 2.625rem;
    overflow: hidden;
  }

  .hero-stage::after {
    right: -0.02em;
    bottom: -0.05em;
    font-size: 28vw;
    writing-mode: vertical-rl;
  }

  .hero-halo {
    top: 4.75rem;
    left: 50%;
    width: min(15.625rem, 64vw);
    height: min(35svh, 18.4375rem);
  }

  .hero-figure {
    top: 4.625rem;
    left: 50%;
    width: min(18.75rem, 76vw);
    height: auto;
    max-height: min(52svh, 27.5rem);
    aspect-ratio: 15 / 22;
  }

  .hero.is-mentor-open .hero-figure {
    position: relative;
    top: auto;
    left: auto;
    width: min(18.125rem, 78vw);
    height: auto;
    max-height: min(20.625rem, 42svh);
    aspect-ratio: 29 / 33;
    flex: 0 0 auto;
    margin: 0 auto -18px;
    transform: none;
  }

  .hero.is-mentor-open .hero-halo {
    top: 5.25rem;
    left: 50%;
    width: min(15.625rem, 68vw);
    height: 15.9375rem;
  }

  .hero-nameplate {
    top: 64%;
    font-size: clamp(2.3rem, 12vw, 3.2rem);
    box-shadow: 4px 4px 0 var(--lemon);
  }

  .hero-portrait {
    height: 70%;
  }

  .hero-portrait img {
    width: var(--mentor-image-width-mobile, 57%);
  }

  .hero-cloud span {
    max-width: 126px;
    min-height: 25px;
    padding: 4px 7px;
    font-size: 0.58rem;
  }

  .hero-cloud {
    display: none;
  }

  .hero-copy {
    top: max(24.375rem, 50svh);
    left: var(--page-gutter);
    width: calc(100vw - var(--page-gutter) - var(--page-gutter));
    text-align: left;
  }

  .hero.is-mentor-open .hero-copy {
    display: none;
  }

  .hero.is-mentor-open .hero-nameplate {
    font-size: clamp(2.4rem, 12vw, 3rem);
  }

  .mentor-panel {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    order: 2;
    width: 100%;
    max-height: none;
    padding: 1.375rem 1.125rem;
    transform: translateY(24px);
  }

  .hero.is-mentor-open .mentor-panel {
    transform: translateY(0);
  }

  .mentor-panel-content {
    overflow: visible;
  }

  .mentor-name {
    font-size: clamp(1.8rem, 8.2vw, 2.5rem);
    text-wrap: wrap;
  }

  .mentor-meta {
    grid-template-columns: 1fr;
  }

  .mentor-meta div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .mentor-panel-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .mentor-switcher {
    justify-content: center;
  }

  .mentor-select {
    width: min(190px, calc(100vw - 168px));
  }

  .mentor-consultation {
    width: 100%;
  }

  h1 {
    margin-bottom: 14px;
    font-size: clamp(2.5rem, 11vw, 3.1rem);
    line-height: 0.94;
  }

  .hero-copy p:not(.eyebrow) {
    max-width: 540px;
    margin-bottom: 0;
    font-size: 0.94rem;
  }

  .section-panel {
    padding: clamp(4.5rem, 18vw, 5rem) 0;
  }

  .work-intro {
    display: block;
  }

  .work {
    margin-top: var(--work-overlap);
  }

  .hero.is-mentor-open + .work {
    margin-top: 0;
  }

  .work-intro h2 {
    font-size: clamp(2.55rem, 12vw, 3.4rem);
  }

  .showcase {
    min-height: 460px;
    box-shadow: 6px 6px 0 var(--cobalt);
  }

  .showcase-slide {
    padding: 26px 26px 92px;
  }

  .showcase-slide strong {
    font-size: clamp(2.15rem, 11vw, 3rem);
  }

  .showcase-slide p {
    max-width: 280px;
    font-size: 0.88rem;
  }

  .showcase-arrow {
    bottom: 18px;
  }

  .showcase-arrow.left {
    right: 76px;
    left: auto;
  }

  .showcase-arrow.right {
    right: 18px;
  }

  .review-slide {
    min-height: 300px;
    padding: 28px 24px;
    border-left-width: 8px;
    box-shadow: 5px 5px 0 var(--lemon);
  }

  .tariffs-heading h2 {
    font-size: clamp(3.9rem, 18.5vw, 5.2rem);
  }

  .tariffs-heading {
    margin-bottom: 32px;
  }

  .subject-tabs {
    width: 100%;
  }

  .subject-tab {
    flex: 1 1 calc(50% - 6px);
    padding: 0 8px;
    font-size: 0.9rem;
  }

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

  .tariff-card {
    min-height: 285px;
  }

  .faq-grid summary {
    min-height: 76px;
    padding: 0 2px;
  }

  .cart {
    right: 16px;
    bottom: 16px;
  }

  .cart-panel {
    width: min(380px, calc(100vw - 32px));
  }

  .cookie-banner {
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .cookie-actions {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 45rem) and (max-height: 43.75rem) {
  .hero-figure {
    top: 4.125rem;
  }

  .hero-halo {
    top: 4.375rem;
  }

  .hero-copy {
    top: 21.875rem;
  }

  h1 {
    font-size: 2rem;
  }

  .hero-copy p:not(.eyebrow) {
    margin-bottom: 0;
    font-size: 0.82rem;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-portrait:hover img {
    transform: none;
  }
}

