/* ==========================================================================
   Innovation Trampoline — Claude Fable 5.1 "Lego" edition
   "The brick box." A teal baseplate, hard ink outlines with offset shadows,
   Gabarito display type over Figtree, and red/blue isometric bricks that snap
   down as they arrive. Ported from the Claude Design project
   "Claude Design Theme Directions" (Lego - Fable 5.1).

   Self-contained: this stylesheet also skins the shared header, mobile nav
   and footer whenever body.fable-lego is active.
   ========================================================================== */

:root {
  --lg-teal:     #8fd3cf;
  --lg-teal-deep:#6fc0bb;
  --lg-ink:      #14333b;
  --lg-ink-soft: #2f5a62;
  --lg-red:      #e8232a;
  --lg-red-deep: #c4141b;
  --lg-blue:     #3f95e6;
  --lg-yellow:   #ffd500;
  --lg-white:    #ffffff;
  --lg-mint:     #f2fbfa;
  --lg-green:    #7ed957;

  --lg-display: 'Gabarito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --lg-body:    'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --lg-pop:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --lg-drop: cubic-bezier(0.34, 1.4, 0.64, 1);
  --lg-snap: cubic-bezier(0.3, 0.9, 0.4, 1);
  --lg-out:  cubic-bezier(0.16, 1, 0.3, 1);

  --lg-max: 1140px;
  --lg-gutter: clamp(1.25rem, 3vw, 1.75rem);
}

/* Base --------------------------------------------------------------------- */
body.fable-lego {
  margin: 0;
  background-color: var(--lg-teal);
  color: var(--lg-ink);
  font-family: var(--lg-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.fable-lego *,
body.fable-lego *::before,
body.fable-lego *::after { box-sizing: border-box; }

body.fable-lego ::selection { background-color: var(--lg-ink); color: var(--lg-white); }

.lg img { max-width: 100%; height: auto; display: block; }
.lg a { color: inherit; text-decoration: none; }
/* .menu-toggle lives in the shared header, outside <main class="lg"> — without
   this it renders with native UA button chrome. */
.lg button,
body.fable-lego .menu-toggle {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  border-radius: 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
}
.lg h1, .lg h2, .lg h3, .lg p { margin: 0; }
.lg ul, .lg ol { margin: 0; padding: 0; list-style: none; }
.lg svg { overflow: visible; display: block; }
.lg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

body.fable-lego :focus { outline: none; }
body.fable-lego .menu-toggle:focus-visible,
body.fable-lego .site-logo:focus-visible,
body.fable-lego .site-nav a:focus-visible,
body.fable-lego .mobile-nav a:focus-visible,
body.fable-lego .footer-links a:focus-visible,
.lg a:focus-visible,
.lg button:focus-visible,
.lg .lg-field__input:focus-visible {
  outline: 3px solid var(--lg-blue);
  outline-offset: 3px;
}

.lg-container {
  width: 100%;
  max-width: var(--lg-max);
  margin: 0 auto;
  padding: 0 var(--lg-gutter);
}

/* Keyframes ---------------------------------------------------------------- */
@keyframes lg-snap {
  0%   { transform: translateY(-140px); opacity: 0; }
  55%  { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(0) scale(1.03, 0.94); }
  85%  { transform: translateY(-6px) scale(1, 1); }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes lg-hover {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}
@keyframes lg-dots { to { stroke-dashoffset: 0; } }
@keyframes lg-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes lg-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Shared pieces ------------------------------------------------------------ */

/* A brick that snaps down into place. --lg-delay staggers the drop. */
.lg-snap {
  animation: lg-snap 0.9s var(--lg-snap) var(--lg-delay, 0s) both;
}
.lg-snap--build { animation-duration: 0.7s; }

/* Hover lift for a brick; each sets its own --lg-hov transform + origin. */
.lg-brick {
  transition: transform 0.35s var(--lg-pop) var(--lg-hd, 0s);
  cursor: help;
}
.lg-brick:hover { transform: var(--lg-hov, translateY(-10px)); }
.lg-brick--lift:hover { transform: translateY(-14px); }

/* The one that never quite lands */
.lg-float { animation: lg-hover 3.2s ease-in-out 1.8s infinite; }

/* Dotted white "baseplate" lines that draw in */
.lg-dots {
  fill: none;
  stroke: var(--lg-white);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 0.1 18;
  stroke-dashoffset: 260;
  animation: lg-dots 1.2s ease var(--lg-delay, 0s) both;
}
.lg-dots--static { stroke-dashoffset: 0; animation: none; }

/* White knockout type with a hard ink shadow */
.lg-outline {
  color: var(--lg-white);
  text-shadow: 4px 4px 0 var(--lg-ink);
}
.lg-red { color: var(--lg-red); }

/* Highlighter run */
.lg-hl {
  background: var(--lg-yellow);
  color: var(--lg-ink);
  font-weight: 600;
  padding: 1px 7px;
  border: 2px solid var(--lg-ink);
}

/* Section label: ink block */
.lg-label {
  display: inline-block;
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lg-white);
  background: var(--lg-ink);
  padding: 4px 10px;
}

.lg-aside {
  font-size: 0.875rem;
  color: var(--lg-ink-soft);
}
.lg-aside--strong { font-weight: 600; }

/* The boxed button: hard border, offset shadow, presses in on hover */
.lg-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--lg-red);
  color: var(--lg-white);
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  padding: 14px 22px;
  border: 3px solid var(--lg-ink);
  box-shadow: 6px 6px 0 var(--lg-ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
.lg .lg-btn { background: var(--lg-red); color: var(--lg-white); }
.lg-btn:hover,
.lg-btn:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--lg-ink);
}

