/* ═══════════════════════════════════════════════════════
   ABOUT OVERLAY — adapted from fictions.work
   Circular +/× toggle + full-screen overlay panel.
   Placeholder content (green bg, white "content" word)
   until real copy/design is supplied.
═══════════════════════════════════════════════════════ */

.about-toggle {
  position: fixed;
  top: 1.6rem;
  right: calc(1.8rem + var(--nav-h) * 3.8936);
  z-index: 300;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: block;
  width: var(--nav-h);
  height: var(--nav-h);
  color: #fff;
  opacity: 0.9;
  -webkit-touch-callout: none;
  user-select: none;
  transition: opacity 0.3s ease, filter 0.5s ease;
}

.about-toggle:hover { opacity: 1; }

.about-toggle svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: rotate(0deg);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: 50% 50%;
}

/* The SVG spins on click via body.about-open */
body.about-open .about-toggle svg {
  transform: rotate(45deg);
}


/* ═══════════════════════════════════════════════════════
   OVERLAY PANEL
   Fixed full-screen, above site content but below the
   toggle button. Placeholder blue bg, 90% opaque so the
   page behind shows through slightly — swap later.
═══════════════════════════════════════════════════════ */
#about-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 35, 255, 0.9);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.about-open #about-overlay {
  opacity: 1;
  pointer-events: all;
}

/* Block clicks on the storybook while overlay is open */
body.about-open .scroll-container {
  pointer-events: none;
}

/* Logo, mail and linkedin sit below the overlay when it's open */
body.about-open .logo,
body.about-open .mail-link,
body.about-open .linkedin-link,
body.about-open .info-link {
  z-index: 1;
}


/* ═══════════════════════════════════════════════════════
   OVERLAY CONTENT — newsletter sign-up
   Reuses the storybook's .anim/.signup-* classes, but those
   normally only reveal under .section.is-active — this overlay
   isn't a .section, so it needs its own reveal trigger here.
═══════════════════════════════════════════════════════ */
.about-content {
  text-align: center;
  width: 100%;
  max-width: 1300px;
  /* Capped the same way as .content in style.css — 12vw padding was
     uncapped past the point where this box's own width freezes at
     max-width:1300px, so inner text width was shrinking as the
     window got wider above ~1300px. 9.75rem = 12% of 1300px. */
  padding: 0 clamp(2rem, 12vw, 9.75rem);
  box-sizing: border-box;
}

body.about-open .about-content .anim {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(0.3s + var(--delay, 0s));
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE — mirrors mail-link/linkedin-link breakpoints
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .about-toggle {
    top:   max(1rem, env(safe-area-inset-top, 0px) + 0.7rem);
    right: calc(max(1.2rem, env(safe-area-inset-right, 0px) + 1rem) + var(--nav-h) * 3.8936);
  }

  .about-content {
    padding: 0 calc(1.6rem + 6vw);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .about-content {
    padding: 0 24vw;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .about-toggle {
    top:   max(0.5rem, env(safe-area-inset-top, 0px) + 0.4rem);
    right: calc(max(0.8rem, env(safe-area-inset-right, 0px) + 0.6rem) + var(--nav-h) * 3.8936);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-toggle svg,
  #about-overlay,
  .about-word {
    transition-duration: 0.01ms !important;
  }
}
