/* ==========================================================================
   Base: the palette as CSS variables (same colors as the Tailwind theme in
   config.js), the page background, and global defaults.
   ========================================================================== */

:root {
  --passionfruit: #6C265C;
  --pulp: #F3A92B;
  --mango: #F6B93B;
  --yuzu: #E8D64B;
  --greentea: #91A875;
  --milk: #FFF8E9;
  --ink: #493B37;
  --ink-purple: #493B77;
  --guava: #E98C91;
  --paper: #FAF5EA;
  --blueberry: #5C7CBF;
  --matcha: #8FA84A;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(73, 59, 55, .04), 0 10px 30px -14px rgba(73, 59, 55, .22);
  --shadow-pop: 0 20px 50px -12px rgba(73, 59, 55, .35);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { -webkit-tap-highlight-color: transparent; max-width: 100%; overflow-x: clip; }

body {
  max-width: 100%;
  overflow-x: clip;
  background-color: var(--milk);
  color: var(--ink);
  font-family: 'Quicksand', sans-serif;
  background-image:
    radial-gradient(circle at 12% 0%, var(--glow, transparent), transparent 38%),
    radial-gradient(circle at 100% 30%, var(--glow-2, transparent), transparent 35%),
    linear-gradient(to right, rgba(145, 168, 117, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(145, 168, 117, .07) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 24px 24px, 24px 24px;
  background-attachment: fixed, fixed, scroll, scroll; /* the glows stay, the squares scroll with the page */
  transition: background-color .4s ease;
}

#page { min-width: 0; }
#site-header, #page > section, [data-mount] { min-width: 0; max-width: 100%; }
html.full-width #page, html.full-width #site-header > div { max-width: 100% !important; }
[data-stage-wrap] { max-width: 100%; overflow-x: clip; }

::selection { background: var(--mango); color: var(--ink); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(145, 168, 117, .7); border-radius: 4px; }

[hidden] { display: none !important; }

/* Top loading progress bar ("growing line" at the very top of the viewport) */
.top-loader { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none; overflow: hidden; opacity: 1; transition: opacity .35s ease; }
.top-loader.is-done { opacity: 0; }
.top-loader-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--passionfruit), var(--mango), var(--guava)); box-shadow: 0 0 10px rgba(246, 185, 59, .65); transition: width .28s cubic-bezier(.22, 1, .36, 1); border-radius: 0 999px 999px 0; }

/* The app fades in once drawn (App.show); shown after 4s anyway, in case */
.js body.app > :not(#top-loader):not(#app-splash) { opacity: 0; animation: app-reveal 0s 4s forwards; }
.js body.app.is-ready > :not(#top-loader):not(#app-splash) { opacity: 1; transition: opacity .3s ease-out; }
@keyframes app-reveal { to { opacity: 1; } }

/* Respect the system "reduce motion" setting */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
