/* Scroll canvas shell from html/styles.css (mini project) — used with #touchTrack */
.sequence-track {
  height: 420vh;
  position: relative;
}

.sequence-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #000;
}

#touchTrack .sequence-sticky::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.58) 30%,
    rgba(0, 0, 0, 0.26) 55%,
    rgba(0, 0, 0, 0.08) 76%,
    transparent 100%
  );
}

.sequence-sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#touchTrack .overlay-text {
  position: absolute;
  z-index: 2;
  width: min(70ch, 86vw);
  text-align: center;
  pointer-events: none;
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}

#touchTrack .overlay-text .eyebrow {
  margin: 0 0 12px;
  color: #79b0ff;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
}

#touchTrack .overlay-text h2 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 4px;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

#touchTrack .overlay-text p {
  color: #d2d8e4;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .sequence-track {
    height: 350vh;
  }
}

@media (max-width: 768px) {
  .sequence-track {
    height: 280vh;
  }

  #touchTrack .overlay-text {
    width: 90vw;
  }
}

/* html/touch.css (mini project) */
#touchTrack .overlay-text .eyebrow {
  color: #6fe8c8;
}

#touchTrack {
  position: relative;
  height: 1332vh;
}

#touchCanvas {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#touchTrack .sequence-sticky::after {
  box-shadow: inset 0 0 56px rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.touch-ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  pointer-events: none;
}

.touch-panel-forward {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  min-height: 0;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.touch-forward-top {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3.5vh, 40px) clamp(12px, 3vw, 24px) 10px;
  min-height: 0;
}

.touch-forward-dock {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0 clamp(8px, 2.2vw, 18px) max(4px, env(safe-area-inset-bottom, 0px));
  margin-bottom: clamp(16px, 3.6vh, 42px);
  box-sizing: border-box;
  pointer-events: auto;
}

.touch-ui.is-reverse-phase .touch-panel-forward {
  opacity: 0;
  visibility: hidden;
}

#touchTrack .touch-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.1vh, 14px);
  width: min(96vw, 1120px);
  max-width: 100%;
  pointer-events: none;
  opacity: 1;
  text-align: center;
}

#touchTrack .touch-line {
  opacity: 1;
}

.touch-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: clamp(10px, 1.6vw, 16px);
  width: min(1280px, calc(100vw - 28px));
  margin: 0 auto;
  justify-items: stretch;
  pointer-events: auto;
}

.touch-feature-box {
  text-align: left;
  padding: clamp(12px, 1.4vw, 16px) clamp(14px, 1.7vw, 20px);
  border-radius: 16px;
  min-height: clamp(112px, 15vh, 150px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(8px, 1vw, 12px);
  min-width: 0;
  background: linear-gradient(152deg, rgba(30, 30, 30, 0.92) 0%, rgba(18, 32, 28, 0.88) 48%, rgba(14, 22, 20, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  will-change: transform;
  transition:
    border-color 0.32s ease,
    background 0.32s ease,
    box-shadow 0.32s ease,
    transform 0.25s ease;
}

.touch-feature-box:hover {
  border-color: rgba(65, 134, 110, 0.28);
  transform: translateY(-4px);
}

.touch-feature-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(9px, 1.2vw, 12px);
  width: 100%;
  min-width: 0;
}

.touch-feature-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: clamp(0.74rem, 0.92vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: #b8f5e0;
  line-height: 1.25;
}

.touch-feature-box.is-active .touch-feature-title {
  color: #d4fff0;
}

.touch-feature-iconwrap {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(65, 134, 110, 0.14);
  border: 1px solid rgba(65, 134, 110, 0.32);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    opacity 0.28s ease;
}

.touch-feature-iconwrap i {
  font-size: 1.38rem;
  color: #5eb89a;
  line-height: 1;
  display: block;
  transition: color 0.28s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
}

.touch-feature-box:not(.is-active) .touch-feature-iconwrap {
  opacity: 0.42;
}

.touch-feature-box.is-active .touch-feature-iconwrap {
  opacity: 1;
  background: rgba(65, 134, 110, 0.26);
  border-color: rgba(110, 192, 163, 0.55);
  box-shadow:
    0 0 0 1px rgba(110, 192, 163, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.38);
}

.touch-feature-box.is-active .touch-feature-iconwrap i {
  color: #8ee4c8;
  filter: drop-shadow(0 0 12px rgba(110, 192, 163, 0.35));
}

.touch-feature-iconwrap:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 192, 163, 0.5);
}

.touch-feature-iconwrap:hover i {
  color: #a8f0d8;
  transform: scale(1.08) translateY(-2px);
}

.touch-feature-iconwrap:active i {
  transform: scale(0.96);
}

.touch-feature-body {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  align-self: stretch;
}

.touch-feature-body p {
  margin: 0;
  width: 100%;
  max-width: none;
  font-size: clamp(0.74rem, 0.9vw, 0.86rem);
  line-height: 1.45;
  color: rgba(220, 228, 235, 0.94);
  text-align: left;
}

