/* Silver iPhone 17 Pro illustration. Dimensions use a 270 × 560 local plane.
   32 px chassis depth; full-width camera plateau; inset ceramic back.
   Reference: Apple's iPhone 17 Pro product page and dimensional drawings.
   Lighting variables are written by landing.mjs every frame:
   --light-x  key-light position across the back (%)
   --edge-l / --edge-r / --edge-t   lit colour of each side of the frame
   (the rear keeps its original static finish; it only uses --light-x) */
.site-header {
  justify-content: flex-end;
}
.device-stage {
  height: 100svh;
  bottom: auto;
  perspective: 1600px;
  animation: stage-in 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes stage-in {
  from {
    opacity: 0;
  }
}
.phone-model,
.phone-chassis {
  transform-style: preserve-3d;
}
.phone-model {
  --edge-l: #c9cdd2;
  --edge-r: #c9cdd2;
  --edge-t: #d4d8dc;

}
.phone-chassis {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Slices sit 1 px inside the side planes so they only shape the corners and
   never z-fight with the straight edges (that was the striped rim). They keep
   a fixed colour: 16 full-size layers repainting on every rotation step was
   the main cost on phones, and only their rounded corners ever show. */
.chassis-slice {
  position: absolute;
  inset: 1px;
  border-radius: 43px;
  transform: translateZ(var(--z));
  background: #b3b8be;
  border: 0;
  backface-visibility: visible;
}

/* Front: thin anodised rim and black bezel. */
.iphone {
  transform: translateZ(16px);
  padding: 3px;
  border-radius: 44px;
  border: 0;
  background:
    linear-gradient(
      var(--rim-angle, 135deg),
      #ffffff 0%,
      #aeb4bb 12%,
      #e8ebee 26%,
      #8e959d 52%,
      #dfe3e7 74%,
      #a1a8b0 100%
    );
  box-shadow:
    0 0 0 0.5px #eef1f4,
    inset 0 0 0 0.5px #ffffffc0,
    inset 0 0 0 1.5px #7f868e55;
  isolation: auto;
}
/* Chromium only (.hires-screen, set by landing.mjs): the screen is its own 3D
   layer drawn at 2x and scaled back down. Chromium rasterises
   perspective-transformed layers at a fallback scale, so without this the
   screenshots were painted at ~1x and upscaled (blurry text). */
.hires-screen .iphone {
  transform-style: preserve-3d;
}
.hires-screen .phone-screen {
  zoom: 2;
  width: 264px;
  height: 554px;
  transform-origin: 0 0;
  transform: translateZ(0.2px) scale(0.5);
}
.phone-screen {
  border: 4.5px solid #000;
  border-radius: 41px;
  box-shadow:
    0 0 0 0.5px #2a2c30,
    inset 0 0 0 0.5px #1a1b1e;
  position: relative;
  background: #000;
}
.screen-power {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  pointer-events: none;
}
/* Power-on: the display wakes from black as the stage fades in. */
.screen-power {
  z-index: 7;
  background: #000;
  animation: screen-on 1.1s 0.55s ease-out both;
}
@keyframes screen-on {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
.phone-screen:after {
  content: none;
}
@media (prefers-reduced-motion: reduce) {
  .screen-power {
    display: none;
  }
}
.dynamic-island,
.hw-island {
  width: 76px;
  height: 22px;
}
.hw-island {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  background: #000;
  border-radius: 20px;
  box-shadow: inset 0 0 0 0.5px #17181c;
}
.dynamic-island:after,
.hw-island:after {
  content: "";
  position: absolute;
  right: 8px;
  top: 6px;
  width: 9px;
  height: 9px;
  background: radial-gradient(
    circle at 35% 35%,
    #2b4a86 0%,
    #111626 32%,
    #050608 66%
  );
  border: 1px solid #0d0f18;
  border-radius: 50%;
}

/* Rear: original silver back (plateau, ceramic panel, lenses). */
.phone-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg) translateZ(16px);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 44px;
  background:
    radial-gradient(ellipse at var(--light-x, 50%) 0%, #fff9, transparent 65%),
    linear-gradient(155deg, #d9dce0, #bfc3c8 40%, #d8dbe0 80%, #b7bcc3);
  border: 1px solid #f3f4f5;
  box-shadow:
    inset 0 0 0 2px #c4c8cf,
    inset -3px -4px 9px #727b8535;
}
.ceramic-panel {
  position: absolute;
  top: 171px;
  bottom: 18px;
  left: 17px;
  right: 17px;
  border-radius: 24px 24px 30px 30px;
  background: linear-gradient(
    125deg,
    #f4f3f2,
    #e9e8e6 43%,
    #f5f4f1 82%,
    #dfdfdf
  );
  border: 1px solid #aeb3ba88;
  box-shadow:
    0 1px 1px #fff9,
    inset 0 0 4px #fafafa;
  display: grid;
  place-items: center;
  overflow: hidden;
  backface-visibility: hidden;
}
.ceramic-panel:after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at var(--light-x, 50%) -10%,
    #fff9,
    transparent 70%
  );
  pointer-events: none;
}
.apple-mark {
  width: 64px;
  height: 64px;
  fill: #94999f;
  color: #94999f;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 0 #fff9);
  margin-top: -20px;
}
.camera-plate {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 14px;
  height: 140px;
  border-radius: 31px;
  background: radial-gradient(
    ellipse at var(--light-x, 30%) 0,
    #f9fafb,
    #d1d5da 47%,
    #bac0c7
  );
  border: 1px solid #f3f5f8;
  box-shadow:
    0 1px 0 #9ba2ab,
    0 2px 0 #b2b8bf,
    0 3px 0 #858e97,
    0 4px 0 #bdc3ca,
    1px 8px 10px #4a515943,
    inset 0 1px 3px #fff;
  transform: translateZ(4px);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.lens {
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: conic-gradient(
    from 30deg,
    #eef2f7,
    #9199a3 12%,
    #e5e9ec 28%,
    #7f8790 49%,
    #f2f4f6 73%,
    #a9b2bc 88%,
    #edf0f4
  );
  border: 1px solid #727b86;
  box-shadow:
    0 1px 0 #f8faff,
    0 2px 0 #7b8590,
    0 3px 0 #d9e0e7,
    0 4px 0 #8a949e,
    1px 6px 7px #24283080,
    inset 0 0 0 2px #e0e4e9;
  transform: translateZ(6px);
  display: grid;
  place-items: center;
  backface-visibility: hidden;
}
.lens-main {
  top: 7px;
  left: 9px;
}
.lens-wide {
  bottom: 7px;
  left: 9px;
}
.lens-tele {
  top: 38px;
  left: 78px;
}
.lens-glass {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #101317;
  background:
    radial-gradient(
      ellipse at 31% 24%,
      #9cb4de77 0%,
      #4776a522 10%,
      transparent 26%
    ),
    radial-gradient(ellipse at 67% 74%, #5772bf55, transparent 20%),
    radial-gradient(
      circle,
      #03050c 0 13%,
      #202a4133 14% 20%,
      #070c1488 21% 27%,
      #233144 29% 31%,
      #0c1220 33% 39%,
      #171c22 40% 48%,
      #07090d 50% 63%,
      #333a43 65% 67%,
      #101419 70%
    );
  box-shadow:
    inset 0 0 0 2px #050609,
    inset 0 1px 3px #8facc02b;
  position: relative;
}
.lens-glass:before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid #4d567b66;
  background: radial-gradient(circle at 45% 38%, #4e547244, #030612 64%);
  box-shadow: 0 0 3px #000;
}
.lens-glass:after {
  content: "";
  position: absolute;
  top: 7px;
  left: 10px;
  width: 16px;
  height: 7px;
  transform: rotate(-35deg);
  border-radius: 50%;
  background: linear-gradient(90deg, #b5cbea66, #4c72a811);
  filter: blur(0.5px);
}
.lens-tele .lens-glass:before {
  inset: 16px;
  border-radius: 5px;
  transform: rotate(12deg);
  border-color: #53687e88;
}
.lens-wide .lens-glass:before {
  inset: 16px;
  background: radial-gradient(circle, #11112b, #000);
}
.camera-flash {
  position: absolute;
  right: 27px;
  top: 19px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    #e7e0ce 0deg 45deg,
    #f8f2e7 45deg 90deg
  );
  border: 2px solid #c3c6c8;
  box-shadow:
    0 0 0 1px #a8aeb5,
    inset 0 0 0 2px #fffbf1;
  transform: translateZ(1px);
}
.camera-lidar {
  position: absolute;
  right: 27px;
  bottom: 20px;
  width: 24px;
  height: 24px;
  background: radial-gradient(
    circle at 35% 25%,
    #424449,
    #111318 55%,
    #272a2e 85%
  );
  border-radius: 50%;
  border: 2px solid #939ba5;
  box-shadow: 0 0 0 1px #c6cdd5;
}
.camera-mic {
  position: absolute;
  right: 36px;
  top: 65px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2b2d31;
  box-shadow:
    inset 0 1px 1px #000,
    0 0 0 1px #dbe0e6;
}

/* Frame sides: a base colour lit by the timeline plus a fixed brushed band. */
.phone-edge {
  backface-visibility: visible;
}
.edge-left,
.edge-right {
  width: 32px;
  height: 472px;
  top: 44px;
}
.edge-left {
  left: -16px;
  background:
    linear-gradient(
      90deg,
      #00000030,
      #ffffff00 22%,
      #ffffff55 48%,
      #ffffff00 74%,
      #00000030
    ),
    var(--edge-l);
}
.edge-right {
  right: -16px;
  background:
    linear-gradient(
      90deg,
      #00000030,
      #ffffff00 26%,
      #ffffff55 52%,
      #ffffff00 78%,
      #00000030
    ),
    var(--edge-r);
}
.edge-top,
.edge-bottom {
  height: 32px;
  width: 182px;
  left: 44px;
  background:
    linear-gradient(
      0deg,
      #00000030,
      #ffffff00 24%,
      #ffffff50 50%,
      #ffffff00 76%,
      #00000030
    ),
    var(--edge-t);
}
.edge-top {
  top: -16px;
}
.edge-bottom {
  bottom: -16px;
  filter: brightness(0.82);
}
.antenna {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: #9fa7b0;
  border-block: 1px solid #b8c0c9;
  opacity: 0.8;
}
.antenna-top {
  top: 12px;
}
.antenna-bottom {
  bottom: 12px;
}
.hardware-key {
  position: absolute;
  width: 13px;
  left: -7px;
  transform: rotateY(-90deg) translateZ(1.5px);
  border-radius: 5px;
  background:
    linear-gradient(90deg, #00000038, #ffffff66 45%, #00000020),
    var(--edge-l);
  border: 1px solid #9aa2ac;
  box-shadow: 0 0 0 1px #6e778288;
  backface-visibility: visible;
}
.action-key {
  height: 20px;
  top: 94px;
}
.volume-up {
  height: 39px;
  top: 139px;
}
.volume-down {
  height: 39px;
  top: 190px;
}
.power-key,
.camera-key {
  left: auto;
  right: -7px;
  transform: rotateY(90deg) translateZ(1.5px);
  background:
    linear-gradient(90deg, #00000038, #ffffff66 45%, #00000020),
    var(--edge-r);
}
.power-key {
  height: 58px;
  top: 155px;
}
.camera-key {
  height: 51px;
  top: 342px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 2px #b9c3ce88;
}
.usb-port {
  position: absolute;
  left: 72px;
  top: 10px;
  width: 38px;
  height: 12px;
  background: #15191e;
  border: 2px solid #818b95;
  border-radius: 5px;
  box-shadow:
    inset 0 1px 2px #000,
    0 1px 1px #fff9;
}
.usb-port:after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 4px;
  height: 2px;
  background: #59616a;
}
.speaker {
  position: absolute;
  top: 13px;
  width: 42px;
  height: 6px;
  background: radial-gradient(circle, #232931 0 2px, transparent 2.4px) 0 0/8px
    6px repeat-x;
}
.speaker-left {
  left: 12px;
}
.speaker-right {
  right: 12px;
}
.screw {
  position: absolute;
  top: 15px;
  width: 3px;
  height: 3px;
  background: #555f6b;
  border-radius: 50%;
}
.screw-left {
  left: 61px;
}
.screw-right {
  right: 61px;
}

/* Contact shadow: tightens when the phone is edge-on, softens as it rises. */
.phone-shadow {
  left: 50%;
  width: 150%;
  bottom: -70px;
  height: 46px;
  margin-left: -75%;
  background: radial-gradient(ellipse, #000000b0 0%, #0000 68%);
  filter: blur(10px);
  transform: scaleX(var(--shadow-w, 1));
  opacity: var(--shadow-o, 0.7);
}

/* Scene light: a soft key glow behind the phone, tinted per chapter. */
/* Set and transitioned on .ambient alone: an inherited property animating on
   <body> restyled the whole page on every frame of the fade. */
@property --glow {
  syntax: "<color>";
  inherits: false;
  initial-value: rgba(118, 99, 214, 0.16);
}
[data-scene="apps"] .ambient {
  --glow: rgba(150, 96, 230, 0.17);
}
[data-scene="dinero"] .ambient {
  --glow: rgba(206, 150, 64, 0.13);
}
[data-scene="mensajes"] .ambient {
  --glow: rgba(128, 112, 255, 0.17);
}
[data-scene="lugares"] .ambient {
  --glow: rgba(72, 140, 225, 0.15);
}
[data-scene="contacto"] .ambient {
  --glow: rgba(70, 180, 130, 0.13);
}
.ambient {
  --glow: rgba(118, 99, 214, 0.16);
  transition: --glow 1.4s ease;
  width: 70vw;
  height: 70vw;
  max-width: 980px;
  max-height: 980px;
  background:
    radial-gradient(ellipse 34% 40% at 50% 48%, var(--glow), transparent 100%),
    radial-gradient(ellipse, #49407314, transparent 65%);
  animation: stage-in 2s ease both;
}

/* The canvas buffer is sized to the stage (svh); match its box so particles
   are not stretched when mobile toolbars collapse. */
#particles {
  height: 100svh;
  bottom: auto;
}
/* Keep text and phone anchored to the small viewport as mobile browser chrome changes. */
@media (max-width: 760px) {
  /* Compact headline block so the iPhone gets most of the screen. */
  .chapter,
  .chapter-intro {
    padding-top: max(84px, calc(env(safe-area-inset-top) + 64px));
  }
  .chapter:not(.chapter-intro) h2 {
    font-size: clamp(29px, 7.6vw, 44px);
    letter-spacing: -1.3px;
  }
  .chapter-intro h1 {
    font-size: clamp(34px, 8.6vw, 52px);
  }
  .chapter .description {
    margin-top: 12px;
  }
  .site-header {
    padding-top: max(15px, env(safe-area-inset-top));
  }
  .device-stage {
    perspective: 1100px;
  }
  .chapter {
    min-height: 125svh;
  }
  .scroll-hint {
    bottom: max(24px, env(safe-area-inset-bottom));
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .chapter {
    padding-top: 75px;
    min-height: 125svh;
  }
  .chapter-copy {
    width: 48%;
  }
  .chapter-intro .chapter-copy {
    width: 100%;
  }
  .chapter-intro h1 {
    font-size: 35px;
  }
  .chapter-intro .description {
    font-size: 10px;
    margin-top: 10px;
  }
  .chapter-intro {
    padding-top: 65px;
  }
  .chapter:not(.chapter-intro) h2 {
    font-size: 28px;
    letter-spacing: -1px;
  }
  .eyebrow {
    margin-bottom: 10px;
  }
  .description {
    font-size: 10px;
    margin-top: 12px;
  }
  .chapter-final .chapter-copy {
    width: 48%;
  }
  .chapter-final h2 {
    font-size: 28px;
  }
  .store-link {
    margin-top: 12px;
    font-size: 15px;
    padding: 8px 12px;
  }
  #disponibilidad {
    font-size: 8px;
    margin-top: 10px;
  }
  .chapter-intro h1 br {
    display: none;
  }
  .chapter-intro h1 em {
    margin-left: 0.2em;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .chapter {
    justify-content: flex-start !important;
  }
  .chapter-intro .chapter-copy {
    width: 100%;
    text-align: center;
  }
  .chapter-intro .eyebrow {
    display: none;
  }
}

/* Visibility is culled by the timeline to avoid mirrored front faces in WebKit. */
.iphone,
.phone-back {
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
}

/* Simplified editorial copy and a clearer App Store badge. */
.chapter-contacto .description {
  white-space: nowrap;
  font-size: 14px;
  letter-spacing: -0.1px;
}
.store-link {
  background: linear-gradient(160deg, #fff, #e0e2e7);
  color: #151518;
  border: 1px solid #fff9;
  border-radius: 15px;
  padding: 14px 23px 14px 17px;
  gap: 12px;
  box-shadow:
    0 2px 2px #ffffff16,
    inset 0 1px 0 #fff,
    0 12px 36px #0004;
  font-size: 25px;
  font-weight: 550;
  letter-spacing: -0.5px;
  line-height: 1.1;
  backdrop-filter: none;
}
.store-link small {
  color: #50515a;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.15px;
  margin-bottom: 4px;
}
.store-link > .icon {
  width: 37px;
  height: 37px;
  stroke: none;
}
.store-link > span:last-child {
  font-size: 25px;
  color: inherit;
  margin-left: 0;
}
.store-link:hover {
  background: linear-gradient(160deg, #fff, #eceef1);
  border-color: #fff;
}
.store-link[aria-disabled="true"] {
  cursor: default;
}
.store-link:focus-visible {
  outline: 2px solid #d4c6ff;
  outline-offset: 6px;
}
footer span:last-child {
  margin-left: auto;
}
@media (max-width: 760px) {
  .chapter-contacto .description {
    font-size: clamp(8px, 2.5vw, 12px);
  }
  .store-link {
    margin-top: 25px;
    padding: 12px 20px 12px 15px;
  }
  .store-link > span:last-child {
    font-size: 23px;
  }
  .store-link small {
    font-size: 9px;
  }
  .store-link > .icon {
    width: 33px;
    height: 33px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .chapter-lugares h2 {
    font-size: 26px;
  }
  .store-link {
    margin-top: 16px;
    padding: 9px 16px;
  }
  .store-link > span:last-child {
    font-size: 20px;
  }
  .store-link > .icon {
    width: 28px;
    height: 28px;
  }
  .chapter-contacto .description {
    font-size: 9px;
  }
}

.chapter-contacto .chapter-copy{container-type:inline-size}
.chapter-contacto .description{font-size:clamp(8px,3.2cqw,14px)}

/* Unmodified official Apple vector artwork, with availability outside the badge. */
.store-cta{display:flex;flex-direction:column;align-items:flex-start;gap:10px;margin-top:30px}
.store-status{font-size:10px;letter-spacing:.12em;color:#a79daf;margin-left:2px}
.store-status[hidden]{display:none}
.store-link,.store-link:hover{display:block;width:200px;max-width:100%;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;line-height:0;transform:none;transition:none}
.store-link img{display:block;width:100%;height:auto}
@media(min-width:761px){.chapter-intro{padding-top:clamp(80px,9.5svh,110px)}}
@media(max-width:760px){.store-cta{margin-top:25px;gap:9px}.store-link{width:184px}}
@media(max-height:500px) and (orientation:landscape){.store-cta{margin-top:14px;gap:6px}.store-link{width:156px}.store-status{font-size:8px}.chapter-intro{padding-top:65px}}
