/* TacticalCodeworks - tacticalcodeworks.com
   Design language ported from the Terix Studio iOS app (TerixStudioTheme.swift)
   and taken to orbit: near-black ink under a blue / violet / teal nebula and a
   drifting starfield, warm ivory rims on every container, white-steel text with
   hierarchy from size and weight, Quantico for display, one loud white-into-steel
   CTA. Iris blue and the live green appear only where the app allows colour to
   survive. */

@font-face {
  font-family: "Quantico";
  src: url("/assets/fonts/quantico-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Quantico";
  src: url("/assets/fonts/quantico-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: rgb(3, 4, 8);
  --card: rgba(7, 10, 17, 0.55);
  --cream: 251, 243, 223;              /* outlineCream */
  --rim: rgba(var(--cream), 0.55);
  --rim-strong: rgba(var(--cream), 0.95);
  --rim-hairline: rgba(var(--cream), 0.25);
  --text: #ffffff;
  --steel-2: rgb(218, 227, 238);       /* textSecondary */
  --steel-3: rgb(184, 196, 213);       /* textTertiary */
  --iris: rgb(46, 143, 255);
  --live: rgb(56, 204, 138);           /* action green */
  --cta-grad: linear-gradient(to right, #ffffff, rgb(194, 204, 219));
  --steel-grad: linear-gradient(to bottom, #ffffff 30%, rgb(204, 218, 237));
  --cream-fill: linear-gradient(135deg, rgb(255, 253, 246), rgb(251, 243, 223));
  --neon-blue: linear-gradient(135deg, rgb(92, 158, 255), rgb(61, 117, 245));
  --display: "Quantico", "Avenir Next Condensed", sans-serif;
  /* Apple's corner is a continuous-curvature superellipse, not a circular
     arc - border-radius alone is the single biggest silhouette tell. */
  --sq-body:   path("M 48.00 0 L 220.00 0 L 220.00 0.00 L 235.23 0.05 L 240.56 0.21 L 244.48 0.48 L 247.67 0.86 L 250.39 1.34 L 252.76 1.94 L 254.86 2.65 L 256.74 3.48 L 258.42 4.43 L 259.93 5.50 L 261.29 6.71 L 262.50 8.07 L 263.57 9.58 L 264.52 11.26 L 265.35 13.14 L 266.06 15.24 L 266.66 17.61 L 267.14 20.33 L 267.52 23.52 L 267.79 27.44 L 267.95 32.77 L 268.00 48.00 L 268.00 510.00 L 268.00 510.00 L 267.95 525.23 L 267.79 530.56 L 267.52 534.48 L 267.14 537.67 L 266.66 540.39 L 266.06 542.76 L 265.35 544.86 L 264.52 546.74 L 263.57 548.42 L 262.50 549.93 L 261.29 551.29 L 259.93 552.50 L 258.42 553.57 L 256.74 554.52 L 254.86 555.35 L 252.76 556.06 L 250.39 556.66 L 247.67 557.14 L 244.48 557.52 L 240.56 557.79 L 235.23 557.95 L 220.00 558.00 L 48.00 558.00 L 48.00 558.00 L 32.77 557.95 L 27.44 557.79 L 23.52 557.52 L 20.33 557.14 L 17.61 556.66 L 15.24 556.06 L 13.14 555.35 L 11.26 554.52 L 9.58 553.57 L 8.07 552.50 L 6.71 551.29 L 5.50 549.93 L 4.43 548.42 L 3.48 546.74 L 2.65 544.86 L 1.94 542.76 L 1.34 540.39 L 0.86 537.67 L 0.48 534.48 L 0.21 530.56 L 0.05 525.23 L 0.00 510.00 L 0 48.00 L 0.00 48.00 L 0.05 32.77 L 0.21 27.44 L 0.48 23.52 L 0.86 20.33 L 1.34 17.61 L 1.94 15.24 L 2.65 13.14 L 3.48 11.26 L 4.43 9.58 L 5.50 8.07 L 6.71 6.71 L 8.07 5.50 L 9.58 4.43 L 11.26 3.48 L 13.14 2.65 L 15.24 1.94 L 17.61 1.34 L 20.33 0.86 L 23.52 0.48 L 27.44 0.21 L 32.77 0.05 L 48.00 0.00 Z");
  --sq-bezel:  path("M 43.20 0 L 214.40 0 L 214.40 0.00 L 228.11 0.05 L 232.91 0.19 L 236.43 0.43 L 239.30 0.77 L 241.75 1.21 L 243.89 1.74 L 245.78 2.38 L 247.46 3.13 L 248.98 3.98 L 250.34 4.95 L 251.56 6.04 L 252.65 7.26 L 253.62 8.62 L 254.47 10.14 L 255.22 11.82 L 255.86 13.71 L 256.39 15.85 L 256.83 18.30 L 257.17 21.17 L 257.41 24.69 L 257.55 29.49 L 257.60 43.20 L 257.60 504.40 L 257.60 504.40 L 257.55 518.11 L 257.41 522.91 L 257.17 526.43 L 256.83 529.30 L 256.39 531.75 L 255.86 533.89 L 255.22 535.78 L 254.47 537.46 L 253.62 538.98 L 252.65 540.34 L 251.56 541.56 L 250.34 542.65 L 248.98 543.62 L 247.46 544.47 L 245.78 545.22 L 243.89 545.86 L 241.75 546.39 L 239.30 546.83 L 236.43 547.17 L 232.91 547.41 L 228.11 547.55 L 214.40 547.60 L 43.20 547.60 L 43.20 547.60 L 29.49 547.55 L 24.69 547.41 L 21.17 547.17 L 18.30 546.83 L 15.85 546.39 L 13.71 545.86 L 11.82 545.22 L 10.14 544.47 L 8.62 543.62 L 7.26 542.65 L 6.04 541.56 L 4.95 540.34 L 3.98 538.98 L 3.13 537.46 L 2.38 535.78 L 1.74 533.89 L 1.21 531.75 L 0.77 529.30 L 0.43 526.43 L 0.19 522.91 L 0.05 518.11 L 0.00 504.40 L 0 43.20 L 0.00 43.20 L 0.05 29.49 L 0.19 24.69 L 0.43 21.17 L 0.77 18.30 L 1.21 15.85 L 1.74 13.71 L 2.38 11.82 L 3.13 10.14 L 3.98 8.62 L 4.95 7.26 L 6.04 6.04 L 7.26 4.95 L 8.62 3.98 L 10.14 3.13 L 11.82 2.38 L 13.71 1.74 L 15.85 1.21 L 18.30 0.77 L 21.17 0.43 L 24.69 0.19 L 29.49 0.05 L 43.20 0.00 Z");
  --sq-screen: path("M 38.60 0 L 209.60 0 L 209.60 0.00 L 221.85 0.04 L 226.14 0.17 L 229.29 0.39 L 231.85 0.69 L 234.04 1.08 L 235.95 1.56 L 237.64 2.13 L 239.14 2.79 L 240.50 3.56 L 241.71 4.43 L 242.80 5.40 L 243.77 6.49 L 244.64 7.70 L 245.41 9.06 L 246.07 10.56 L 246.64 12.25 L 247.12 14.16 L 247.51 16.35 L 247.81 18.91 L 248.03 22.06 L 248.16 26.35 L 248.20 38.60 L 248.20 499.60 L 248.20 499.60 L 248.16 511.85 L 248.03 516.14 L 247.81 519.29 L 247.51 521.85 L 247.12 524.04 L 246.64 525.95 L 246.07 527.64 L 245.41 529.14 L 244.64 530.50 L 243.77 531.71 L 242.80 532.80 L 241.71 533.77 L 240.50 534.64 L 239.14 535.41 L 237.64 536.07 L 235.95 536.64 L 234.04 537.12 L 231.85 537.51 L 229.29 537.81 L 226.14 538.03 L 221.85 538.16 L 209.60 538.20 L 38.60 538.20 L 38.60 538.20 L 26.35 538.16 L 22.06 538.03 L 18.91 537.81 L 16.35 537.51 L 14.16 537.12 L 12.25 536.64 L 10.56 536.07 L 9.06 535.41 L 7.70 534.64 L 6.49 533.77 L 5.40 532.80 L 4.43 531.71 L 3.56 530.50 L 2.79 529.14 L 2.13 527.64 L 1.56 525.95 L 1.08 524.04 L 0.69 521.85 L 0.39 519.29 L 0.17 516.14 L 0.04 511.85 L 0.00 499.60 L 0 38.60 L 0.00 38.60 L 0.04 26.35 L 0.17 22.06 L 0.39 18.91 L 0.69 16.35 L 1.08 14.16 L 1.56 12.25 L 2.13 10.56 L 2.79 9.06 L 3.56 7.70 L 4.43 6.49 L 5.40 5.40 L 6.49 4.43 L 7.70 3.56 L 9.06 2.79 L 10.56 2.13 L 12.25 1.56 L 14.16 1.08 L 16.35 0.69 L 18.91 0.39 L 22.06 0.17 L 26.35 0.04 L 38.60 0.00 Z");
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* clip, not hidden: keeps the viewport from gaining a horizontal
     scrollbar from the device's 3D projection and the ambilight blur,
     without turning the root into a scroll container */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

/* ---------- Deep-space backdrop ----------
   Cold blue overhead and teal low on the horizon over near-black.
   The hero's right side stays dark so the device silhouette reads cleanly.
   Two parallax star layers drift on top of it. */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background:
    radial-gradient(ellipse 74vmax 56vmax at 8% -8%, rgba(28, 68, 152, 0.36), transparent 62%),
    radial-gradient(ellipse 64vmax 44vmax at 44% 110%, rgba(12, 92, 100, 0.24), transparent 64%),
    radial-gradient(ellipse 130vmax 90vmax at 50% 46%, rgba(0, 0, 0, 0), rgba(1, 2, 5, 0.86) 82%),
    var(--ink);
}

.stars {
  position: fixed;
  left: 0;
  right: 0;
  top: -900px;
  height: calc(100% + 900px);
  z-index: -2;
  pointer-events: none;
  background: url("/assets/stars-a.png") repeat 0 0 / 900px 900px;
  animation: drift 320s linear infinite;
}
.stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/stars-b.png") repeat 0 0 / 900px 900px;
  animation: drift 190s linear infinite, twinkle 5.5s ease-in-out infinite alternate;
}

/* Detailed planet cutouts travel at different depths. Reusing two assets
   keeps the scene varied without adding more network requests. */
.planet-field {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.planet {
  --x-from: 0px;
  --x-to: 20px;
  --y-from: -12px;
  --y-to: 18px;
  --r-from: -3deg;
  --r-to: 3deg;
  position: absolute;
  display: block;
  width: var(--size);
  aspect-ratio: 1;
  background: center / contain no-repeat;
  opacity: var(--opacity);
  filter: blur(var(--blur)) saturate(0.86) brightness(0.8);
  transform: translate3d(var(--x-from), var(--y-from), 0) rotate(var(--r-from));
  animation: planet-drift var(--duration) ease-in-out infinite alternate;
  will-change: transform;
}

.planet-ice { background-image: url("/assets/planet-ice.webp?v=1"); }
.planet-rust { background-image: url("/assets/planet-rust.webp?v=1"); }

.planet-far-a {
  --size: clamp(42px, 4.4vw, 68px);
  --opacity: 0.2;
  --blur: 0.6px;
  --duration: 138s;
  --x-from: -10px;
  --x-to: 18px;
  --y-from: -16px;
  --y-to: 24px;
  left: 57%;
  top: 12%;
}

.planet-far-b {
  --size: clamp(26px, 2.8vw, 42px);
  --opacity: 0.16;
  --blur: 0.8px;
  --duration: 174s;
  --x-from: 8px;
  --x-to: -14px;
  --y-from: -12px;
  --y-to: 18px;
  left: 18%;
  top: 68%;
}

.planet-far-c {
  --size: clamp(16px, 1.7vw, 27px);
  --opacity: 0.13;
  --blur: 1px;
  --duration: 212s;
  --x-from: -8px;
  --x-to: 10px;
  --y-from: 10px;
  --y-to: -16px;
  left: 76%;
  top: 44%;
}

.planet-mid-a {
  --size: clamp(110px, 12vw, 184px);
  --opacity: 0.15;
  --blur: 0.3px;
  --duration: 156s;
  --x-from: 16px;
  --x-to: -28px;
  --y-from: -20px;
  --y-to: 30px;
  --r-from: 4deg;
  --r-to: -5deg;
  right: -4%;
  top: 70%;
}

.planet-mid-b {
  --size: clamp(86px, 10vw, 150px);
  --opacity: 0.11;
  --blur: 0.45px;
  --duration: 188s;
  --x-from: -14px;
  --x-to: 24px;
  --y-from: 20px;
  --y-to: -26px;
  --r-from: -5deg;
  --r-to: 4deg;
  left: -5%;
  top: 82%;
}

/* Meteors: two thin streaks that cross the field on long, offset cycles.
   Visible well under a second each pass, so they register as an event,
   not a loop. */
.meteor {
  --peak: 0.6;
  position: absolute;
  width: 120px;
  height: 1.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85));
  opacity: 0;
  transform: rotate(24deg) translateX(0);
}
.meteor-a { left: 6%;  top: 16%; animation: meteor-fly 13s linear 4s infinite; }
.meteor-b { left: 52%; top: 30%; width: 88px; --peak: 0.4; animation: meteor-fly 21s linear 11s infinite; }

@keyframes meteor-fly {
  0%   { opacity: 0; transform: rotate(24deg) translateX(0); }
  2%   { opacity: var(--peak); }
  7%   { opacity: 0; transform: rotate(24deg) translateX(54vw); }
  100% { opacity: 0; transform: rotate(24deg) translateX(54vw); }
}

@keyframes planet-drift {
  from {
    transform: translate3d(var(--x-from), var(--y-from), 0) rotate(var(--r-from));
  }
  to {
    transform: translate3d(var(--x-to), var(--y-to), 0) rotate(var(--r-to));
  }
}

/* Both tiles repeat every 900px, so translating exactly one tile loops
   seamlessly - and a transform stays on the compositor instead of
   repainting a full-screen layer every frame. */
@keyframes drift   { from { transform: translateY(0); } to { transform: translateY(900px); } }
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* stars hold still, the device holds still facing front */
  .stars, .stars::after { animation: none !important; }
  .planet { animation: none !important; }
  .meteor { animation: none !important; opacity: 0; }
  .phone, .phone-float, .phone-shade, .sweep { animation: none !important; }
  .phone { transform: rotateY(-8deg); }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

.wrap { width: min(1060px, 100% - 48px); margin-inline: auto; }
@media (max-width: 600px) { .wrap { width: calc(100% - 40px); } }

/* ---------- Header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(4, 6, 8, 0.6);
  border-bottom: 1px solid rgba(var(--cream), 0.14);
}

.nav { display: flex; align-items: center; gap: 24px; padding: 18px 0; }

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--steel-3); }

.nav-right { margin-left: auto; display: flex; gap: 26px; align-items: center; }

.nav-link {
  font-size: 14.5px;
  color: var(--steel-2);
  text-decoration: none;
}
.nav-link:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero { padding: 108px 0 84px; }
@media (max-width: 700px) { .hero { padding: 68px 0 56px; } }

/* The home hero runs copy against the device; app subpages keep the
   single-column hero above. */
.hero-split {
  padding: 96px 0 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 54px;
}
.hero-split h1 { max-width: 9.5em; }
@media (max-width: 940px) {
  .hero-split { grid-template-columns: 1fr; gap: 30px; padding: 64px 0 56px; }
}
@media (max-width: 700px) { .hero-split { padding: 52px 0 44px; } }

.eyebrow {
  font-family: var(--display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--steel-3);
  margin-bottom: 26px;
  display: flex;
  align-items: center;
}

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  max-width: 13em;
  background: var(--steel-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: rgb(204, 218, 237);
}

.lede {
  margin-top: 26px;
  font-size: 19px;
  color: var(--steel-2);
  max-width: 33em;
}

.cta-row { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 30px;
  color: var(--ink);
  background: var(--cta-grad);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.14);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--rim);
  padding: 13px 29px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.btn.ghost:hover { border-color: var(--rim-strong); box-shadow: none; }

/* Load-in: one orchestrated stagger, hero only */
.rise { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.rise.d1 { animation-delay: 0.08s; }
.rise.d2 { animation-delay: 0.16s; }
.rise.d3 { animation-delay: 0.24s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ================================================================
   The device. The production path renders a licensed iPhone 15 Pro Max
   GLB. The CSS extrusion below is a zero-request fallback for browsers
   without WebGL2 or while the model is still loading.

   The fallback is a 40-slab CSS extrusion. Because every slab is a solid
   rounded rectangle, the silhouette stays exact at any angle and the
   brightness ramp across the stack reads as the real frame profile:
   polished front chamfer, matte flat side with a studio band through
   the middle, polished back chamfer.  The camera plateau is a second,
   shallower extrusion standing 1 mm proud of the back panel, so it
   casts its own edge in profile.
   ================================================================ */

.stage {
  --pw: 268px;
  --ph: 558px;
  --scale: 1;
  position: relative;
  width: calc(var(--pw) * var(--scale));
  height: calc(var(--ph) * var(--scale) + 78px);
  perspective: 1500px;
  perspective-origin: 50% 42%;
  justify-self: end;
  /* the device is grabbable: horizontal drags spin it, vertical swipes
     must keep scrolling the page */
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.stage.gl-ready { cursor: grab; }
.stage.gl-ready.grabbing { cursor: grabbing; }
@media (min-width: 1200px) { .stage { --scale: 1.12; } }
@media (max-width: 1040px) { .stage { --scale: 0.88; } }
@media (max-width: 940px)  { .stage { --scale: 0.82; justify-self: center; } }
@media (max-width: 460px)  { .stage { --scale: 0.66; } }

/* The real renderer draws here.  Sized so the framed device lands on
   exactly the same 268 x 558 box the CSS build occupies, with air around
   it for the turn. */
.device-gl {
  position: absolute;
  left: 50%;
  top: calc(var(--ph) * var(--scale) * -0.08);
  width: calc(var(--pw) * var(--scale) * 1.3);
  height: calc(var(--ph) * var(--scale) * 1.16);
  margin-left: calc(var(--pw) * var(--scale) * -0.65);
  display: block;
  pointer-events: none;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.stage.gl-ready .device-gl {
  pointer-events: auto;
  cursor: grab;
}

.stage.gl-ready.grabbing .device-gl { cursor: grabbing; }

/* the CSS device is the fallback: it only steps aside once a real frame
   has actually been drawn */
.stage.gl-ready .phone-scale { display: none; }

.phone-scale {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--pw);
  height: var(--ph);
  margin-left: calc(var(--pw) / -2);
  transform: scale(var(--scale)) rotateX(-3deg);
  transform-origin: 50% 0;
  transform-style: preserve-3d;
}

.phone-float {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: bob 7.5s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(-7px); }
  50%      { transform: translateY(7px); }
}

.phone {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: spin 15s ease-in-out infinite;
}
@keyframes spin {
  0%   { transform: rotateY(-31deg); }
  50%  { transform: rotateY(27deg); }
  100% { transform: rotateY(-31deg); }
}

.phone-shade {
  position: absolute;
  left: 50%;
  bottom: 56px;
  width: calc(var(--pw) * var(--scale) * 0.82);
  height: calc(26px * var(--scale));
  margin-left: calc(var(--pw) * var(--scale) * -0.41);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.3) 46%, transparent 72%);
  filter: blur(11px);
  animation: shade 7.5s ease-in-out infinite;
}
@keyframes shade {
  0%, 100% { opacity: 0.5; transform: scaleX(0.94); }
  50%      { opacity: 0.74; transform: scaleX(1.04); }
}

/* ---- aluminium body ---- */

.body { position: absolute; inset: 0; transform-style: preserve-3d; }

.body i {
  position: absolute;
  inset: 0;
  clip-path: var(--sq-body);
  /* studio lighting down the frame: two soft boxes and the shadows
     between them, which is what sells brushed metal */
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.06) 5%,
    rgba(0, 0, 0, 0.34) 15%,
    rgba(255, 255, 255, 0.16) 29%,
    rgba(0, 0, 0, 0.26) 45%,
    rgba(255, 255, 255, 0.11) 61%,
    rgba(0, 0, 0, 0.30) 77%,
    rgba(255, 255, 255, 0.18) 92%,
    rgba(255, 255, 255, 0.36) 100%
  );
}

