/* Home applications: the existing brand palette, with one scene at a time. */
#use-cases .bp-head { border: 0; padding: 0; }
#use-cases .applications-intro { max-width: 64ch; margin-top: 24px; color: var(--mid); font-size: 18px; }
#use-cases .application-tabs { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 32px; padding: 0; }   /* same underlined text tabs as the Applications page index (11/27) */
#use-cases .application-tabs[hidden] { display: none; }
.application-tabs button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--mid); background: transparent; font: inherit; font-size: 16px; cursor: pointer; }
.application-tabs button:hover { color: var(--ink); }
.application-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
#use-cases .home-cases { display: block; margin-top: 0; }
#use-cases .application { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: center; border: 0; padding: 40px 0 0; }
#use-cases .application[hidden] { display: none; }
#use-cases .application + .application { margin-top: 40px; }
#use-cases[data-enhanced] .application { margin-top: 0; }
#use-cases .application h3 { font-size: clamp(28px, 2.8vw, 44px); font-weight: 500; line-height: 1.3; letter-spacing: -.045em; }
#use-cases .application-copy > p { max-width: 35ch; margin-top: 24px; font-size: 18px; line-height: 1.8; }
.application-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; list-style: none; }
.application-tags li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--mid); font-size: 14px; }
.application-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 32px; }
.application-actions a { display: inline-flex; align-items: center; min-height: 48px; font-size: 15px; font-weight: 500; }
.application-actions a:last-child { text-decoration: underline; text-underline-offset: 5px; }
.application-actions .application-cta { padding: 12px 24px; color: var(--bg); background: var(--ink); border-radius: 4px; }
.application-actions .application-cta:hover { background: var(--dark); }
.application-visual { min-width: 0; margin: 0; }
/* Scenes: no coloured background shapes. The scene sits on the page grey (gray-100) and the device carries the picture.
   Devices follow real Apple hardware proportions, drawn with palette greys only:
   - iPhone 18 Pro, the same numbers as the home demo phone: body 71.9×150 mm, screen 1206×2622, bezel 3.74% of the body width,
     body corners 16.4% / 7.87%, screen corners 13.7% / 6.3%, Dynamic Island 31.1% × 4.23% of the screen, home bar 34.6% × .57%.
   - iPad Pro 11-inch, landscape: body 249.7×177.5 mm, screen 2420×1668, bezel 3.38% of the body width, camera on the long edge.
   - Studio Display: 62.3×36.2 cm, 16:9 panel with a 2.09% bezel, stand 30.3% of the width and 32% of the height. */
