/* justecoqqo — shared foundation: fonts, tokens, header, buttons, footer, motion. */

@font-face {
  font-family: 'Figtree';
  src: url('/assets/fonts/figtree.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  /* hub palette: pearl and iris */
  --pearl: #eef1f7;
  --pearl-deep: #e2e7f2;
  --paper: #f8f9fc;
  --ink: #14151d;
  --ink-soft: #5a6075;
  --ink-faint: #8d93a8;
  --iris-1: #ff7ab6;
  --iris-2: #a98bff;
  --iris-3: #66d4ff;
  --iris: linear-gradient(115deg, var(--iris-1) 0%, var(--iris-2) 48%, var(--iris-3) 100%);

  /* semantic tokens, overridden by app themes */
  --bg: var(--pearl);
  --bg-deep: var(--pearl-deep);
  --surface: #ffffff;
  --surface-2: var(--paper);
  --text: var(--ink);
  --mute: var(--ink-soft);
  --faint: var(--ink-faint);
  --rule: rgba(20, 21, 29, 0.09);
  --accent: #8b6cff;
  --accent-2: #4fc3f7;
  --on-accent: #ffffff;
  --glass: rgba(255, 255, 255, 0.64);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-line: rgba(255, 255, 255, 0.85);
  --shadow: 0 1px 2px rgba(20, 21, 29, 0.05), 0 12px 32px -12px rgba(30, 32, 60, 0.18);
  --shadow-lg: 0 2px 6px rgba(20, 21, 29, 0.05), 0 32px 80px -24px rgba(40, 36, 90, 0.28);
  --donate: var(--iris);

  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-ui: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --container: min(1200px, calc(100% - 40px));
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.7, 0, 0.2, 1);
  --header-h: 76px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 3px;
  border-radius: 10px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* ------------------------------------------------------------------ grain */

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: fixed;
  inset: 34px 0 auto;
  z-index: 80;
  pointer-events: none;
  transition: top 0.45s var(--ease-out);
}

/* at the top of the page the bar floats lower; once the page scrolls it moves up */
.site-header.is-scrolled {
  top: 14px;
}

.header-inner {
  width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  /* one frosted glass bar: the page behind it is blurred so the buttons stand out */
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 18px 40px -22px rgba(40, 30, 90, 0.45);
  pointer-events: auto;
  transition: background 0.4s, box-shadow 0.4s;
}

.brand-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

/* iridescent rim */
.brand-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--spin, 0deg), #ff9ccb, #b9a2ff, #8fe1ff, #fff3, #ff9ccb);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin-rim 8s linear infinite;
}

@property --spin {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes spin-rim {
  to {
    --spin: 360deg;
  }
}

.brand-pill:hover {
  transform: translateY(-1px) scale(1.02);
}

.brand-mark {
  --m: 32px;
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: var(--m);
  height: var(--m);
  border-radius: calc(var(--m) * 0.31);
  font-size: calc(var(--m) * 0.72);
  background: linear-gradient(135deg, var(--iris-1) 0%, var(--iris-2) 52%, var(--iris-3) 100%);
  box-shadow: 0 4px 12px -4px rgba(140, 100, 255, 0.6);
}

/* the "j" of justecoqqo */
.brand-mark::before {
  content: 'j';
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  color: #fff;
  translate: -0.04em -0.02em;
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.header-nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.header-nav a {
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.25s;
}

.header-nav a:hover {
  background: rgba(255, 255, 255, 0.75);
}

.header-nav a[aria-current='page'] {
  background: var(--ink);
  color: #fff;
}

.brand-pill,
.header-nav {
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), background 0.4s, color 0.4s;
}

/* over a dark area (hero video, app pages) the bar turns into smoked glass */
.site-header.on-dark .header-inner {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 18px 44px -20px rgba(0, 0, 0, 0.65);
}

.site-header.on-dark .brand-pill {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.site-header.on-dark .header-nav a {
  color: rgba(255, 255, 255, 0.9);
}

.site-header.on-dark .header-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.site-header.on-dark .header-nav a[aria-current='page'] {
  background: #fff;
  color: var(--ink);
}

/* ------------------------------------------------------------------ buttons */

.btn {
  --btn-h: 52px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 650;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), background 0.3s, color 0.3s;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.btn-sm {
  --btn-h: 44px;
  padding: 0 18px;
  font-size: 15px;
}

.btn-lg {
  --btn-h: 60px;
  padding: 0 30px;
  font-size: 17px;
}

.btn-ink {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(20, 21, 29, 0.55);
}
.btn-ink:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(20, 21, 29, 0.6);
}

.btn-white {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
}
.btn-white:hover {
  transform: translateY(-2px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--accent) 75%, transparent);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px -14px color-mix(in srgb, var(--accent) 85%, transparent);
}