/* Boxed card */
.lg-card {
  display: block;
  background: var(--lg-white);
  color: var(--lg-ink);
  border: 3px solid var(--lg-ink);
  box-shadow: 10px 10px 0 var(--lg-ink);
}

/* Reveal: bricks arrive from above and overshoot into place */
.lg [data-animate] {
  opacity: 0;
  transform: translateY(-40px);
  transition: opacity 0.5s ease var(--lg-delay, 0s),
              transform 0.9s var(--lg-pop) var(--lg-delay, 0s);
}
.lg [data-animate].is-visible { opacity: 1; transform: none; }

/* Sections ----------------------------------------------------------------- */
.lg-section { padding: clamp(3.75rem, 8vw, 6.875rem) 0 0; }

.lg-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 36px;
  margin-bottom: 2.75rem;
}
.lg-section__head--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  max-width: 760px;
  margin-bottom: 2.5rem;
}
.lg-section__head--split {
  justify-content: space-between;
  margin-bottom: 2.25rem;
}
.lg-section__head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 36px;
}
.lg-section__title {
  font-family: var(--lg-display);
  font-weight: 900;
  font-size: clamp(1.875rem, 3.6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.lg-section__sub {
  font-size: 1.125rem;
  color: var(--lg-ink-soft);
  max-width: 56ch;
}

/* Header (shared chrome) --------------------------------------------------- */
/* In normal flow on wide screens, like the source; sticky on phones so the
   hamburger stays reachable. The switcher pill is bottom-docked, so nothing
   overhangs the header band. */
body.fable-lego .site-header {
  position: relative;
  z-index: 200;
  padding: 1.75rem 0 0;
  background: transparent;
}
@media (max-width: 767px) {
  body.fable-lego .site-header {
    position: sticky;
    top: 0;
    padding: 0.9rem 0;
    background: var(--lg-teal);
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s ease;
  }
  body.fable-lego .site-header.is-scrolled { border-bottom-color: var(--lg-ink); }
  body.fable-lego.admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
  /* Below 600px the admin bar is absolute and scrolls away. */
  body.fable-lego.admin-bar .site-header { top: 0; }
}
body.fable-lego .site-header .container {
  width: 100%;
  max-width: var(--lg-max);
  margin: 0 auto;
  padding: 0 var(--lg-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

body.fable-lego .site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--lg-display);
  font-weight: 900;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: -0.015em;
  color: var(--lg-ink);
  text-decoration: none;
  white-space: nowrap;
}
body.fable-lego .site-logo__brick {
  width: 46px;
  height: 44px;
  color: var(--lg-red);
  overflow: visible;
  flex: none;
  transition: transform 0.4s var(--lg-pop);
}
body.fable-lego .site-logo:hover .site-logo__brick { transform: rotate(-14deg) translateY(-4px); }
@media (max-width: 480px) {
  body.fable-lego .site-logo__brick { width: 34px; height: 32px; }
}
body.fable-lego .site-logo .logo-innovation,
body.fable-lego .site-logo .logo-trampoline { color: var(--lg-ink); }
body.fable-lego .site-logo .logo-dot { color: var(--lg-red); }

body.fable-lego .site-nav { display: none; }
@media (min-width: 768px) {
  body.fable-lego .site-nav { display: flex; align-items: center; gap: 1.6rem; }
}
body.fable-lego .site-nav a {
  font-family: var(--lg-body);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--lg-ink);
  transition: color 0.2s ease;
}
body.fable-lego .site-nav a:hover,
body.fable-lego .site-nav a.is-active { color: var(--lg-red); }
/* The last link is the boxed "Contact" button */
body.fable-lego .site-nav a:last-child {
  background: var(--lg-white);
  color: var(--lg-ink);
  padding: 10px 18px;
  border: 3px solid var(--lg-ink);
  box-shadow: 5px 5px 0 var(--lg-ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
body.fable-lego .site-nav a:last-child:hover,
body.fable-lego .site-nav a:last-child.is-active {
  color: var(--lg-ink);
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--lg-ink);
}

body.fable-lego .menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  padding: 4px 0;
}
body.fable-lego .menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--lg-ink);
  transition: transform 0.3s var(--lg-out), opacity 0.2s ease;
}
body.fable-lego .menu-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.fable-lego .menu-toggle.is-active span:nth-child(2) { opacity: 0; }
body.fable-lego .menu-toggle.is-active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (min-width: 768px) { body.fable-lego .menu-toggle { display: none; } }

