/* Homepage hero redesign — loaded after index.css and index-layout.css.
   All classes are prefixed .hx so nothing else on the site is affected.
   To revert: restore .backups/hero-redesign-2026-11-09/ (index.html + css) and remove this <link>.

   Type scale (px): 14 · 16 · 18 · 20 · 24 + display (Anton). Spacing: 4-pt rhythm.
   All text >= 4.5:1 on its surface. One viewport on desktop, natural flow on small screens. */

.hx,
.hx *,
.hx *::before,
.hx *::after {
  box-sizing: border-box;
}

.hx {
  --hx-ink: #120d0c;
  --hx-ink-2: #1b1513;
  --hx-cream: #f5eee3;
  --hx-muted: #c2b6a9;
  --hx-line: rgba(245, 238, 227, 0.16);
  --hx-terra: #c54b1e;
  --hx-terra-hi: #f4a07a;
  --hx-terra-hover: #d65a2a;
  --hx-anton: Anton, "Arial Narrow", Impact, sans-serif;
  --hx-pop: Poppins, system-ui, sans-serif;
  --hx-body: "DM Sans", system-ui, sans-serif;

  --hx-fs-14: 14px;
  --hx-fs-16: 16px;
  --hx-fs-18: 18px;
  --hx-fs-20: 20px;
  --hx-fs-24: clamp(23px, 1.75vw, 27px);

  /* 1% of the space under the fixed nav — keeps the hero inside one screen */
  --hx-u: calc((100svh - var(--nav-height)) / 100);

  /* Phone: height drives width (9 : 19.3 screen ratio) */
  --hx-ratio: 0.4663;
  --hx-ph: clamp(500px, calc(100svh - var(--nav-height) - 130px), 780px);
  --hx-pw: calc(var(--hx-ph) * var(--hx-ratio) + 40px);

  position: relative;
  overflow: hidden;
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 3vh, 36px) clamp(20px, 4vw, 64px);
  padding-left: max(clamp(20px, 4vw, 64px), env(safe-area-inset-left));
  padding-right: max(clamp(20px, 4vw, 64px), env(safe-area-inset-right));
  background:
    radial-gradient(60% 70% at 78% 52%, rgba(197, 75, 30, 0.3), transparent 70%),
    linear-gradient(180deg, #120d0c, #0d0908);
  color: var(--hx-cream);
  font: 400 var(--hx-fs-16) / 1.5 var(--hx-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.hx a:focus-visible {
  outline: 3px solid var(--hx-terra-hi);
  outline-offset: 4px;
  border-radius: 6px;
}

.hx__wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hx__stage {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--hx-pw);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

/* ---------- Left: copy (headline -> promise -> steps -> CTA) ---------- */
.hx__title {
  margin: 0;
  font: 400 clamp(46px, min(6.2vw, calc(var(--hx-u) * 10.15)), 96px) / 0.96 var(--hx-anton);
  color: var(--hx-cream);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.hx__hit {
  display: inline-block;
  /* +10px above the tag, taken back from below so nothing else moves */
  margin: calc(clamp(10px, calc(var(--hx-u) * 2.2), 18px) + 10px) 0 calc(clamp(6px, calc(var(--hx-u) * 1.2), 10px) - 10px);
  padding: 0.06em 0.3em 0.1em 0.26em;
  background: var(--hx-terra);
  color: #fff;
  font: 400 clamp(32px, min(4.3vw, calc(var(--hx-u) * 7)), 62px) / 1 var(--hx-anton);
  transform: rotate(-3deg);
  transform-origin: left center;
  box-shadow: 0 18px 36px -18px rgba(197, 75, 30, 0.85);
}

.hx__reasons {
  margin: clamp(10px, calc(var(--hx-u) * 2.4), 20px) 0 0;
  color: #e0d8ce;
  font: 600 var(--hx-fs-20) / 1.3 var(--hx-pop);
}

.hx__promise {
  max-width: 30em;
  margin: clamp(14px, calc(var(--hx-u) * 2.8), 24px) 0 0;
  padding-left: 18px;
  border-left: 3px solid var(--hx-terra);
  color: var(--hx-cream);
  font: 600 var(--hx-fs-24) / 1.28 var(--hx-pop);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.hx__promise em {
  color: var(--hx-terra-hi);
  font-style: normal;
  white-space: nowrap;
}

.hx__steps {
  list-style: none;
  max-width: 41em;
  margin: clamp(14px, calc(var(--hx-u) * 2.8), 24px) 0 0;
  padding: 0;
  border-top: 1px solid var(--hx-line);
}

.hx__step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: clamp(9px, calc(var(--hx-u) * 1.7), 14px) 0;
  border-bottom: 1px solid var(--hx-line);
}

.hx__num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--hx-terra-hi);
  border-radius: 50%;
  color: var(--hx-terra-hi);
  font: 600 var(--hx-fs-16) / 1 var(--hx-pop);
}

.hx__step h2 {
  margin: 0;
  color: var(--hx-cream);
  font: 700 var(--hx-fs-18) / 1.25 var(--hx-pop);
  letter-spacing: -0.01em;
}

.hx__step h2 em {
  color: var(--hx-terra-hi);
  font-style: normal;
}

.hx__step p {
  margin: 2px 0 0;
  color: var(--hx-muted);
  font: 400 var(--hx-fs-16) / 1.4 var(--hx-body);
}

.hx__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  gap: 6px;
  margin-top: clamp(16px, calc(var(--hx-u) * 3.2), 28px);
}

