/* sections — each scroll-snapped screen and its content. */

.sec {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  scroll-snap-align: start;
}
.sec--home { height: 100vh; }
.sec--wiring, .sec--work, .sec--team, .sec--footer { overflow: hidden; }
.sec--about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 120px 56px 64px;
}
.sec--team, .sec--footer { display: flex; align-items: center; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* --- Stage: 1600×900 authoring box, uniformly scaled to fit the section --- */
.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1600px;
  height: 900px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  pointer-events: none;
}

/* --- Common asset image (components on the mat) --- */
.asset {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  object-fit: contain;
  /* base filter — the shadow projector concatenates drop-shadows onto this */
  filter:
    brightness(0.94) contrast(1.06) saturate(0.95)
    drop-shadow(2px 3px 3px rgba(5, 13, 8, 0.5))
    drop-shadow(9px 14px 14px rgba(5, 13, 8, 0.36))
    drop-shadow(24px 40px 50px rgba(5, 13, 8, 0.3));
}
.asset[data-wire] { pointer-events: auto; cursor: pointer; }

/* ================================================================
   HOME
   ================================================================ */

.sec__pad-hero {
  position: absolute;
  top: 104px;
  left: 56px;
  max-width: 640px;
  pointer-events: none;
}
.hero__title {
  margin: 0;
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.hero__hard { color: #F6F6F6; }
.hero__code {
  color: var(--accent);
  font-style: italic;
  letter-spacing: -0.03em;
}
.hero__arrow { font-weight: 400; display: inline-block; margin-left: 4px; }

.hero__foot {
  position: absolute;
  left: 56px;
  bottom: 56px;
  pointer-events: none;
}
.hero__subtitle {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--fg);
}

/* ================================================================
   WORK
   ================================================================ */

/* Laptop lives inside .stage (the 1600×900 authoring canvas) so it
   uniform-scales with the rest of the workbench. Position + size are
   set inline in HTML (stage-authoring coord space); this rule owns only
   the visual styling. */
.work__laptop {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  object-fit: contain;
  filter:
    brightness(0.9) contrast(1.07) saturate(0.9)
    drop-shadow(3px 5px 5px rgba(5, 13, 8, 0.5))
    drop-shadow(14px 22px 24px rgba(5, 13, 8, 0.38))
    drop-shadow(34px 54px 64px rgba(5, 13, 8, 0.3));
}

.glass-note {
  position: absolute;
  z-index: 2;
  padding: 32px 30px 28px;
  border-radius: 6px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    12px 26px 60px rgba(5, 13, 8, 0.36),
    2px 5px 10px rgba(5, 13, 8, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.glass-note__title {
  margin: 0;
  font-size: clamp(19px, 1.6vw, 23px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--fg);
}
.glass-note__divider {
  margin: 22px 0 16px;
  height: 0;
  border-top: 1px dashed var(--line);
}
.glass-note__sub {
  margin: 0;
  text-align: right;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* ================================================================
   WIRING
   ================================================================ */

.wiring__caption {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  max-width: 80vw;
  text-align: center;
  pointer-events: none;
}
.wiring__heading {
  margin: 8px 0 0;
  font-size: clamp(34px, 5.2vw, 66px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--fg);
}
.wiring__sub {
  margin: 16px 0 0;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
  opacity: 0.72;
}

/* ================================================================
   ABOUT
   ================================================================ */

.about__tiles {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.about__tile {
  width: 110px;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  filter:
    brightness(0.94) contrast(1.05) saturate(0.95)
    drop-shadow(1px 2px 2px rgba(5, 13, 8, 0.5))
    drop-shadow(5px 8px 9px rgba(5, 13, 8, 0.36))
    drop-shadow(14px 24px 30px rgba(5, 13, 8, 0.28));
}
.about__tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.about__body { max-width: 640px; width: 100%; text-align: center; }
.about__heading {
  margin: 10px 0 0;
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.about__text {
  margin: 18px auto 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 54ch;
}
.about__contact {
  display: inline-block;
  margin-top: 26px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}

/* ================================================================
   TEAM
   ================================================================ */

.team__wrap {
  position: relative;
  width: min(1440px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.team__text {
  position: relative;
  z-index: 2;
  margin-left: clamp(72px, 8vw, 140px);
  padding-top: 24px;
  max-width: min(400px, 36vw);
  pointer-events: none;
}
.team__heading {
  margin: 8px 0 0;
  font-size: clamp(34px, 4.8vw, 60px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--fg);
}
.team__hard { color: #EDF1EF; }
.team__code {
  color: var(--accent);
  font-style: italic;
  letter-spacing: -0.03em;
}
.team__sub {
  margin: 20px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 38ch;
}

.team__backing {
  position: absolute;
  z-index: 1;
  right: 6%;
  top: 26%;
  width: 445px;
  height: 370px;
  aspect-ratio: 612 / 470;
  background: #f6f5ee;
  border-radius: 3px;
  box-shadow: 14px 20px 34px rgba(6, 16, 10, 0.34);
}
.team__photo {
  position: absolute;
  z-index: 2;
  right: 7%;
  top: 24%;
  width: 499px;
  height: 367px;
  padding: 14px 14px 44px;
  background: #faf9f3;
  border-radius: 3px;
  box-shadow:
    16px 24px 40px rgba(6, 16, 10, 0.4),
    3px 6px 10px rgba(6, 16, 10, 0.35);
}
.team__tape {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 96px;
  height: 26px;
  background: rgba(230, 228, 214, 0.55);
  box-shadow: 0 1px 3px rgba(6, 16, 10, 0.15);
}
.team__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1px;
  filter: brightness(0.97) contrast(1.03) saturate(0.98);
}
.team__caption {
  position: absolute;
  left: 18px;
  bottom: 15px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #3a4a3f;
}

/* --- Team hover system ---
   Hotspot layer sits over the photo bounds (matches photo padding). */
.team__hotspots {
  position: absolute;
  top: 14px; left: 14px; right: 14px; bottom: 44px;
  pointer-events: auto;
}
.team__hot {
  position: absolute;
  cursor: pointer;
  border-radius: 50% 50% 42% 42%;
  /* uncomment for debugging hotspot placement:
     background: rgba(255,255,0,0.2); border: 1px dashed rgba(255,255,255,0.4); */
}
.team__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.team__card {
  position: absolute;
  pointer-events: none;
  transform: rotate(-4deg);
  transform-origin: right center;
}
.team__card-inner {
  display: flex;
  align-items: stretch;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.09));
  backdrop-filter: blur(38px) saturate(1.6);
  -webkit-backdrop-filter: blur(38px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 28px 64px rgba(6, 16, 10, 0.5),
    0 4px 12px rgba(6, 16, 10, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 0 28px rgba(255, 255, 255, 0.07);
  animation: teamCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.team__card-left {
  flex: 0 0 44%;
  min-width: 0;
}
.team__card-right {
  flex: 1;
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  padding-left: 18px;
  display: flex;
  align-items: center;
}
.team__card-index {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--label);
  opacity: 0.8;
  margin-bottom: 10px;
}
.team__card-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg);
  text-shadow: 0 1px 8px rgba(6, 16, 10, 0.25);
  animation: teamNameIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
.team__card-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  margin: 8px 0 0;
}
.team__card-blurb {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
  opacity: 0.85;
}

/* ================================================================
   FOOTER
   ================================================================ */

.footer__wrap {
  position: relative;
  width: min(1440px, 100%);
  margin: 0 auto;
  min-height: 100vh;
}

/* Mission folder — three phases:
   0 = closed (default)
   1 = opening / closing intermediate (400ms)
   2 = open, paper flown out and centered
   All transform/filter values verbatim from .dc.html 1085-1119. */
.footer__mission {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 4vw, 90px);
  top: 50%;
  width: min(560px, 44vw);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1), filter 720ms ease;
}
.footer__mission[data-phase="0"] { transform: translateY(-50%); filter: none; }
.footer__mission[data-phase="1"] { transform: translateY(calc(-50% + 30px)) scale(0.97); filter: none; }
.footer__mission[data-phase="2"] { transform: translateY(calc(-50% + 84px)) scale(0.9); filter: brightness(0.8) saturate(0.9); }

.footer__mission img {
  display: block;
  width: 100%;
  height: auto;
  filter:
    drop-shadow(1px 2px 2px rgba(6, 16, 10, 0.4))
    drop-shadow(6px 10px 12px rgba(6, 16, 10, 0.34))
    drop-shadow(20px 34px 46px rgba(6, 16, 10, 0.34))
    brightness(1.015) contrast(1.02) saturate(0.94);
}
.footer__mission-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(246, 246, 246, 0.55);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.footer__mission[data-phase="1"] .footer__mission-hint,
.footer__mission[data-phase="2"] .footer__mission-hint { opacity: 0; }

/* --- Mission paper — flies out of the folder, lands center-ish, tilts to -1.5deg --- */
.mission-paper {
  position: absolute;
  left: calc(clamp(24px, 4vw, 90px) + min(280px, 22vw) - 200px);
  top: 50%;
  width: 400px;
  max-width: 86vw;
  aspect-ratio: 1 / 1.32;
  padding: 28px 30px 20px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #f8f6ee 0%, #f1efe4 70%, #eceadf 100%);
  border-radius: 2px;
  overflow: hidden;
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 620ms ease, opacity 200ms ease;
}
.mission-paper[data-phase="0"] {
  opacity: 0;
  transform: translate(46px, -50%) rotate(88deg) scale(0.52);
  z-index: 1;
  cursor: default;
  pointer-events: none;
  box-shadow: 2px 4px 10px rgba(6, 16, 10, 0.25);
}
.mission-paper[data-phase="1"] {
  opacity: 1;
  transform: translate(60px, calc(-50% - 250px)) rotate(84deg) scale(0.58);
  z-index: 1;
  cursor: default;
  pointer-events: none;
  box-shadow: 2px 4px 10px rgba(6, 16, 10, 0.25);
}
.mission-paper[data-phase="2"] {
  opacity: 1;
  transform: translate(calc(min(720px, 50vw) - clamp(24px, 4vw, 90px) - min(280px, 22vw)), -50%) rotate(-1.5deg) scale(1);
  z-index: 6;
  cursor: pointer;
  pointer-events: auto;
  box-shadow:
    0 40px 90px rgba(6, 16, 10, 0.55),
    0 8px 22px rgba(6, 16, 10, 0.35);
}

/* Paper contents — Special Elite typewriter feel, all values from .dc.html 379-400 */
.mission-paper__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid #2b2a26;
  padding-bottom: 8px;
}
.mission-paper__brand {
  font-family: 'Special Elite', monospace;
  font-size: 21px;
  color: #2b2a26;
}
.mission-paper__label {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  color: #2b2a26;
}
.mission-paper__meta {
  display: flex;
  gap: 16px;
  font-family: 'Special Elite', monospace;
  font-size: 10px;
  color: #55534b;
  margin-top: 9px;
}
.mission-paper__section {
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  color: #2b2a26;
  margin-top: 22px;
  letter-spacing: 0.08em;
}
.mission-paper__mission-text {
  font-family: 'Special Elite', monospace;
  font-size: 17px;
  line-height: 1.55;
  color: #2b2a26;
  margin-top: 8px;
}
.mission-paper__directives {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  line-height: 2;
  color: #3a382f;
  margin-top: 6px;
}
.mission-paper__redacted {
  background: #23221e;
  color: #23221e;
  padding: 0 14px;
}
.mission-paper__redacted--wide { padding: 0 26px; }

.mission-paper__stamp {
  position: absolute;
  right: 26px;
  top: 118px;
  transform: rotate(-12deg);
  border: 3px solid rgba(178, 34, 34, 0.75);
  color: rgba(178, 34, 34, 0.78);
  font-family: 'Special Elite', monospace;
  font-size: 15px;
  letter-spacing: 0.14em;
  padding: 5px 12px;
  border-radius: 3px;
}
.mission-paper__footer {
  margin-top: auto;
  border-top: 1px dashed #8a877c;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.mission-paper__footer span:first-child {
  font-family: 'Special Elite', monospace;
  font-size: 10px;
  color: #55534b;
}
.mission-paper__footer span:last-child {
  font-family: 'Special Elite', monospace;
  font-size: 9px;
  color: #8a877c;
}

.footer__glass {
  position: absolute;
  z-index: 2;
  right: clamp(48px, 6vw, 110px);
  bottom: clamp(48px, 6vh, 96px);
  width: min(452px, 40vw);
  padding: 36px 40px;
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 24px 60px rgba(6, 16, 10, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  pointer-events: auto;
}
.footer__blurb {
  margin: 18px 0 0;
  text-align: right;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 360px;
}
.footer__cols { display: flex; gap: 56px; margin-top: 44px; flex-wrap: wrap; }
.footer__col { display: flex; flex-direction: column; gap: 11px; }
.footer__col a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(246, 246, 246, 0.82);
}
.footer__col-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(246, 246, 246, 0.45);
  margin-bottom: 3px;
}
.footer__social { display: flex; gap: 12px; }
.footer__social a {
  width: 40px; height: 40px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(246, 246, 246, 0.85);
}
.footer__email {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(246, 246, 246, 0.7);
  margin-top: 6px;
}
.footer__copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(246, 246, 246, 0.4);
  margin-top: 48px;
}