body.fable-lego .mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 2rem;
  background: var(--lg-teal);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--lg-out), visibility 0.35s;
}
body.fable-lego.admin-bar .mobile-nav { top: 32px; }
@media screen and (max-width: 782px) {
  body.fable-lego.admin-bar .mobile-nav { top: 46px; }
}
body.fable-lego .mobile-nav.is-open { opacity: 1; visibility: visible; }
body.fable-lego .mobile-nav a {
  font-family: var(--lg-display);
  text-decoration: none;
  font-weight: 900;
  font-size: clamp(2rem, 9vw, 3rem);
  letter-spacing: -0.02em;
  color: var(--lg-ink);
  opacity: 0;
  transform: translateY(-24px);
  transition: opacity 0.4s ease, transform 0.6s var(--lg-pop), color 0.2s ease;
}
body.fable-lego .mobile-nav.is-open a { opacity: 1; transform: none; }
body.fable-lego .mobile-nav.is-open a:nth-child(1) { transition-delay: 0.08s; }
body.fable-lego .mobile-nav.is-open a:nth-child(2) { transition-delay: 0.14s; }
body.fable-lego .mobile-nav.is-open a:nth-child(3) { transition-delay: 0.2s; }
body.fable-lego .mobile-nav.is-open a:nth-child(4) { transition-delay: 0.26s; }
body.fable-lego .mobile-nav a:hover { color: var(--lg-red); }
@media (min-width: 768px) { body.fable-lego .mobile-nav { display: none; } }