.btn-line {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--rule);
}
.btn-line:hover {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--text) 40%, transparent);
  transform: translateY(-2px);
}

/* donation button: iris gradient, sheen and a beating heart */
.btn-donate {
  background: var(--donate);
  background-size: 160% 100%;
  color: #fff;
  text-shadow: 0 1px 1px rgba(60, 20, 90, 0.25);
  box-shadow: 0 12px 30px -12px rgba(150, 90, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), background-position 0.8s var(--ease-out);
}

.btn-donate::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 5.5s var(--ease-in-out) infinite 2s;
}

.btn-donate:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -12px rgba(150, 90, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-donate .heart {
  animation: beat 2.4s ease-in-out infinite;
  transform-origin: center;
}

@keyframes sheen {
  0%,
  70% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes beat {
  0%,
  40%,
  100% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.18);
  }
  20% {
    transform: scale(0.96);
  }
  30% {
    transform: scale(1.1);
  }
}

.btn[aria-disabled='true'] {
  opacity: 0.55;
  pointer-events: none;
}

.btn-label {
  display: grid;
  gap: 3px;
  text-align: left;
}

.btn-label small {
  font-size: 12.5px;
  font-weight: 550;
  opacity: 0.72;
  letter-spacing: 0;
}

/* ------------------------------------------------------------------ chips, eyebrow */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--rule);
}

.chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

.iris-text {
  background: var(--iris);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------------ sections */

.section {
  position: relative;
  padding: clamp(80px, 12vw, 150px) 0;
}

.section-head {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: clamp(36px, 6vw, 64px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.section-title {
  font-size: clamp(40px, 6.4vw, 84px);
}

.section-lead {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--mute);
  max-width: 620px;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  position: relative;
  padding: 72px 0 40px;
  color: var(--mute);
  font-size: 15px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.footer-brand .brand-mark {
  --m: 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

.footer-links a {
  text-decoration: none;
  font-weight: 550;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-note {
  width: 100%;
  font-size: 13.5px;
  color: var(--faint);
}

/* ------------------------------------------------------------------ reveal on scroll */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}

.js [data-reveal='scale'] {
  transform: scale(0.94);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ page transition */

.page-wipe {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  background: var(--wipe);
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%));
  transition: clip-path 0.7s var(--ease-in-out);
}

.page-wipe.is-on {
  clip-path: circle(150vmax at var(--x, 50%) var(--y, 50%));
}

html.is-arriving::after,
html.is-leaving-arrival::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  background: var(--wipe-color);
}

html.is-leaving-arrival::after {
  animation: wipe-away 0.8s var(--ease-in-out) forwards;
}

@keyframes wipe-away {
  to {
    clip-path: inset(0 0 100% 0);
  }
}

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  max-width: min(420px, calc(100% - 32px));
  padding: 14px 20px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 550;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 140%);
  transition: transform 0.6s var(--ease-out);
}

.toast.is-on {
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 760px) {
  :root {
    --header-h: 64px;
    --container: calc(100% - 32px);
  }
  body {
    font-size: 16px;
  }
  .site-header {
    inset: 22px 0 auto;
  }
  .site-header.is-scrolled {
    top: 10px;
  }
  .header-nav {
    display: none;
  }
  .header-inner {
    padding: 5px;
  }
  .brand-pill {
    height: 40px;
    padding-right: 14px;
  }
  .brand-mark {
    --m: 28px;
  }
  .brand-word {
    font-size: 17px;
  }
  .site-header .btn-donate {
    margin-left: auto;
    --btn-h: 40px;
    padding: 0 16px;
    font-size: 15px;
  }
}

.btn-donate .short {
  display: none;
}

@media (max-width: 380px) {
  .site-header .btn-donate .long {
    display: none;
  }
  .site-header .btn-donate .short {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ simple pages (legal, 404) */

.simple-page {
  min-height: 80vh;
  padding: calc(var(--header-h) + clamp(48px, 9vh, 110px)) 0 80px;
}

.simple-page h1 {
  font-size: clamp(42px, 6vw, 80px);
  margin-bottom: 28px;
  max-width: 16ch;
}

.prose {
  max-width: 720px;
}

.prose h2 {
  margin: 44px 0 12px;
  font-size: 26px;
  letter-spacing: -0.025em;
}

.prose p + p {
  margin-top: 12px;
}

.prose p {
  color: var(--mute);
}

.prose strong {
  color: var(--text);
}