/* body slabs: front chamfer -> flat side -> back chamfer */
.body i:nth-child(1){transform:translateZ(15.76px);background-color:rgb(229,232,240)}
.body i:nth-child(2){transform:translateZ(14.67px);background-color:rgb(180,183,189)}
.body i:nth-child(3){transform:translateZ(13.58px);background-color:rgb(114,116,120)}
.body i:nth-child(4){transform:translateZ(12.50px);background-color:rgb(96,97,101)}
.body i:nth-child(5){transform:translateZ(11.41px);background-color:rgb(88,89,92)}
.body i:nth-child(6){transform:translateZ(10.32px);background-color:rgb(80,81,84)}
.body i:nth-child(7){transform:translateZ(9.24px);background-color:rgb(72,73,76)}
.body i:nth-child(8){transform:translateZ(8.15px);background-color:rgb(64,65,67)}
.body i:nth-child(9){transform:translateZ(7.06px);background-color:rgb(56,57,59)}
.body i:nth-child(10){transform:translateZ(5.98px);background-color:rgb(69,70,73)}
.body i:nth-child(11){transform:translateZ(4.89px);background-color:rgb(85,86,89)}
.body i:nth-child(12){transform:translateZ(3.80px);background-color:rgb(101,102,106)}
.body i:nth-child(13){transform:translateZ(2.72px);background-color:rgb(112,114,118)}
.body i:nth-child(14){transform:translateZ(1.63px);background-color:rgb(118,120,124)}
.body i:nth-child(15){transform:translateZ(0.54px);background-color:rgb(123,125,130)}
.body i:nth-child(16){transform:translateZ(-0.54px);background-color:rgb(119,121,125)}
.body i:nth-child(17){transform:translateZ(-1.63px);background-color:rgb(106,107,111)}
.body i:nth-child(18){transform:translateZ(-2.72px);background-color:rgb(92,94,97)}
.body i:nth-child(19){transform:translateZ(-3.80px);background-color:rgb(82,84,87)}
.body i:nth-child(20){transform:translateZ(-4.89px);background-color:rgb(75,76,79)}
.body i:nth-child(21){transform:translateZ(-5.98px);background-color:rgb(68,69,71)}
.body i:nth-child(22){transform:translateZ(-7.06px);background-color:rgb(61,62,64)}
.body i:nth-child(23){transform:translateZ(-8.15px);background-color:rgb(54,55,56)}
.body i:nth-child(24){transform:translateZ(-9.24px);background-color:rgb(51,52,53)}
.body i:nth-child(25){transform:translateZ(-10.32px);background-color:rgb(55,56,58)}
.body i:nth-child(26){transform:translateZ(-11.41px);background-color:rgb(59,60,62)}
.body i:nth-child(27){transform:translateZ(-12.50px);background-color:rgb(92,94,97)}
.body i:nth-child(28){transform:translateZ(-13.58px);background-color:rgb(157,159,165)}
.body i:nth-child(29){transform:translateZ(-14.67px);background-color:rgb(195,198,205)}
.body i:nth-child(30){transform:translateZ(-15.76px);background-color:rgb(215,218,226)}

