/* Pase site: shared tokens, header, footer and page bands for every page on pase.club.
   Colors from pase-app src/theme/variables.scss, title font from pase-app src/theme/font.scss.
   Page-specific styles stay with the page (assets/pase.css for the league/profile shell, inline on /t pages).
   The header and footer markup is copied into each HTML file (no build step); keep the copies identical. */
@font-face {
  font-family: "sanson";
  src: local("sanson"), url(/fonts/sanson.otf) format("opentype");
  font-display: swap;
}

:root {
  --purple: #8e3bed;
  --purple-rgb: 142, 59, 237;
  --purple-tint: #c79df6;
  --purple-deep: #592594;
  --plum: #3c1642;
  --mint: #29ffc9;
  --mint-rgb: 41, 255, 201;
  --mint-tint: #94ffe4;
  --pink: #fb36c9;
  --indigo: #5f59f7;
  --amber: #ffc409;

  --ink: #3c1642;
  --muted: #6d5071;
  --line: #e2dce3;
  --bg: #ffffff;
  --soft: #f5f3f6;
  --surface: #ffffff;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(60, 22, 66, .06), 0 10px 28px -14px rgba(60, 22, 66, .22);
  --shadow-hover: 0 2px 4px rgba(60, 22, 66, .06), 0 24px 48px -20px rgba(var(--purple-rgb), .55);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hero-gradient: linear-gradient(160deg, #250b2b 0%, var(--plum) 32%, var(--purple-deep) 72%, #6f2ccb 100%);

  --font-display: "sanson", system-ui, sans-serif;
  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 4vw, 32px);
  --max: 1080px;
  --topbar-h: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-synthesis: none; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  overflow-x: hidden;
}
body > main { flex: 1 0 auto; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background-color: var(--plum);
  transition: background-color .3s, box-shadow .3s;
}
/* Over a full-bleed hero (tournament pages): transparent until the page scrolls (the page's script sets is-scrolled). */
.topbar--overlay { position: fixed; inset: 0 0 auto; background-color: transparent; }
.topbar--overlay.is-scrolled, .topbar.is-scrolled {
  background-color: rgba(60, 22, 66, .78);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--topbar-h); }
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  color: #fff; text-decoration: none;
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  letter-spacing: .04em; text-transform: uppercase; font-size: 15px;
}
.brand img, .brand svg { width: 30px; height: 30px; display: block; }
.topbar__end { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a, .session a, .session button {
  color: rgba(255, 255, 255, .82); text-decoration: none; background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 14px; padding: 8px 12px; border-radius: 999px;
  transition: background-color .2s, color .2s;
}
.nav a:hover, .session a:hover, .session button:hover { background-color: rgba(255, 255, 255, .12); color: #fff; }
.nav a[aria-current="page"] { color: #fff; background-color: rgba(255, 255, 255, .12); }
.nav .nav__cta { background-color: var(--mint); color: var(--plum); margin-left: 6px; }
.nav .nav__cta:hover { background-color: #fff; color: var(--plum); }
.session { position: relative; display: flex; align-items: center; font-size: 14px; }
.session:empty { display: none; }
.session a, .session button { white-space: nowrap; }
.session .session__toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--mint); font-weight: 800; }
.session__handle { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }
.session__caret { font-size: 11px; line-height: 1; }
.session__icon { display: none; }
.session__icon svg { display: block; width: 20px; height: 20px; fill: currentColor; }
.session__menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 180px; padding: 6px;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.session__menu[hidden] { display: none; }
.session .session__menu a, .session .session__menu button { display: block; width: 100%; text-align: left; color: var(--ink); border-radius: 4px; padding: 10px 12px; }
.session .session__menu a:hover, .session .session__menu button:hover { background-color: var(--soft); color: var(--ink); }
.session__menu-handle { display: none; padding: 8px 12px; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
/* Language switch: a plain link to the same page in the other language (stays visible on phones). */
.lang-switch { display: flex; margin-left: 6px; }
.lang-switch a {
  color: rgba(255, 255, 255, .86); text-decoration: none; white-space: nowrap;
  font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .3);
  transition: background-color .2s, color .2s;
}
.lang-switch a:hover { background-color: rgba(255, 255, 255, .12); color: #fff; }
@media (max-width: 720px) {
  .nav a:not(.nav__cta) { display: none; }
  .session__handle { display: none; }
  .session__icon { display: block; }
  .session__menu-handle { display: block; }
}
/* The header's call to action repeats a link the page's top already shows; on small phones the account item needs the room. */
@media (max-width: 420px) {
  .nav .nav__cta { display: none; }
  .topbar__inner { gap: 8px; }
  .lang-switch { margin-left: 0; }
  .session a, .session button { padding-inline: 8px; }
}
@media (max-width: 340px) {
  .topbar .brand { font-size: 0; gap: 0; }
}

/* ---------- Sign-in dialog and messages, on every page (assets/session-ui.js) ---------- */
/* Buttons in the page and in modals follow the app's (Ionic, Android look): small radius, uppercase label, solid
   primary purple or secondary mint, "clear" for a quiet choice. The header's buttons keep the site's look. */
#main button, .overlay button {
  font: inherit; font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
  border: 0; border-radius: 4px;
  padding: 10px 18px; min-height: 40px;
  background: var(--purple); color: #fff;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: background-color .2s, box-shadow .2s;
}
#main button:hover, .overlay button:hover { background: var(--purple-deep); }
#main button.secondary, .overlay button.secondary { background: var(--mint); color: var(--plum); }
#main button.secondary:hover, .overlay button.secondary:hover { background: #25e6b5; }
#main button.clear, .overlay button.clear { background: none; color: var(--purple); box-shadow: none; }
#main button.clear:hover, .overlay button.clear:hover { background: var(--soft); }
#main button.block, .overlay button.block { display: flex; width: 100%; }
#main button:disabled, .overlay button:disabled { opacity: .6; cursor: default; }
#main button svg, .overlay button svg { width: 18px; height: 18px; flex: none; fill: currentColor; }

.notice { background: var(--soft); border-left: 4px solid var(--purple-tint); border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 18px; }
.error { color: #b00020; }

.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(37, 11, 43, .6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: var(--gutter);
}
.overlay__card {
  position: relative; width: 100%; max-width: 440px; padding: clamp(18px, 3vw, 26px); padding-top: 44px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink);
}
.overlay__card h2 {
  font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: clamp(22px, 3.4vw, 28px); margin: 0 0 16px;
}
/* Close × in the top right corner, like the app's closeable card. */
.overlay .overlay__close {
  position: absolute; top: 8px; right: 8px; min-height: 0; padding: 6px;
  background: none; color: var(--ink); box-shadow: none; border-radius: 50%;
}
.overlay .overlay__close:hover { background: var(--soft); }
.overlay .overlay__close svg { width: 24px; height: 24px; }
.actions { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 0; }
.actions--row { flex-direction: row; justify-content: flex-end; }
#main .sign-in { max-width: 360px; margin-bottom: 18px; }
.connecting { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); margin: 16px 0 0; }
.connecting[hidden] { display: none; }
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid var(--purple-tint); border-top-color: var(--purple);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Page band: the title area under the header (league, profile, legal and home pages) ---------- */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff; background: var(--hero-gradient);
  padding: clamp(36px, 7vw, 64px) 0 clamp(44px, 8vw, 76px);
}
.page-hero::before, .page-hero::after {
  content: ""; position: absolute; z-index: -1; height: 10px; border-radius: 2px; transform: skewX(-20deg);
}
.page-hero::before { right: 9%; bottom: 30px; width: 120px; background: var(--pink); }
.page-hero::after { right: calc(9% + 46px); bottom: 12px; width: 70px; background: var(--mint); }
.page-hero__mark {
  position: absolute; z-index: -1; right: -60px; top: 50%; width: min(46vw, 340px); height: auto;
  opacity: .1; transform: translateY(-50%) rotate(-8deg); pointer-events: none;
}
.page-hero h1 {
  margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 900; text-transform: uppercase;
  font-size: clamp(34px, 7vw, 64px); line-height: .95; letter-spacing: -.01em; overflow-wrap: anywhere;
}
.page-hero .eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
  font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--mint-tint);
}
.page-hero .eyebrow::before { content: ""; width: 26px; height: 5px; border-radius: 1px; background: var(--pink); transform: skewX(-20deg); }
.page-hero .eyebrow a { color: inherit; }
.page-hero__lead { max-width: 600px; margin: 16px 0 0; font-size: clamp(16px, 2vw, 19px); color: rgba(255, 255, 255, .86); }
.page-hero__lead a { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 800; font-size: 15px; text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s, background-color .25s;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn--primary { background: var(--mint); color: var(--plum); box-shadow: 0 10px 30px -10px rgba(var(--mint-rgb), .7); }
.btn--ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, .35); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Long-form text (privacy policy, data deletion) ---------- */
.prose { max-width: 760px; padding-block: clamp(32px, 6vw, 56px); }
.prose h1, .prose h2 { font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.prose h1 { font-size: clamp(28px, 5vw, 40px); margin: 0 0 16px; }
.prose h2 { font-size: clamp(20px, 3vw, 24px); margin: 2em 0 .5em; color: var(--purple-deep); }
.prose p, .prose li { color: var(--ink); }
.prose a { color: var(--purple-deep); }
.prose code { background: var(--soft); padding: 2px 6px; border-radius: 6px; }
.prose ul, .prose ol { padding-left: 1.4em; }

/* ---------- Home ---------- */
.home-hero { padding: clamp(56px, 10vw, 112px) 0 clamp(72px, 12vw, 128px); }
.home-hero h1 { font-size: clamp(48px, 11vw, 112px); }
.home-hero .hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.home-section { padding-block: clamp(40px, 7vw, 72px); }
.home-section h2 {
  margin: 0 0 20px; font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: clamp(26px, 4.5vw, 40px); line-height: 1.05;
}
.home-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.home-card {
  display: block; position: relative; overflow: hidden; padding: 24px;
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  border-bottom: 4px solid var(--mint); color: inherit; text-decoration: none;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
a.home-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.home-card:nth-child(2) { border-bottom-color: var(--pink); }
.home-card:nth-child(3) { border-bottom-color: var(--indigo); }
.home-card--feature { color: #fff; background: linear-gradient(150deg, var(--plum), var(--purple-deep)); border-bottom-color: var(--mint); }
.home-card h3 {
  margin: 0 0 8px; font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: 24px; line-height: 1.05;
}
.home-card p { margin: 0; color: var(--muted); }
.home-card--feature p { color: rgba(255, 255, 255, .8); }
.home-card .tag {
  display: inline-block; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px;
  background: rgba(var(--purple-rgb), .1); color: var(--purple);
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.home-card--feature .tag { background: rgba(var(--mint-rgb), .16); color: var(--mint); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(56px, 8vw, 96px); padding: 40px 0 32px; background: var(--plum); color: rgba(255, 255, 255, .78); font-size: 14px; }
.site-footer__inner { display: grid; gap: 28px; grid-template-columns: 1.2fr 1fr 1fr; }
@media (max-width: 720px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } .site-footer__about { grid-column: 1 / -1; } }
.site-footer p { margin: 12px 0 0; max-width: 32ch; }
.site-footer h2 {
  margin: 0 0 10px; color: var(--mint-tint);
  font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: rgba(255, 255, 255, .86); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__legal { max-width: none !important; margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; color: rgba(255, 255, 255, .6); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0s !important;
  }
}