/* Hero --------------------------------------------------------------------- */
.lg-hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.lg-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .lg-hero__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.lg-hero__copy { animation: lg-fade-up 0.8s var(--lg-out) 0.1s both; }
.lg-hero__eyebrow {
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--lg-ink-soft);
  letter-spacing: 0.02em;
}
.lg-hero__title {
  margin-bottom: 1.5rem;
  font-family: var(--lg-display);
  font-weight: 900;
  font-size: clamp(2.625rem, 5.6vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 12ch;
}
.lg-hero__lead {
  margin-bottom: 0.75rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.45;
  font-weight: 500;
  max-width: 34ch;
}
.lg-hero__text {
  margin-bottom: 1.875rem;
  font-size: 1.0625rem;
  color: var(--lg-ink-soft);
  max-width: 40ch;
}
.lg-hero__text strong { color: var(--lg-ink); font-weight: 700; }
.lg-hero__cta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.lg-hero__pile { position: relative; min-height: 240px; }
.lg-hero__svg { width: 100%; height: auto; }
@media (max-width: 899px) {
  .lg-hero__pile { max-width: 520px; margin: 0 auto; }
}

/* Approach ----------------------------------------------------------------- */
.lg-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem 2.5rem;
  align-items: end;
}
.lg-step { display: flex; flex-direction: column; gap: 14px; }
.lg-step__stack { position: relative; width: 200px; }
.lg-step__svg { width: 200px; height: 216px; cursor: help; }
.lg-step__num {
  position: absolute;
  left: 24px;
  top: 4px;
  font-family: var(--lg-display);
  font-weight: 900;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--lg-white);
  text-shadow: 3px 3px 0 var(--lg-ink), -1px -1px 0 var(--lg-ink), 1px -1px 0 var(--lg-ink), -1px 1px 0 var(--lg-ink);
  pointer-events: none;
}
.lg-step__title {
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.lg-step__body {
  font-size: 1rem;
  color: var(--lg-ink-soft);
  max-width: 44ch;
}

/* Proof -------------------------------------------------------------------- */
.lg-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem 1.5rem;
  margin-bottom: 4rem;
}
.lg-stat { display: flex; flex-direction: column; align-items: flex-start; }
.lg-stat__num {
  font-family: var(--lg-display);
  font-weight: 900;
  font-size: clamp(3.25rem, 5.6vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-left: 8px;
}
.lg-stat__brick {
  width: 230px;
  max-width: 100%;
  height: auto;
  margin-top: 4px;
  cursor: help;
  transition: transform 0.4s var(--lg-pop);
}
.lg-stat__brick:hover { transform: translateY(-10px) rotate(-3deg); }
.lg-stat__label {
  font-family: var(--lg-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 10px;
  max-width: 18ch;
}

.lg-proof__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem 3.5rem;
  align-items: start;
}

.lg-essay {
  padding: 30px 30px 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.lg-essay:hover { box-shadow: 6px 6px 0 var(--lg-ink); transform: translate(2px, 2px); }
/* The hover transform must not fight the reveal transform */
.lg-essay.is-visible:hover { transform: translate(2px, 2px); }
.lg-essay__kicker {
  display: block;
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lg-red);
  margin-bottom: 12px;
}
.lg-essay__title {
  display: block;
  font-family: var(--lg-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.lg-essay__text {
  display: block;
  font-size: 1rem;
  color: var(--lg-ink-soft);
  margin-bottom: 16px;
}
.lg-essay__cta {
  display: inline-block;
  font-family: var(--lg-display);
  font-weight: 700;
  color: var(--lg-red);
}

.lg-exhibit__kicker {
  display: block;
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.lg-exhibit__text {
  margin-bottom: 8px;
  font-size: 1rem;
  color: var(--lg-ink-soft);
  max-width: 46ch;
}
.lg-drafts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 4px 12px;
}
.lg-drafts__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--lg-ink);
  padding: 8px 6px 6px;
  transition: transform 0.25s var(--lg-pop);
}
a.lg-drafts__link:hover { transform: translateY(-6px); }
.lg-drafts__brick {
  width: 88px;
  height: 84px;
  transition: transform 0.4s var(--lg-pop);
}
a.lg-drafts__link:hover .lg-drafts__brick { transform: rotate(-10deg) scale(1.1); }
.lg-drafts__name {
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.2;
  margin-top: 6px;
}
.lg-drafts__tail {
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--lg-ink-soft);
}
.lg-drafts__link.is-current .lg-drafts__tail { color: var(--lg-red); font-weight: 700; }

/* Capabilities ------------------------------------------------------------- */
.lg-caps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem 3rem;
  align-items: center;
}
.lg-build { position: relative; }
.lg-build__svg { width: 100%; height: auto; }
.lg-build__set { display: none; }
.lg-build__set.is-active { display: inline; }
.lg-build__label {
  position: absolute;
  left: 2%;
  top: 4%;
  background: var(--lg-white);
  border: 3px solid var(--lg-ink);
  box-shadow: 5px 5px 0 var(--lg-ink);
  padding: 8px 14px;
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.25;
  max-width: 210px;
  animation: lg-fade-up 0.5s ease var(--lg-delay, 0.3s) both;
}
.lg-build__label-sub {
  display: block;
  font-family: var(--lg-body);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--lg-ink-soft);
}

