@font-face {
  font-family: "DynaPuff";
  src: url("/media/fonts/DynaPuff-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

html:has(body.home),
body.home {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overflow-x: clip;
  max-width: 100%;
}

body.home {
  color: #fff;
  background: #282828;
  font-family: "DynaPuff", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.home-stage {
  box-sizing: border-box;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #282828;
  display: grid;
  grid-template-rows: auto 1fr;
}

.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.25rem clamp(1.5rem, 4vw, 4.5rem) 0;
  border: 0;
  border-bottom: 0;
  background: transparent;
  position: relative;
  z-index: 5;
}

.home-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  position: relative;
  z-index: 6;
}

.home-logo img {
  display: block;
  width: clamp(11rem, 18vw, 17.5rem);
  height: auto;
  mix-blend-mode: lighten;
}

.home-menu-toggle {
  display: none;
  position: relative;
  z-index: 6;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.home-menu-toggle-bar {
  display: block;
  width: 1.55rem;
  height: 0.18rem;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.home-stage.is-menu-open .home-menu-toggle-bar:nth-child(1) {
  transform: translateY(0.58rem) rotate(45deg);
}

.home-stage.is-menu-open .home-menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.home-stage.is-menu-open .home-menu-toggle-bar:nth-child(3) {
  transform: translateY(-0.58rem) rotate(-45deg);
}

.home-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: clamp(1.25rem, 3vw, 2.75rem);
}

.home-nav a,
.home-nav-item {
  color: #fff;
  text-decoration: none;
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.home-nav a:hover,
.home-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.home-nav a[aria-current="page"] {
  color: #f9d775;
}

.home-nav-item {
  cursor: default;
  opacity: 0.5;
}

.home-hero {
  /* Use vw/rem only — never % inside --mob-size ( % resolves differently for width vs height ). */
  --mob-size: min(37.125rem, 49.5vw, calc((100dvh - 16rem) * 360 / 320 * 0.75));
  /* Sheet has ~95px empty top; nudge so visible tip+text center in the hero. */
  --hero-optical-nudge: calc(var(--mob-size) * -95 / 720);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.495rem;
  text-align: center;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 clamp(1rem, 4vw, 3rem);
  box-sizing: border-box;
  overflow-x: clip;
  transform: translateY(var(--hero-optical-nudge));
}

/* Local preview — delete with the figure in index.php to revert. */
.home-hero-mob {
  --mob-frames: 15;
  --mob-duration: 1.5s;
  --mob-scale: 1;
  box-sizing: border-box;
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  width: min(var(--mob-size), 100%);
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 360 / 320;
  height: auto;
  /* Scale grows past full-bleed width (width alone is capped by the viewport). */
  margin: calc((var(--mob-scale) - 1) * min(var(--mob-size), 100%) * 320 / 360 / 2) auto;
  padding: 0;
  line-height: 0;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
  transform: scale(var(--mob-scale));
  transform-origin: center center;
}

.home-hero-mob-sheet {
  /* Absolute so the wide strip cannot widen/shift the flex item. */
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  width: auto;
  max-width: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  /* Keep idle loop even when OS/Chrome sets prefers-reduced-motion. */
  animation: home-mob-idle var(--mob-duration) steps(var(--mob-frames)) infinite;
  will-change: transform;
}

@keyframes home-mob-idle {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-100%, 0, 0);
  }
}

.home-hero h1 {
  margin: 0 0 1.495rem;
  color: #fff;
  font-size: clamp(1.846rem, 4.399vw, 3.619rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-wrap: balance;
}

.home-title-a,
.home-title-b {
  display: inline;
}

.home-title-a::after {
  content: " ";
}

.home-line {
  margin: 0;
  color: #fff;
  font-size: clamp(0.71rem, 1.49vw, 1.1rem);
  font-weight: 400;
  line-height: 1.45;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: nowrap;
}

.home-feature {
  display: inline;
}

.home-sep {
  display: inline;
}

@media (max-width: 900px) {
  .home-top {
    padding: 1rem 1.15rem 0;
    gap: 1rem;
  }

  .home-logo img {
    width: min(12.5rem, 58vw);
  }

  .home-menu-toggle {
    display: inline-flex;
  }

  .home-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 1.15rem;
    left: auto;
    width: min(15.5rem, calc(100vw - 2.3rem));
    margin: 0;
    padding: 0.85rem 1rem;
    box-sizing: border-box;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: #fff;
    border-radius: 0.55rem;
    box-shadow: 0 0.65rem 1.6rem rgba(0, 0, 0, 0.35);
    transform: none;
    pointer-events: auto;
  }

  .home-stage.is-menu-open .home-nav {
    display: flex;
  }

  .home-nav a,
  .home-nav-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.35rem;
    color: #282828;
    font-size: 1.2rem;
    line-height: 1.2;
    opacity: 1;
    border-bottom: 1px solid rgba(40, 40, 40, 0.08);
  }

  .home-nav-item {
    opacity: 0.45;
  }

  .home-nav a:last-child,
  .home-nav-item:last-child {
    border-bottom: 0;
  }

  .home-nav a:hover,
  .home-nav a:focus-visible {
    text-decoration: none;
    background: rgba(40, 40, 40, 0.06);
    border-radius: 0.35rem;
  }

  .home-nav a[aria-current="page"] {
    color: #282828;
    text-decoration: none;
    background: rgba(40, 40, 40, 0.06);
    border-radius: 0.35rem;
  }

  .home-hero {
    /* Bigger presence like desktop; optically center in the mobile viewport. */
    --mob-size: min(42.9rem, calc(100vw - 1.2rem), calc((100dvh - 10rem) * 360 / 320));
    --mob-pad-top: 95;
    /* Half of empty sprite top pad so visible tip+text sit on true center. */
    --hero-optical-nudge: calc(var(--mob-size) * var(--mob-pad-top) / -720 - 30px);
    gap: 0.75rem;
    padding: 0 0.85rem 1rem;
    justify-content: center;
  }

  .home-hero-mob {
    /* 1.092 then +15% → 1.256 */
    --mob-scale: 1.256;
  }

  .home-hero h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    margin: -25px 0 0.85rem;
    width: 100%;
    font-size: clamp(1.24rem, 5.76vw, 1.72rem);
    line-height: 1.08;
    letter-spacing: 0;
    padding-inline: 0.1rem;
  }

  .home-title-a,
  .home-title-b {
    display: block;
    max-width: 100%;
  }

  .home-title-a::after {
    content: none;
  }

  .home-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    white-space: normal;
    max-width: 100%;
    font-size: clamp(0.84rem, 3.36vw, 1rem);
    line-height: 1.2;
  }

  .home-feature {
    display: block;
  }

  .home-sep {
    display: none;
  }
}

@media (max-width: 480px) {
  .home-hero {
    --mob-size: min(39rem, calc(100vw - 1rem), calc((100dvh - 9.5rem) * 360 / 320));
    gap: 0.65rem;
    padding: 0 0.75rem 0.85rem;
  }

  .home-hero h1 {
    font-size: clamp(1.12rem, 6.08vw, 1.56rem);
    margin-bottom: 0.75rem;
  }

  .home-line {
    gap: 0.75rem;
    font-size: clamp(0.8rem, 3.52vw, 0.92rem);
  }

  .home-nav {
    right: 1rem;
  }
}

@media (max-width: 360px) {
  .home-hero {
    --mob-size: min(34.125rem, calc(100vw - 0.8rem), calc((100dvh - 9rem) * 360 / 320));
  }

  .home-hero h1 {
    font-size: clamp(1rem, 5.76vw, 1.36rem);
  }
}