/* ---- camera plateau, standing proud of the back ---- */

.plate {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  transform-style: preserve-3d;
}
.plate i {
  position: absolute;
  inset: 0;
  border-radius: 48px 48px 17px 17px;
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.26),
    rgba(0, 0, 0, 0.22) 40%,
    rgba(255, 255, 255, 0.12) 74%,
    rgba(0, 0, 0, 0.24)
  );
}

/* plateau slabs, raised off the back panel */
.plate i:nth-child(1){transform:translateZ(-16.52px);background-color:rgb(114,118,126)}
.plate i:nth-child(2){transform:translateZ(-16.87px);background-color:rgb(108,112,119)}
.plate i:nth-child(3){transform:translateZ(-17.23px);background-color:rgb(102,105,113)}
.plate i:nth-child(4){transform:translateZ(-17.58px);background-color:rgb(96,99,106)}
.plate i:nth-child(5){transform:translateZ(-17.94px);background-color:rgb(90,92,99)}
.plate i:nth-child(6){transform:translateZ(-18.29px);background-color:rgb(83,86,92)}
.plate i:nth-child(7){transform:translateZ(-18.64px);background-color:rgb(77,80,85)}
.plate i:nth-child(8){transform:translateZ(-19.00px);background-color:rgb(71,73,78)}
.plate i:nth-child(9){transform:translateZ(-19.35px);background-color:rgb(65,67,71)}
.plate i:nth-child(10){transform:translateZ(-19.71px);background-color:rgb(59,60,65)}
.plate i:nth-child(11){transform:translateZ(-20.06px);background-color:rgb(52,54,58)}

