/* Home page: GPU scene, chapters, hero, craft lists */
/* ========== GPU CANVAS ========== */
.scene-root,
.scene-root canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto;
}

.scene-root::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(0, 170, 210, 0.16) 0%, transparent 38%),
    radial-gradient(ellipse at 50% 100%, rgba(4, 14, 24, 0.55) 0%, transparent 52%),
    radial-gradient(ellipse at 50% 40%, transparent 46%, rgba(4, 10, 18, 0.38) 100%);
}

.boot {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: #050c14;
  transition: opacity .6s ease, visibility .6s;
}

.boot.hide {
  opacity: 0;
  visibility: hidden;
}

.boot-inner {
  text-align: center;
}

.boot-mark {
  width: 10px;
  height: 10px;
  margin: 0 auto 18px;
  background: var(--lime);
  box-shadow: 0 0 16px rgba(0, 216, 240, 0.55);
  animation: boot-pulse 1.2s ease-in-out infinite;
}

.boot p {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #9a9a9a;
}

@keyframes boot-pulse {
  0%, 100% { opacity: .4; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.hud {
  position: fixed;
  left: var(--pad);
  top: calc(var(--nav-h) + 10px);
  bottom: auto;
  z-index: 40;
  display: flex;
  gap: 14px;
  align-items: center;
  pointer-events: none;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8d8d8d;
}

.hud b {
  color: var(--lime);
  font-weight: 600;
}

.rail {
  position: fixed;
  left: 50%;
  right: auto;
  top: auto;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: row;
  gap: 18px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  background: rgba(5, 12, 20, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}

.rail button {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6e6e6e;
  transition: color .25s;
}

.rail button i {
  width: 7px;
  height: 7px;
  border: 1px solid #4a4a4a;
  border-radius: 50%;
  transition: .25s;
}

.rail button.on,
.rail button:hover { color: var(--white); }

.rail button.on i {
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 12px rgba(0, 216, 240, 0.5);
}

.rail button span { white-space: nowrap; }


/* ========== PAGE / DOM OVER 3D ========== */
main, footer {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

main a, main button, main input,
footer a, footer button {
  pointer-events: auto;
}

.chapter {
  position: relative;
  padding: 88px var(--pad) 72px;
}

.sec-head h2,
.sec-head .craft-kicker,
.craft-lead,
.craft-item .name,
.craft-item .craft-desc,
.craft-item .num {
  text-shadow: 0 0 16px rgba(5, 12, 20, 0.92), 0 1px 8px rgba(5, 12, 20, 0.8);
}

.hero {
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + 36px);
  padding-bottom: 108px;
}

.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 560px;
  pointer-events: none;
}

.hero-stage a, .hero-stage button { pointer-events: auto; }

.hero-kicker {
  margin-bottom: 22px;
}

.hero-title {
  font-family: "Inter Tight", Inter, sans-serif;
  font-weight: 900;
  font-size: clamp(72px, 11vw, 148px);
  line-height: 0.78;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}

.hero-title .a { color: var(--lime); }

.hero-panel {
  padding: 0;
  margin-top: 28px;
  pointer-events: auto;
  max-width: 440px;
}

.hero-copy {
  max-width: 440px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.75;
  color: #b7c9d6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 26px;
}

.view-work {
  display: none;
}

.view-work i {
  width: 28px;
  height: 28px;
  border: 1px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 22px;
}

.trust span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
}

.trust span::before {
  content: "◆";
  color: var(--lime);
  margin-right: 8px;
  font-size: 8px;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #7a7a7a;
  pointer-events: none;
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(240px, 0.95fr) minmax(220px, 1.05fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: 36px;
}

.craft-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.sec-head h2,
.cta-band h2 {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(36px, 4.6vw, 62px);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 0;
}

.sec-head h2 em,
.cta-band h2 em { font-style: normal; color: var(--lime); }

.craft-lead {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 0;
}

.sec-head .tags { margin-top: 16px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags a,
.tags span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #143044;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cfcfcf;
  transition: .25s;
}

.tags a:hover { border-color: var(--lime); color: var(--lime); }

.craft-list { display: grid; }

#aboutList {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

#worksList {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

#craftList {
  grid-template-columns: 1.25fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
}

#craftList .craft-item { height: 100%; }
#craftList .craft-item:first-child {
  grid-row: 1 / span 2;
  justify-content: center;
}
#craftList .craft-item:first-child .name {
  font-size: clamp(28px, 3vw, 42px);
}

#techList {
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}

#faqList {
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}

#ctaList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.craft-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  background: rgba(5, 12, 20, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .25s, background .25s;
}

