/* Cinematic factory hero. One accent, sharp industrial geometry, no decorative glass. */
body:has(#hero) .site-nav__brand b {
  color: #168f82;
  background: none;
  -webkit-text-fill-color: currentColor;
}

body:has(#hero) .site-nav .btn-primary {
  color: #f2f7f6;
  background: #122528;
  box-shadow: none;
}

body:has(#hero) .site-nav .btn-primary:hover { background: #1c373a; }

#hero {
  --hero-accent: #55dbc8;
  --hero-ink: #f2f7f6;
  --hero-muted: rgba(226, 237, 235, .72);
  --hero-line: rgba(188, 217, 213, .28);
  --hero-surface: rgba(7, 17, 20, .88);
  position: relative;
  isolation: isolate;
  min-height: calc(100dvh - 56px);
  overflow: hidden;
  color: var(--hero-ink);
  background: #081113;
}

#hero .hero-media,
#hero .hero-shade {
  position: absolute;
  inset: 0;
}

#hero .hero-media {
  z-index: -3;
  background-image: url('../assets/hero/factory-cinematic.webp');
  background-position: center;
  background-size: cover;
  filter: saturate(.8) contrast(1.05) brightness(.87);
  transform: scale(1.015);
  transition: transform 2.4s cubic-bezier(.16, 1, .3, 1), filter 1.2s ease;
}

#hero .hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(4, 10, 12, .96) 0%, rgba(4, 10, 12, .82) 27%, rgba(4, 10, 12, .3) 56%, rgba(4, 10, 12, .12) 100%),
    linear-gradient(180deg, rgba(3, 8, 10, .3) 0%, transparent 24%, transparent 64%, rgba(3, 8, 10, .9) 100%);
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

#hero .hero-story {
  position: relative;
  width: min(100% - 48px, 1320px);
  min-height: calc(100dvh - 56px);
  margin-inline: auto;
  padding: clamp(64px, 11vh, 116px) 0 144px;
}

#hero .hero-copy {
  position: relative;
  z-index: 5;
  width: min(610px, 48vw);
}

#hero h1 {
  margin: 0;
  max-width: 12em;
  font-size: clamp(2.8rem, 5.25vw, 5.2rem);
  font-weight: 760;
  line-height: 1.03;
  letter-spacing: -.055em;
  word-break: keep-all;
  text-wrap: balance;
}

#hero h1 span {
  color: var(--hero-accent);
}

#hero #hero-copy-desc {
  max-width: 31em;
  min-height: 3.4em;
  margin-top: 24px;
  color: var(--hero-muted);
  font-size: clamp(1rem, 1.35vw, 1.17rem);
  font-weight: 500;
  line-height: 1.68;
  word-break: keep-all;
  transition: opacity .18s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
}

#hero .hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

#hero .hero-primary,
#hero .hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: .95rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

#hero .hero-primary {
  color: #071416;
  background: var(--hero-accent);
}

#hero .hero-secondary {
  color: var(--hero-ink);
  background: rgba(7, 17, 20, .62);
  border-color: rgba(226, 237, 235, .38);
}

#hero .hero-primary:hover { background: #75e7d6; }
#hero .hero-secondary:hover { border-color: rgba(226, 237, 235, .72); }
#hero .hero-primary:active,
#hero .hero-secondary:active { transform: translateY(1px); }
#hero .hero-primary:focus-visible,
#hero .hero-secondary:focus-visible,
#hero button:focus-visible { outline: 2px solid var(--hero-accent); outline-offset: 3px; }

#hero .hero-operating-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

#hero .signal {
  position: absolute;
  display: grid;
  min-width: 124px;
  padding: 9px 12px 10px;
  border-left: 2px solid var(--hero-accent);
  color: var(--hero-ink);
  background: rgba(5, 16, 18, .86);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .65s cubic-bezier(.16, 1, .3, 1);
}

#hero .signal::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid #dffbf6;
  border-radius: 50%;
  background: var(--hero-accent);
  transform: translate(-50%, -50%);
}

#hero .signal::after {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: var(--signal-length, 70px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hero-accent));
}

#hero .signal span {
  color: var(--hero-accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .08em;
}

#hero .signal b {
  margin-top: 2px;
  font-size: .79rem;
  font-weight: 650;
}

#hero .signal--cnc { top: 37%; right: 23%; --signal-length: 62px; transition-delay: .05s; }
#hero .signal--work { top: 57%; right: 39%; --signal-length: 86px; transition-delay: .16s; }
#hero .signal--stock { top: 73%; right: 8%; --signal-length: 92px; transition-delay: .27s; }