.plate .top {
  position: absolute;
  inset: 0;
  border-radius: 48px 48px 17px 17px;
  transform: rotateY(180deg) translateZ(20.24px);
  backface-visibility: hidden;
  background:
    linear-gradient(168deg, rgba(255, 255, 255, 0.13), transparent 38%),
    linear-gradient(160deg, rgb(92, 100, 114), rgb(44, 51, 62) 56%, rgb(66, 74, 87));
  box-shadow: inset 0 0.8px 0 rgba(255, 255, 255, 0.42);
}

/* Lens: a machined ring around a deep, near-black well.  The glass is
   flat and dark - a centred highlight reads as a glass marble, which is
   exactly what a real lens does not look like. */
.lens {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(152deg, rgb(160, 168, 180) 0%, rgb(98, 106, 118) 34%, rgb(52, 58, 68) 62%, rgb(120, 128, 140) 100%);
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.72),
    inset 0 0 0 0.9px rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
}
.lens::after {
  content: "";
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 46%, #05070c 58%, rgba(14, 26, 42, 0.9) 82%, rgb(6, 12, 20) 100%),
    #04060a;
  box-shadow:
    inset 0 0 0 1.6px rgba(0, 0, 0, 0.95),
    inset 0 3.5px 7px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}
/* the coating, seen only as a thin tinted arc on the rim */
.lens b {
  position: absolute;
  inset: 7.5px;
  border-radius: 50%;
  background: conic-gradient(
    from 186deg,
    rgba(126, 196, 255, 0.4) 0deg,
    rgba(90, 150, 220, 0.1) 34deg,
    transparent 78deg,
    transparent 250deg,
    rgba(150, 122, 240, 0.18) 306deg,
    rgba(126, 196, 255, 0.4) 360deg
  );
  -webkit-mask: radial-gradient(circle, transparent 66%, #000 73%);
  mask: radial-gradient(circle, transparent 66%, #000 73%);
  pointer-events: none;
}
.lens.l1 { left: 17px; top: 7px; }
.lens.l2 { left: 17px; top: 50px; }
.lens.l3 { left: 61px; top: 28.5px; }

.flash, .lidar, .mic {
  position: absolute;
  border-radius: 50%;
  left: 121px;
}
.flash {
  top: 22px; width: 14px; height: 14px;
  background: radial-gradient(circle at 40% 34%, rgb(255, 248, 228), rgb(198, 176, 132) 56%, rgb(88, 76, 56));
  box-shadow: 0 0 7px rgba(255, 240, 205, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.lidar {
  top: 45px; width: 12px; height: 12px;
  background: radial-gradient(circle at 36% 30%, rgb(78, 90, 102), rgb(10, 14, 20) 60%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.mic { top: 68px; width: 6px; height: 6px; background: rgb(16, 20, 26); }

/* ---- faces ---- */

.face {
  position: absolute;
  inset: 0;
  clip-path: var(--sq-body);
  backface-visibility: hidden;
}

/* The rim is only 1.4 mm wide, so a conic sweep across the whole face
   shows up purely as light travelling around the frame. */
.face.front {
  transform: translateZ(16.3px);
  background: conic-gradient(
    from 198deg at 50% 50%,
    rgb(236, 240, 247) 0deg,
    rgb(128, 136, 150) 38deg,
    rgb(52, 58, 70) 92deg,
    rgb(158, 166, 180) 148deg,
    rgb(232, 237, 245) 184deg,
    rgb(112, 120, 134) 230deg,
    rgb(42, 48, 60) 286deg,
    rgb(176, 184, 198) 334deg,
    rgb(236, 240, 247) 360deg
  );
  box-shadow: inset 0 0 0 0.8px rgba(255, 255, 255, 0.55);
}

/* black glass border, lit faintly by the panel it surrounds */
.face.front::before {
  content: "";
  position: absolute;
  inset: 5.2px;
  clip-path: var(--sq-bezel);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), transparent 24%),
    #05070c;
  box-shadow:
    inset 0 0 0 0.8px rgba(255, 255, 255, 0.18),
    inset 0 0 13px rgba(78, 140, 200, 0.28);
}

.screen {
  position: absolute;
  inset: 9.9px;
  clip-path: var(--sq-screen);
  overflow: hidden;
  background: #04060a;
}

.screen .shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* static reflection: the room, plus the curve of the glass at the edge */
.glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(126deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.04) 14%, transparent 32%),
    radial-gradient(ellipse 120% 60% at 50% 108%, rgba(255, 255, 255, 0.06), transparent 60%);
  box-shadow:
    inset 0 0 0 0.8px rgba(255, 255, 255, 0.08),
    inset 0 0 20px rgba(0, 0, 0, 0.55);
}

/* moving specular: travels across the glass while the device turns */
.sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    104deg,
    transparent 33%,
    rgba(255, 255, 255, 0.09) 42%,
    rgba(255, 255, 255, 0.2) 47%,
    rgba(255, 255, 255, 0.05) 53%,
    transparent 63%
  );
  background-size: 260% 100%;
  animation: sweep 15s ease-in-out infinite;
}
@keyframes sweep {
  0%   { background-position: 78% 0; }
  50%  { background-position: 16% 0; }
  100% { background-position: 78% 0; }
}

