/* Photon handheld in CSS 3D (29 Nov 2026): the hero of /graphing-calculator/ and the home page's calculator section.
   Markup: tools/gdc_landing.py writes it into both pages (never edit the copies between the gdc-3d / gdc-home markers).
   Pointer tilt and the off-screen pause: gdc-3d.js. Decorative only (aria-hidden), no library, no image but the owl.
   Size: set --w on .g3d; every length below is in em, and 1em = --w / 24 (the case is 24em x 41em, 2.2em deep).
   prefers-reduced-motion: the case stands still at an angle and the screen shows one finished graph. */
.g3d { --w: 230px; position: relative; flex: none; width: var(--w); height: calc(var(--w) * 41 / 24); font-size: calc(var(--w) / 24); perspective: 84em; perspective-origin: 50% 36%; pointer-events: none; user-select: none; -webkit-user-select: none; }
.g3d__tilt, .g3d__spin, .g3d__body { position: absolute; inset: 0; transform-style: preserve-3d; }
.g3d__tilt { transform: rotateX(var(--g3d-ty, 0deg)) rotateY(var(--g3d-tx, 0deg)); transition: transform .7s cubic-bezier(.2, .75, .25, 1); }
.g3d__spin { transform: translateY(-.3em) rotateX(7deg) rotateY(-19deg); }