#hero[data-phase="mes"] .signal,
#hero[data-phase="mom"] .signal,
#hero[data-phase="ai"] .signal {
  opacity: 1;
  transform: translateY(0);
}

#hero[data-phase="mom"] .signal,
#hero[data-phase="ai"] .signal { opacity: .42; }

#hero .mom-board {
  position: absolute;
  top: 24%;
  right: 5%;
  width: min(330px, 28vw);
  padding: 16px 18px;
  border-top: 2px solid var(--hero-accent);
  background: var(--hero-surface);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .4s ease, transform .7s cubic-bezier(.16, 1, .3, 1);
}

#hero .mom-board > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hero-line);
}

#hero .mom-board > p {
  margin: 0 0 6px;
  color: var(--hero-muted);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .04em;
}

#hero .mom-board > div:last-child { border-bottom: 0; }
#hero .mom-board span { color: var(--hero-accent); font-size: .72rem; font-weight: 750; }
#hero .mom-board b { color: var(--hero-ink); font-size: .79rem; font-weight: 600; }
#hero[data-phase="mom"] .mom-board,
#hero[data-phase="ai"] .mom-board { opacity: 1; transform: translateX(0); }
#hero[data-phase="ai"] .mom-board { opacity: .38; }

#hero .ai-proposal {
  position: absolute;
  top: 19%;
  right: 5%;
  width: min(360px, 30vw);
  padding: 24px;
  border: 1px solid rgba(129, 231, 215, .42);
  border-top: 3px solid var(--hero-accent);
  background: rgba(5, 15, 18, .94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .45s ease, transform .7s cubic-bezier(.16, 1, .3, 1);
}

#hero .ai-proposal > p {
  color: var(--hero-accent);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
}

#hero .ai-proposal h2 {
  margin-top: 8px;
  color: var(--hero-ink);
  font-size: clamp(1.45rem, 2.25vw, 2.25rem);
  font-weight: 730;
  line-height: 1.16;
  letter-spacing: -.035em;
}

#hero .ai-proposal dl { margin-top: 22px; }
#hero .ai-proposal dl div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hero-line);
  font-size: .75rem;
}
#hero .ai-proposal dt { color: var(--hero-muted); }
#hero .ai-proposal dd { margin: 0; color: var(--hero-ink); font-weight: 650; }

#hero .ai-proposal__approval {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 12px 14px;
  color: #071416;
  background: var(--hero-accent);
  font-size: .78rem;
}
#hero .ai-proposal__approval span { font-weight: 800; }
#hero .ai-proposal__approval b { font-weight: 650; }
#hero[data-phase="ai"] .ai-proposal { opacity: 1; transform: translateY(0); }

#hero .hero-result {
  position: absolute;
  right: 0;
  bottom: 122px;
  z-index: 4;
  max-width: 470px;
  margin: 0;
  padding-left: 26px;
  border-left: 1px solid var(--hero-accent);
  color: rgba(241, 248, 247, .88);
  font-size: clamp(.92rem, 1.3vw, 1.1rem);
  font-weight: 600;
  line-height: 1.5;
  text-align: right;
  word-break: keep-all;
  transition: opacity .18s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
}

#hero .hero-controls {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 108px;
  width: 100%;
  min-height: 92px;
  border-top: 1px solid rgba(213, 234, 231, .2);
  background: rgba(4, 11, 13, .86);
  transform: translateX(-50%);
}

#hero .hero-toggle {
  display: grid;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--hero-line);
  border-radius: 0;
  color: var(--hero-ink);
  background: transparent;
  font-size: 1rem;
}
#hero .hero-toggle:hover { color: var(--hero-accent); }

#hero .hero-chapters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

#hero .hero-chapters button {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 3px;
  padding: 16px clamp(14px, 2.5vw, 34px);
  border: 0;
  border-right: 1px solid var(--hero-line);
  border-radius: 0;
  color: rgba(223, 236, 234, .54);
  background: transparent;
  text-align: left;
  transition: color .25s ease, background .25s ease;
  min-width: 0;
}

#hero .hero-chapters button::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 100%;
  height: 2px;
  background: var(--hero-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

#hero .hero-chapters button:hover { color: var(--hero-ink); }
#hero .hero-chapters button[aria-pressed="true"] {
  color: var(--hero-ink);
  background: rgba(85, 219, 200, .06);
}
#hero .hero-chapters button[aria-pressed="true"]::before { transform: scaleX(1); }
#hero .hero-chapters span { font-size: .88rem; font-weight: 800; }
#hero .hero-chapters small { font-size: .7rem; font-weight: 550; opacity: .72; }

