/* Shared responsive repairs for the public pages and control centre. */
html {
  overflow-x: clip;
  scroll-padding-top: 84px;
}

body.home-site,
.home-site .hero,
.home-site .hero:before {
  background-repeat: no-repeat;
}

body.guide-site {
  background-repeat: no-repeat;
}

img,
svg,
video {
  max-width: 100%;
}

.home-site .nav-toggle {
  min-width: 44px;
  min-height: 44px;
}

.home-site .hero {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: clip;
  background-image:
    radial-gradient(ellipse at 74% 38%, rgba(158, 71, 130, .21), transparent 34%),
    radial-gradient(ellipse at 17% 82%, rgba(96, 45, 86, .2), transparent 30%),
    #100b10;
}

.home-site .hero-copy {
  width: min(1160px, calc(100% - 48px));
  min-width: 0;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: clamp(24px, 4vw, 64px);
}

.home-site .hero-story,
.home-site .hero-signal-map {
  min-width: 0;
}

.home-site .hero-story {
  max-width: none;
}

.home-site .hero h1 {
  font-size: clamp(5rem, 12vw, 10rem);
  overflow-wrap: anywhere;
}

.home-site .hero-tagline {
  text-wrap: balance;
}

.home-site .hero-description {
  width: min(100%, 48ch);
}

.home-site .btn,
.guide-site .btn {
  min-height: 46px;
}

.guide-site .guide-hero-inner,
.guide-site .guide-section,
.guide-site .guide-bottom .container {
  min-width: 0;
}

.guide-site .guide-hero h1 {
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.guide-site .guide-index {
  min-width: 0;
}

.guide-site .guide-card,
.guide-site .gift-guide-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.guide-site .guide-card code,
.guide-site .gift-guide-card code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.auth-card {
  width: min(420px, 100%);
  min-width: 0;
  padding: clamp(22px, 6vw, 34px);
}

.auth-card h2 {
  max-width: 100%;
  font-size: clamp(20px, 5.6vw, 24px);
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

@media (max-width: 1040px) {
  .home-site .nav-links {
    gap: clamp(10px, 1.5vw, 18px);
  }

  .home-site .nav-links > a:not(.btn) {
    font-size: 12px;
  }
}

@media (max-width: 940px) {
  .home-site .hero-copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: clamp(88px, 13vh, 128px);
    padding-bottom: 76px;
  }

  .home-site .hero-story {
    width: min(100%, 680px);
  }

  .home-site .hero-signal-map {
    position: absolute;
    z-index: -1;
    top: 24%;
    right: -9%;
    width: min(54vw, 420px);
    opacity: .28;
    pointer-events: none;
  }

  .home-site .hero h1 {
    font-size: clamp(5rem, 13vw, 8.5rem);
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 70px;
  }

  .home-site .hero {
    min-height: 0;
  }

  .home-site .hero-copy {
    width: min(calc(100% - 32px), 560px);
    padding-top: clamp(42px, 10vw, 72px);
    padding-bottom: 74px;
    text-align: center;
  }

  .home-site .hero-story {
    margin-inline: auto;
    text-align: center;
  }

  .home-site .hero h1 {
    margin: 18px 0 15px;
    font-size: clamp(4.6rem, 20vw, 6.6rem);
    line-height: .9;
    letter-spacing: -.09em;
  }

  .home-site .hero-tagline {
    max-width: 100%;
    margin-inline: auto;
    font-size: clamp(1.35rem, 5.8vw, 1.8rem);
    line-height: 1.18;
  }

  .home-site .hero-description {
    max-width: 44ch;
    margin: 14px auto 0;
    font-size: 14px;
    line-height: 1.7;
  }

  .home-site .hero-actions {
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
  }

  .home-site .hero-actions .btn {
    flex: 1 1 150px;
    max-width: 240px;
    min-height: 46px;
  }

  .home-site .hero-signals {
    justify-content: center;
    max-width: 100%;
    gap: 8px;
  }

  .home-site .hero-signal-map {
    display: none;
  }

  .home-site .hero:after {
    top: 24%;
    right: -60%;
    width: 118vw;
    opacity: .48;
  }

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

  .home-site .reach-card:nth-child(3) {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(224, 167, 207, .13);
  }

  .home-site .reach-card:nth-child(4) {
    border-top: 1px solid rgba(224, 167, 207, .13);
  }

  .home-site .community-row {
    width: 100%;
  }

  .home-site .community-actions .btn {
    flex: 1 1 160px;
  }

  .guide-site .guide-hero {
    padding-top: clamp(108px, 27vw, 150px);
  }

  .guide-site .guide-hero h1 {
    max-width: 12ch;
    font-size: clamp(2.5rem, 11.2vw, 4.1rem);
    line-height: 1;
    letter-spacing: -.075em;
  }

  .guide-site .guide-hero p {
    max-width: 46ch;
    font-size: 15px;
  }

  .guide-site .guide-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-site .guide-actions .btn {
    width: 100%;
  }

  .guide-site .guide-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
    padding-top: 18px;
    font-size: 8px;
    line-height: 1.5;
    letter-spacing: .08em;
  }

  .guide-site .guide-index span:last-child {
    grid-column: 1 / -1;
  }

  .guide-site .moderation-preview-head {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .guide-site .moderation-preview-head span:last-child {
    margin-left: 0;
  }

  .guide-site .gift-guide-card {
    gap: 13px;
    padding: 18px;
  }

  .guide-site .gift-guide-card h3 {
    font-size: 13px;
  }

  .auth-gate {
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  }

  .auth-card {
    border-radius: 20px;
  }
}

@media (max-width: 390px) {
  .home-site .hero-copy {
    width: calc(100% - 28px);
  }

  .home-site .hero-actions .btn {
    flex-basis: 140px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .home-site .reach-shell {
    padding-inline: 14px;
  }

  .home-site .reach-card small {
    font-size: 7px;
    letter-spacing: .11em;
  }

  .guide-site .guide-hero h1 {
    max-width: 11ch;
    font-size: clamp(2.25rem, 11.2vw, 2.85rem);
  }

  .guide-site .guide-index {
    grid-template-columns: 1fr;
  }

  .guide-site .guide-index span:last-child {
    grid-column: auto;
  }
}

@media (hover: none) {
  .home-site .reach-card:hover,
  .home-site .system-item:hover,
  .home-site .arrival-note:hover,
  .home-site .arrival-steps:hover,
  .home-site .control-preview:hover,
  .home-site .safety-points > div:hover,
  .guide-site .guide-card:hover,
  .guide-site .gift-guide-card:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .home-site *,
  .guide-site *,
  .home-site *::before,
  .guide-site *::before,
  .home-site *::after,
  .guide-site *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
