/* Golden Gate Cup: компоненты дизайн-системы. Копия design/ds/project/components/bundle.css без @import шрифтов
   (шрифты подключает index.html). Правки — сначала в дизайн-системе, потом сюда. */

/* Golden Gate Cup — components. Every value comes from tokens.css; this file only composes them.
   Faces: Syne for headings, buttons and labels in English; Unbounded in Russian and Ukrainian
   (Syne has no Cyrillic); Cormorant Garamond for text in every language. Put .gg-pair-a on any ancestor to try
   pair A (Playfair Display + Cinzel) there. Glass here is a web approximation (backdrop-filter),
   with a solid fallback for prefers-reduced-transparency. */

:root {
  --gg-display: var(--font-syne);
  --gg-body: var(--font-cormorant);
  --gg-ui: var(--font-syne);
  --gg-display-weight: 800;
  --gg-heading-weight: 700;
  --gg-display-tracking: -0.03em;
  --gg-label-tracking: 0.2em;
  --gg-button-size: 15px;
  --gg-button-tracking: 0;
  --gg-button-case: none;
  --gg-body-size: 20px;
  --gg-small-size: 17px;
}
/* Syne has no Cyrillic: Russian and Ukrainian pages switch headings, buttons and labels to Unbounded */
:root:lang(ru), :root:lang(uk), .gg-cyr {
  --gg-display: var(--font-unbounded);
  --gg-ui: var(--font-unbounded);
}
.gg-pair-a {
  --gg-display: var(--font-playfair);
  --gg-body: var(--font-playfair);
  --gg-ui: var(--font-cinzel);
  --gg-display-weight: 500;
  --gg-heading-weight: 500;
  --gg-display-tracking: -0.01em;
  --gg-label-tracking: 0.28em;
  --gg-button-size: 14px;
  --gg-button-tracking: 0.12em;
  --gg-button-case: uppercase;
  --gg-body-size: 18px;
  --gg-small-size: 15px;
}