.island {
  position: absolute;
  top: 16.7px;
  left: 50%;
  width: 77.5px;
  height: 22.8px;
  margin-left: -38.75px;
  border-radius: 999px;
  background: #000;
  box-shadow: inset 0 0 0 0.7px rgba(255, 255, 255, 0.07);
}
.island::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8.4px;
  height: 8.4px;
  margin-top: -4.2px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, rgba(64, 104, 132, 0.75), rgba(8, 16, 24, 0.96) 56%, #000 100%);
}

/* ---- back panel: one anodised shell, no stickers ---- */

.face.back {
  transform: rotateY(180deg) translateZ(16.3px);
  background:
    radial-gradient(ellipse 84% 42% at 26% 8%, rgba(255, 255, 255, 0.17), transparent 58%),
    linear-gradient(158deg,
      rgb(124, 133, 147) 0%,
      rgb(84, 92, 105) 22%,
      rgb(56, 63, 75) 52%,
      rgb(74, 82, 95) 76%,
      rgb(122, 131, 145) 100%);
  box-shadow:
    inset 0 0 0 0.8px rgba(255, 255, 255, 0.52),
    inset 0 0 44px rgba(0, 0, 0, 0.34);
}

/* contact shadow the raised plateau drops onto the shell */
.face.back::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100px;
  height: 20px;
  border-radius: 0 0 17px 17px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.52), transparent);
  pointer-events: none;
}

/* the shell catches the same moving highlight as the glass */
.gloss {
  position: absolute;
  inset: 0;
  clip-path: var(--sq-body);
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 43%,
    rgba(255, 255, 255, 0.19) 47.5%,
    rgba(255, 255, 255, 0.05) 53%,
    transparent 66%
  );
  background-size: 280% 100%;
  animation: sweep 15s ease-in-out infinite;
}

.mark {
  position: absolute;
  left: 50%;
  top: 268px;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  background: linear-gradient(135deg, rgb(74, 130, 205), rgb(40, 92, 160));
  transform: rotate(45deg);
  border-radius: 2.5px;
  box-shadow:
    inset 0 1px 1.5px rgba(0, 0, 0, 0.55),
    0 0.7px 0 rgba(255, 255, 255, 0.16);
}

.backword {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  text-align: center;
  font-family: var(--display);
  font-weight: 400;
  font-size: 7px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}

/* ---- side keys ---- */