.application-scene { position: relative; display: grid; place-items: center; height: clamp(370px, 34vw, 490px); overflow: hidden; border-radius: 4px; background: var(--bg); isolation: isolate; }
.device-ground { position: absolute; z-index: -1; left: 50%; top: 100%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgb(18 23 22 / .32), rgb(18 23 22 / 0)); }   /* contact shadow: darkest where the device meets the floor and fading outward; half of it is hidden by the device, so the device sits on the floor */
.application-device { position: relative; container-type: inline-size; background: #121716; }
.device-screen { position: absolute; overflow: hidden; background: #fff; }
.device-top, .device-bottom { position: absolute; left: 50%; z-index: 3; transform: translateX(-50%); border-radius: 999px; }
.application-avatar { position: absolute; inset: 0; overflow: hidden; }
.application-avatar img, .application-avatar video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.application-avatar video { opacity: 0; }
.application-avatar video[data-playing] { opacity: 1; }
.application-avatar:has(video[data-playing]) img { visibility: hidden; }
/* speech bubbles: the home's chat bubbles (user dark, character gray-200) */
#use-cases .application-user, #use-cases .application-reply { position: absolute; z-index: 4; max-width: 44%; margin: 0; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: var(--soft); color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.4; letter-spacing: -.02em; }
#use-cases .application-user { top: 16%; left: 4%; border-radius: 16px 16px 4px 16px; background: var(--ink); color: #fff; }
#use-cases .application-reply { right: 4%; bottom: 16%; }

/* iPhone 18 Pro */
.device-iphone { height: 88%; aspect-ratio: 71.9 / 150; border-radius: 16.4% / 7.87%; box-shadow: 0 0 0 1px #a2a8a7, 0 0 0 2px #e1e5e4, 0 0 0 3px #838a88; }   /* titanium band: three thin greys */
.device-iphone .device-ground { width: 130%; height: 14cqw; }
.device-iphone::before, .device-iphone::after { content: ""; position: absolute; width: 1.2cqw; border-radius: .6cqw; }
.device-iphone::before { left: -2.2cqw; top: 17%; height: 26%; background: linear-gradient(#c1c7c5 0 19%, transparent 19% 31%, #c1c7c5 31% 62%, transparent 62% 69%, #c1c7c5 69% 100%); }   /* left: action button, volume up, volume down */
.device-iphone::after { right: -2.2cqw; top: 24%; height: 11%; background: #c1c7c5; }   /* right: side button */
.device-iphone .device-screen { inset: 3.74cqw; border-radius: 13.7% / 6.3%; }
.device-iphone .device-top { top: 1.26%; width: 31.1%; height: 4.23%; background: #000; }
.device-iphone .device-bottom { bottom: .92%; width: 34.6%; height: .57%; background: rgb(18 23 22 / .55); }
.device-iphone .application-avatar { inset: 8% 0; }   /* below the Dynamic Island, above the home bar */
.device-iphone .application-avatar img, .device-iphone .application-avatar video { transform: translateY(3.5%) scale(1.3); }   /* the figure spans 10%–84.6% of the clip's height (centre 47.3%, not 50%): moved down by that offset × 1.3 so head and feet keep the same distance from the screen edges */

/* iPad Pro 11-inch, landscape */
.device-ipad { width: 72%; aspect-ratio: 249.7 / 177.5; border-radius: 5.2% / 7.3%; box-shadow: 0 0 0 1px #838a88, 0 0 0 2px #c1c7c5; }   /* thin aluminium edge */
.device-ipad .device-ground { width: 110%; height: 6cqw; }
.device-ipad::before { content: ""; position: absolute; left: 50%; top: 1.2cqw; width: 1cqw; height: 1cqw; margin-left: -.5cqw; border-radius: 50%; background: #252b2a; box-shadow: inset 0 0 0 .2cqw #434a48; }   /* front camera on the long edge */
.device-ipad .device-screen { inset: 3.38cqw; border-radius: 1.6% / 2.3%; }
.device-ipad .device-top { display: none; }
.device-ipad .device-bottom { bottom: 1.6%; width: 18%; height: .9%; background: rgb(18 23 22 / .55); }
.device-ipad .application-avatar { inset: 4% 0 0; }

/* iPad Pro 11-inch, portrait (the same numbers turned: bezel 4.76% of the body width) */
.device-ipad-portrait { height: 88%; aspect-ratio: 177.5 / 249.7; border-radius: 7.3% / 5.2%; box-shadow: 0 0 0 1px #838a88, 0 0 0 2px #c1c7c5; }
.device-ipad-portrait::before { content: ""; position: absolute; top: 50%; left: 1.7cqw; width: 1.4cqw; height: 1.4cqw; margin-top: -.7cqw; border-radius: 50%; background: #252b2a; box-shadow: inset 0 0 0 .3cqw #434a48; }
.device-ipad-portrait .device-screen { inset: 4.76cqw; border-radius: 2.3% / 1.6%; }
.device-ipad-portrait .device-top { display: none; }
.device-ipad-portrait .device-bottom { bottom: 1.2%; width: 26%; height: .6%; background: rgb(18 23 22 / .55); }
.device-ipad-portrait .application-avatar { inset: 4% 0 0; }
.device-ipad-portrait .device-ground { width: 116%; height: 8cqw; }

/* MacBook Pro 14-inch, lid open, seen from the front: 3024×1964 screen with the camera notch, thin bezel, the base as a bar */
.device-macbook { width: 70%; aspect-ratio: 31.26 / 21.2; margin-bottom: 4%; border-radius: 2.2% 2.2% 0 0 / 3.3% 3.3% 0 0; box-shadow: 0 0 0 1px #838a88; }
.device-macbook::after { content: ""; position: absolute; left: -7%; top: 100%; width: 114%; height: 2.6cqw; border-radius: 0 0 2cqw 2cqw; background: #c1c7c5; }   /* base */
.device-macbook::before { content: ""; position: absolute; z-index: 1; left: 43%; top: 100%; width: 14%; height: .8cqw; border-radius: 0 0 1cqw 1cqw; background: #a2a8a7; }   /* opening notch */
.device-macbook .device-screen { inset: 1.4cqw 1.4cqw 2cqw; border-radius: 1.2% / 1.9%; }
.device-macbook .device-top { top: 0; width: 12%; height: 3.3%; border-radius: 0 0 .8cqw .8cqw; background: #121716; }   /* camera notch */
.device-macbook .device-bottom { display: none; }
.device-macbook .application-avatar { inset: 4% 0 0; }
.device-macbook .device-ground { top: 104%; width: 128%; height: 6cqw; }

/* Studio Display on its stand */
.device-display { width: 66%; aspect-ratio: 62.3 / 36.2; margin-bottom: 13%; border-radius: 1.4% / 2.4%; box-shadow: 0 0 0 1px #838a88, 0 0 0 2px #e1e5e4; }   /* margin-bottom leaves room for the stand */
.device-display .device-ground { top: 132.5%; width: 56%; height: 6cqw; }   /* under the base plate */
.device-display::before { content: ""; position: absolute; z-index: -1; left: 34.85%; top: 60%; width: 30.3%; height: 72%; background: #c1c7c5; }   /* stand neck, behind the panel */
.device-display::after { content: ""; position: absolute; left: 32.85%; top: 130%; width: 34.3%; height: 2.5%; border-radius: 0 0 .6cqw .6cqw; background: #a2a8a7; }   /* base plate */
.device-display .device-screen { inset: 2.09cqw; border-radius: 0; }
.device-display .device-top { top: -1.4cqw; width: .7cqw; height: .7cqw; background: #434a48; }   /* camera in the top bezel */
.device-display .device-bottom { display: none; }
.device-display .application-avatar { inset: 4% 0 0; }
.device-display .application-avatar img, .device-display .application-avatar video { object-position: 50% 12%; }
#use-cases .application-companion .application-user { left: 2%; max-width: 30%; }   /* beside the phone, not on it */
#use-cases .application-companion .application-reply { right: 2%; max-width: 30%; }
#use-cases .application-guide .application-reply { bottom: 30%; }   /* on the panel corner, clear of the stand */
#use-cases a:focus-visible, #use-cases button:focus-visible, #use-cases [role="tabpanel"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
@media (max-width: 900px) {
  #use-cases .application { gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  #use-cases .application-user, #use-cases .application-reply { font-size: 14px; }
}
@media (max-width: 720px) {
  #use-cases .applications-intro { font-size: 16px; }
  #use-cases .application-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin-top: 24px; }
  .application-tabs button { font-size: 15px; text-align: center; }
  #use-cases .application { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; }
  .application-visual { grid-row: 1; }
  #use-cases .application h3 { font-size: clamp(28px, 7.6vw, 36px); }
  #use-cases .application-copy > p { max-width: 38ch; margin-top: 16px; font-size: 16px; }
  .application-tags { margin-top: 16px; }
  .application-actions { margin-top: 24px; gap: 12px 20px; }
  .application-scene { height: 420px; }
  .device-iphone { height: 72%; }   /* room above and below for the two bubbles */
  #use-cases .application-companion .application-user { top: 2%; max-width: 46%; }
  #use-cases .application-companion .application-reply { bottom: 2%; max-width: 46%; }
  .device-ipad { width: 84%; }
  .device-display { width: 80%; }
  #use-cases .application-user { top: 4%; left: 2%; max-width: 60%; }
  #use-cases .application-reply { right: 2%; bottom: 6%; max-width: 60%; }
}
