/* ══ ARCA — app feel ══════════════════════════════════════════════════════
   The small things that separate "a website on a phone" from an app. Mostly
   about removing browser behaviours that give the game away.
   ────────────────────────────────────────────────────────────────────── */

/* ── Cross-document view transitions ──────────────────────────────────────
   Navigating between pages normally flashes white and jumps to the top.
   This crossfades instead, so moving around feels like one app rather than
   a series of page loads. Chrome 126+ and Safari 18+ honour it; everywhere
   else simply navigates as before, so there is no fallback to write. */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  /* Short on purpose. Anything over ~250ms stops reading as "instant" and
     starts reading as "slow", which is the opposite of the goal. */
  animation-duration: 220ms;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ── Tap feedback ─────────────────────────────────────────────────────────
   Mobile Safari and Chrome paint a grey box over any tapped link. Nothing
   says "web page" louder. Removed globally; interactive elements provide
   their own feedback through their existing transitions. */
a, button, [role="button"], summary, label, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

/* ── Installed-app behaviours ─────────────────────────────────────────────
   Scoped to .arca-standalone (set by pwa.js) so the normal website keeps
   every browser affordance people expect in a tab. */
.arca-standalone,
.arca-standalone body {
  /* Kills the rubber-band that exposes a white strip above the hero and
     below the footer — the single most obvious "this is Safari" tell.
     Also prevents pull-to-refresh firing on an accidental downward swipe. */
  overscroll-behavior: none;
  /* Stops iOS inflating type in landscape. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Long-press on navigation should not raise a text-selection caret or the
   iOS callout menu. Body copy stays selectable — members may want to copy
   an address or a date. */
.arca-standalone nav,
.arca-standalone .arca-tabs,
.arca-standalone .nav-link,
.arca-standalone .footer-nav,
.arca-standalone button,
.arca-standalone .btt {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Images in an app are UI, not content to be dragged out or saved by
   accident while scrolling. */
.arca-standalone img {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

/* ── Momentum + rendering ─────────────────────────────────────────────── */
.arca-standalone {
  -webkit-overflow-scrolling: touch;
}

/* Hairline dividers render heavy on 3x screens without this. */
@media (-webkit-min-device-pixel-ratio: 2) {
  .arca-standalone .arca-tabs { border-top-width: .5px; }
}

/* ── Website furniture, hidden in the installed app ───────────────────────
   The big marketing footer — Navigate / Connect / Membership Waitlist /
   newsletter signup / © line — is the clearest "this is a website" tell when
   you scroll to the bottom of Account inside the app. The tab bar already
   provides navigation, and the legal links live on their own pages.

   Scoped to .arca-standalone, so the website is completely unaffected for
   anyone in a desktop or mobile browser.
   ────────────────────────────────────────────────────────────────────── */
.arca-standalone footer,
.arca-standalone .mega-footer,
.arca-standalone .footer-nav,
.arca-standalone .footer-social-links,
.arca-standalone .cta-layer {
  display: none !important;
}

/* Back-to-top would otherwise sit on top of the floating tab bar. */
.arca-standalone .btt {
  bottom: calc(92px + env(safe-area-inset-bottom)) !important;
}

/* The app's own pages bring their own header, so the website nav is noise
   there. Pages that are still website-shaped keep theirs for navigation. */
.arca-standalone .arca-app-page nav { display: none !important; }

/* ── Prompt banner + install sheet ────────────────────────────────────────
   These used to be injected from pwa.js, but the install module returns
   early when the app is already installed — and it returned BEFORE the
   injection. So inside the installed app these classes had no styles at
   all, and the notifications prompt (which reuses .arca-install) rendered
   as a bare block in normal flow at the bottom of Account, looking like a
   footer that had gone wrong.

   Styles belong in a stylesheet. Here they always exist, and they paint on
   first frame instead of after JS runs.
   ────────────────────────────────────────────────────────────────────── */
.arca-install{
  position:fixed;left:50%;right:auto;
  bottom:calc(14px + env(safe-area-inset-bottom));
  transform:translate(-50%,calc(100% + 24px));
  width:calc(100% - 28px);max-width:460px;
  z-index:9700;display:flex;align-items:center;gap:1rem;
  background:rgba(10,10,10,.88);
  -webkit-backdrop-filter:blur(22px) saturate(1.4);backdrop-filter:blur(22px) saturate(1.4);
  border:.5px solid rgba(248,248,248,.14);border-radius:18px;
  box-shadow:0 12px 38px rgba(10,10,10,.3);
  padding:.95rem 1rem;
  transition:transform .62s cubic-bezier(.22,1,.36,1);
  font-family:'Montserrat','Helvetica Neue',sans-serif;
}
.arca-install.in{transform:translate(-50%,0)}
.arca-install img{width:40px;height:40px;flex:0 0 40px;display:block;border-radius:9px}
.arca-install-txt{flex:1;min-width:0}
.arca-install-ttl{
  font-family:'Cormorant Garamond',Georgia,serif;font-weight:200;
  font-size:1.14rem;letter-spacing:-.01em;line-height:1.15;color:#F8F8F8;margin-bottom:.2rem;
}
.arca-install-ttl em{font-style:italic;font-weight:inherit}
.arca-install-sub{font-size:.6rem;font-weight:200;line-height:1.6;color:rgba(248,248,248,.6)}
.arca-install-sub b{font-weight:400;color:rgba(248,248,248,.85)}
.arca-install-act{display:flex;align-items:center;gap:.3rem;flex:0 0 auto}
/* 44px: Apple HIG and WCAG 2.5.5 minimum touch target. */
.arca-install-btn{
  font-family:inherit;font-size:.55rem;font-weight:400;letter-spacing:.2em;
  text-transform:uppercase;color:#0A0A0A;background:#F8F8F8;border:none;border-radius:100px;
  padding:0 20px;min-height:44px;cursor:pointer;transition:opacity .35s;
}
.arca-install-btn:hover{opacity:.84}
.arca-install-x{
  background:none;border:none;color:rgba(248,248,248,.45);
  font-size:1.5rem;line-height:1;cursor:pointer;transition:color .35s;
  min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center;
}
.arca-install-x:hover{color:#F8F8F8}
.arca-share{display:inline-block;width:11px;height:11px;vertical-align:-1px;margin:0 3px}

/* Guided install sheet (iOS) */
.arca-sheet{
  position:fixed;inset:0;z-index:9750;display:flex;align-items:flex-end;justify-content:center;
  background:rgba(10,10,10,.55);opacity:0;pointer-events:none;transition:opacity .36s ease;
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
}
.arca-sheet.in{opacity:1;pointer-events:auto}
.arca-sheet-panel{
  width:100%;max-width:460px;background:#0F0F0F;color:#F8F8F8;
  border-top-left-radius:20px;border-top-right-radius:20px;
  border:.5px solid rgba(248,248,248,.14);border-bottom:none;
  padding:12px 1.35rem calc(1.6rem + env(safe-area-inset-bottom));text-align:center;
  transform:translateY(16px);transition:transform .42s cubic-bezier(.22,1,.36,1);
}
.arca-sheet.in .arca-sheet-panel{transform:none}
.arca-sheet-grip{width:36px;height:4px;border-radius:4px;background:rgba(248,248,248,.22);margin:0 auto 1.1rem}
.arca-sheet-icon{width:52px;height:52px;border-radius:12px;margin:0 auto .9rem;display:block}
.arca-sheet-ttl{
  font-family:'Cormorant Garamond',Georgia,serif;font-weight:200;font-size:1.5rem;
  letter-spacing:-.01em;line-height:1.15;margin-bottom:1.3rem;
}
.arca-sheet-ttl em{font-style:italic;font-weight:inherit}
.arca-steps{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:grid;gap:.85rem}
.arca-steps li{display:flex;gap:.75rem;align-items:flex-start;font-size:.72rem;font-weight:200;line-height:1.7;color:rgba(248,248,248,.74)}
.arca-steps b{font-weight:400;color:#F8F8F8}
.arca-steps .n{
  flex:0 0 20px;width:20px;height:20px;border-radius:50%;margin-top:1px;
  border:.5px solid rgba(248,248,248,.3);display:flex;align-items:center;justify-content:center;
  font-size:.56rem;font-weight:400;color:#F8F8F8;
}
.arca-sheet .arca-install-btn{width:100%;justify-content:center}
@media (prefers-reduced-motion:reduce){
  .arca-sheet,.arca-sheet-panel,.arca-install{transition:none}
}
@media (max-width:420px){
  .arca-install{gap:.7rem;padding-left:.85rem;padding-right:.55rem}
  .arca-install img{width:36px;height:36px;flex-basis:36px}
  .arca-install-ttl{font-size:1.02rem}
  .arca-install-btn{padding:0 15px}
}

/* ── Floating tab bar ─────────────────────────────────────────────────────
   A pill sitting on top of the content, not chrome bolted to the frame —
   the clearest single visual difference between an app and a website in
   full-screen. Moved here from pwa.js so it paints on the first frame
   instead of popping in once the script has run.

   top / height / opacity / transform are reset explicitly: pages style the
   bare `nav` element, and one stray element selector is enough to park this
   off-screen or invisible.
   ────────────────────────────────────────────────────────────────────── */
.arca-standalone body{
  padding-bottom:calc(92px + env(safe-area-inset-bottom)) !important;
}
.arca-tabs{
  position:fixed;left:50%;right:auto;top:auto;height:auto;
  bottom:calc(14px + env(safe-area-inset-bottom));
  transform:translateX(-50%);opacity:1;z-index:9600;display:flex;
  width:calc(100% - 32px);max-width:420px;
  background:rgba(10,10,10,.82);
  -webkit-backdrop-filter:blur(22px) saturate(1.4);backdrop-filter:blur(22px) saturate(1.4);
  border:.5px solid rgba(248,248,248,.14);border-radius:100px;
  box-shadow:0 10px 34px rgba(10,10,10,.26);
  padding:4px;overflow:hidden;
  font-family:'Montserrat','Helvetica Neue',sans-serif;
}
/* Icons only — no labels. Five labels at 375px force ~7px type nobody
   reads, and a row of tiny words is what makes a tab bar read as a website
   menu rather than an app. The icon carries the meaning; aria-label carries
   it for screen readers. */
.arca-tab{
  position:relative;flex:1;display:flex;
  align-items:center;justify-content:center;min-height:52px;
  text-decoration:none;color:rgba(248,248,248,.46);border-radius:100px;
  transition:color .26s ease, background-color .26s ease, transform .26s cubic-bezier(.22,1,.36,1);
  -webkit-tap-highlight-color:transparent;
}
.arca-tab svg{width:23px;height:23px;display:block}
.arca-tab.on{color:#F8F8F8;background:rgba(248,248,248,.12)}
.arca-tab:active{transform:scale(.92)}

/* Centre slot: the ARCA arch, slightly larger, always a touch brighter than
   its neighbours so the bar has a focal point rather than five equal dots. */
.arca-tab.brand svg{width:26px;height:26px}
.arca-mark{display:block;width:27px;height:27px;background:currentColor;
  -webkit-mask:url(/img/arca-mark.png) center/contain no-repeat;mask:url(/img/arca-mark.png) center/contain no-repeat}
.arca-tab.brand{color:rgba(248,248,248,.62)}
.arca-tab.brand.on{color:#F8F8F8}

/* Account shows the member's initials instead of a generic person glyph. */
.arca-initials{
  width:23px;height:23px;border-radius:50%;
  border:1px solid currentColor;
  display:flex;align-items:center;justify-content:center;
  font-family:'Montserrat','Helvetica Neue',sans-serif;
  font-size:.46rem;font-weight:400;letter-spacing:.02em;line-height:1;
}
.arca-tab.on .arca-initials{background:rgba(248,248,248,.14);border-color:transparent}
@media (prefers-reduced-motion:reduce){ .arca-tab{transition:none} }

/* ── Map, in the app ──────────────────────────────────────────────────────
   On the website the map is a full-bleed 300px band. On a 812px phone, once
   the nav (64px) and the tab bar (92px) are accounted for, that band was
   eating most of the visible area — it read as "the map IS the page".

   In the app it becomes a card instead: shorter, inset from the edges and
   rounded, so it sits inside the page rather than dominating it. Tapping a
   pin still flies the map, so nothing is lost.
   ────────────────────────────────────────────────────────────────────── */
.arca-standalone .map-wrapper{
  height:196px !important;
  margin:0 1.15rem;
  width:auto;
  border-radius:16px;
  border:.5px solid rgba(10,10,10,.1);
}
.arca-standalone .map-wrapper .leaflet-container{border-radius:16px}

/* Zoom buttons are desktop furniture; pinch works and the pins fly on tap. */
.arca-standalone .leaflet-control-zoom{display:none !important}

@media (min-width:600px){
  .arca-standalone .map-wrapper{height:260px !important}
}

/* ── No website chrome inside the app ─────────────────────────────────────
   The installed app should never show the website's own navigation. The
   floating tab bar replaces it entirely, and seeing the marketing nav bar
   (ARCA wordmark, hamburger, Apply / Login links) is the single clearest
   way the app stops feeling like an app.

   This matters most on login.html, which the app lands on whenever a
   session has expired — previously that showed the full website header.

   Website visitors are untouched: everything here is scoped to
   .arca-standalone, which only exists in an installed app.
   ────────────────────────────────────────────────────────────────────── */
.arca-standalone nav,
.arca-standalone .nav,
.arca-standalone .nav-hamburger,
.arca-standalone .mobile-overlay,
.arca-standalone .scroll-progress,
.arca-standalone .cookie-banner,
.arca-standalone .fixed-apply {
  display: none !important;
}

/* Pages reserve room for the 64px fixed nav. With it gone, reclaim the gap
   and respect the notch instead. */
.arca-standalone main,
.arca-standalone .page,
.arca-standalone body > .container:first-of-type {
  padding-top: env(safe-area-inset-top) !important;
}

/* ── Tap feedback ─────────────────────────────────────────────────────────
   An app acknowledges a touch on the frame you press, before anything
   loads. Without it the UI feels dead for the 100-300ms until the next
   screen paints — which reads as "slow" even when it isn't.

   Audit found Home, Spaces and Pass had no :active state at all, so most
   cards in the app did nothing when pressed.
   ────────────────────────────────────────────────────────────────────── */
.arca-standalone .hero-card,
.arca-standalone .tile,
.arca-standalone .room,
.arca-standalone .card,
.arca-standalone .ev,
.arca-standalone .action,
.arca-standalone .pack,
.arca-standalone .conc-btn,
.arca-standalone .credits,
.arca-standalone .credits-card,
.arca-standalone .qr-plate {
  transition: transform .18s cubic-bezier(.22,1,.36,1), opacity .18s ease;
}
.arca-standalone .hero-card:active,
.arca-standalone .tile:active,
.arca-standalone .room:active,
.arca-standalone .card:active,
.arca-standalone .ev:active,
.arca-standalone .action:active,
.arca-standalone .pack:active,
.arca-standalone .conc-btn:active,
.arca-standalone .credits:active,
.arca-standalone .credits-card:active,
.arca-standalone .qr-plate:active {
  transform: scale(.975);
  opacity: .9;
}

/* Removes the ~300ms delay browsers hold back in case a tap is a
   double-tap-to-zoom. The single biggest cheap win in perceived speed. */
.arca-standalone a,
.arca-standalone button,
.arca-standalone [role="button"],
.arca-standalone .card,
.arca-standalone .room,
.arca-standalone .ev,
.arca-standalone .pack {
  touch-action: manipulation;
}

@media (prefers-reduced-motion: reduce) {
  .arca-standalone *:active { transform: none !important; }
}

/* ── Scroll ───────────────────────────────────────────────────────────────
   Returning to a tab should land where you left it, not at the top. */
.arca-standalone { scroll-behavior: auto; }

/* ── Tab destinations don't get back buttons ──────────────────────────────
   Experiences and Pass each carry a "‹ Home" link, which made sense before
   they were tabs. In an app with a persistent tab bar, a back-to-Home link
   on a tab destination is redundant — iOS apps don't do it, and it reads as
   a web page wearing app clothes.

   Only hidden in standalone: in a browser tab there IS no tab bar, so the
   link is the only way back and must stay.
   ────────────────────────────────────────────────────────────────────── */
.arca-standalone .strip .back { visibility: hidden; }

/* The strip still reserves its space, so the section eyebrow stays put
   rather than jumping left when the link disappears. */


/* ══ Dark mode ══════════════════════════════════════════════════════════════
   Chosen by the member in Account. Every app page draws from the same five
   tokens, so the palette lives here once; html.dark outranks the pages'
   own :root values. The few colours a page hard-codes for light mode are
   corrected underneath. */
html.dark{--paper:#0D0C0A;--paper2:#1B1916;--ink:#F1EEE8;--soft:#9C978E;--line:rgba(241,238,232,.12);color-scheme:dark}
html.dark .empty{background:rgba(255,255,255,.03)}
html.dark .skel{background:linear-gradient(90deg,var(--paper2) 25%,#26231F 37%,var(--paper2) 63%);background-size:400% 100%}
html.dark .row:active,html.dark .pack:active,html.dark .method:active{background:#2A2723}
html.dark .pay-notice{background:rgba(255,255,255,.04)}
html.dark .row-img{background:#26231F}
/* White pills that carry ink text must stay white-on-dark-text. */
html.dark .room-live,html.dark .card-badge{background:rgba(244,242,238,.92);color:#0A0A0A}
/* The balance card is the one ink panel in light mode; in dark mode it stays
   a dark panel (lifted a step) so its pale labels keep their contrast. */
html.dark .credits-card{background:linear-gradient(160deg,#24211D 0%,#171512 100%);color:#F1EEE8;box-shadow:inset 0 0 0 .5px rgba(241,238,232,.12)}
html.dark .avatar{background:#24211D;color:#F1EEE8;box-shadow:inset 0 0 0 .5px rgba(241,238,232,.14)}
