/* TALSON logo morph — fixed button + letter groups */

.talson-btn {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0 !important;
  background: none !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0;
  display: block;
  cursor: pointer;
  color: inherit;
  font: inherit;
  line-height: 0;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transform-origin: 0 0;
  will-change: transform, width, height;
}

.talson-btn:hover,
.talson-btn:focus,
.talson-btn:active {
  background: none !important;
  background-color: transparent !important;
  color: inherit;
  padding: 0 !important;
}

.talson-btn:focus-visible {
  outline: 2px solid #00a863;
  outline-offset: 6px;
  border-radius: 8px;
}

.talson-btn .talson-hover {
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.talson-btn:hover .talson-hover {
  transform: scale(1.06);
}

.talson-btn svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
}

.talson-letter {
  transform-box: view-box;
  transform-origin: 0 0;
  will-change: transform, opacity;
}

/* Reserves space where the wordmark sits over the hero */
.hero-logo-slot {
  position: relative;
  width: 100%;
  min-height: clamp(7.5rem, 18vw, 12rem);
  margin: 0 0 0.35rem;
  pointer-events: none;
}

.hero-logo-slot .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Intro lock: page chrome hidden + no scroll until wordmark lands —— */
html.logo-intro {
  overflow: hidden;
  height: 100%;
}

html.logo-intro body {
  overflow: hidden;
  max-height: 100svh;
  overscroll-behavior: none;
  touch-action: none;
}

html.logo-intro header,
html.logo-intro main,
html.logo-intro footer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Keep layout for the hero slot so the wordmark can land on it */
html.logo-intro main {
  visibility: hidden;
}

html.logo-intro .hero-logo-slot {
  visibility: hidden;
}

/* Page content stays hidden until intro finishes (JS adds .logo-ready) */
body:not(.logo-ready) header,
body:not(.logo-ready) main,
body:not(.logo-ready) footer {
  opacity: 0;
  pointer-events: none;
}

body.logo-ready header,
body.logo-ready main,
body.logo-ready footer {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.7s ease;
}

/* Hero copy fades in after intro unstack */
#hero-h2,
#hero-p1 {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

body.logo-ready #hero-h2,
body.logo-ready #hero-p1 {
  opacity: 1;
  transform: none;
}

#hero-p1 {
    text-align: justify;
    text-justify: inter-word;
    text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  html.logo-intro,
  html.logo-intro body {
    overflow: auto;
    max-height: none;
    touch-action: auto;
  }

  html.logo-intro header,
  html.logo-intro main,
  html.logo-intro footer,
  body:not(.logo-ready) header,
  body:not(.logo-ready) main,
  body:not(.logo-ready) footer,
  body.logo-ready header,
  body.logo-ready main,
  body.logo-ready footer,
  #hero-h2,
  #hero-p1 {
    opacity: 1 !important;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: none;
  }

  .talson-btn:hover .talson-hover {
    transform: none;
  }
}