.k {
  position: absolute;
  left: 50%;
  width: 15px;
  margin-left: -7.5px;
  border-radius: 2.5px;
  /* same alloy as the rail it sits in - only the seam should give it away */
  background: linear-gradient(to right, rgb(42, 48, 58), rgb(104, 112, 124) 26%, rgb(66, 73, 85) 62%, rgb(36, 42, 52));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.62),
    inset 0 0.9px 0 rgba(255, 255, 255, 0.26),
    inset 0 -0.9px 0 rgba(0, 0, 0, 0.5);
}
.k.action { top: 100px; height: 30px; transform: translateX(-134.4px) rotateY(-90deg); }
.k.volup  { top: 156px; height: 47px; transform: translateX(-134.4px) rotateY(-90deg); }
.k.voldn  { top: 213px; height: 47px; transform: translateX(-134.4px) rotateY(-90deg); }
.k.power  { top: 168px; height: 76px; transform: translateX(134.4px)  rotateY(90deg); }
.k.camctl {
  top: 300px; height: 38px;
  transform: translateX(134.4px) rotateY(90deg);
  background: linear-gradient(to right, rgb(40, 46, 56), rgb(92, 100, 112) 26%, rgb(24, 30, 40) 68%, rgb(40, 47, 58));
}

/* antenna slots crossing the rails */
.ant {
  position: absolute;
  left: 50%;
  width: 15px;
  height: 2.4px;
  margin-left: -7.5px;
  background: rgba(16, 20, 28, 0.5);
  box-shadow: 0 -0.6px 0 rgba(255, 255, 255, 0.16), 0 0.6px 0 rgba(255, 255, 255, 0.1);
}
.ant.a1 { top: 50px;  transform: translateX(-134.3px) rotateY(-90deg); }
.ant.a2 { top: 506px; transform: translateX(-134.3px) rotateY(-90deg); }
.ant.a3 { top: 50px;  transform: translateX(134.3px)  rotateY(90deg); }
.ant.a4 { top: 506px; transform: translateX(134.3px)  rotateY(90deg); }

/* ---- bottom edge: speakers and the port ----
   The stage tips the device 3 degrees back, so this face is the one
   that catches the eye at the base. */

.edge {
  position: absolute;
  left: 36px;
  right: 36px;
  top: 50%;
  height: 32.6px;
  margin-top: -16.3px;
  transform: translateY(279px) rotateX(-90deg);
  background: linear-gradient(
    to bottom,
    rgb(212, 218, 228) 0%,
    rgb(96, 104, 117) 14%,
    rgb(54, 61, 73) 44%,
    rgb(72, 80, 93) 74%,
    rgb(176, 184, 197) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.grille {
  width: 44px;
  height: 4.8px;
  background-image: radial-gradient(circle closest-side, rgba(6, 8, 12, 0.92) 78%, transparent 82%);
  background-size: 7.4px 4.8px;
  background-repeat: repeat-x;
}

.usbc {
  position: relative;
  width: 31px;
  height: 9px;
  border-radius: 4.5px;
  background: linear-gradient(to bottom, rgb(18, 22, 29), rgb(6, 8, 12) 55%, rgb(30, 36, 45));
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.85),
    inset 0 1.4px 2px rgba(0, 0, 0, 0.9),
    0 0 0 0.8px rgba(255, 255, 255, 0.12);
}
/* the connector tongue inside the port */
.usbc::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 21px;
  height: 2.6px;
  margin: -1.3px 0 0 -10.5px;
  border-radius: 1.3px;
  background: rgb(58, 66, 78);
}

/* ---- caption ---- */

.stage.paused .phone,
.stage.paused .phone-float,
.stage.paused .phone-shade,
.stage.paused .sweep,
.stage.paused .gloss { animation-play-state: paused; }

.stage-caption {
  position: absolute;
  left: -80px;
  right: -80px;
  bottom: 0;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  white-space: nowrap;
}
@media (max-width: 460px) { .stage-caption { left: -46px; right: -46px; } }

.stage-caption img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.stage-caption b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stage-caption span {
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: #ffffff;
}

/* ---------- Sections ---------- */

section {
  padding: 44px 0;
  scroll-margin-top: 82px;
}

.section-tag {
  font-family: var(--display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--steel-3);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
/* Iris diamond: the one place the app lets blue survive */
.section-tag::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--iris);
  transform: rotate(45deg);
  flex: none;
}
/* a hairline runs from the label to the margin, like a technical drawing */
.section-tag::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(var(--cream), 0.2), transparent);
}

/* ---------- App cards ---------- */

.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .apps { grid-template-columns: 1fr; } }

.app {
  position: relative;
  border-radius: 24px;
  border: 1px solid var(--rim);
  background: var(--card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 28px 26px 26px;
  display: flex;
  flex-direction: column;
  /* a hairline of light along the top edge is what makes glass read as glass */
  box-shadow: inset 0 1px 0 rgba(var(--cream), 0.07);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.app:hover { transform: translateY(-3px); border-color: var(--rim-strong); }

/* SnackScore just shipped: it wears the neon blue rim the app reserves
   for the headline offer. */
.app.neon { border-color: transparent; }
.app.neon::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: 25px;
  padding: 1.5px;
  background: var(--neon-blue);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.app.neon:hover { border-color: transparent; }

.app-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  display: block;
  transition: transform 0.18s ease;
}
.app:hover .app-icon { transform: translateY(-2px); }

.app .tag {
  font-family: var(--display);
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel-3);
}

.app h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.app > p { color: var(--steel-2); font-size: 15.5px; flex: 1; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  margin: 20px 0 18px;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.status.live::before { background: var(--live); }
.status.dev { color: var(--steel-3); }
.status.dev::before { background: var(--steel-3); }

.app-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.store-pill {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--cream-fill);
  border-radius: 999px;
  padding: 10px 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.store-pill:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(var(--cream), 0.18); }

.site-link {
  font-size: 14.5px;
  color: var(--steel-2);
  text-decoration: none;
}
.site-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

/* A card lifts out of the aurora rather than just lightening its rim. */
.app::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse 70% 50% at 18% 0%, rgba(46, 143, 255, 0.10), transparent 62%);
  transition: opacity 0.22s ease;
}
.app:hover::after { opacity: 1; }
.app:hover { box-shadow: inset 0 1px 0 rgba(var(--cream), 0.07), 0 18px 44px rgba(0, 0, 0, 0.42); }

/* ---------- Scroll reveal (only when JS is present) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.66s cubic-bezier(0.22, 1, 0.36, 1), transform 0.66s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.s1 { transition-delay: 0.07s; }
.js .reveal.s2 { transition-delay: 0.14s; }
.js .reveal.s3 { transition-delay: 0.21s; }

/* ---------- Doctrine strip ---------- */

.doctrine-head {
  margin-bottom: 24px;
}

