/* The 3D pages (the homepage and the product pages). Builds on flow.css: same tokens, header, buttons, chips, HUD.
   Laid out like the live site: on wide screens the current district's words sit on the left in the
   site's own large type, over a soft dark fade, and always fit without scrolling; the 3D world fills
   the right, where the district in focus is shown big. Phones get a bottom sheet instead. */
html,body.island{height:100%;overflow:hidden}
body.island{padding-bottom:0}
.island{--col-left:clamp(24px,5vw,96px);--col-w:min(620px,42vw)}
.island .site-header{position:fixed;left:0;right:0;top:0}

.island-canvas{position:fixed;inset:0;width:100%;height:100%;z-index:0;display:block}
.island-still{display:none;position:fixed;left:calc(var(--col-left) + var(--col-w) + 24px);right:24px;top:140px;bottom:100px;object-fit:contain;z-index:0}
.no-webgl .island-canvas,.no-webgl .island-labels{display:none}
.no-webgl .island-still{display:block}
@media (max-width:999px){.still-early .island-still{display:block}}

/* District names over the islands: real buttons, so they can be clicked and tabbed to. */
.island-labels{position:fixed;inset:0;z-index:5;pointer-events:none}
.island-label{position:absolute;left:0;top:0;transform:translate(-50%,-100%);pointer-events:auto;min-height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line-2);background:rgba(26,29,36,.86);color:var(--text-2);font-weight:600;font-size:0.875rem;white-space:nowrap;cursor:pointer;transition:opacity .4s var(--ease),color .3s var(--ease),border-color .3s var(--ease)}
.island-label:hover{color:var(--on-yellow);background:var(--accent,var(--yellow));border-color:var(--accent,var(--yellow))}
/* A map pin: the name sits raised above its island, with a thin line in its colour down to a glowing dot. */
.island-label::after{content:"";position:absolute;left:50%;top:100%;width:10px;height:26px;margin-left:-5px;pointer-events:none;
  background:radial-gradient(circle at 50% calc(100% - 4px),var(--accent,var(--yellow)) 0 3px,transparent 4px),linear-gradient(var(--accent,var(--yellow)),rgba(255,255,255,0)) 50% 0/2px calc(100% - 8px) no-repeat;
  filter:drop-shadow(0 0 4px var(--accent,var(--yellow)))}
.island-label::before{content:"";display:inline-block;width:7px;height:7px;margin-right:8px;border-radius:50%;background:var(--accent,var(--yellow));box-shadow:0 0 8px var(--accent,var(--yellow));vertical-align:1px}
.island-label:not([hidden]){animation:label-in .5s var(--ease) both}
@keyframes label-in{from{opacity:0;translate:0 10px}}
.island-label[hidden]{display:none}

/* The district's words: the left column, centred top to bottom, in the live site's type sizes. */
/* Centred with auto margins (not justify-content), so a panel taller than the room scrolls instead of losing its top. */
.island-panels>.panel{margin-block:auto}
.island-panels{position:fixed;z-index:10;left:var(--col-left);top:72px;bottom:0;width:var(--col-w);display:flex;flex-direction:column;padding:28px 0 40px;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;text-shadow:0 1px 14px rgba(0,0,0,.55)}
.island-panels::-webkit-scrollbar{display:none}
.island-panels:focus{outline:none}
.island-panels .zone-copy h1{font-size:clamp(2.25rem,3.6vw,4rem)}
.island-panels .zone-copy h2{font-size:clamp(2rem,3vw,3.375rem)}
.island-panels .panel-shots{max-width:520px}
body.island::after{content:"";position:fixed;top:0;left:0;bottom:0;width:min(66vw,1000px);background:linear-gradient(to right,rgba(18,20,25,.95) 0%,rgba(18,20,25,.86) 40%,rgba(18,20,25,.4) 72%,rgba(18,20,25,0) 100%);pointer-events:none;z-index:9}
/* Shorter laptop screens: a little more compact, so everything still fits without scrolling. */
@media (min-width:1000px) and (max-height:860px){
  .island-panels .zone-copy h1{font-size:clamp(2rem,3vw,3.125rem);margin-bottom:16px}
  .island-panels .zone-copy h2{font-size:clamp(1.875rem,2.6vw,2.75rem);margin-bottom:14px}
  .island-panels .zone-copy>p,.island-panels .zone-copy>p.lede{font-size:1rem}
  .island-panels .kicker{margin-bottom:10px}
  .island-panels .actions{margin-top:20px}
  .island-panels .disciplines,.island-panels .apps-list{margin-top:16px;gap:12px 18px}
  .island-panels .panel-shots{max-width:420px;margin-top:16px}
  .island-panels .starter{gap:10px}
  .island-panels .panel .contact-card{margin-top:14px}
  /* The two phone numbers stay; the emails are one tap away under Contact in the strip below. */
  .island-panels .contact-card li:nth-child(3),.island-panels .contact-card li:nth-child(4){display:none}
  .island-panels #connect>p{margin-bottom:4px}
}
/* Wide screens: the legal links live in the strip at the bottom, so the panels stay short; the
   contact card, starter, stages and prices are a little tighter than on the long map page. */