.hx__cta .btn.patient-cta {
  align-self: center;
}

.hx__cta .cta-note {
  margin: 0;
  max-width: none;
  color: var(--hx-muted);
  font-style: normal;
  text-align: center;
  white-space: nowrap;
}

.hx__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 32px;
  border-radius: 6px;
  background: var(--hx-terra);
  color: #fff;
  font: 600 var(--hx-fs-18) / 1 var(--hx-pop);
  text-decoration: none;
  box-shadow: 0 14px 30px -14px rgba(197, 75, 30, 0.9);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.hx__btn:hover {
  background: var(--hx-terra-hover);
  box-shadow: 0 18px 34px -14px rgba(197, 75, 30, 1);
}

.hx__btn:active {
  background: #b3411a;
}

.hx__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.hx__btn:hover .hx__arrow {
  transform: translateX(4px);
}

/* ---------- Right: realistic phone (inner sizes are cqw of the phone width) ---------- */
.hx__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, calc(var(--hx-u) * 2.2), 20px);
  margin: 0;
}

.hx__phone {
  position: relative;
  flex: none;
  width: var(--hx-pw);
  height: var(--hx-ph);
  filter: drop-shadow(0 50px 50px rgba(0, 0, 0, 0.55));
}

.hx__frame {
  position: absolute;
  inset: 0;
  container-type: inline-size;
  border-radius: calc(var(--hx-pw) * 0.15);
  background: linear-gradient(145deg, #8b8177 0%, #3a332e 22%, #a39a8f 46%, #2c2723 72%, #7a7066 100%);
  box-shadow:
    inset 0 0 0 0.35cqw rgba(255, 255, 255, 0.22),
    inset 0 0 0 1.1cqw rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.7);
}

.hx__bezel {
  position: absolute;
  inset: 1.7cqw;
  padding: 2.1cqw;
  border-radius: 13.4cqw;
  background: #000;
}

.hx__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 11.3cqw;
  background: radial-gradient(90% 50% at 50% 0%, rgba(197, 75, 30, 0.22), transparent 70%), #100b0a;
  color: var(--hx-cream);
}

.hx__hw {
  position: absolute;
  width: calc(var(--hx-pw) * 0.013);
  border-radius: 2px;
  background: linear-gradient(90deg, #6d645b, #2b2622);
}

.hx__hw--action { left: calc(var(--hx-pw) * -0.011); top: 15%; height: 3.2%; }
.hx__hw--volup { left: calc(var(--hx-pw) * -0.011); top: 21.5%; height: 6.4%; }
.hx__hw--voldn { left: calc(var(--hx-pw) * -0.011); top: 30%; height: 6.4%; }
.hx__hw--power { right: calc(var(--hx-pw) * -0.011); top: 25%; height: 10.5%; background: linear-gradient(270deg, #6d645b, #2b2622); }

.hx__island {
  position: absolute;
  z-index: 2;
  top: 2.8cqw;
  left: 50%;
  width: 26cqw;
  height: 7.6cqw;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #000;
}

.hx__island::after {
  content: "";
  position: absolute;
  right: 2.2cqw;
  top: 50%;
  width: 3cqw;
  height: 3cqw;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3550, #05070d 70%);
}

.hx__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 12.5cqw;
  padding: 2.4cqw 7.4cqw 0 8.4cqw;
  color: #fff;
  font: 600 4.2cqw / 1 var(--hx-pop);
}

.hx__status-icons {
  display: flex;
  align-items: center;
  gap: 1.6cqw;
}

.hx__status svg {
  display: block;
  width: auto;
  height: 3.3cqw;
  color: #fff;
}

.hx__app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4.5cqw;
  padding: 2.5cqw 5.4cqw 4cqw;
}

.hx__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hx__logo {
  display: block;
  width: 25cqw;
  height: auto;
}

.hx__card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4.2cqw 4.4cqw 4.4cqw;
  border: 1px solid var(--hx-line);
  border-radius: 7cqw;
  background: var(--hx-ink-2);
  text-align: center;
}

