/* Scroll-tilt tablet for the #interface section of the landing page.
   Standalone and additive, same shape as bg-paths.v1.* and liquid-metal.v1.*.

   Why plain CSS and not Tailwind: this page's Tailwind output
   (index-DssA39eN.css) is a frozen build with no source tree, so a utility it
   never emitted does nothing. Every class below is defined here. The colours
   read the page's own :root tokens so the section stays on-palette.

   Geometry follows the ContainerScroll reference, retuned: 64rem scroll runway,
   1000px perspective on the stage, a 16:9 card, rotateX 20deg -> 0 and
   scale 1.05 -> 1 as the section is scrolled through. The transform values
   themselves are written by the bundle (ScraperShot) on rAF; the values here
   are the at-rest start state, so the card is never flat before JS runs. */

.ss-scroll {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64rem;
  padding: 4rem 1.5rem;
}

.ss-stage {
  position: relative;
  width: 100%;
  perspective: 1000px;
}

/* ---- headline ------------------------------------------------------- */

.ss-head {
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  will-change: transform;
}

.ss-kicker {
  margin-top: 0;
  margin-bottom: 0;
  font-size: clamp(1.3rem, 2.4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: hsl(var(--deep));
}

.ss-title {
  display: block;
  margin-top: 0.12em;
  font-size: clamp(1.75rem, 4.6vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  color: hsl(var(--deep));
}

/* ---- the tablet ----------------------------------------------------- */

.ss-card {
  position: relative;
  width: 100%;
  max-width: 64rem;
  margin: -3rem auto 0;
  padding: 0.75rem;
  border: 4px solid #6c6c6c;
  border-radius: 30px;
  background: #222;
  box-shadow:
    0 0 #0000004d, 0 9px 20px #0000004a, 0 37px 37px #00000042,
    0 84px 50px #00000026, 0 149px 60px #0000000a, 0 233px 65px #00000003;
  transform: rotateX(20deg) scale(1.05);
  will-change: transform;
}

.ss-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  overflow: hidden;
  border-radius: 1rem;
  background: hsl(var(--surface-2));
  /* The screen takes the screenshot's own aspect ratio, so the tablet is built
     around the image instead of the image being cropped to fit the tablet.
     ScraperShot overwrites --shot-ar from the file's real naturalWidth/Height
     once it loads; the fallback is the current screenshot, so there is no
     layout shift on a cold load. */
  aspect-ratio: var(--shot-ar, 1600 / 749);
}

.ss-screen img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: left top;
}

/* ---- empty state, shown until the screenshot exists ------------------ */

.ss-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  height: 100%;
  width: 100%;
  color: hsl(var(--fg-subtle));
}

.ss-empty span { font-size: 12px; }

.ss-empty .ss-empty-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ---- liquid metal on the bezel --------------------------------------- */

/* liquid-metal.v2.js mounts the same animated rim it puts behind the dark CTAs
   on .ss-card as well. The base rules in liquid-metal.v1.css are scoped to
   [data-slot="liquid-button"] and are all pill-shaped, so the tablet needs its
   own geometry here. Radius is 26px: the card is 30px with a 4px border, and an
   absolutely positioned child at inset:0 fills the padding box.

   The canvas sits at z-index -9. A negative-z child paints after its parent's
   own background but before normal-flow children, so it covers .ss-card's #222
   and still sits behind .ss-screen. The #222 stays as the fallback for no-WebGL
   and reduced motion. */

.ss-card .lm-rim {
  position: absolute;
  inset: 0;
  z-index: -9;
  overflow: hidden;
  border-radius: 26px;
  pointer-events: none;
}

.ss-card .lm-rim > canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 26px;
}

/* On a button .lm-face masks the metal down to a 2px rim, and .lm-ripples
   reacts to clicks. Neither applies to a tablet: the whole bezel should be
   metal, and .lm-ripples would paint on top of the screenshot. */
.ss-card .lm-face,
.ss-card .lm-ripples {
  display: none;
}

/* ---- small screens --------------------------------------------------- */

@media (max-width: 768px) {
  .ss-scroll { height: 34rem; padding: 2rem 1rem; }
  .ss-card {
    margin-top: -1.5rem;
    padding: 0.4rem;
    border-width: 3px;
    border-radius: 22px;
    transform: rotateX(20deg) scale(0.8);
  }
  .ss-card .lm-rim,
  .ss-card .lm-rim > canvas { border-radius: 19px; }
  .ss-screen { border-radius: 0.75rem; }
}

/* ---- no motion ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .ss-head { transform: none !important; }
  .ss-card { transform: rotateX(0deg) scale(1) !important; }
}