.lg-caps__picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1.625rem;
}
.lg .lg-pick {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--lg-white);
  color: var(--lg-ink);
  border: 3px solid var(--lg-ink);
  box-shadow: 5px 5px 0 var(--lg-ink);
  padding: 10px 14px;
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.9375rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, color 0.2s;
}
.lg .lg-pick:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--lg-ink);
}
.lg .lg-pick.is-active {
  background: var(--lg-red);
  color: var(--lg-white);
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--lg-ink);
}
.lg-pick__dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--lg-blue);
  border: 2px solid var(--lg-ink);
}
.lg-pick.is-active .lg-pick__dot { background: var(--lg-white); }

/* Without JS every panel stacks, ruled off; the script collapses them. */
.lg-caps__panel + .lg-caps__panel {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 3px dotted var(--lg-ink);
}
.lg-caps__body.is-enhanced .lg-caps__panel + .lg-caps__panel {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.lg-caps__panel[hidden] { display: none; }
.lg-caps__panel.is-active { animation: lg-fade-in 0.3s ease both; }
.lg-caps__tagline {
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--lg-red);
  margin-bottom: 8px;
  line-height: 1.2;
}
.lg-caps__detail {
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  color: var(--lg-ink-soft);
  max-width: 54ch;
}
.lg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-chip-tag {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--lg-white);
  color: var(--lg-ink);
  border: 2px solid var(--lg-ink);
}

/* Contact ------------------------------------------------------------------ */
.lg-contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem 4.5rem;
  align-items: start;
}
.lg-contact__lead .lg-label { margin-bottom: 1rem; }
.lg-contact__title {
  margin-bottom: 1.125rem;
  font-family: var(--lg-display);
  font-weight: 900;
  font-size: clamp(2.25rem, 4.6vw, 3.875rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.lg-contact__text {
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
  color: var(--lg-ink-soft);
  max-width: 40ch;
}
.lg-contact__email {
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 1.1875rem;
  color: var(--lg-ink);
  border-bottom: 3px solid var(--lg-red);
  transition: color 0.2s ease;
  word-break: break-all;
}
.lg-contact__email:hover { color: var(--lg-red); }

/* The wreck: the tower lying in pieces, snapped back together on hover */
.lg-wreck {
  position: relative;
  max-width: 420px;
  margin-top: 1.75rem;
  cursor: pointer;
  user-select: none;
}
.lg-wreck__svg { width: 100%; height: auto; }
.lg-wreck__brick {
  transform: var(--lg-tf);
  transition: transform 1s var(--lg-drop) var(--lg-d-break, 0s);
}
.lg-wreck.is-fixed .lg-wreck__brick {
  transform: none;
  transition-delay: var(--lg-d-fix, 0s);
}
.lg-wreck__status {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--lg-white);
  border: 3px solid var(--lg-ink);
  box-shadow: 5px 5px 0 var(--lg-ink);
  padding: 7px 12px;
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25;
}
.lg-wreck__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lg-red);
  border: 2px solid var(--lg-ink);
  transition: background 0.3s;
}
.lg-wreck.is-fixed .lg-wreck__dot { background: var(--lg-green); }
.lg-wreck__sub {
  display: block;
  font-family: var(--lg-body);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--lg-ink-soft);
}

.lg-form {
  background: var(--lg-white);
  border: 3px solid var(--lg-ink);
  box-shadow: 10px 10px 0 var(--lg-ink);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-field__label {
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.875rem;
}
.lg-field__input {
  font: inherit;
  font-size: 1.0625rem;
  color: var(--lg-ink);
  background: var(--lg-mint);
  border: 3px solid var(--lg-ink);
  border-radius: 0;
  padding: 11px 12px;
  width: 100%;
  transition: background 0.2s, box-shadow 0.2s;
}
.lg-field__input:focus {
  background: var(--lg-white);
  box-shadow: inset 0 0 0 2px var(--lg-blue);
}
.lg .lg-field__input:focus-visible { outline: none; }
.lg-field__input--area { resize: vertical; min-height: 110px; }
/* Browser autofill would repaint the field yellow-on-white. */
.lg-field__input:-webkit-autofill,
.lg-field__input:-webkit-autofill:hover,
.lg-field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--lg-ink);
  box-shadow: inset 0 0 0 1000px var(--lg-mint);
}
.lg .lg-form__submit { align-self: flex-start; }
.lg-form__note {
  font-size: 0.8125rem;
  color: var(--lg-ink-soft);
}