.hx__avatar {
  display: block;
  width: 23cqw;
  height: 23cqw;
  margin: 0 0 3.6cqw;
  border: 1cqw solid var(--hx-terra);
  border-radius: 50%;
  background: #2a1f1a;
  object-fit: cover;
}

.hx__name {
  margin: 0;
  color: var(--hx-cream);
  font: 600 6.8cqw / 1.2 var(--hx-pop);
}

.hx__role {
  margin: 1.6cqw 0 5cqw;
  color: var(--hx-muted);
  font: 500 3.2cqw / 1.2 var(--hx-pop);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hx__msg {
  margin: 0;
  color: #eadfd2;
  font: 400 3.85cqw / 1.36 var(--hx-body);
  text-align: left;
}

.hx__msg + .hx__msg {
  margin-top: 0.55em;
}

.hx__btns {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.6cqw;
  margin-top: auto;
  padding-top: 3.6cqw;
}

.hx__btns span {
  display: grid;
  place-items: center;
  height: 12.4cqw;
  border-radius: 4.4cqw;
  font: 600 4.2cqw / 1 var(--hx-pop);
}

.hx__acc { background: var(--hx-terra); color: #fff; }
.hx__dec { border: 1px solid rgba(245, 238, 227, 0.32); color: var(--hx-cream); }

.hx__home {
  flex: none;
  display: grid;
  place-items: center;
  height: 7.5cqw;
}

.hx__home i {
  display: block;
  width: 34cqw;
  height: 1.3cqw;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.82);
}

.hx__cap {
  width: calc(var(--hx-pw) + 60px);
  max-width: calc(100vw - 40px);
  margin: 0;
  color: var(--hx-muted);
  font: 500 var(--hx-fs-14) / 1.4 var(--hx-pop);
  text-align: center;
}

/* ---------- Motion (decorative; off for reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hx-rise {
    opacity: 0;
    transform: translateY(10px);
    animation: hx-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
    animation-delay: var(--d, 0s);
  }

  @keyframes hx-rise {
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .hx__btn,
  .hx__arrow { transition: none; }
}

/* ---------- Short laptop screens (e.g. 1366x768) ---------- */
@media (min-width: 1024px) and (max-height: 820px) {
  .hx {
    --hx-ph: clamp(480px, calc(100svh - var(--nav-height) - 110px), 780px);
  }

  .hx__title { font-size: clamp(44px, min(6.2vw, calc(var(--hx-u) * 9.4)), 96px); }
  .hx__hit { font-size: clamp(30px, min(4.3vw, calc(var(--hx-u) * 6.6)), 62px); }
  .hx__reasons { font-size: var(--hx-fs-18); }
  .hx__promise { font-size: 23px; }
  .hx__step { padding: 8px 0; }
  .hx__step h2 { font-size: 17px; }
  .hx__step p { font-size: 15px; }
  .hx__btn { min-height: 54px; font-size: var(--hx-fs-16); }
  .hx__msg { font-size: 3.85cqw; }
}

/* Keep each step description on one line on desktop */
@media (min-width: 1024px) {
  .hx__step p { white-space: nowrap; }
}

/* ---------- Tablet / phone: stacked ---------- */
@media (max-width: 1023px) {
  .hx {
    --hx-pw: min(380px, 84vw);
    --hx-ph: calc(var(--hx-pw) / var(--hx-ratio));
  }

  .hx__stage {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 8px 0 16px;
  }

  .hx__copy { max-width: 640px; }
  .hx__title { font-size: clamp(48px, 13vw, 84px); }
  .hx__hit { font-size: clamp(34px, 9.5vw, 60px); }
  .hx__promise { font-size: clamp(23px, 5vw, 27px); }
}

@media (max-width: 520px) {
  .hx__btn { width: 100%; }
  .hx__step { gap: 14px; }
}