.touch-feature-box.is-active {
  border-color: rgba(65, 134, 110, 0.5);
  background: linear-gradient(152deg, rgba(22, 48, 40, 0.94) 0%, rgba(14, 36, 30, 0.92) 55%, rgba(10, 28, 24, 0.94) 100%);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(110, 192, 163, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.touch-panel-reverse {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  z-index: 3;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 36px);
  box-sizing: border-box;
  opacity: 1;
  visibility: hidden;
  pointer-events: none;
}

.touch-ui.is-reverse-phase .touch-panel-reverse {
  visibility: visible;
  pointer-events: none;
}

.touch-reverse-copy {
  text-align: center;
  width: min(78ch, 94vw);
  margin: 0 auto;
  display: grid;
  place-items: center;
  justify-content: center;
  will-change: transform, opacity;
}

#touchTrack .touch-reverse-heading {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: clamp(1.65rem, 3.9vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-transform: none;
  color: #e8fbff;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 4px 24px rgba(0, 0, 0, 0.55),
    0 20px 48px rgba(0, 0, 0, 0.45);
}

#touchTrack .touch-reverse-heading br {
  display: none;
}

#touchTrack .touch-reverse-sub {
  margin: clamp(9px, 1.5vh, 15px) auto 0;
  padding: 0;
  font-family: inherit;
  font-size: clamp(0.88rem, 1.35vw, 1.05rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: rgba(218, 228, 242, 0.94);
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  max-width: 78ch;
  text-align: center;
  white-space: pre-line;
}

@media (max-width: 1024px) {
  #touchTrack {
    height: 980vh;
  }

  .touch-feature-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    width: min(780px, calc(100vw - 24px));
    gap: 12px;
  }

  .touch-forward-top {
    padding: clamp(18px, 4vh, 34px) clamp(14px, 4vw, 30px) 8px;
  }

  .touch-forward-dock {
    margin-bottom: clamp(12px, 2.8vh, 28px);
  }

  #touchTrack .touch-overlay {
    width: min(86vw, 760px);
    gap: clamp(7px, 1vh, 11px);
  }

  #touchTrack .overlay-text h2 {
    font-size: clamp(1.65rem, 4.8vw, 2.8rem);
  }

  #touchTrack .overlay-text p {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    line-height: 1.55;
  }

  .touch-feature-box {
    min-height: clamp(104px, 12vh, 132px);
    padding: 12px 14px;
  }

  .touch-feature-body p {
    font-size: clamp(0.72rem, 1.6vw, 0.82rem);
  }
}

@media (max-width: 768px) {
  #touchTrack {
    height: 820vh;
  }

  .touch-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(620px, calc(100vw - 18px));
    gap: 9px;
  }

  .touch-forward-top {
    align-items: flex-start;
    padding: clamp(96px, 16vh, 148px) 14px 8px;
  }

  #touchTrack .touch-overlay {
    width: min(92vw, 560px);
    gap: 8px;
  }

  #touchTrack .overlay-text .eyebrow {
    margin-bottom: 6px;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }

  #touchTrack .overlay-text h2 {
    font-size: clamp(1.35rem, 7vw, 2.05rem);
    line-height: 1.08;
    margin-bottom: 2px;
  }

  #touchTrack .overlay-text p {
    font-size: clamp(0.78rem, 3.4vw, 0.94rem);
    line-height: 1.45;
  }

  .touch-forward-dock {
    padding: 0 clamp(8px, 2.2vw, 16px) max(6px, env(safe-area-inset-bottom, 0px));
    margin-bottom: clamp(8px, 2vh, 18px);
  }

  .touch-panel-reverse {
    inset: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    transform: none;
    align-items: stretch;
    padding: 0;
  }

  .touch-reverse-copy {
    width: 100%;
    max-width: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: clamp(150px, 24vh, 218px) 18px clamp(116px, 19vh, 168px);
    box-sizing: border-box;
  }

  .touch-feature-box {
    min-height: 0;
    padding: 10px 11px;
    gap: 7px;
    border-radius: 14px;
  }

  .touch-feature-head {
    align-items: center;
  }

  .touch-feature-iconwrap {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .touch-feature-iconwrap i {
    font-size: 1.12rem;
  }

  .touch-feature-title {
    font-size: clamp(0.64rem, 2.6vw, 0.76rem);
    line-height: 1.2;
    letter-spacing: 0.035em;
  }

  .touch-feature-body p {
    font-size: clamp(0.66rem, 2.65vw, 0.76rem);
    line-height: 1.35;
  }

  #touchTrack .touch-reverse-heading {
    font-size: clamp(1.32rem, 6vw, 2.05rem);
    line-height: 1.12;
    white-space: normal;
  }

  #touchTrack .touch-reverse-heading br {
    display: block;
  }

  #touchTrack .touch-reverse-sub {
    margin: 0 auto;
    font-size: clamp(0.84rem, 3.35vw, 1rem);
    max-width: 36ch;
    line-height: 1.48;
    white-space: normal;
  }
}