/* Footer (shared chrome) --------------------------------------------------- */
body.fable-lego .site-footer {
  margin-top: clamp(4.375rem, 9vw, 7.5rem);
  /* Clear the bottom-docked switcher pill (see version-switcher.css) */
  padding: 1.375rem 0 6.5rem;
  background: var(--lg-teal);
}
body.fable-lego .site-footer .container {
  width: 100%;
  max-width: var(--lg-max);
  margin: 0 auto;
  padding: 1.375rem var(--lg-gutter) 0;
  border-top: 4px dotted var(--lg-white);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
}
body.fable-lego .footer-copy,
body.fable-lego .footer-credit {
  margin: 0;
  font-family: var(--lg-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--lg-ink-soft);
}
body.fable-lego .footer-credit { color: var(--lg-ink); font-weight: 600; }
body.fable-lego .footer-links a {
  font-size: 0.875rem;
  text-decoration: none;
  font-weight: 500;
  color: var(--lg-ink);
  transition: color 0.2s ease;
}
body.fable-lego .footer-links a:hover { color: var(--lg-red); }

/* First-visit intro -------------------------------------------------------- */
/* The switcher pill stays live above the scrim — it is what the copy points
   at — so it is lifted, not dimmed. Everything else goes inert. */
body.lg-intro-open .version-switcher {
  z-index: 700;
  box-shadow: 0 0 0 4px var(--lg-yellow), 0 0 0 7px var(--lg-ink), 0 16px 40px rgba(20, 51, 59, 0.45);
}

.lg-intro {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(20, 51, 59, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: lg-fade-in 0.4s ease both;
  transition: opacity 0.45s ease;
}
.lg-intro[hidden] { display: none; }
.lg-intro.is-closing { opacity: 0; }
/* Scrolls internally so short viewports can always reach the whole card;
   bottom padding keeps it clear of the docked pill. */
.lg-intro__scroll {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4rem 1.5rem 6rem;
}
.lg-intro__box {
  width: 100%;
  max-width: 600px;
  margin: auto;
  transform: rotate(-0.8deg);
  transition: transform 0.55s cubic-bezier(0.5, 0, 0.9, 0.4), opacity 0.45s ease;
}
.lg-intro.is-closing .lg-intro__box { transform: translateY(90px) rotate(5deg); opacity: 0; }
.lg-intro__card {
  position: relative;
  background: var(--lg-white);
  color: var(--lg-ink);
  border: 3px solid var(--lg-ink);
  box-shadow: 12px 12px 0 var(--lg-ink);
  padding: clamp(30px, 5vh, 44px) clamp(22px, 4vw, 36px) 22px;
  animation: lg-snap 0.9s var(--lg-snap) 0.15s both;
}
.lg-intro__studs {
  position: absolute;
  top: -14px;
  left: 130px;
  right: 200px;
  display: flex;
  justify-content: center;
  gap: 14px;
}
.lg-intro__stud {
  display: block;
  width: 42px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--lg-ink);
  box-shadow: inset 0 -5px 0 rgba(0, 15, 20, 0.22), inset 0 3px 0 rgba(255, 255, 255, 0.35);
  cursor: help;
  transition: transform 0.35s var(--lg-pop);
}
.lg-intro__stud:hover { transform: translateY(-7px) rotate(-6deg); }
@media (max-width: 560px) {
  .lg-intro__studs { left: 24px; right: 24px; }
  .lg-intro__stud:nth-child(n + 4) { display: none; }
}
.lg-intro__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 14px;
}
.lg-intro__lead { flex: 1 1 260px; min-width: 0; }
.lg-intro .lg-intro__kicker {
  margin: 0 0 6px;
  font-style: italic;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--lg-red);
}
.lg-intro .lg-intro__title {
  font-family: var(--lg-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
.lg-intro__title-em { color: var(--lg-red); }

/* The tower */
.lg-tower {
  flex: none;
  position: relative;
  width: 190px;
  margin: -38px -8px 0 0;
}
.lg-tower__svg { width: 190px; height: auto; }
.lg-tower__brick {
  transition: transform 0.7s var(--lg-drop), opacity 0.5s ease 0.15s;
  cursor: pointer;
}
.lg-tower__brick.is-pulled { opacity: 0; pointer-events: none; }
.lg-tower__lift { transition: transform 0.35s var(--lg-pop); }
.lg-tower__brick:hover .lg-tower__lift { transform: translateY(-9px) rotate(-3deg); }
.lg-tower__plane {
  display: none;
  cursor: pointer;
  transform-origin: 165px 150px;
}
.lg-tower__plane.is-shown {
  display: inline;
  animation: lg-hover 3s ease-in-out 1.8s infinite;
}
.lg-tower__plane:focus-visible { outline: 3px solid var(--lg-blue); }
.lg-intro .lg-tower__hint {
  margin-top: 4px;
  text-align: center;
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--lg-ink-soft);
  pointer-events: none;
}
@media (max-width: 560px) {
  .lg-intro__head { flex-wrap: wrap; align-items: flex-start; }
  .lg-tower { width: 150px; margin: 0 auto; }
  .lg-tower__svg { width: 150px; }
}

.lg-intro__badge {
  position: absolute;
  top: -22px;
  left: -22px;
  background: var(--lg-yellow);
  border: 3px solid var(--lg-ink);
  box-shadow: 4px 4px 0 var(--lg-ink);
  padding: 8px 12px 7px;
  transform: rotate(-7deg);
  text-align: center;
  line-height: 1;
  transition: transform 0.35s var(--lg-pop);
}
.lg-intro__badge:hover { transform: rotate(4deg) scale(1.08); }
.lg-intro__badge-set {
  display: block;
  font-family: var(--lg-display);
  font-weight: 900;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}
.lg-intro__badge-sub {
  display: block;
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 4px;
}
@media (max-width: 560px) {
  .lg-intro__badge { left: -8px; top: -30px; }
}

.lg-intro .lg-intro__text {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--lg-ink-soft);
}
.lg-intro .lg-intro__text + .lg-intro__text { margin-bottom: 16px; }
.lg-intro__text em { color: var(--lg-ink); }

