/* AirHive, "How AirHive would work" (lane one-offs, 1 Dec). Replaces the old image-expansion section.
   Three statements, three shapes: a search field that holds the sentence, a centred line whose photo opens
   from the middle, and a photo that grows from a pill into a band between two halves of the last line.
   Each photo opens with scroll (--x, 0 to 1); without the script --x is 1 and everything is open. Page-only file. */
body #main#main#main#main#main .ahx { --ink: #111a23; --soft: #42505b; --gold: #bd810c; --sun: #e7b52e; position: relative; padding: clamp(84px, 9vw, 140px) clamp(16px, 4vw, 64px) clamp(84px, 9vw, 140px) !important; margin: 0 !important; overflow: clip; background: radial-gradient(70% 50% at 8% 0%, #fde3d3 0, rgb(253 227 211 / 0) 70%), radial-gradient(60% 50% at 100% 46%, #e3defb 0, rgb(227 222 251 / 0) 70%), radial-gradient(60% 40% at 30% 100%, #d8ecfb 0, rgb(216 236 251 / 0) 70%), #f6f7f9 !important; color: var(--ink); font: 400 clamp(17px, 1.3vw, 20px)/1.5 GoldstineSynonym, sans-serif; }
body #main#main#main#main#main .ahx :where(h2, h3, p, ol, li, span, b, i, img) { margin: 0 !important; padding: 0; color: inherit !important; letter-spacing: normal; text-transform: none !important; list-style: none; }

/* the section's own heading, with a step meter that follows you through the three steps */
body #main#main#main#main#main .ahx-top { position: sticky; top: 92px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(560px, 100%); margin: 0 auto clamp(56px, 7vw, 110px) !important; padding: 8px 8px 8px 20px !important; border-radius: var(--g-r-pill, 99px); background: rgb(255 255 255 / .62); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 14px 34px -22px rgb(17 26 35 / .45), inset 0 0 0 1px rgb(255 255 255 / .8); }
body #main#main#main#main#main .ahx-top h2 { font: 600 15px/1.2 GoldstineSynonym, sans-serif !important; letter-spacing: 0 !important; color: var(--ink) !important; white-space: nowrap; }
body #main#main#main#main#main .ahx-meter { position: relative; display: flex; gap: 4px; padding: 4px !important; border-radius: var(--g-r-pill, 99px); background: rgb(17 26 35 / .06); }
body #main#main#main#main#main .ahx-meter b { position: relative; z-index: 1; padding: 7px 13px !important; border-radius: var(--g-r-pill, 99px); font: 600 13px/1 GoldstineSynonym, sans-serif; color: var(--soft) !important; transition: color .3s; }
body #main#main#main#main#main .ahx-meter i { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 16px) / 3); border-radius: var(--g-r-pill, 99px); background: var(--ink); transform: translateX(calc(var(--at, 0) * (100% + 4px))); transition: transform .45s var(--g-ease, cubic-bezier(.2, .8, .2, 1)); }
body #main#main#main#main#main .ahx[data-at="0"] .ahx-meter b:nth-of-type(1), body #main#main#main#main#main .ahx[data-at="1"] .ahx-meter b:nth-of-type(2), body #main#main#main#main#main .ahx[data-at="2"] .ahx-meter b:nth-of-type(3) { color: #fff !important; }
body #main#main#main#main#main .ahx[data-at="1"] { --at: 1; }
body #main#main#main#main#main .ahx[data-at="2"] { --at: 2; }

/* shared pieces: step label and statement type */
body #main#main#main#main#main .ahx-steps { display: grid; gap: clamp(110px, 14vw, 220px); }
body #main#main#main#main#main .ahx-step { --x: 1; position: relative; }
body #main#main#main#main#main .ahx-meta { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px !important; font: 600 14px/1 GoldstineSynonym, sans-serif; letter-spacing: var(--g-track-label, .1em) !important; text-transform: uppercase !important; color: var(--soft) !important; }
body #main#main#main#main#main .ahx-meta span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff !important; letter-spacing: 0 !important; font-size: 13px; }
body #main#main#main#main#main .ahx-step h3 { font: 500 clamp(38px, 6vw, 108px)/.98 GoldstineChillax, sans-serif !important; letter-spacing: -.045em !important; color: var(--ink) !important; }
body #main#main#main#main#main .ahx-step h3 > span { display: block; text-wrap: balance; }
body #main#main#main#main#main .ahx-step > p:last-child { max-width: 38ch; color: #2b3640 !important; }

/* the photo pill inside a line of type: it opens from a sliver to its full width */
body #main#main#main#main#main .ahx-pill { position: relative; display: inline-block; width: 2.5em; height: .8em; margin: 0 .08em !important; vertical-align: -.06em; border-radius: var(--g-r-pill, 99px); overflow: hidden; clip-path: inset(0 calc((1 - var(--x)) * 36%) round 99px); background: #dfe4ea; box-shadow: 0 18px 30px -18px rgb(17 26 35 / .55); }
body #main#main#main#main#main .ahx-pill img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; transform: scale(calc(1.3 - var(--x) * .3)); }