html { background: var(--studio-deep); }
body {
  margin: 0;
  background: var(--studio-deep);
  color: var(--ink);
  font-family: var(--gg-body);
  font-size: var(--gg-body-size);
  font-weight: 500;
  line-height: 1.5;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
.gg-pair-a { font-weight: 400; }

/* ---------- Studio ground: what sits behind the 3D box ---------- */
.gg-stage {
  position: relative;
  box-sizing: border-box;
  min-height: 100vh;
  padding: var(--space-8);
  background: radial-gradient(ellipse 70% 78% at 62% 42%, var(--studio-glow), var(--studio-wine) 48%, var(--studio-deep) 84%);
}

/* ---------- Type ---------- */
.gg-display {
  margin: 0;
  font-family: var(--gg-display);
  font-weight: var(--gg-display-weight);
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: var(--gg-display-tracking);
  text-wrap: balance;
}
.gg-heading {
  margin: 0;
  font-family: var(--gg-display);
  font-weight: var(--gg-heading-weight);
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.1;
  letter-spacing: calc(var(--gg-display-tracking) * 0.6);
  text-wrap: balance;
}
.gg-title {
  margin: 0;
  font-family: var(--gg-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.gg-pair-a .gg-title { font-size: 22px; letter-spacing: 0; }
/* Small caps label. Use at most once per three sections. */
.gg-label {
  margin: 0;
  font-family: var(--gg-ui);
  font-weight: 600;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: var(--gg-label-tracking);
  text-transform: uppercase;
  color: var(--ink-muted);
}
.gg-muted { color: var(--ink-muted); }
.gg-small { font-size: var(--gg-small-size); line-height: 1.55; }

/* ---------- Glass ---------- */
.gg-glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  padding: var(--space-6);
}
.gg-glass--strong { background: var(--glass-fill-strong); }
.gg-glass--shade { background: var(--glass-shade); }
.gg-glass--tight { padding: var(--space-4); border-radius: var(--radius-md); }

/* ---------- Button ---------- */
.gg-btn {
  box-sizing: border-box; /* <a> по умолчанию считает ширину без полей: с --block кнопка вылезала из панели */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-family: var(--gg-ui);
  font-weight: 700;
  font-size: var(--gg-button-size);
  line-height: 20px;
  letter-spacing: var(--gg-button-tracking);
  text-transform: var(--gg-button-case);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.16, 1, .3, 1), background-color .2s ease, border-color .2s ease;
}
.gg-btn--primary { background: var(--bone); color: var(--on-bone); }
.gg-btn--primary:hover { transform: translateY(-1px); }
.gg-btn--glass {
  background: var(--glass-fill);
  border-color: var(--control-line);
  color: var(--ink);
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
}
.gg-btn--glass:hover { background: var(--glass-fill-strong); }
.gg-btn--quiet {
  min-height: 0;
  padding: var(--space-1) 0;
  border: 0;
  border-bottom: 1px solid var(--control-line);
  border-radius: 0;
  background: none;
  color: var(--ink);
}
.gg-btn--quiet:hover { border-bottom-color: var(--signal); }
.gg-btn--lg { min-height: 56px; padding: 0 var(--space-8); font-size: calc(var(--gg-button-size) + 1px); }
.gg-btn--block { display: flex; width: 100%; }
.gg-btn:active { transform: scale(.98); }
.gg-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.gg-btn--quiet:focus-visible { border-radius: var(--radius-sm); }

/* ---------- Gold: the tournament name and the main button's ring ---------- */
.gg-gold {
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 52%, var(--gold-lo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
@property --gg-ring { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.gg-btn--ring { position: relative; isolation: isolate; }
.gg-btn--ring::before, .gg-btn--ring::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: var(--radius-full);
  padding: 2px;
  pointer-events: none;
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
/* a thin steady gold line, and a highlight running round it */
.gg-btn--ring::before { background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); opacity: .45; }
.gg-btn--ring::after { background: conic-gradient(from var(--gg-ring), transparent 0deg 220deg, var(--gold-lo) 280deg, var(--gold-hi) 330deg, transparent 360deg); animation: gg-ring 3.6s linear infinite; }
@keyframes gg-ring { to { --gg-ring: 360deg; } }
/* the same ring on a panel: the glow moves to whatever is the next step (the region choice) */
.gg-glass--ring { isolation: isolate; }
.gg-glass--ring::before, .gg-glass--ring::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.gg-glass--ring::before { background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo)); opacity: .45; }
.gg-glass--ring::after { background: conic-gradient(from var(--gg-ring), transparent 0deg 220deg, var(--gold-lo) 280deg, var(--gold-hi) 330deg, transparent 360deg); animation: gg-ring 4.8s linear infinite; }

/* ---------- Event facts ---------- */
.gg-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.gg-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--space-4);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-full);
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
  font-family: var(--gg-ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--ink);
}
.gg-pair-a .gg-chip { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.gg-chip--key { border-color: var(--signal); }

/* ---------- Number stand: the printed stand, red bridge base with a black digit ---------- */
.gg-stand {
  --s: 64px;
  position: relative;
  display: inline-grid;
  place-items: end center;
  width: var(--s);
  height: calc(var(--s) * 1.12);
  flex: none;
}
.gg-stand::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: calc(var(--s) * 0.06) calc(var(--s) * 0.06) var(--radius-sm) var(--radius-sm);
  background: linear-gradient(180deg, var(--stand-red-light), var(--stand-red) 62%);
  box-shadow: var(--stand-inset);
  /* the shallow arch cut into the top edge: the bridge span between two short towers */
  -webkit-mask: radial-gradient(ellipse 40% 17% at 50% 0, #0000 97%, #000 100%);
  mask: radial-gradient(ellipse 40% 17% at 50% 0, #0000 97%, #000 100%);
}
.gg-stand__digit {
  position: relative;
  padding-bottom: calc(var(--s) * 0.14);
  font-family: var(--font-syne);
  font-weight: 800;
  font-size: calc(var(--s) * 0.46);
  line-height: 1;
  letter-spacing: -0.08em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--digit);
}
.gg-stand--sm { --s: 40px; }
.gg-stand--lg { --s: 96px; }
.gg-stands { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: end; }

/* ---------- Ticket picker ---------- */
.gg-tickets { display: grid; gap: var(--space-4); max-width: 380px; }
.gg-tickets__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.gg-price {
  margin: 0;
  font-family: var(--gg-display);
  font-weight: var(--gg-display-weight);
  font-size: 34px;
  line-height: 1;
  letter-spacing: var(--gg-display-tracking);
  font-variant-numeric: lining-nums;
}
.gg-price small { margin-left: var(--space-1); font-family: var(--gg-body); font-weight: 500; font-size: var(--gg-small-size); letter-spacing: 0; color: var(--ink-muted); }
.gg-stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: var(--space-1);
  border: 1px solid var(--control-line);
  border-radius: var(--radius-full);
}
.gg-stepper button {
  height: 44px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--glass-fill-strong);
  color: var(--ink);
  font: 600 22px/1 var(--font-syne);
  cursor: pointer;
}
.gg-stepper button:hover { background: var(--glass-line); }
.gg-stepper button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.gg-stepper output {
  text-align: center;
  font-family: var(--gg-display);
  font-weight: var(--gg-display-weight);
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}
.gg-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.gg-quick button {
  min-height: 40px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-full);
  background: none;
  color: var(--ink-muted);
  font: 600 14px/1 var(--gg-ui);
  font-variant-numeric: tabular-nums lining-nums;
  cursor: pointer;
}
.gg-quick button[aria-pressed="true"] { border-color: var(--signal); color: var(--ink); }
.gg-quick button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.gg-tickets__total { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--gg-small-size); line-height: 1.5; color: var(--ink-muted); }
.gg-tickets__total b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Participant list ---------- */
.gg-roster { padding: 0; overflow: hidden; max-width: 560px; }
.gg-roster > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  list-style: none;
  cursor: pointer;
}
.gg-roster > summary::-webkit-details-marker { display: none; }
.gg-roster > summary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--bone); border-radius: var(--radius-lg); }
.gg-roster__count { display: block; margin-top: 2px; font-size: var(--gg-small-size); color: var(--ink-muted); }
.gg-roster__chev {
  width: 9px;
  height: 9px;
  flex: none;
  margin-top: -4px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.gg-roster[open] .gg-roster__chev { margin-top: 4px; transform: rotate(-135deg); }
.gg-roster__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3) var(--space-6);
  max-height: 320px;
  margin: 0;
  padding: var(--space-2) var(--space-6) var(--space-6);
  overflow-y: auto;
  list-style: none;
}
.gg-roster__row { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: var(--space-3); min-width: 0; }
/* the participant's slice of the wheel: tickets / all tickets */
.gg-roster__slice {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: conic-gradient(var(--signal) var(--share, 0%), var(--glass-fill-strong) 0);
}
.gg-roster__name { min-width: 0; font-size: var(--gg-small-size); line-height: 1.3; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gg-roster__tix { font: 600 14px/1 var(--gg-ui); color: var(--ink-muted); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

/* ---------- Language switch ---------- */
.gg-lang {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-full);
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
}
.gg-lang button {
  min-width: 44px;
  height: 32px;
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-full);
  background: none;
  color: var(--ink-muted);
  font: 600 12px/1 var(--gg-ui);
  letter-spacing: 0.1em;
  cursor: pointer;
}
.gg-lang button[aria-pressed="true"] { background: var(--bone); color: var(--on-bone); }
.gg-lang button:disabled { opacity: .45; cursor: not-allowed; }
.gg-lang button:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---------- Lockup: bridge mark + tournament name ---------- */
.gg-lockup { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; }
.gg-lockup__mark { display: block; width: 76px; height: auto; flex: none; }
.gg-lockup__name {
  display: block;
  font-family: var(--gg-display);
  font-weight: var(--gg-heading-weight);
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.gg-pair-a .gg-lockup__name { font-family: var(--font-cinzel); font-weight: 600; font-size: 15px; letter-spacing: 0.24em; text-transform: uppercase; }
.gg-lockup__sub { display: block; margin-top: 2px; font-size: 15px; line-height: 1.4; color: var(--ink-muted); }
.gg-lockup--stacked { flex-direction: column; gap: var(--space-4); text-align: center; }
.gg-lockup--stacked .gg-lockup__mark { width: 128px; }
.gg-lockup--stacked .gg-lockup__name { font-size: 26px; }

@media (prefers-reduced-transparency: reduce) {
  .gg-glass, .gg-glass--strong, .gg-glass--shade, .gg-chip, .gg-lang, .gg-btn--glass {
    background: var(--box);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gg-btn--ring::after, .gg-glass--ring::after { animation: none; opacity: 0; }
  .gg-btn, .gg-roster__chev { transition: none; }
  .gg-btn--primary:hover { transform: none; }
}