.island-foot{position:fixed;z-index:12;left:var(--col-left);bottom:10px;display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;max-width:var(--col-w);font-size:0.78125rem;color:var(--text-3)}
.island-foot nav{display:flex;flex-wrap:wrap;gap:4px 14px}
.island-foot a{color:var(--text-3);text-decoration:none}
.island-foot a:hover{color:#fff}
@media (min-width:1000px){
  /* The panel column stops above the strip, so a tall panel scrolls (fading out) instead of running under it. */
  .island-panels{bottom:58px;padding-bottom:16px;-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 22px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 22px),transparent)}
  .island-panels .panel .zone-foot{display:none}
  .island-panels .contact-card{padding:14px 16px}
  .island-panels .contact-card h3{font-size:1rem;margin-bottom:6px}
  .island-panels .contact-card ul{grid-template-columns:1fr 1fr;column-gap:18px}
  .island-panels .contact-card li{padding:7px 0;font-size:0.875rem}
  .island-panels .contact-card li:last-child{display:none}
  .island-panels .chip{min-height:40px;padding:0 15px;font-size:0.9375rem}
  .island-panels .chip-label{margin-bottom:6px}
  .island-panels .brief-preview{padding:10px 14px;font-size:0.9375rem}
  .island-panels .stage-panel{min-height:0;padding:14px 16px}
  .island-panels .stage-panel p{font-size:0.96875rem}
  .island-panels .price-card{margin-top:18px;padding:14px 16px}
  .island-panels .price-card h3{font-size:1rem;margin-bottom:4px}
  .island-panels .prices{gap:6px}
  .island-panels .prices div{padding-top:7px;gap:12px}
  .island-panels .prices dt,.island-panels .prices dd{font-size:0.90625rem}
  .island-panels .points li{margin:6px 0}
}
@media (max-width:999px){.island-foot{display:none}}
@media (min-width:1000px) and (max-height:700px){
  .island-panels .kicker,.island-panels .panel-shots figcaption{display:none}
  .island-panels .panel-shots{max-width:340px}
  .island-panels{padding-top:16px}
  .island-panels .chip{min-height:36px;padding:0 13px;font-size:0.90625rem}
  .island-panels .chip-label{margin:0 0 4px;font-size:0.9375rem}
  .island-panels .starter{gap:6px}
  .island-panels .brief-preview{padding:8px 12px;font-size:0.875rem}
}

