/*
 * The Terminal page: the showcase section that replaced the two pass cards.
 * A small title, one sentence, and the Terminal dashboard shown on a tablet-shaped screen, on the same ivory ground
 * and engraved branches as before. Quiet luxury: matte espresso bezel, champagne hairlines, slow motion.
 */
.term {
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5.5rem);
}
.term__wrap {
  display: grid;
  justify-items: center;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
.term__title {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.term__title span {
  width: clamp(28px, 6vw, 64px);
  height: 1px;
  background: var(--gold-deep);
  opacity: 0.7;
}
.term__lead {
  max-width: 40rem;
  margin: 0 0 clamp(0.5rem, 1.5vw, 1rem);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.0625rem, 1.55vw, 1.3125rem);
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--forest-deep);
  text-wrap: balance;
}

/* the tablet: a matte espresso bezel with a camera dot, and a rounded screen */
.term__frame {
  --tx: 0;
  --ty: 0;
  position: relative;
  width: 100%;
  max-width: 1040px;
  margin: 0;
  padding: clamp(8px, 1.3vw, 14px);
  border: 1px solid rgba(189, 160, 100, 0.5);
  border-radius: clamp(18px, 2.6vw, 30px);
  background: linear-gradient(160deg, #2a211b 0%, #1d1612 100%);
  box-shadow: 0 30px 50px -32px rgba(29, 22, 18, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.term__frame::before {
  content: "";
  position: absolute;
  top: clamp(3px, 0.5vw, 5px);
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: rgba(189, 160, 100, 0.45);
}
.term__screen {
  position: relative;
  overflow: hidden;
  border-radius: clamp(10px, 1.6vw, 20px);
  background: #0f0b09;
}
.term__img {
  display: block;
  width: 100%;
  height: auto;
}
/* soft light that follows the pointer, and one thin scan line: both only appear on hover / when settled on touch */
.term__screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(360px circle at var(--sx, 50%) var(--sy, 40%), rgba(255, 244, 220, 0.2), transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.term__screen::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  z-index: 2;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(214, 184, 120, 0.9) 30%, rgba(214, 184, 120, 0.9) 70%, transparent);
  opacity: 0;
  pointer-events: none;
}
@keyframes term-scan {
  0% { top: -2px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .term__frame {
    transform: perspective(1400px) rotateX(calc(var(--ty) * -2deg)) rotateY(calc(var(--tx) * 2.6deg));
    transition: transform 0.5s var(--ease), box-shadow 0.7s var(--ease), border-color 0.7s var(--ease);
    will-change: transform;
  }
  .term__img {
    transition: transform 1.6s var(--ease);
  }
  .term__screen::before {
    transition: opacity 0.8s var(--ease);
  }
  .term__frame:hover {
    border-color: rgba(214, 184, 120, 0.95);
    box-shadow: 0 40px 60px -30px rgba(29, 22, 18, 0.75), inset 0 0 0 1px rgba(214, 184, 120, 0.12);
  }
  .term__frame:hover::before {
    background: rgba(214, 184, 120, 0.95);
  }
  .term__frame:hover .term__img {
    transform: scale(1.015);
  }
  .term__frame:hover .term__screen::before {
    opacity: 1;
  }
  .term__frame:hover .term__screen::after {
    animation: term-scan 2.4s var(--ease) 1 both;
  }
}
/* touch: the same look plays once when the dashboard scrolls into view (see /touch-motion.js) */
@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .term__frame {
    transition: border-color 0.8s var(--ease);
  }
  .term__frame.is-seen {
    border-color: rgba(214, 184, 120, 0.95);
  }
  .term__frame.is-seen::before {
    background: rgba(214, 184, 120, 0.95);
  }
  .term__frame.is-seen .term__screen::after {
    animation: term-scan 2.4s var(--ease) 1 both;
  }
}