.doctrine-head .section-tag {
  margin-bottom: 8px;
}

.doctrine-head > p:last-child {
  color: var(--steel-2);
  font-size: 15px;
}

.doctrine {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.principle {
  position: relative;
  min-height: 248px;
  padding: 27px 26px 24px;
  border: 1px solid var(--rim);
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(19, 25, 36, 0.78), rgba(5, 7, 11, 0.9)),
    var(--card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.principle:hover {
  transform: translateY(-3px);
  border-color: var(--rim-strong);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
}

/* each rule carries its numeral as an oversized ghost in the corner,
   clipped by the card edge */
.principle::after {
  content: "01";
  position: absolute;
  right: 18px;
  bottom: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 96px;
  line-height: 1;
  color: rgba(var(--cream), 0.05);
  pointer-events: none;
  transition: color 0.22s ease;
}
.principle.s1::after { content: "02"; }
.principle.s2::after { content: "03"; }
.principle:hover::after { color: rgba(var(--cream), 0.09); }

@media (max-width: 800px) {
  .doctrine { grid-template-columns: 1fr; }
  .principle { min-height: 0; }
}

.principle-index {
  margin-bottom: 28px;
  color: rgb(111, 174, 255);
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.18em;
}

.principle h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 11px;
}

.principle > p {
  color: var(--steel-2);
  font-size: 15px;
  line-height: 1.68;
}

.principle-proof {
  margin-top: auto;
  padding-top: 24px;
  color: var(--steel-3);
  font-family: var(--display);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.principle-proof::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--iris);
  transform: rotate(45deg);
}

/* ---------- Contact ---------- */

.contact {
  border: 1px solid var(--rim);
  border-radius: 24px;
  background: var(--card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 46px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
@media (max-width: 600px) { .contact { padding: 34px 26px; } }

.contact h2,
.contact h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.contact p { color: var(--steel-2); max-width: 34em; }
.contact .cta-row { margin-top: 0; }

/* ---------- Footer ---------- */

footer.site {
  margin-top: 60px;
  border-top: 1px solid var(--rim-hairline);
  padding: 40px 0 52px;
  font-size: 14.5px;
  color: var(--steel-3);
}

.foot-grid { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
footer.site a { color: var(--steel-2); text-decoration: none; font-size: 14.5px; }
footer.site a:hover { color: var(--text); }

.footer-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  text-align: right;
}

.model-credit {
  color: rgba(190, 201, 218, 0.62);
  font-size: 10.5px;
  line-height: 1.45;
}

.model-credit a {
  color: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(190, 201, 218, 0.28);
  text-underline-offset: 3px;
}

@media (max-width: 700px) {
  .footer-meta {
    justify-items: start;
    text-align: left;
  }
}

/* ---------- 404 doc ---------- */

.doc { max-width: 720px; margin-inline: auto; padding: 90px 0; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin-bottom: 16px; }
.doc p { color: var(--steel-2); margin-bottom: 28px; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--iris);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- App subpages (/brickbyte/) ---------- */

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 300px));
  gap: 26px;
  justify-content: center;
  padding: 6px 0 10px;
}
@media (max-width: 640px) { .shots { grid-template-columns: minmax(0, 280px); } }

.shot { margin: 0; }
/* Device-framed store shots: the frame is baked into the image, so no card
   chrome - the radius clips the black corners outside the bezel. */
.shot img { display: block; width: 100%; height: auto; border-radius: 46px; }

.hero .status { margin: 0; }

.doc .updated {
  font-family: var(--display);
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--steel-3);
  margin-bottom: 36px;
}

.doc h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 36px 0 10px;
}

.doc ul { margin: 0 0 24px 22px; color: var(--steel-2); }
.doc li { margin-bottom: 8px; }

.doc a { color: var(--text); text-underline-offset: 4px; }

/* ---------- Santrix (/santrix/app, unlisted) ----------
   Santrix swaps the site's iris accent for the app's vivid green.
   Everything else on the page is the shared system. */

.santrix .section-tag::before { background: rgb(46, 224, 107); }
.santrix .status.soon::before { background: rgb(46, 224, 107); }

/* The hero centerpiece: the app's onboarding ECG trace, drawing itself
   on a loop. pathLength normalises both paths to 1000, so the dash
   animation is independent of the real path geometry. */

.santrix .ecg {
  display: block;
  width: 100%;
  height: clamp(72px, 11vw, 116px);
  margin-top: 46px;
}

.santrix .ecg .ghost {
  fill: none;
  stroke: rgba(46, 224, 107, 0.14);
  stroke-width: 2;
}

.santrix .ecg .trace {
  fill: none;
  stroke: rgb(46, 224, 107);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: ecg-draw 7s linear infinite;
}

@keyframes ecg-draw {
  0%   { stroke-dashoffset: 1000; }  /* hidden, about to draw */
  58%  { stroke-dashoffset: 0; }     /* fully drawn */
  76%  { stroke-dashoffset: 0; }     /* hold the beat */
  100% { stroke-dashoffset: -1000; } /* trace runs off ahead */
}

@media (prefers-reduced-motion: reduce) {
  .santrix .ecg .trace { animation: none !important; stroke-dashoffset: 0; }
}

/* Feature lines: short and flat, each opening with a blip of the trace. */

.santrix .feat {
  list-style: none;
  display: grid;
  gap: 16px;
  max-width: 640px;
}

.santrix .feat li { display: flex; align-items: baseline; gap: 16px; }

.santrix .feat li::before {
  content: "";
  flex: none;
  align-self: center;
  width: 20px;
  height: 2.5px;
  background: rgb(46, 224, 107);
}

.santrix .feat b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.santrix .feat span { color: var(--steel-2); font-size: 15.5px; }

/* Shared Santrix panel: the same rounded glass rect the contact card wears. */

