/* Real-proportioned devices (drawn in CSS) and the pinned 3D iPad showcase. */

/* ── iPad Pro 13-inch (M5), portrait: 215.5 x 281.6 mm, even 4.1% bezels, camera on the right edge ── */
.ipad { position: relative; container-type: inline-size; width: 100%; aspect-ratio: 1 / 1.306; }
.ipad .rim { position: absolute; inset: 0; border-radius: 5.8cqw; background: linear-gradient(135deg, #e4e2dc, #a9a69f 45%, #d3d0c9 70%, #8d8a83); box-shadow: 0 5cqw 9cqw -3cqw rgba(30, 20, 8, .5), 0 1.6cqw 3cqw -1cqw rgba(30, 20, 8, .35); }
.ipad .bez { position: absolute; inset: .45cqw; border-radius: 5.35cqw; background: #0b0b0d; box-shadow: inset 0 0 0 .3cqw #26262b; }
.ipad .scr { position: absolute; inset: 4.1cqw; border-radius: 1.9cqw; overflow: hidden; background: #f4f6fb; }
.ipad .scr img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ipad .cam { position: absolute; right: 1.55cqw; top: 50%; width: 1cqw; height: 1cqw; margin-top: -.5cqw; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #3b4658, #10141c 70%); box-shadow: 0 0 0 .25cqw #1b1b20; }
.ipad .b { position: absolute; background: linear-gradient(90deg, #8d8a83, #d3d0c9, #8d8a83); }
.ipad .b-power { top: -.55cqw; right: 18cqw; width: 7cqw; height: .7cqw; border-radius: .4cqw .4cqw 0 0; }
.ipad .b-vol { right: -.55cqw; top: 14cqw; width: .7cqw; height: 15cqw; border-radius: 0 .4cqw .4cqw 0; background: linear-gradient(180deg, #8d8a83, #d3d0c9, #8d8a83); }

/* ── iPhone 17 Pro Max: 78 x 163.4 mm, titanium frame, Dynamic Island ── */
.iphone { position: relative; container-type: inline-size; width: 100%; aspect-ratio: 1 / 2.095; }
.iphone .rim { position: absolute; inset: 0; border-radius: 15.8cqw; background: linear-gradient(135deg, #d9d5cd, #8b877f 40%, #c5c0b7 65%, #77736c); box-shadow: 0 6cqw 10cqw -3cqw rgba(30, 20, 8, .5), 0 1.6cqw 3cqw -1cqw rgba(30, 20, 8, .35); }
.iphone .bez { position: absolute; inset: .7cqw; border-radius: 15.1cqw; background: #050506; box-shadow: inset 0 0 0 .3cqw #1c1c20; }
.iphone .scr { position: absolute; inset: 2.3cqw; border-radius: 13.6cqw; overflow: hidden; background: #f4f6fb; }
.iphone .scr img { display: block; width: 100%; height: 100%; object-fit: cover; }
.iphone .isl { position: absolute; left: 50%; top: 4.5cqw; width: 28cqw; height: 8.2cqw; margin-left: -14cqw; border-radius: 99cqw; background: #000; box-shadow: inset 0 0 0 .2cqw #151518; }
.iphone .b { position: absolute; background: linear-gradient(90deg, #77736c, #cbc6bc, #77736c); }
.iphone .b-act { left: -.6cqw; top: 25cqw; width: .8cqw; height: 5cqw; border-radius: .5cqw 0 0 .5cqw; }
.iphone .b-up { left: -.6cqw; top: 36cqw; width: .8cqw; height: 10cqw; border-radius: .5cqw 0 0 .5cqw; }
.iphone .b-dn { left: -.6cqw; top: 49cqw; width: .8cqw; height: 10cqw; border-radius: .5cqw 0 0 .5cqw; }
.iphone .b-pow { right: -.6cqw; top: 40cqw; width: .8cqw; height: 16cqw; border-radius: 0 .5cqw .5cqw 0; }
.iphone .b-cam { right: -.5cqw; top: 112cqw; width: .7cqw; height: 9cqw; border-radius: 0 .5cqw .5cqw 0; }

/* ── Showcase: ClassMate's pinned 3D device (marketing/public/animations.css), as an iPad.
   A sticky REAL 3D iPad (thickness from stacked slices) that turns a half-turn per step and
   moves side to side between the texts. Driven by showcase.js (GSAP ScrollTrigger, as on
   classmateapp.org). Everything in the 3D box is sized in px from --w: no container queries
   inside the 3D context. ── */
.sc-head { text-align: center; max-width: 760px; margin: 0 auto; }
.sc-head p { margin-left: auto; margin-right: auto; }
.sc-wrap { position: relative; margin-top: clamp(24px, 4vw, 48px); }
.sc-stage {
  position: -webkit-sticky; position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  z-index: 3; pointer-events: none;
  -webkit-perspective: 1700px; perspective: 1700px;
  -webkit-perspective-origin: 50% 45%; perspective-origin: 50% 45%;
}
.sc-3d {
  --w: clamp(250px, 34vw, 460px);
  --h: calc(var(--w) * 1.306);
  --r: calc(var(--w) * .058);
  --t: max(6px, calc(var(--w) * .018));   /* half the iPad's thickness */
  position: relative; width: var(--w); height: var(--h); margin-top: 28px;
  -webkit-transform-style: preserve-3d; transform-style: preserve-3d; will-change: transform;
}
.sc-face {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; box-sizing: border-box;
  border-radius: var(--r); overflow: hidden;
  background: #0b0b0d; border: calc(var(--w) * .041) solid #0b0b0d;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-shadow: 0 0 0 calc(var(--w) * .0055) #b9b6af;
}
.sc-front { -webkit-transform: translateZ(var(--t)); transform: translateZ(var(--t)); }
.sc-back { -webkit-transform: rotateY(180deg) translateZ(var(--t)); transform: rotateY(180deg) translateZ(var(--t)); }
.sc-scr { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: calc(var(--w) * .019); overflow: hidden; background: #f4f6fb; }
.sc-scr img { position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.sc-scr img.on { opacity: 1; }
/* Body = rounded slices stacked through the depth: a SOLID rounded thickness, no edge-on flash.
   They stay just inside the faces: a slice in a face's own plane is drawn over its screen in Safari. */
.sc-body {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: var(--r);
  -webkit-transform: translateZ(calc((var(--i) - 15.5) * (var(--t) - .8px) / 14.5)); transform: translateZ(calc((var(--i) - 15.5) * (var(--t) - .8px) / 14.5));
  background: linear-gradient(110deg, #e0ded8, #aaa7a0 55%, #8f8c85);
}
.sc-texts { position: relative; margin-top: -100vh; margin-top: -100dvh; z-index: 1; }
.sc-copy {
  min-height: 100vh; min-height: 100dvh; box-sizing: border-box; padding-top: 56px;
  display: flex; flex-direction: column; justify-content: center;
  opacity: .35; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease;
}
.sc-copy.is-active { opacity: 1; transform: none; }
.sc-copy[data-side="right"] { align-items: flex-end; text-align: right; padding-right: clamp(24px, 9vw, 260px); }
.sc-copy[data-side="left"] { align-items: flex-start; text-align: left; padding-left: clamp(24px, 9vw, 260px); }
.sc-copy > * { max-width: 24ch; }
.sc-copy h3 { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.06; font-weight: 800; letter-spacing: -.03em; max-width: 14ch; }
.sc-copy p { color: var(--body); margin: 14px 0 0; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; }
.sc-copy p.eyebrow { font-size: 12px; color: var(--brand); margin: 0 0 14px; }

/* The still version: every screen in a row of framed iPads. Shown only when the scroll
   animation can't or shouldn't run (reduced motion, or the script didn't load: .no-anim). */
.sc-mobile { display: none; }
.sc-mobile .ipad { width: min(100%, 360px); margin: 0 auto; }
.sc-mobile-scroller { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 48px 32px; max-width: 1100px; margin: 0 auto; padding: 8px 24px; }
.sc-card { text-align: center; }
.sc-card h3 { font-size: 22px; font-weight: 800; margin: 22px 0 8px; }
.sc-card p { margin: 0 auto; max-width: 30ch; color: var(--body); line-height: 1.55; font-size: 15.5px; }
.sc-card p.eyebrow { margin: 22px 0 0; color: var(--brand); font-size: 12px; }
.sc-card p.eyebrow + h3 { margin-top: 8px; }
.only-r { display: none; }
.sc-wrap.no-anim { display: none; }
.sc-wrap.no-anim + .sc-mobile { display: block; }
.sc-off .only-d { display: none; } .sc-off .only-r { display: inline; }

@media (max-width: 1100px) { .sc-3d { --w: clamp(250px, 44vw, 460px); } }
/* Short windows: the iPad never taller than the room under the header. */
@media (max-height: 760px) and (min-width: 769px) { .sc-3d { --w: clamp(220px, 50vh, 400px); } }
/* Phones: the same 3D iPad, in the upper part of the screen, its text under it. */
@media (max-width: 768px) {
  .sc-stage { align-items: flex-start; padding-top: 116px; box-sizing: border-box; }
  .sc-3d { --w: min(68vw, 39vh); margin-top: 0; }
  .sc-copy, .sc-copy[data-side="right"], .sc-copy[data-side="left"] {
    justify-content: flex-end; align-items: center; text-align: center;
    padding: 0 24px max(7vh, 40px);
  }
  .sc-copy:not(.is-active) { opacity: 0; }   /* a caption on its way out never crosses the iPad */
  .sc-copy > * { max-width: 30ch; }
  .sc-copy h3 { font-size: clamp(24px, 6.6vw, 30px); max-width: 16ch; }
  .sc-copy p { font-size: 15.5px; margin-top: 10px; }
  .sc-copy p.eyebrow { margin-bottom: 10px; }
}
/* Short phones: a smaller iPad, so it never reaches its text. */
@media (max-width: 768px) and (max-height: 720px) {
  .sc-stage { padding-top: 108px; }
  .sc-3d { --w: min(60vw, 31vh); }
  .sc-copy p { font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-wrap { display: none; }
  .sc-mobile { display: block; }
  .only-d { display: none; } .only-r { display: inline; }
}
.no-js .sc-copy { opacity: 1; transform: none; }
