/* r23 · 25.10.2026: "Dynamic Island" section (Grzegorz: show our island states from Figma WORKSHOP 4226:57717 the way Apple
   showed the island on the iPhone 14 Pro page). One pinned scene: the top of the phone, large; the island morphs through
   three jobs, compact then expanded; one line of copy per state on the left. Everything transform/opacity/size on one element. */
.di { position: relative; height: 640vh; background: var(--ink); --v: 2px; }
.di-vp { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--ink); }
.di-vp::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 72% 42%, rgba(199,230,53,.07), transparent 70%); pointer-events: none; }
@media (min-width: 760px) { .di { --v: clamp(1px, (100vw - 2 * var(--gut) - 540px) / 390, 2.1px); } }

/* copy, left */
.di-copy { position: absolute; left: var(--gut); top: 50%; transform: translateY(-50%); width: min(520px, calc(100% - 2 * var(--gut))); z-index: 2; }
.di-copy .cap { margin-bottom: 22px; }
.di-h { font-weight: 850; font-size: clamp(38px, 4.6vw, 72px); line-height: .95; letter-spacing: -.04em; margin: 0 0 26px; }
.di-h .lime { color: var(--lime); display: block; }
.di-caps { position: relative; min-height: 4.6em; font-size: clamp(19px, 1.65vw, 26px); line-height: 1.3; font-weight: 600; color: var(--mute); }
.di-cap { position: absolute; left: 0; top: 0; margin: 0; opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.2,1); max-width: 440px; }
.di-cap b { color: var(--paper); font-weight: 700; }
.di-cap.on { opacity: 1; transform: none; }
.di-step { display: flex; gap: 8px; margin-top: 28px; }
.di-step i { width: 22px; height: 3px; border-radius: 2px; background: rgba(247,246,241,.18); transition: background .3s, width .3s; }
.di-step i.on { background: var(--lime); width: 44px; }