.santrix .panel {
  border: 1px solid var(--rim);
  border-radius: 24px;
  background: var(--card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.santrix .feat-panel { padding: 36px 34px; }
@media (max-width: 600px) { .santrix .feat-panel { padding: 28px 24px; } }

/* At a glance: two app-look vignettes built in the site's own language -
   the Today goal ring and a beat of the Ask surface. Pure CSS + SVG. */

.santrix .glance {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 22px;
}
@media (max-width: 680px) { .santrix .glance { grid-template-columns: 1fr; } }

.santrix .glance-ring {
  padding: 34px 28px;
  display: grid;
  place-items: center;
}

.santrix .ring { width: clamp(150px, 17vw, 188px); display: block; }

.santrix .ring .track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 9;
}

.santrix .ring .fill {
  fill: none;
  stroke: rgb(46, 224, 107);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 28; /* 72% of the day done */
  animation: ring-fill 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

@keyframes ring-fill { from { stroke-dashoffset: 100; } }

@media (prefers-reduced-motion: reduce) {
  .santrix .ring .fill { animation: none !important; }
}

.santrix .ring-num {
  fill: #ffffff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: 0.02em;
}

.santrix .ring-label {
  fill: #ffffff;
  font-family: var(--display);
  font-weight: 400;
  font-size: 8.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.santrix .glance-chat {
  padding: 32px 30px;
  display: grid;
  align-content: center;
}

.santrix .bubble {
  width: fit-content;
  margin-left: auto;
  background: var(--cta-grad);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 600;
}

.santrix .answer { margin-top: 18px; display: grid; gap: 11px; }

.santrix .answer .row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.santrix .tick { flex: none; width: 20px; height: 6px; border-radius: 999px; }
.santrix .tick.good { background: rgb(46, 224, 107); }
.santrix .tick.warn { background: rgb(255, 125, 107); }

/* ================================================================
   Home, the Apple way. The space scene and the device are untouched;
   everything typographic around them switches to the system it was
   always sitting next to: SF system type in sentence case, materials
   instead of outlines, one blue for every action, and no ornament.
   Scoped to body.apple so the subpages keep the original language.
   ================================================================ */

body.apple { color: #ffffff; }

/* --- nav: slim translucent bar --- */

body.apple header.site {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  background: rgba(2, 3, 6, 0.72);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body.apple main { padding-top: 58px; }
body.apple .nav { width: 100%; max-width: none; padding: 12px 22px; }
body.apple .nav-apps { display: flex; gap: 12px; margin-inline: auto; }
body.apple .nav-right { margin-left: 0; gap: 26px; }

/* app links ride in liquid-glass lenses, each in its app's colour:
   specular rim on top, faint catch below, real blur behind */
body.apple .nav-apps .nav-link {
  position: relative;
  overflow: hidden;
  padding: 8px 16px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.3),
    inset 0 -1px 1.5px rgba(255, 255, 255, 0.09),
    inset 0 0 0 0.6px rgba(255, 255, 255, 0.14),
    0 5px 14px rgba(0, 0, 0, 0.4);
  font-size: 13px;
  line-height: 1.2;
  transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.5, 1), background 0.18s ease;
}
body.apple .nav-apps .nav-link:hover { transform: scale(1.12); }
body.apple .nav-apps .nav-link::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 1.5px;
  height: 45%;
  border-radius: 980px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  pointer-events: none;
}
body.apple .nav-apps .nav-link:hover { background: rgba(255, 255, 255, 0.13); }
body.apple .nav-apps .nl-lux { color: rgb(100, 210, 255); }
body.apple .nav-apps .nl-snack { color: rgb(48, 209, 88); }
body.apple .nav-apps .nl-terix { color: rgb(64, 156, 255); }
body.apple .nav-apps .nl-brick { color: rgb(255, 159, 10); }
body.apple .nav-apps .nl-lux:hover { color: rgb(100, 210, 255); }
body.apple .nav-apps .nl-snack:hover { color: rgb(48, 209, 88); }
body.apple .nav-apps .nl-terix:hover { color: rgb(64, 156, 255); }
body.apple .nav-apps .nl-brick:hover { color: rgb(255, 159, 10); }
@media (max-width: 900px) {
  body.apple .nav-apps { display: none; }
  body.apple .nav-right { margin-left: auto; }
}
body.apple .wordmark {
  font-family: var(--body);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-transform: none;
}
body.apple .wordmark span { color: #ffffff; }
body.apple .nav-link { font-size: 13px; color: #ffffff; }
body.apple .nav-link:hover { color: #ffffff; }

/* --- hero type: big, tight, sentence case; keeps the titanium fill --- */

body.apple .cta-row { gap: 12px; margin-top: 34px; }

/* --- actions: one filled blue button, blue chevron links elsewhere --- */

.abtn {
  display: inline-block;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.2;
  padding: 12px 22px;
  border-radius: 980px;
  color: #ffffff;
  background: #0071e3;
  text-decoration: none;
  transition: background 0.15s ease;
}
.abtn:hover { background: #0077ed; }

.abtn.light { background: #ffffff; color: #000000; }
.abtn.light:hover { background: #f5f5f7; }

.alink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--body);
  font-size: 17px;
  color: #2997ff;
  text-decoration: none;
}
.alink:hover { text-decoration: underline; text-underline-offset: 3px; }
.alink .chev { font-size: 19px; line-height: 1; transform: translateY(-1px); }

/* --- section headers --- */

body.apple section { padding: 52px 0; }

.sec-h {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 34px;
}

/* --- app tiles: material, not outline --- */

#apps .sec-h { text-align: center; }

.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 900px) { .tile-grid { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  border-radius: 28px;
  background: rgba(6, 8, 13, 0.44);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 36px 34px 32px;
  display: flex;
  flex-direction: column;
}

.tile-icon { width: 72px; height: 72px; border-radius: 17px; display: block; margin-bottom: 22px; }

.tile-new {
  position: absolute;
  top: 38px;
  right: 34px;
  font-size: 13px;
  font-weight: 600;
  color: rgb(255, 149, 0);
}

.tile h3 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}

.tile-cat { font-size: 14px; color: #ffffff; margin: 2px 0 14px; }

.tile-copy { font-size: 15.5px; line-height: 1.6; color: #ffffff; flex: 1; margin-bottom: 24px; }

.tile-links { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.tile .alink { font-size: 16px; }
.tile-soon { font-size: 15px; color: #ffffff; }

/* --- the three rules: bold lead-ins, no boxes --- */

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 800px) { .values { grid-template-columns: 1fr; } }

.values p {
  border-radius: 28px;
  background: rgba(6, 8, 13, 0.44);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 30px 28px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #ffffff;
}
.values b {
  display: block;
  color: #ffffff;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

/* --- contact --- */

.contact-v3 .sec-h { margin-bottom: 10px; }
.contact-copy { font-size: 17px; color: #ffffff; margin-bottom: 24px; }
.contact-v3 .cta-row { margin-top: 0; }

/* --- footer: hairline and small print --- */

body.apple footer.site {
  margin-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 28px 0 44px;
  font-size: 12px;
  color: #ffffff;
}
body.apple footer.site a { font-size: 12px; color: #ffffff; }
body.apple footer.site a:hover { color: #ffffff; }
body.apple .model-credit { color: #ffffff; font-size: 10.5px; }
body.apple .model-credit a { font-size: inherit; }

body.apple a:focus-visible, body.apple .abtn:focus-visible {
  outline: 2px solid #2997ff;
  outline-offset: 3px;
}