/* The thickness: eight slices of the case's outline behind the face, darker towards the back. */
.g3d__slab { position: absolute; inset: 0; border-radius: 2.4em 2.4em 3.2em 3.2em; background: hsl(217 56% calc(24% - var(--z) * 1.7%)); transform: translateZ(calc(var(--z) * -.275em)); }
.g3d__slab:first-child { background: hsl(214 46% 36%); }
.g3d__face { position: absolute; inset: 0; overflow: hidden; border-radius: 2.4em 2.4em 3.2em 3.2em;
  background: linear-gradient(160deg, #ffffff26, #ffffff00 30%), linear-gradient(155deg, #2b5c9c, #163766 46%, #0b2145);
  box-shadow: inset 0 .1em 0 #ffffff59, inset 0 -.24em 0 #00000059, inset 0 0 0 .07em #0a1d3c; }
.g3d__face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(104deg, #ffffff00 38%, #ffffff1f 49%, #ffffff00 60%) 70% 0 / 260% 100% no-repeat; }
.g3d__face::before { content: ""; position: absolute; left: 50%; bottom: .55em; width: 3.4em; height: .32em; translate: -50% 0; border-radius: 1em; background: #f0a5006b; }

.g3d__screen { position: absolute; left: 1.55em; right: 1.55em; top: 1.65em; height: 15.67em; overflow: hidden; border-radius: .62em; background: #fff;
  box-shadow: 0 0 0 .42em #07142a, 0 0 0 .52em #2c4f82, inset 0 0 0 .06em #0000001f; }
.g3d__screen svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; font-family: "Photon Inter", Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }

.g3d__brand { position: absolute; left: 0; right: 0; top: 18.55em; height: 2.3em; display: flex; align-items: center; justify-content: center; gap: .6em; color: #fff; }
.g3d__owl { display: grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .16em #f0a500b3, 0 .12em .3em #00000059; }
.g3d__owl img { display: block; width: 1.7em; height: 1.7em; }
.g3d__brand b { font: 800 1.02em/1 "Photon Inter", Inter, system-ui, sans-serif; letter-spacing: .36em; margin-right: -.36em; }

.g3d__nav { position: absolute; left: 1.6em; right: 1.6em; top: 21.3em; height: 4.8em; display: grid; grid-template-columns: minmax(0, 1fr) 4.8em minmax(0, 1fr); gap: .95em; align-items: center; }
.g3d__nav > span { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; }
.g3d__nav > span i { display: block; height: 1.5em; border-radius: .42em; background: linear-gradient(#22497f, #14315c); box-shadow: 0 .15em 0 #06142a, inset 0 .07em 0 #ffffff2e; }
.g3d__pad { width: 4.8em; height: 4.8em; border-radius: 50%;
  background: radial-gradient(circle, #1d3f70 0 30%, #0e2850 31% 35%, #2a5590 36%, #183a69 72%);
  box-shadow: 0 .17em 0 #06142a, inset 0 .08em 0 #ffffff38, inset 0 -.1em .2em #00000040; }

.g3d__keys { position: absolute; left: 1.5em; right: 1.5em; top: 26.55em; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .46em .5em; }
.g3d__keys i { display: block; height: 2.15em; overflow: hidden; border-radius: .55em; font: normal 600 .8em/2.15em "Photon Inter", Inter, system-ui, sans-serif; text-align: center; white-space: nowrap;
  color: #dce6f4; background: linear-gradient(#25497f, #163765); box-shadow: 0 .22em 0 #06142a, inset 0 .09em 0 #ffffff2b; }
.g3d__keys i.n { color: #0d1f3c; background: linear-gradient(#fbfcfe, #dbe3ee); box-shadow: 0 .22em 0 #7f91ab, inset 0 .09em 0 #fff; }
.g3d__keys i.g { color: #10264a; background: linear-gradient(#ffc444, #f0a500); box-shadow: 0 .22em 0 #8f6100, inset 0 .09em 0 #ffffff6b; }
.g3d__keys i.s { font-size: .62em; line-height: 2.77em; height: 2.77em; letter-spacing: .02em; }

.g3d__shadow { position: absolute; left: 10%; right: 10%; bottom: -1.9em; height: 2.6em; border-radius: 50%; background: radial-gradient(closest-side, #0d1f3c5c, #0d1f3c00); }

/* The screen's story: graphs draw, Analyze Graph finds the intersection, then a Normal Cdf dialog gives its answer.
   Without motion, the finished graph with the labelled intersection stays on screen. */
.g3d .s-p, .g3d .s-l { stroke-dasharray: 1; stroke-dashoffset: 0; }
.g3d .s-b1, .g3d .s-b2, .g3d .s-q1, .g3d .s-q2, .g3d .s-dim, .g3d .s-dlg, .g3d .s-hist { opacity: 0; }
.g3d .s-ring { opacity: 0; transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  .g3d__spin { animation: g3d-sway 12s cubic-bezier(.45, .05, .55, .95) infinite; }
  .g3d__shadow { animation: g3d-shadow 12s cubic-bezier(.45, .05, .55, .95) infinite; }
  .g3d__face::after { animation: g3d-gloss 12s cubic-bezier(.45, .05, .55, .95) infinite; }
  .g3d .s-curves { animation: g3d-curves 12s linear infinite; }
  .g3d .s-p { animation: g3d-draw-p 12s linear infinite; }
  .g3d .s-l { animation: g3d-draw-l 12s linear infinite; }
  .g3d .s-lab1 { animation: g3d-lab1 12s linear infinite; }
  .g3d .s-lab2 { animation: g3d-lab2 12s linear infinite; }
  .g3d .s-b1 { animation: g3d-b1 12s linear infinite; }
  .g3d .s-b2 { animation: g3d-b2 12s linear infinite; }
  .g3d .s-q1 { animation: g3d-q1 12s linear infinite; }
  .g3d .s-q2 { animation: g3d-q2 12s linear infinite; }
  .g3d .s-q3, .g3d .s-pt { animation: g3d-q3 12s linear infinite; }
  .g3d .s-ring { animation: g3d-ring 12s ease-out infinite; }
  .g3d .s-dim { animation: g3d-dim 12s linear infinite; }
  .g3d .s-dlg { animation: g3d-dlg 12s linear infinite; }
  .g3d .s-v1 { animation: g3d-v1 12s linear infinite; }
  .g3d .s-v2 { animation: g3d-v2 12s linear infinite; }
  .g3d .s-v3 { animation: g3d-v3 12s linear infinite; }
  .g3d .s-v4 { animation: g3d-v4 12s linear infinite; }
  .g3d .s-ok { animation: g3d-ok 12s linear infinite; }
  .g3d .s-hist { animation: g3d-hist 12s linear infinite; }
  .g3d .s-res { animation: g3d-res 12s linear infinite; }
  .g3d .s-res2 { animation: g3d-res2 12s linear infinite; }
  .g3d--paused *, .g3d--paused *::after { animation-play-state: paused !important; }
}
@keyframes g3d-sway {
  0%, 100% { transform: translateY(0) rotateX(8deg) rotateY(-24deg); }
  25%, 75% { transform: translateY(-.75em) rotateX(5deg) rotateY(-2deg); }
  50% { transform: translateY(0) rotateX(8deg) rotateY(21deg); }
}
@keyframes g3d-shadow { 0%, 50%, 100% { transform: scale(1); opacity: 1; } 25%, 75% { transform: scale(.88); opacity: .78; } }
@keyframes g3d-gloss { 0%, 100% { background-position: 92% 0; } 50% { background-position: 8% 0; } }
@keyframes g3d-curves { 0%, 96% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes g3d-draw-p { 0%, 3% { stroke-dashoffset: 1; } 14%, 100% { stroke-dashoffset: 0; } }
@keyframes g3d-draw-l { 0%, 12% { stroke-dashoffset: 1; } 22%, 100% { stroke-dashoffset: 0; } }
@keyframes g3d-lab1 { 0%, 13% { opacity: 0; } 16%, 100% { opacity: 1; } }
@keyframes g3d-lab2 { 0%, 21% { opacity: 0; } 24%, 100% { opacity: 1; } }
@keyframes g3d-b1 { 0%, 29.9% { opacity: 0; } 30%, 57.9% { opacity: 1; } 58%, 100% { opacity: 0; } }
@keyframes g3d-b2 { 0%, 36.9% { opacity: 0; } 37%, 57.9% { opacity: 1; } 58%, 100% { opacity: 0; } }
@keyframes g3d-q1 { 0%, 29.9% { opacity: 0; } 30%, 36.9% { opacity: 1; } 37%, 100% { opacity: 0; } }
@keyframes g3d-q2 { 0%, 36.9% { opacity: 0; } 37%, 43.9% { opacity: 1; } 44%, 100% { opacity: 0; } }
@keyframes g3d-q3 { 0%, 43.9% { opacity: 0; } 44%, 57.9% { opacity: 1; } 58%, 100% { opacity: 0; } }
@keyframes g3d-ring { 0%, 44% { opacity: 0; transform: scale(1); } 45% { opacity: .9; transform: scale(1); } 53%, 100% { opacity: 0; transform: scale(3.2); } }
@keyframes g3d-dim { 0%, 59% { opacity: 0; } 61%, 79% { opacity: .38; } 81%, 100% { opacity: 0; } }
@keyframes g3d-dlg { 0%, 60% { opacity: 0; } 62%, 79.9% { opacity: 1; } 80%, 100% { opacity: 0; } }
@keyframes g3d-v1 { 0%, 63.9% { opacity: 0; } 64%, 100% { opacity: 1; } }
@keyframes g3d-v2 { 0%, 66.4% { opacity: 0; } 66.5%, 100% { opacity: 1; } }
@keyframes g3d-v3 { 0%, 68.9% { opacity: 0; } 69%, 100% { opacity: 1; } }
@keyframes g3d-v4 { 0%, 71.4% { opacity: 0; } 71.5%, 100% { opacity: 1; } }
@keyframes g3d-ok { 0%, 75.4% { opacity: 0; } 75.5%, 78% { opacity: .55; } 78.1%, 100% { opacity: 0; } }
@keyframes g3d-hist { 0% { opacity: 1; } 2.5%, 79.9% { opacity: 0; } 80%, 100% { opacity: 1; } }
@keyframes g3d-res { 0%, 2.5% { opacity: 1; } 2.6%, 82.9% { opacity: 0; } 83%, 100% { opacity: 1; } }
@keyframes g3d-res2 { 0%, 2.5% { opacity: 1; } 2.6%, 88.9% { opacity: 0; } 89%, 100% { opacity: 1; } }