.lg-intro__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.lg-intro__note {
  font-style: italic;
  font-size: 0.875rem;
  color: var(--lg-ink-soft);
}
.lg-intro .lg-intro__warning {
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 3px dotted var(--lg-ink);
  font-family: var(--lg-display);
  font-weight: 700;
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lg-ink-soft);
}

/* Reduced motion ----------------------------------------------------------
   Delays must be zeroed too, or staggered bricks stay invisible for the
   length of their delay. Bricks simply sit where they land. */
@media (prefers-reduced-motion: reduce) {
  body.fable-lego *,
  body.fable-lego *::before,
  body.fable-lego *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .lg [data-animate] { opacity: 1; transform: none; }
  .lg-snap { animation: none; opacity: 1; transform: none; }
  .lg-float, .lg-tower__plane.is-shown { animation: none; }
  .lg-dots { stroke-dashoffset: 0; animation: none; }
  .lg-hero__copy { animation: none; }
}

/* Replay-the-intro brick: fixed bottom-right on wide screens only; below
   900px the bottom-docked pill needs the width, and the footer credit carries
   the same [data-intro-open] control. */
.lg-intro-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 300;
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  font-family: var(--lg-display);
  font-weight: 900;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--lg-ink);
  background: var(--lg-yellow);
  border: 3px solid var(--lg-ink);
  box-shadow: 4px 4px 0 var(--lg-ink);
  transition: transform 0.15s, box-shadow 0.15s;
}
@media (min-width: 900px) { .lg-intro-btn { display: inline-flex; } }
.lg-intro-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--lg-ink); }
body.lg-intro-open .lg-intro-btn { display: none; }

/* The footer's "replay the intro" control reads as a link */
body.fable-lego .footer-credit__replay {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: var(--lg-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
body.fable-lego .footer-credit__replay:hover { color: var(--lg-red); }
body.fable-lego .footer-credit__replay:focus-visible { outline: 3px solid var(--lg-blue); outline-offset: 3px; }