/* the top of the phone, right, cropped at the bottom like Apple's */
.di-phone { position: absolute; left: 72%; top: 50%; width: calc(417.3 * var(--v)); height: calc(330 * var(--v)); margin: calc(-150 * var(--v)) 0 0 calc(-208.65 * var(--v)); border-radius: calc(63 * var(--v)) calc(63 * var(--v)) 0 0; background: #141416;
  box-shadow: inset 0 0 0 calc(1.2 * var(--v)) rgba(255,255,255,.14), inset 0 0 0 calc(2.6 * var(--v)) #000, 0 40px 120px -40px rgba(0,0,0,.8);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, #000 0, #000 62%, transparent 100%); }
.di-screen { position: absolute; left: calc(13.65 * var(--v)); right: calc(13.65 * var(--v)); top: calc(13.65 * var(--v)); bottom: calc(-60 * var(--v)); border-radius: calc(49.35 * var(--v)) calc(49.35 * var(--v)) 0 0; overflow: hidden; background: #0B0B0D; }
.di-screen > img { position: absolute; left: 0; top: 0; width: 100%; height: calc(360 * var(--v)); object-fit: cover; object-position: 50% 30%; opacity: .55; filter: saturate(.8); transform: scale(1.04); }
.di-screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,13,.55) 0, rgba(11,11,13,.1) 40%, rgba(11,11,13,.6) 100%); }
.di-sb { position: absolute; left: 0; right: 0; top: 0; height: calc(59 * var(--v)); z-index: 2; color: #F4F2F8; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; font-variant-numeric: tabular-nums; pointer-events: none; }
.di-sb .t { position: absolute; left: calc(30 * var(--v)); top: calc(21 * var(--v)); font-size: calc(17 * var(--v)); line-height: calc(20 * var(--v)); font-weight: 600; letter-spacing: -.01em; }
.di-sb .ic { position: absolute; right: calc(36 * var(--v)); top: calc(25 * var(--v)); height: calc(12 * var(--v)); display: flex; align-items: center; gap: calc(7 * var(--v)); fill: currentColor; }
.di-sb svg { display: block; height: calc(12 * var(--v)); width: auto; }
.di-sb svg.w { height: calc(11.5 * var(--v)); } .di-sb svg.b { height: calc(13 * var(--v)); }
.di-tabs { position: absolute; left: 0; right: 0; top: calc(68 * var(--v)); z-index: 2; display: flex; justify-content: center; gap: calc(28 * var(--v)); font-size: calc(15 * var(--v)); font-weight: 600; color: rgba(244,242,248,.55); transition: opacity .4s, transform .5s cubic-bezier(.2,.7,.2,1); }
.di-tabs b { color: #fff; position: relative; }
.di-tabs b::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: calc(-7 * var(--v)); height: calc(2 * var(--v)); border-radius: 2px; background: #fff; }
.di[data-s="2"] .di-tabs, .di[data-s="4"] .di-tabs, .di[data-s="6"] .di-tabs { opacity: 0; transform: translateY(calc(8 * var(--v))); }   /* the expanded island covers them */

/* the island itself: one element, its box morphs; the state layers fade and scale inside */
.di-island { position: absolute; left: 50%; top: calc(11 * var(--v)); z-index: 3; transform: translateX(-50%); background: #000; color: #fff; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; font-variant-numeric: tabular-nums;
  width: calc(126 * var(--v)); height: calc(37 * var(--v)); border-radius: calc(26 * var(--v));
  transition: width .62s cubic-bezier(.3,1.25,.45,1), height .62s cubic-bezier(.3,1.25,.45,1), border-radius .5s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 calc(10 * var(--v)) calc(30 * var(--v)) rgba(0,0,0,.35); will-change: width, height; }
.di[data-s="1"] .di-island, .di[data-s="3"] .di-island, .di[data-s="5"] .di-island { width: calc(216 * var(--v)); }   /* 216 pt: clear of the clock and the battery */
.di[data-s="2"] .di-island, .di[data-s="4"] .di-island, .di[data-s="6"] .di-island { width: calc(371 * var(--v)); height: calc(160 * var(--v)); border-radius: calc(44 * var(--v)); }
.di[data-s="7"] .di-island { width: calc(126 * var(--v)); }
.di-l { position: absolute; left: 0; top: 0; opacity: 0; transform: scale(.9); transition: opacity .28s ease, transform .5s cubic-bezier(.3,1.2,.45,1); pointer-events: none; }
.di-l.c { width: calc(216 * var(--v)); height: calc(37 * var(--v)); transform-origin: 50% 50%; }
.di-l.x { width: calc(371 * var(--v)); height: calc(160 * var(--v)); transform-origin: 50% 0; }
.di[data-s="1"] .di-l.c1, .di[data-s="2"] .di-l.x1, .di[data-s="3"] .di-l.c2, .di[data-s="4"] .di-l.x2, .di[data-s="5"] .di-l.c3, .di[data-s="6"] .di-l.x3 { opacity: 1; transform: none; transition-delay: .12s; }

/* compact layers: 230 × 37 pt, from Figma 4226:57719 / 57732 / 57741 */
.di-l.c .lhs { position: absolute; left: calc(14 * var(--v)); top: 50%; transform: translateY(-50%); display: flex; align-items: center; }
.di-l.c .rhs { position: absolute; right: calc(12 * var(--v)); top: 50%; transform: translateY(-50%); font-size: calc(13 * var(--v)); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.di-l.c1 .rhs, .di-l.x1 .big, .di-l.x1 .turn { color: var(--lime); }
.di-arrow { width: calc(20 * var(--v)); height: calc(20 * var(--v)); display: block; }
.di-arrow path { fill: none; stroke: var(--lime); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.di[data-s="1"] .di-arrow { animation: di-nudge 1.4s ease-in-out infinite; }
@keyframes di-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(-2 * var(--v))); } }
.di-em { position: relative; width: calc(24 * var(--v)); height: calc(24 * var(--v)); border-radius: 50%; background: #2A2A2E; display: grid; place-items: center; box-shadow: 0 0 0 calc(1.5 * var(--v)) #000; }
.di-em img { width: calc(16 * var(--v)); height: calc(16 * var(--v)); display: block; }
.di-em + .di-em { margin-left: calc(-9 * var(--v)); }
.di-badge { position: absolute; right: calc(-5 * var(--v)); bottom: calc(-3 * var(--v)); width: calc(14 * var(--v)); height: calc(14 * var(--v)); border-radius: 50%; background: #1C1C20; box-shadow: 0 0 0 calc(1.5 * var(--v)) #000; display: grid; place-items: center; }
.di-badge img { width: calc(10 * var(--v)); height: calc(10 * var(--v)); }
.di-live { display: inline-block; width: calc(6 * var(--v)); height: calc(6 * var(--v)); border-radius: 50%; background: var(--lime); margin-right: calc(6 * var(--v)); vertical-align: middle; animation: di-pulse 1.6s ease-in-out infinite; }
@keyframes di-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* expanded layers: 371 × 160 pt, from Figma 4226:57759 / 57775 / 57788 */
.di-l.x .top { position: absolute; left: calc(18 * var(--v)); top: calc(16 * var(--v)); display: flex; align-items: center; }
.di-l.x .ring { position: relative; width: calc(48 * var(--v)); height: calc(48 * var(--v)); border-radius: 50%; background: #2A2A2E; display: grid; place-items: center; }
.di-l.x .ring .di-arrow { width: calc(24 * var(--v)); height: calc(24 * var(--v)); }
.di-l.x .ring img { width: calc(30 * var(--v)); height: calc(30 * var(--v)); }
.di-l.x .ring .di-badge { width: calc(22 * var(--v)); height: calc(22 * var(--v)); right: calc(-4 * var(--v)); bottom: calc(-4 * var(--v)); }
.di-l.x .ring .di-badge img { width: calc(16 * var(--v)); height: calc(16 * var(--v)); }
.di-l.x3 .top .di-em { width: calc(36 * var(--v)); height: calc(36 * var(--v)); }
.di-l.x3 .top .di-em img { width: calc(26 * var(--v)); height: calc(26 * var(--v)); }
.di-l.x3 .top .di-em + .di-em { margin-left: calc(-14 * var(--v)); }
.di-l.x3 .top .di-badge { width: calc(20 * var(--v)); height: calc(20 * var(--v)); } .di-l.x3 .top .di-badge img { width: calc(15 * var(--v)); height: calc(15 * var(--v)); }
.di-l.x .num { position: absolute; right: calc(18 * var(--v)); top: calc(12 * var(--v)); width: calc(150 * var(--v)); text-align: right; }
.di-l.x .num .big { display: block; font-size: calc(32 * var(--v)); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.di-l.x .num small { display: block; font-size: calc(12 * var(--v)); color: rgba(255,255,255,.6); margin-top: calc(2 * var(--v)); }
.di-l.x .turn { position: absolute; left: calc(18 * var(--v)); top: calc(68 * var(--v)); font-size: calc(22 * var(--v)); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.di-l.x .ttl { position: absolute; left: calc(18 * var(--v)); top: calc(70 * var(--v)); font-size: calc(17 * var(--v)); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.di-l.x .sub { position: absolute; left: calc(18 * var(--v)); right: calc(18 * var(--v)); top: calc(96 * var(--v)); font-size: calc(12.5 * var(--v)); line-height: 1.25; color: rgba(255,255,255,.66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.di-l.x .btns { position: absolute; left: calc(18 * var(--v)); right: calc(18 * var(--v)); top: calc(118 * var(--v)); display: flex; gap: calc(8 * var(--v)); }
.di-l.x .btns span { flex: 1; height: calc(32 * var(--v)); border-radius: 999px; display: grid; place-items: center; font-size: calc(13 * var(--v)); font-weight: 600; background: #fff; color: #000; }
.di-l.x .btns span.dk { background: #2A2A2E; color: #fff; }

/* phones: copy on top, the phone top full width below, at 1 px per point */
@media (max-width: 759px) {
  .di { height: 520vh; --v: calc(100vw / 390); }
  .di-copy { left: var(--gut); right: var(--gut); top: 7svh; transform: none; width: auto; }
  .di-copy .cap { margin-bottom: 14px; }
  .di-h { font-size: 34px; margin-bottom: 14px; }
  .di-caps { font-size: 17px; min-height: 3.9em; }
  .di-step { margin-top: 14px; }
  .di-phone { left: 50%; top: 44svh; bottom: auto; margin-top: 0; height: calc(300 * var(--v)); }
}
html.rm .di { height: auto; padding: 80px 0 40px; }
html.rm .di-vp { position: relative; height: auto; min-height: 560px; }
html.rm .di-cap { position: static; opacity: 1; transform: none; margin-bottom: 10px; }
html.rm .di-caps { min-height: 0; }