#hero .hero-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: rgba(223, 236, 234, .46);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .68rem;
}
#hero .hero-time span { color: var(--hero-accent); }
#hero .hero-time b { font-weight: 550; }

#hero.is-copy-changing #hero-copy-desc,
#hero.is-copy-changing .hero-result { opacity: 0; transform: translateY(7px); }

#hero[data-phase="mes"] .hero-media { transform: scale(1.035); filter: saturate(.84) contrast(1.08) brightness(.82); }
#hero[data-phase="mom"] .hero-media { transform: scale(1.055); filter: saturate(.74) contrast(1.1) brightness(.75); }
#hero[data-phase="ai"] .hero-media { transform: scale(1.075); filter: saturate(.7) contrast(1.12) brightness(.68); }

@media (max-width: 960px) {
  #hero .hero-story { width: min(100% - 36px, 900px); padding-top: 72px; }
  #hero .hero-copy { width: min(580px, 62vw); }
  #hero .mom-board,
  #hero .ai-proposal { right: 2%; }
  #hero .signal--cnc { right: 18%; }
  #hero .signal--work { right: 34%; }
  #hero .hero-result { max-width: 380px; }
}

@media (max-width: 767px) {
  #hero { min-height: calc(100dvh - 56px); }
  #hero .hero-media {
    background-position: 64% center;
    filter: saturate(.72) contrast(1.08) brightness(.62);
  }
  #hero .hero-shade {
    background:
      linear-gradient(180deg, rgba(4, 10, 12, .9) 0%, rgba(4, 10, 12, .58) 48%, rgba(4, 10, 12, .96) 100%),
      linear-gradient(90deg, rgba(4, 10, 12, .65), transparent 85%);
  }
  #hero .hero-story {
    width: 100%;
    min-height: calc(100dvh - 56px);
    padding: 44px 20px 156px;
  }
  #hero .hero-copy { width: 100%; }
  #hero h1 { max-width: 9em; font-size: clamp(2.35rem, 11vw, 3.4rem); line-height: 1.05; }
  #hero #hero-copy-desc { max-width: 25em; min-height: 4.9em; margin-top: 18px; font-size: .98rem; }
  #hero .hero-actions { margin-top: 22px; }
  #hero .hero-primary,
  #hero .hero-secondary { min-height: 44px; padding-inline: 17px; font-size: .86rem; }

  #hero .signal { min-width: 104px; padding: 7px 9px 8px; }
  #hero .signal span { font-size: .6rem; }
  #hero .signal b { font-size: .68rem; }
  #hero .signal { width: 112px; min-width: 0; }
  #hero .signal--cnc { top: 51%; right: 12px; }
  #hero .signal--work { top: 63%; right: 31%; }
  #hero .signal--stock { top: 71%; right: 12px; }

  #hero .mom-board,
  #hero .ai-proposal {
    top: auto;
    right: 20px;
    bottom: 169px;
    width: calc(100% - 40px);
  }
  #hero .mom-board { padding: 11px 14px; }
  #hero .mom-board > div { grid-template-columns: 76px 1fr; padding: 7px 0; }
  #hero .ai-proposal { padding: 16px 18px; }
  #hero .ai-proposal h2 { font-size: 1.35rem; }
  #hero .ai-proposal dl { margin-top: 12px; }
  #hero .ai-proposal__approval { margin-top: 12px; padding: 9px 11px; }

  #hero .hero-result { left: 20px; right: 20px; bottom: 138px; max-width: none; padding-left: 12px; font-size: .8rem; text-align: left; }
  #hero[data-phase="mom"] .hero-result,
  #hero[data-phase="ai"] .hero-result { display: none; }

  #hero .hero-controls { grid-template-columns: 44px minmax(0, 1fr); min-height: 112px; }
  #hero .hero-time { display: none; }
  #hero .hero-chapters button { overflow: hidden; padding: 14px 6px; }
  #hero .hero-chapters span { font-size: .75rem; }
  #hero .hero-chapters small { font-size: .59rem; line-height: 1.2; }
}

@media (max-width: 420px) {
  #hero .hero-story { padding-top: 34px; }
  #hero h1 { font-size: clamp(2rem, 8.8vw, 2.25rem); }
  #hero .hero-secondary { display: none; }
  #hero .signal--work { right: 28%; }
}

@media (prefers-reduced-motion: reduce) {
  #hero *,
  #hero *::before,
  #hero *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  #hero .hero-media { transform: none !important; }
}
