/* The frame around the playground: loading screen, top bar, menu, section navigator, footer. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ================= LOADING SCREEN ================= */
body.loading { overflow: hidden; }
.loader { --p: 0; position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; animation: loader-failsafe 0s 12s forwards; }
@keyframes loader-failsafe { to { visibility: hidden; } }
.loader-curtain { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.loader-curtain i { background: var(--c); margin-right: -1px; transition: translate .85s cubic-bezier(.76, 0, .18, 1); transition-delay: calc(var(--i) * 75ms + .15s); }
.loader-curtain i:nth-child(1) { --c: var(--cobalt); --i: 0; }
.loader-curtain i:nth-child(2) { --c: var(--tomato); --i: 1; }
.loader-curtain i:nth-child(3) { --c: var(--sun); --i: 2; }
.loader-curtain i:nth-child(4) { --c: var(--pink); --i: 3; }
.loader-curtain i:nth-child(5) { --c: var(--leaf); --i: 4; }
.loader-body { position: relative; display: flex; flex-direction: column; align-items: center; gap: .8rem; width: min(760px, 90vw); padding: clamp(1.2rem, 4vw, 2.6rem); background: var(--paper); border: 4px solid var(--ink); border-radius: 36px; box-shadow: 14px 14px 0 var(--ink); transition: scale .4s var(--spring), opacity .35s; }
.loader-blan { height: min(34svh, 300px); width: auto; animation: loader-bob 1.1s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes loader-bob { from { rotate: -4deg; } to { rotate: 5deg; translate: 0 -10px; } }
.loader-word { position: relative; font: 700 clamp(2.8rem, 12vw, 7rem)/1.25 var(--logo); letter-spacing: -.035em; white-space: nowrap; }
.loader-word span { display: block; padding-inline: .1em; }
.loader-word > span:first-child { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.loader-ink { position: absolute; inset: 0; color: var(--ink); clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0); }
.loader-bar { width: 100%; height: 22px; border: 3px solid var(--ink); border-radius: 99px; overflow: hidden; }
.loader-bar b { display: block; height: 100%; width: 100%; transform: scaleX(var(--p)); transform-origin: left; background: repeating-linear-gradient(-45deg, var(--ink) 0 12px, var(--cobalt) 12px 24px); }
.loader-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; width: 100%; }
.loader-num { font: 800 clamp(2.4rem, 7vw, 4rem)/1 var(--sans); font-stretch: 75%; font-variant-numeric: tabular-nums; }
.loader.done { pointer-events: none; }
.loader.done .loader-body { scale: .7; opacity: 0; }
.loader.done .loader-curtain i { translate: 0 -102%; }

/* ================= TOP BAR ================= */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: max(.8rem, env(safe-area-inset-top)) clamp(.9rem, 2.5vw, 2rem) .8rem; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.logo { display: inline-flex; align-items: flex-start; font: 700 1.35rem/1.3 var(--logo); letter-spacing: -.025em; color: var(--ink); text-decoration: none; background: var(--paper); padding: .25rem .85rem .3rem; border-radius: 99px; border: 2px solid var(--ink); }
.logo i { width: .5em; height: .5em; margin: .3em 0 0 .12em; border-radius: 50% 50% 50% 0; background: var(--tomato); rotate: -20deg; }
.quick { position: absolute; left: 50%; translate: -50% 0; display: flex; gap: .15rem; padding: .25rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 99px; }
.quick a { padding: .35rem 1.05rem; border-radius: 99px; color: var(--ink); font-weight: 700; font-size: .95rem; text-decoration: none; transition: background-color .2s, color .2s, rotate .25s var(--spring); }
.quick a:hover { background: var(--sun); rotate: -3deg; }
.quick a[aria-current] { background: var(--ink); color: var(--paper); }
.topbar-actions { display: flex; gap: .6rem; }
.burger { display: inline-flex; align-items: center; gap: .6rem; min-height: 46px; padding: .3rem 1.15rem .3rem .95rem; border: 2px solid var(--ink); border-radius: 99px; background: var(--ink); color: var(--paper); font-weight: 750; box-shadow: 0 4px 0 rgb(0 0 0 / .28); transition: translate .15s var(--spring); }
.burger:hover { translate: 0 -2px; }
.burger-lines { position: relative; display: block; width: 24px; height: 18px; }
.burger-lines i { position: absolute; left: 0; height: 3px; border-radius: 3px; transition: .3s var(--spring); }
.burger-lines i:nth-child(1) { top: 0; width: 24px; background: var(--sun); }
.burger-lines i:nth-child(2) { top: 7.5px; width: 16px; background: var(--pink); }
.burger-lines i:nth-child(3) { top: 15px; width: 21px; background: var(--lime); }
.burger:hover .burger-lines i { width: 24px; }
.burger.is-open .burger-lines i { width: 24px; }
.burger.is-open .burger-lines i:nth-child(1) { top: 7.5px; rotate: 45deg; }
.burger.is-open .burger-lines i:nth-child(2) { opacity: 0; translate: -14px 0; }
.burger.is-open .burger-lines i:nth-child(3) { top: 7.5px; rotate: -45deg; }
body.on-dark .burger { background: var(--sun); color: var(--ink); border-color: var(--paper); }
body.on-dark .burger-lines i { background: var(--ink); }

/* ================= FULL-SCREEN MENU ================= */
.menu { --bg: var(--paper); --fg: var(--ink); width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--fg); overflow: hidden; transition: background-color .45s; }
.menu[open] { display: flex; flex-direction: column; animation: menu-in .65s cubic-bezier(.7, 0, .2, 1); }
.menu::backdrop { background: transparent; }
@keyframes menu-in { from { clip-path: circle(0% at calc(100% - 70px) 40px); } to { clip-path: circle(150% at calc(100% - 70px) 40px); } }
.menu-top { display: flex; justify-content: space-between; align-items: center; padding: max(.8rem, env(safe-area-inset-top)) clamp(.9rem, 2.5vw, 2rem) .8rem; }
.menu-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 2rem; padding: .5rem var(--gut) 1.5rem; overflow: auto; }
.menu nav ol { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(6, auto); align-content: center; min-height: 100%; column-gap: 2rem; }
.menu nav li { border-bottom: 2px solid currentColor; animation: item-in .6s var(--spring) backwards; animation-delay: calc(var(--i) * 35ms + .15s); }
@keyframes item-in { from { translate: -60px 0; opacity: 0; } }
.menu nav a { display: flex; align-items: baseline; gap: .8rem; padding: clamp(.35rem, 1.5svh, 1.1rem) 0; color: inherit; text-decoration: none; }
.menu nav a small { font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
.menu nav a span { font-weight: 800; font-stretch: 76%; font-size: clamp(1.8rem, min(3.8vw, 6.4svh), 3.9rem); line-height: 1; transition: translate .35s var(--spring), font-stretch .3s; }
.menu nav a:hover span, .menu nav a:focus-visible span { translate: 14px 0; font-stretch: 100%; }
.menu nav a[aria-current] span { font-family: var(--chunk); font-weight: 400; font-stretch: normal; font-size: clamp(1.5rem, min(3vw, 5.2svh), 3.1rem); }
.menu-side { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.4rem; min-height: 0; }
.menu-preview { display: flex; flex-direction: column; align-items: center; gap: .7rem; width: min(380px, 100%); padding: 14px 14px 10px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 12px 12px 0 var(--ink); rotate: 3deg; }
.menu-preview img { width: 100%; height: min(40svh, 380px); object-fit: contain; }
.menu-preview img.swap { animation: pop .45s var(--spring); }
.menu-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.menu-contact a, .menu-contact span { padding: .35rem .9rem; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 99px; font-weight: 650; font-size: .9rem; text-decoration: none; }

/* ================= SECTION NAVIGATOR ================= */
.dock { position: fixed; right: clamp(8px, 1.4vw, 20px); bottom: max(clamp(8px, 1.4vw, 20px), env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: center; gap: 4px; padding: 5px; background: var(--ink); color: var(--paper); border: 2px solid var(--paper); border-radius: 99px; box-shadow: 0 10px 24px -10px rgb(0 0 0 / .6), 0 0 0 2px var(--ink); transition: translate .4s var(--spring), visibility 0s; }
.dock.away { translate: 0 180%; visibility: hidden; transition: translate .4s, visibility 0s .4s; }
.dock button { display: grid; place-items: center; height: 44px; padding: 0; border: 0; border-radius: 99px; background: transparent; color: inherit; }
.dock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dock-top, .dock-step { width: 44px; }
.dock-top svg { width: 44px; height: 44px; }
.dock-top circle { stroke: rgb(255 254 251 / .22); stroke-width: 3; }
.dock-top .ring { stroke: var(--sun); stroke-dasharray: 100; stroke-dashoffset: 100; transform-origin: center; rotate: -90deg; }
.dock-step:hover:not(:disabled) { background: rgb(255 254 251 / .18); }
.dock-next { background: var(--sun) !important; color: var(--ink) !important; }
.dock-next:hover:not(:disabled) { background: var(--lime) !important; }
.dock .dock-now { display: flex; align-items: center; gap: .55rem; min-width: 11.5rem; justify-content: center; padding: 0 .8rem; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.dock-now b { padding: .05rem .45rem; border-radius: 6px; background: var(--paper); color: var(--ink); font-variant-numeric: tabular-nums; }
.dock-now:hover span { text-decoration: underline wavy var(--sun); text-underline-offset: 4px; }

/* ================= FOOTER ================= */
.footer { position: relative; padding: 3rem var(--gut) max(2rem, env(safe-area-inset-bottom)); background: var(--ink); color: var(--paper); overflow: hidden; border-top: 3px dashed rgb(255 254 251 / .3); }
.footer-word { font: 700 clamp(3rem, 17vw, 22rem)/1.15 var(--logo); letter-spacing: -.045em; text-align: center; white-space: nowrap; color: var(--paper); padding-inline: .1em; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin: 1.5rem 0 2rem; }
.footer h2 { font: 400 1.3rem/1.4 var(--chunk); color: var(--sun); margin: 0 0 .7rem; }
.footer ul { columns: 2; column-gap: 1.5rem; }
.footer-cols > div:nth-child(2) ul { columns: 1; }
.footer li { break-inside: avoid; padding: .18rem 0; }
.footer a { color: inherit; text-underline-offset: 4px; }
.footer-end { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 1rem; text-align: right; }
.footer small { display: block; text-align: center; opacity: .65; }

@media (max-width: 1100px) {
  .quick { display: none; }
}
@media (max-width: 900px) {
  .menu-body { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .menu nav ol { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; min-height: 0; }
  .menu-preview { display: none; }
  .menu-side { align-items: flex-start; padding-bottom: 1rem; }
  .menu-contact { justify-content: flex-start; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-end { grid-column: 1 / -1; align-items: center; text-align: center; }
}
@media (max-width: 760px) {
  .logo { font-size: 1.1rem; }
  .topbar .pill { min-height: 40px; padding-inline: .8rem; font-size: .85rem; }
  .burger { min-height: 42px; padding-inline: .8rem .95rem; font-size: .9rem; }
  /* the first phone screen belongs to the paint tools; the navigator arrives once you leave it */
  .dock.at-home { translate: 0 180%; visibility: hidden; }
  .dock .dock-now { min-width: 0; padding: 0 .35rem; }
  .dock-now span { display: none; }
  .dock-top, .dock-step, .dock button { height: 40px; }
  .dock-top, .dock-step { width: 40px; }
  .dock-top svg { width: 40px; height: 40px; }
  .footer-cols { grid-template-columns: 1fr; text-align: center; }
  .footer { padding-bottom: 6rem; }
}
@media (max-width: 430px) {
  .topbar .sound { display: none; }
}
/* very narrow panes: the burger keeps its name for screen readers only */
@media (max-width: 340px) {
  .logo { font-size: .95rem; }
  .burger { padding-inline: .75rem; }
  .burger > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .snap, .bubble-hero { display: none !important; }
  .tagline { max-width: 80vw !important; }
  .meet-stage { height: 150vw !important; min-height: 0 !important; }
}
/* hidden pin labels must never widen the page */
.meet { overflow-x: clip; }