.panel[hidden]{display:none}
/* Headline words rise out of a blur one after another; the other lines come in just behind. */
.panel :is(h1,h2) .word{display:inline-block}
.panel.is-entering :is(h1,h2) .word{animation:word-in .7s var(--ease) both;animation-delay:calc(var(--i) * 45ms + 40ms)}
@keyframes word-in{from{opacity:0;transform:translateY(.4em);filter:blur(8px)}}
.panel.is-entering>*:not(h1):not(h2){animation:panel-in .6s var(--ease) both}
.panel.is-entering>*:nth-child(2){animation-delay:.05s}
.panel.is-entering>*:nth-child(3){animation-delay:.1s}
.panel.is-entering>*:nth-child(4){animation-delay:.15s}
.panel.is-entering>*:nth-child(5){animation-delay:.2s}
.panel.is-entering>*:nth-child(n+6){animation-delay:.25s}
@keyframes panel-in{from{opacity:0;transform:translateY(16px)}}
.panel .contact-card{margin-top:24px}
.panel .zone-foot{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
.panel-shots{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}
.panel-shots figure{margin:0}
.panel-shots img{border-radius:12px;border:1px solid var(--line)}
.panel-shots figcaption{font-size:0.8125rem;color:var(--text-3);margin-top:6px}
.panel .work-shelf{margin-top:24px}
/* Each district's own colour (the same one its island and lights use in 3D). */
.district-tag{display:inline-flex;align-items:center;gap:10px;margin-bottom:16px;color:var(--accent);font-weight:700;font-size:0.8125rem;letter-spacing:.1em;text-transform:uppercase}
.district-tag i{width:9px;height:9px;border-radius:50%;background:var(--accent);box-shadow:0 0 12px var(--accent)}
.sheet-handle{display:none}

/* Under the 3D world, like the live site: Back/Next at the bottom; Pause motion at the top right. */
.island .map-hud{left:calc(var(--col-left) + var(--col-w) + 40px);bottom:22px;padding:8px 8px 8px 20px}
.island-motion{position:fixed;z-index:35;right:24px;top:88px;background:rgba(26,29,36,.86)}
/* Seven dots in the district colours; the current one is a short bar. */
.hud-dots{display:flex;align-items:center;gap:5px}
.hud-dots i{width:6px;height:6px;border-radius:3px;background:var(--accent);opacity:.35;transition:width .45s var(--ease),opacity .3s var(--ease),box-shadow .3s}
.hud-dots i.is-on{width:20px;opacity:1;box-shadow:0 0 10px var(--accent)}
/* A light that runs round the edge of the yellow Next button. */
@property --shine{syntax:'<angle>';inherits:false;initial-value:0deg}
.island #hud-next{position:relative;isolation:isolate}
.island #hud-next::after{content:"";position:absolute;inset:-2px;border-radius:inherit;padding:2px;pointer-events:none;
  background:conic-gradient(from var(--shine),transparent 0 70%,rgba(255,255,255,.95) 82%,transparent 94%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;animation:shine 3.2s linear infinite}
.island #hud-next:disabled::after{display:none}
@keyframes shine{to{--shine:360deg}}


/* The band between districts: dark, edged in the new district's colour, sweeping across the words. */
.panel-wipe{position:fixed;z-index:11;top:72px;left:var(--col-left);width:var(--col-w);height:calc(100dvh - 72px);pointer-events:none;transform:scaleX(0);transform-origin:left;
  background:linear-gradient(90deg,var(--accent,var(--yellow)) 0 4px,rgba(18,20,25,.97) 4px calc(100% - 4px),var(--accent,var(--yellow)) calc(100% - 4px));box-shadow:0 0 40px -6px var(--accent,var(--yellow))}
.panel-wipe.is-wiping{animation:wipe .52s cubic-bezier(.7,0,.3,1) both}
@keyframes wipe{0%{transform:scaleX(0);transform-origin:left}50%{transform:scaleX(1);transform-origin:left}50.01%{transform:scaleX(1);transform-origin:right}100%{transform:scaleX(0);transform-origin:right}}
/* Pause motion turns every one of these off. */
html[data-motion=off] .panel.is-entering :is(h1,h2) .word,html[data-motion=off] .island-label:not([hidden]),html[data-motion=off] .island #hud-next::after{animation:none}

/* Phones and tablets: the panel becomes a bottom sheet that can shrink to its headline. */
@media (max-width:999px){
  .island-panels{display:block;top:auto;left:0;right:0;bottom:64px;width:auto;max-height:calc(40dvh - 64px);padding:0 20px 24px;border-radius:20px 20px 0 0;border:1px solid var(--line-2);border-bottom:0;background:rgba(18,20,25,.92);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);text-shadow:none;scrollbar-width:thin;box-shadow:inset 0 3px 0 var(--accent,var(--yellow));transition:max-height .45s var(--ease)}
  body.island::after{display:none}
  .island-panels.is-collapsed{max-height:206px;overflow:hidden}
  .sheet-handle{display:flex;justify-content:center;align-items:flex-start;position:sticky;top:0;z-index:1;width:calc(100% + 40px);margin:0 -20px 6px;height:34px;padding-top:10px;border:0;background:linear-gradient(rgba(18,20,25,.96) 70%,rgba(18,20,25,0));color:transparent;font-size:0;cursor:pointer}
  .sheet-handle::before{content:"";width:44px;height:5px;border-radius:3px;background:var(--line-2)}
  .island-panels .zone-copy h1{font-size:2.125rem;margin-bottom:14px}
  .island-panels .zone-copy h2{font-size:1.875rem;margin-bottom:12px}
  .island-panels .new-chip,.island-panels .kicker{display:none}
  .island-still{left:16px;right:16px;top:72px;bottom:auto;height:calc(60dvh - 80px)}
  .island-motion{right:12px;top:78px;min-height:34px;font-size:0.8125rem}
  /* a link to #home (or any district) lands the sheet at its top, not under the handle */
  .island-panels>.panel{scroll-margin-top:40px}
  /* Back and Next become the sheet's bottom bar, so they never cover its buttons. */
  .island .map-hud{left:0;right:0;bottom:0;height:64px;justify-content:space-between;padding:0 12px 0 20px;border-radius:0;border:0;border-top:1px solid var(--line);background:var(--ink-2);box-shadow:none}
  .island .hud-where{display:flex}
  /* Ask Mr. Octo sits at the right end of that bar (round, face only), with Back and Next beside it. */
  .island .map-hud{padding-right:72px}
  .island .ai-launcher{right:10px;bottom:6px;padding:6px;gap:0;border-radius:50%;min-height:0}
  .island .ai-launcher .ai-launch-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .island .ai-launcher .ai-launch-face{margin:0}
  .island .hud-steps button{white-space:nowrap;padding:0 12px}
  .island-label{font-size:0.75rem;min-height:30px;padding:0 10px}
  .panel-wipe{display:none}
}
@media (max-width:420px){.island .hud-dots{display:none}} /* "1 of 7" says it; the room goes to Back and Next */
@media (prefers-reduced-motion:reduce){
  .panel.is-entering>*:not(h1):not(h2){animation-name:panel-fade}
  .panel.is-entering :is(h1,h2) .word{animation-name:panel-fade;animation-delay:0s}
  @keyframes panel-fade{from{opacity:0}}
  .island-panels{transition:none}
}