.craft-item.is-on {
  border-color: var(--lime);
  background: rgba(0, 216, 240, 0.06);
}

.craft-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.craft-item .name {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  line-height: 1.1;
  color: #d2d2d2;
  transition: .28s;
}

.craft-item .num {
  font-size: 12px;
  color: #b8b8b8;
  letter-spacing: 0.12em;
  flex-shrink: 0;
  transition: .28s;
}

.craft-desc {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.craft-desc em {
  display: block;
  margin-top: 10px;
  font-style: normal;
  color: var(--lime);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.craft-item.is-on .name {
  color: var(--lime);
  text-shadow: 4px 4px 0 rgba(0,216,240,.12);
}

.craft-item.is-on .num { color: var(--lime); }

#techList .craft-item,
#faqList .craft-item {
  padding: 22px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  backdrop-filter: none;
}

#techList .craft-item.is-on,
#faqList .craft-item.is-on {
  background: transparent;
  border-color: var(--line);
}

#ctaList .craft-item {
  width: auto;
  min-width: 168px;
  padding: 14px 16px;
  flex-direction: row;
  align-items: center;
}

#ctaList .craft-desc { display: none; }

.cta-band {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 36px;
}

.cta-band .craft-kicker { margin-bottom: 16px; }
.cta-band .craft-lead { margin: 18px auto 0; }
.cta-band .hero-actions { justify-content: center; }

#about {
  display: flex;
  flex-direction: column;
}

.marquee-wrap {
  margin-top: auto;
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding: 28px 0 8px;
}

.marquee {
  display: flex;
  width: max-content;
  animation: ticker 32s linear infinite;
}

.marquee span {
  font-family: "Inter Tight", Inter, sans-serif;
  font-size: clamp(42px, 6vw, 78px);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #d8d8d8;
  white-space: nowrap;
  padding-right: 28px;
}

.marquee i {
  font-style: normal;
  color: var(--lime);
  font-size: 0.28em;
  vertical-align: middle;
  margin: 0 10px 10px;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (hover: hover) and (pointer: fine) {
  .craft-item:hover {
    border-color: var(--lime);
  }
  .craft-item:hover .name {
    color: var(--lime);
    text-shadow: 4px 4px 0 rgba(0,216,240,.12);
  }
  .craft-item:hover .num { color: var(--lime); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .scene-root { display: none; }
}

.hero-title { animation: rise-in 1.1s cubic-bezier(0.22, 0.7, 0.25, 1) both; }
.hero-copy { animation: rise-in 0.8s ease both 0.35s; }
.trust { animation: rise-in 0.8s ease both 0.43s; }
.hero-panel { animation: rise-in 0.8s ease both 0.51s; }
.rail { animation: rail-in 0.7s ease both 0.5s; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rail-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.fade-flash { animation: fade-flash 0.35s ease; }
@keyframes fade-flash {
  from { opacity: 0.22; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}


@media (max-width: 1100px) {
  .hero-stage { max-width: 100%; }
  .sec-head { grid-template-columns: 1fr; gap: 16px; }
  #aboutList { grid-template-columns: 1fr 1fr; }
  #craftList {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
  }
  #craftList .craft-item:first-child { grid-row: auto; grid-column: 1 / -1; }
  .rail span { display: none; }
}


@media (max-width: 720px) {
  .hero { min-height: auto; padding-bottom: 72px; }
  .hero-panel { justify-self: start; max-width: none; padding: 0; }
  .hero-copy { max-width: none; }
  .hero-actions { justify-content: flex-start; }
  .sec-head h2,
  .cta-band h2 { text-transform: none; }
  .tags { display: none; }
  #aboutList,
  #worksList,
  #craftList,
  #techList,
  #faqList { grid-template-columns: 1fr; }
  #ctaList { justify-content: stretch; }
  #ctaList .craft-item { width: 100%; }
  .craft-item {
    padding: 16px 0;
    border: 0;
    border-bottom: 1px solid #1a1a1a;
    background: transparent;
    backdrop-filter: none;
  }
  .craft-item.is-on { background: transparent; border-color: #1a1a1a; }
  .craft-item .name {
    font-size: clamp(24px, 7vw, 32px);
    color: #d6d6d6;
    text-transform: none;
  }
  .craft-item .num { color: #c0c0c0; }
  .craft-item.is-on .name { color: var(--lime); text-shadow: none; }
  .craft-item.is-on .num { color: var(--lime); }
  .craft-desc { display: none; }
  .craft-item.is-on .craft-desc {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
  }
  .rail { display: none; }
  .hud { display: none; }
  .scroll-hint { display: none; }
}