@media (max-width: 560px) {
  #touchTrack {
    height: 780vh;
  }

  .touch-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(430px, calc(100vw - 14px));
    gap: 7px;
  }

  .touch-forward-top {
    padding: clamp(82px, 14vh, 118px) 12px 6px;
  }

  #touchTrack .touch-overlay {
    width: min(92vw, 430px);
    gap: 4px;
  }

  #touchTrack .overlay-text .eyebrow {
    font-size: 0.58rem;
  }

  #touchTrack .overlay-text h2 {
    font-size: clamp(1.18rem, 6vw, 1.72rem);
    margin-bottom: 2px;
  }

  #touchTrack .overlay-text p {
    font-size: clamp(0.72rem, 3.15vw, 0.84rem);
    line-height: 1.38;
    max-width: 38ch;
    margin-left: auto;
    margin-right: auto;
  }

  .touch-feature-box {
    padding: 8px 9px;
    gap: 6px;
    min-height: 92px;
  }

  .touch-feature-head {
    gap: 7px;
  }

  .touch-feature-iconwrap {
    width: 30px;
    height: 30px;
  }

  .touch-feature-iconwrap i {
    font-size: 1rem;
  }

  .touch-feature-title {
    font-size: clamp(0.56rem, 2.75vw, 0.68rem);
    line-height: 1.16;
  }

  .touch-feature-body p {
    font-size: clamp(0.62rem, 2.8vw, 0.7rem);
    line-height: 1.28;
  }

  .touch-reverse-copy {
    width: 100%;
    padding: clamp(128px, 23vh, 172px) 16px clamp(100px, 17vh, 138px);
  }

  #touchTrack .touch-reverse-heading {
    font-size: clamp(1.22rem, 6.6vw, 1.66rem);
  }

  #touchTrack .touch-reverse-sub {
    font-size: clamp(0.82rem, 3.75vw, 0.92rem);
    max-width: 31ch;
  }
}

@media (max-width: 380px) {
  .touch-forward-top {
    padding-top: clamp(72px, 13vh, 96px);
  }

  #touchTrack .overlay-text h2 {
    font-size: clamp(1.05rem, 6.6vw, 1.4rem);
  }

  #touchTrack .overlay-text p {
    font-size: 0.68rem;
    line-height: 1.32;
  }

  .touch-feature-grid {
    width: calc(100vw - 12px);
    gap: 6px;
  }

  .touch-feature-box {
    padding: 7px;
    min-height: 88px;
  }

  .touch-feature-iconwrap {
    width: 28px;
    height: 28px;
  }

  .touch-feature-iconwrap i {
    font-size: 0.94rem;
  }

  .touch-feature-title {
    font-size: 0.54rem;
  }

  .touch-feature-body p {
    font-size: 0.6rem;
    line-height: 1.24;
  }

  .touch-reverse-copy {
    padding: clamp(108px, 21vh, 142px) 14px clamp(88px, 16vh, 118px);
  }

  #touchTrack .touch-reverse-heading {
    font-size: clamp(1rem, 6.8vw, 1.42rem);
  }

  #touchTrack .touch-reverse-sub {
    font-size: 0.76rem;
    max-width: 29ch;
    line-height: 1.4;
  }
}

@media (max-height: 620px) and (max-width: 900px) {
  #touchTrack {
    height: 900vh;
  }

  .touch-forward-top {
    padding-top: clamp(18px, 5vh, 34px);
  }

  #touchTrack .overlay-text h2 {
    font-size: clamp(1.15rem, 4vw, 1.75rem);
  }

  #touchTrack .overlay-text p {
    font-size: clamp(0.72rem, 2vw, 0.86rem);
    line-height: 1.35;
  }

  .touch-feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: calc(100vw - 18px);
    gap: 7px;
  }

  .touch-feature-box {
    padding: 8px;
    gap: 5px;
  }

  .touch-feature-iconwrap {
    width: 30px;
    height: 30px;
  }

  .touch-feature-iconwrap i {
    font-size: 1rem;
  }

  .touch-feature-title {
    font-size: clamp(0.52rem, 1.6vw, 0.62rem);
  }

  .touch-feature-body p {
    font-size: clamp(0.54rem, 1.65vw, 0.64rem);
    line-height: 1.28;
  }

  .touch-forward-dock {
    margin-bottom: 8px;
  }

  #touchTrack .touch-reverse-heading {
    font-size: clamp(1rem, 4vw, 1.7rem);
  }

  #touchTrack .touch-reverse-sub {
    font-size: clamp(0.68rem, 2.1vw, 0.82rem);
    line-height: 1.35;
  }
}