/* "In sync + guide": the scene comes first and fills the left and middle; the district's words float
   in a compact card on the right. */
@media (min-width:1000px){
  .panel-right .island-panels{left:auto;right:var(--col-left);padding:12px 4px;overflow:visible;-webkit-mask-image:none;mask-image:none;text-shadow:none;animation:card-float 7s ease-in-out infinite}
  .panel-right .island-panels>.panel{flex-shrink:0;max-height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
  .panel-right .island-panels>.panel::-webkit-scrollbar{display:none}
  .panel-right .island-panels>.panel{padding:24px 24px 22px;border-radius:22px;border:1px solid rgba(255,255,255,.09);background:linear-gradient(160deg,rgba(32,36,46,.8),rgba(15,17,23,.74));-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 30px 60px -24px rgba(0,0,0,.7),inset 0 1px 0 rgba(255,255,255,.07),0 0 40px -18px var(--accent)}
  .panel-right .island-panels>.panel:focus{outline:none} /* focus moves here for screen readers; nothing to click */
  .panel-right .island-panels .panel-shots,.panel-right .island-panels .work-shelf{display:none} /* the laptop shows them */
  /* compact enough that every district fits the card without scrolling */
  .island.panel-right{--col-w:min(440px,35vw)}
  .panel-right .island-panels{top:120px;bottom:84px}
  .panel-right .island-panels>.panel{padding:12px 20px 10px}
  .panel-right .island-panels .zone-copy h1,.panel-right .island-panels .zone-copy h2{font-size:clamp(1.375rem,1.75vw,1.75rem);margin-bottom:6px;text-wrap:balance}
  .panel-right .island-panels .zone-copy h2 br{display:none} /* the two halves run on, wrapping only where they must */
  .panel-right .island-panels .zone-copy h2 .y{margin-left:.25em}
  .panel-right .island-panels .zone-copy>p,.panel-right .island-panels .zone-copy>p.lede{font-size:0.875rem;line-height:1.5}
  /* the hologram shows the lede big; on the card it stays for screen readers only */
  .panel-right .island-panels .zone-copy>h1+p,.panel-right .island-panels .zone-copy>h2+p{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .panel-right .island-panels .kicker,.panel-right .island-panels .district-tag{margin-bottom:6px;font-size:0.75rem}
  .panel-right .island-panels .new-chip{margin-bottom:10px;padding-block:6px}
  .panel-right .island-panels .actions{margin-top:8px}
  .panel-right .island-panels .btn{min-height:38px;font-size:0.875rem}
  .panel-right .island-panels .disciplines,.panel-right .island-panels .apps-list{margin-top:10px;gap:6px 14px}
  .panel-right .island-panels .disciplines li,.panel-right .island-panels .apps-list li{padding-top:6px}
  .panel-right .island-panels .disciplines b,.panel-right .island-panels .apps-list b{font-size:0.9375rem}
  .panel-right .island-panels .disciplines span,.panel-right .island-panels .apps-list span{display:none} /* names only; the hologram shows the rest */
  .panel-right .island-panels .points{margin-top:6px}
  .panel-right .island-panels .points{gap:2px}
  .panel-right .island-panels .points li{margin:0;font-size:0.8125rem;line-height:1.3}
  .panel-right .island-panels .stage-tabs{margin-top:10px;gap:6px}
  .panel-right .island-panels .stage-tab{min-height:34px;padding:0 12px;font-size:0.8125rem}
  .panel-right .island-panels .stage-panel{margin-top:6px;padding:8px 12px}
  .panel-right .island-panels .stage-panel p{font-size:0.8125rem;line-height:1.45}
  .panel-right .island-panels .price-card{margin-top:8px;padding:4px 12px 6px}
  .panel-right .island-panels .price-card h3{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)} /* for screen readers; the prices say it */
  .panel-right .island-panels .prices{gap:4px}
  .panel-right .island-panels .prices div{display:block;padding-top:4px}
  .panel-right .island-panels .prices dt,.panel-right .island-panels .prices dd{display:inline;font-size:0.75rem;line-height:1.35}
  .panel-right .island-panels .prices dt::after{content:": "}
  .panel-right .island-panels .price-card .fine{font-size:0.6875rem;margin-top:0}
  .panel-right .island-panels .starter{gap:5px;margin-top:6px}
  .panel-right .island-panels .chip-label{font-size:0.75rem;margin-bottom:4px}
  .panel-right .island-panels .chips{gap:4px}
  .panel-right .island-panels .chip{min-height:27px;padding:0 9px;font-size:0.75rem}
  .panel-right .island-panels .chip-group{display:flex;flex-wrap:wrap;align-items:center;gap:5px}
  .panel-right .island-panels .chip-group .chip-label{margin:0 4px 0 0}
  .panel-right .island-panels .chip-group .chips{display:contents}
  .panel-right .island-panels .brief-preview{padding:6px 10px;font-size:0.8125rem}
  .panel-right .island-panels .brief-preview:has(.is-empty){display:none} /* shows once something is picked */
  .panel-right .island-panels .panel .contact-card{margin-top:6px;padding:6px 12px}
  .panel-right .island-panels .contact-card h3{font-size:0.8125rem;margin-bottom:2px}
  .panel-right .island-panels .contact-card li{padding:3px 0;font-size:0.8125rem}
  .panel-right .island-panels .contact-card li span{display:none}
  .panel-right .island-panels .contact-card li:nth-child(n+3){display:none} /* the two numbers; email is under Contact */
  body.island.panel-right::after{left:auto;right:0;width:min(36vw,520px);background:linear-gradient(to left,rgba(18,20,25,.55),rgba(18,20,25,0))}
  .panel-right .island-foot{max-width:330px}
  .island.panel-right .map-hud{left:calc(var(--col-left) + 360px)}
  .panel-right .panel-wipe{display:none} /* it swept the left column, now the hologram; the card's words animate in on their own */
}
@keyframes card-float{50%{translate:0 -6px}}
@media (prefers-reduced-motion:reduce){.panel-right .island-panels{animation:none}}
html[data-motion=off] .panel-right .island-panels{animation:none}