/* 1 Search: the sentence sits in a search field, caret blinking after it */
body #main#main#main#main#main .ahx-search { display: grid; gap: 28px; }
body #main#main#main#main#main .ahx-search > p:last-child { justify-self: end; }
body #main#main#main#main#main .ahx-field { position: relative; padding: clamp(26px, 3vw, 46px) clamp(26px, 3.4vw, 54px) clamp(26px, 3vw, 46px) clamp(70px, 7vw, 116px) !important; border-radius: clamp(28px, 3vw, 48px); background: rgb(255 255 255 / .72); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3); box-shadow: 0 40px 70px -46px rgb(17 26 35 / .5), inset 0 0 0 1px rgb(255 255 255 / .9); }
body #main#main#main#main#main .ahx-field::before { content: ""; position: absolute; left: clamp(24px, 2.6vw, 44px); top: clamp(34px, 3.6vw, 56px); width: clamp(28px, 2.8vw, 44px); aspect-ratio: 1; background: var(--soft); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3Cpath d='M15.5 15.5 21 21' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='%23000' stroke-width='2.2'/%3E%3Cpath d='M15.5 15.5 21 21' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
body #main#main#main#main#main .ahx-caret { display: inline-block; width: .06em; height: .78em; margin-left: .06em !important; vertical-align: -.04em; background: var(--gold); animation: ahx-caret 1.1s steps(1) infinite; }
@keyframes ahx-caret { 50% { background: transparent; } }

/* 2 Compare: centred, the photo opens from its middle between two halves of the line */
body #main#main#main#main#main .ahx-compare { display: grid; justify-items: center; gap: 32px; text-align: center; }
body #main#main#main#main#main .ahx-compare .ahx-pill { width: 2.9em; clip-path: inset(0 calc((1 - var(--x)) * 44%) round 99px); }
body #main#main#main#main#main .ahx-compare h3 > span:nth-child(2) { transform: translateX(calc((1 - var(--x)) * -.4em)); }
body #main#main#main#main#main .ahx-compare h3 > span:nth-child(3) { transform: translateX(calc((1 - var(--x)) * .4em)); }
body #main#main#main#main#main .ahx-compare > p:last-child { max-width: 34ch; padding: 18px 24px !important; border-radius: var(--g-r-card, 22px); background: rgb(255 255 255 / .6); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .9); }

/* 3 Check: the photo grows from a pill into a band between "Then go" and "to the source." */
body #main#main#main#main#main .ahx-check { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 28px clamp(32px, 4vw, 64px); align-items: end; }
body #main#main#main#main#main .ahx-check :is(h3, .ahx-meta) { grid-column: 1 / -1; }
body #main#main#main#main#main .ahx-check .ahx-meta { justify-self: start; margin-bottom: 0 !important; }
body #main#main#main#main#main .ahx-check h3 > span:last-child { text-align: right; }
body #main#main#main#main#main .ahx-band { position: relative; display: block !important; height: clamp(200px, 30vw, 460px); margin: .12em 0 !important; border-radius: calc(clamp(28px, 3vw, 48px) + (1 - var(--x)) * 200px); overflow: hidden; clip-path: inset(0 calc((1 - var(--x)) * 40%) round calc(clamp(28px, 3vw, 48px) + (1 - var(--x)) * 200px)); box-shadow: 0 50px 80px -50px rgb(17 26 35 / .6); }
body #main#main#main#main#main .ahx-band img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; object-position: 50% 35%; transform: scale(calc(1.25 - var(--x) * .25)); }
body #main#main#main#main#main .ahx-band::after { content: ""; position: absolute; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 16 16 8M9 8h7v7' fill='none' stroke='%23111a23' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: 0 10px 24px -10px rgb(17 26 35 / .6); transform: scale(var(--x)); }
body #main#main#main#main#main .ahx-check > p:last-child { grid-column: 2; padding-left: 18px !important; border-left: 3px solid var(--sun); }

@media (max-width: 899px) {
  body #main#main#main#main#main .ahx-top { display: none; }
  body #main#main#main#main#main .ahx-check { grid-template-columns: minmax(0, 1fr); }
  body #main#main#main#main#main .ahx-search > p:last-child { justify-self: start; }
  body #main#main#main#main#main .ahx-check > p:last-child { grid-column: 1; }
  body #main#main#main#main#main .ahx-step h3 { font-size: var(--g-t-h1, clamp(34px, 10vw, 64px)) !important; }
  body #main#main#main#main#main .ahx-field { padding: 22px 20px 22px 58px !important; border-radius: var(--g-r-card, 26px); }
  body #main#main#main#main#main .ahx-field::before { left: 18px; top: 28px; width: 26px; }
  body #main#main#main#main#main .ahx-band { height: clamp(180px, 56vw, 300px); }
}
@media (prefers-reduced-motion: reduce) {
  body #main#main#main#main#main .ahx-caret { animation: none; }
  body #main#main#main#main#main .ahx-meter i, body #main#main#main#main#main .ahx-meter b { transition: none; }
}
