.home,
.home body,
.home #content,
.home .site-content,
.home .ast-container,
.home .entry-content {
  overflow-x: hidden;
}

.home .lafit-hero {
  position: relative;
  overflow-x: clip;
  padding-inline: clamp(12px, 3vw, 28px);
  box-sizing: border-box;
}

.lafit-hero .lafit-hero-visual {
  --lafit-heartbeat-cycle: 1.32s;
  position: relative;
  isolation: isolate;
  width: min(100%, 1420px);
  max-width: calc(100vw - clamp(24px, 6vw, 56px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  box-sizing: border-box;
}

.lafit-hero .lafit-hero-visual .lafit-logoBtn {
  position: relative;
  z-index: 3;
  flex: 0 1 auto;
}

.home .lafit-hero .lafit-hero-visual .lafit-logo {
  position: relative;
  z-index: 3;
  display: block;
  max-width: min(100%, 850px);
  will-change: transform, filter, opacity;
  animation: lafitHeroBeat var(--lafit-heartbeat-cycle) ease-in-out infinite !important;
}

.home .lafit-hero .lafit-hero-text-top,
.home .lafit-hero .lafit-hero-text-bottom {
  inline-size: min(100%, 780px);
  max-width: min(100%, 780px);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.lafit-heartbeat-toggle {
  position: relative;
  z-index: 4;
  margin-top: 16px;
  min-width: 152px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #eaf6ff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.lafit-heartbeat-toggle:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(56, 182, 255, 0.28);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.24),
    0 0 18px rgba(56, 182, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.lafit-heartbeat-toggle.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(56, 182, 255, 0.96) 0%, rgba(30, 115, 255, 0.96) 100%);
  border-color: rgba(151, 224, 255, 0.44);
  box-shadow:
    0 16px 32px rgba(30, 115, 255, 0.28),
    0 0 26px rgba(56, 182, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.lafit-hero .lafit-ekg-shell {
  position: absolute;
  top: 58%;
  width: clamp(120px, 18vw, 320px);
  height: clamp(54px, 7vw, 110px);
  pointer-events: none;
  z-index: 2;
  opacity: 0.92;
  filter:
    drop-shadow(0 0 14px rgba(56, 182, 255, 0.48))
    drop-shadow(0 0 32px rgba(30, 115, 255, 0.2));
}

.lafit-hero .lafit-ekg-shell::before,
.lafit-hero .lafit-ekg-shell::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.98) 0%, rgba(56, 182, 255, 0.85) 45%, rgba(56, 182, 255, 0) 100%);
  box-shadow:
    0 0 16px rgba(56, 182, 255, 0.68),
    0 0 28px rgba(30, 115, 255, 0.34);
}

.lafit-hero .lafit-ekg-shell-left {
  left: 50%;
  transform: translate(calc(-100% - clamp(160px, 20.5vw, 380px)), -50%);
}

.lafit-hero .lafit-ekg-shell-left::before {
  left: -6px;
}

.lafit-hero .lafit-ekg-shell-left::after {
  right: -4px;
}

.lafit-hero .lafit-ekg-shell-right {
  left: 50%;
  transform: translate(clamp(160px, 20.5vw, 380px), -50%);
}

.lafit-hero .lafit-ekg-shell-right::before {
  left: -4px;
}

.lafit-hero .lafit-ekg-shell-right::after {
  right: -6px;
}

.lafit-hero .lafit-ekg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.lafit-hero .lafit-ekg-right {
  transform: scaleX(-1);
  transform-origin: center;
}

.lafit-hero .lafit-ekg-track,
.lafit-hero .lafit-ekg-pulse {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lafit-hero .lafit-ekg-track {
  stroke: rgba(123, 214, 255, 0.24);
  stroke-width: 3;
}

.lafit-hero .lafit-ekg-pulse {
  stroke: rgba(255, 255, 255, 0.98);
  stroke-width: 4.6;
  stroke-dasharray: 118 620;
  animation: lafitEkgFlow var(--lafit-heartbeat-cycle) linear infinite;
  filter:
    drop-shadow(0 0 14px rgba(56, 182, 255, 0.9))
    drop-shadow(0 0 26px rgba(30, 115, 255, 0.45));
}

.lafit-hero .lafit-hero-visual.lafit-heartbeat-live .lafit-ekg-pulse {
  stroke-width: 5;
}

.lafit-hero .lafit-hero-visual.lafit-heartbeat-sync-reset .lafit-logo,
.lafit-hero .lafit-hero-visual.lafit-heartbeat-sync-reset .lafit-ekg-pulse {
  animation: none !important;
}

.lafit-toggle:checked ~ .lafit-hero-visual .lafit-logo {
  opacity: 0.15;
  transform: scale(0.96);
  filter: blur(1px) drop-shadow(0 0 0 rgba(30, 115, 255, 0));
  animation-play-state: paused;
}

.lafit-toggle:checked ~ .lafit-heartbeat-toggle {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.lafit-toggle:checked ~ .lafit-hero-visual .lafit-ekg-shell {
  opacity: 0.14;
  filter: blur(0.2px) drop-shadow(0 0 6px rgba(56, 182, 255, 0.15));
}

@keyframes lafitHeroBeat {
  0%,
  36%,
  100% {
    transform: scale(1);
    filter:
      drop-shadow(0 0 40px rgba(30, 115, 255, 0.58))
      drop-shadow(0 0 80px rgba(56, 182, 255, 0.08));
  }

  10% {
    transform: scale(1.018);
    filter:
      drop-shadow(0 0 52px rgba(56, 182, 255, 0.64))
      drop-shadow(0 0 90px rgba(56, 182, 255, 0.16));
  }

  19% {
    transform: scale(0.996);
  }

  28% {
    transform: scale(1.038);
    filter:
      drop-shadow(0 0 64px rgba(56, 182, 255, 0.76))
      drop-shadow(0 0 110px rgba(56, 182, 255, 0.24));
  }
}

@keyframes lafitEkgFlow {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -738;
  }
}

@media (max-width: 1100px) {
  .lafit-hero .lafit-hero-visual {
    width: min(98vw, 1120px);
  }

  .lafit-hero .lafit-ekg-shell {
    top: 60%;
    width: clamp(112px, 21vw, 220px);
    height: clamp(50px, 9vw, 88px);
  }

  .lafit-hero .lafit-ekg-shell-left {
    transform: translate(calc(-100% - clamp(120px, 16vw, 186px)), -50%);
  }

  .lafit-hero .lafit-ekg-shell-right {
    transform: translate(clamp(120px, 16vw, 186px), -50%);
  }
}

@media (max-width: 768px) {
  .home .lafit-hero {
    padding-inline: 10px;
  }

  .lafit-hero .lafit-hero-visual {
    width: min(100%, 760px);
    max-width: calc(100vw - 20px);
    transform: translateY(-14px);
  }

  .lafit-hero .lafit-ekg-shell {
    top: 61%;
    width: clamp(60px, 15vw, 92px);
    height: clamp(36px, 8.5vw, 58px);
    opacity: 0.84;
    z-index: 4;
    mix-blend-mode: screen;
    filter:
      drop-shadow(0 0 12px rgba(56, 182, 255, 0.5))
      drop-shadow(0 0 24px rgba(30, 115, 255, 0.18));
  }

  .lafit-hero .lafit-ekg-shell-left {
    transform: translate(calc(-100% - clamp(104px, 14vw, 128px)), -50%);
  }

  .lafit-hero .lafit-ekg-shell-right {
    transform: translate(clamp(104px, 14vw, 128px), -50%);
  }

  .lafit-hero .lafit-ekg-track {
    stroke-width: 2.2;
  }

  .lafit-hero .lafit-ekg-pulse {
    stroke-width: 3.2;
  }

  .lafit-hero .lafit-ekg-shell::before,
  .lafit-hero .lafit-ekg-shell::after {
    width: 10px;
    height: 10px;
  }

  .home .lafit-hero .lafit-hero-text-top {
    inline-size: min(100%, 12ch);
    max-width: 12ch;
    line-height: 1.08;
    font-size: clamp(20px, 5.6vw, 28px);
    text-wrap: balance;
    transform: translateY(-20px);
  }

  .home .lafit-hero .lafit-hero-text-bottom {
    inline-size: min(100%, 18ch);
    max-width: 18ch;
    line-height: 1.25;
    text-wrap: balance;
    transform: translateY(-12px);
  }

  .lafit-heartbeat-toggle {
    margin-top: 14px;
    min-width: 138px;
    height: 38px;
    font-size: 13px;
  }

  .home .lafit-heartbeat-toggle {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: auto;
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 4px);
    margin-top: 0;
    min-width: 132px;
    height: 40px;
    padding: 0 16px;
    white-space: nowrap;
    z-index: 60;
  }
}

@media (max-width: 480px) {
  .lafit-hero .lafit-hero-visual {
    max-width: calc(100vw - 16px);
    transform: translateY(-18px);
  }

  .lafit-hero .lafit-hero-visual .lafit-logoBtn {
    transform: translate(-8px, -4px);
  }

  .home .lafit-hero .lafit-hero-visual .lafit-logo {
    width: min(74vw, 286px) !important;
  }

  .lafit-hero .lafit-ekg-shell {
    width: clamp(46px, 11vw, 64px);
    height: 28px;
    opacity: 0.78;
  }

  .home .lafit-heartbeat-toggle {
    left: max(10px, env(safe-area-inset-left));
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 2px);
    min-width: 126px;
    height: 38px;
    padding: 0 14px;
    font-size: 12.5px;
  }

  .lafit-hero .lafit-ekg-shell-left {
    transform: translate(calc(-100% - 112px), -50%);
  }

  .lafit-hero .lafit-ekg-shell-right {
    transform: translate(112px, -50%);
  }

  .lafit-hero .lafit-ekg-track {
    stroke-width: 1.8;
  }

  .lafit-hero .lafit-ekg-pulse {
    stroke-width: 2.6;
  }

  .lafit-hero .lafit-ekg-shell::before,
  .lafit-hero .lafit-ekg-shell::after {
    width: 7px;
    height: 7px;
  }
}

@media (max-width: 390px) {
  .home .lafit-hero .lafit-hero-visual .lafit-logo {
    width: min(70vw, 252px) !important;
  }

  .lafit-hero .lafit-hero-visual {
    transform: translateY(-20px);
  }

  .home .lafit-hero .lafit-hero-text-top {
    transform: translateY(-24px);
  }

  .home .lafit-hero .lafit-hero-text-bottom {
    transform: translateY(-14px);
  }

  .lafit-hero .lafit-ekg-shell {
    width: clamp(38px, 9vw, 52px);
    height: 24px;
    opacity: 0.68;
  }

  .home .lafit-heartbeat-toggle {
    min-width: 122px;
    padding: 0 13px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .lafit-hero .lafit-hero-visual .lafit-logo,
  .lafit-hero .lafit-ekg-pulse {
    animation: none !important;
  }
}
