/* Champion Ascendant — shared styles for every page.
   ONE ASCENT is always gold, DWCS ASCENT is always teal. The two never share a colour,
   a column or a bar, so they can't be read as one number. */

:root {
  --bg: #0D1626;
  --panel: #131F33;
  --panel-2: #18263D;
  --line: #24344F;
  --line-soft: #1C2A42;
  --text: #EDF0F4;
  --muted: #A3AEBF;
  --dim: #74819A;
  --one: #E2B53F;
  --one-ink: #1A1404;
  --dwcs: #3BB7C4;
  --dwcs-ink: #04191C;
  --pos: #62C48F;
  --neg: #E3705F;
  --focus: #F4D67A;

  --font-display: 'Bebas Neue', 'Archivo Narrow', sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-code: 'JetBrains Mono', ui-monospace, monospace;

  --r-lg: 14px;
  --r: 10px;
  --r-sm: 6px;
  --max: 1160px;
  --gutter: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html { background: var(--bg); }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background: transparent;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--one); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
strong { font-weight: 700; color: var(--text); }
p { max-width: 68ch; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--one); color: var(--one-ink); padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 22, 38, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-family: var(--font-display); font-size: 24px; letter-spacing: 1px; line-height: 1; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: var(--r-sm); white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.nav .gh {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 8px;
  border: 1px solid var(--line); color: var(--text);
}
.nav .gh svg { width: 16px; height: 16px; }

@media (max-width: 860px) {
  .site-head .wrap { height: auto; flex-wrap: wrap; gap: 0; padding-top: 10px; }
  .nav {
    width: calc(100% + 2 * var(--gutter)); margin: 6px calc(-1 * var(--gutter)) 0;
    padding: 0 var(--gutter) 8px; overflow-x: auto; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 10px 12px; }
}

/* ---------- type ---------- */
.display {
  font-family: var(--font-display); font-weight: 400; letter-spacing: 0.5px;
  line-height: 0.95; text-transform: none;
}
h1.display { font-size: clamp(52px, 8vw, 104px); }
h2.display { font-size: clamp(36px, 4.6vw, 56px); margin-bottom: 14px; }
h3 { font-size: 19px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.lede { font-size: 19px; line-height: 1.6; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--dim); }

/* ---------- layout blocks ---------- */
.page-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line-soft); }
.page-head .lede { margin-top: 18px; }
.page-head .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
section.block { padding: 72px 0; border-bottom: 1px solid var(--line-soft); }
section.block:last-of-type { border-bottom: 0; }
.block-intro { margin-bottom: 32px; }
.block-intro p { color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 24px; }
.panel h3 { margin-bottom: 6px; }
.panel p { color: var(--muted); font-size: 15px; }

/* ---------- system tags & buttons ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
  white-space: nowrap;
}
.tag.one { color: var(--one); border-color: rgba(226, 181, 63, 0.4); }
.tag.dwcs { color: var(--dwcs); border-color: rgba(59, 183, 196, 0.4); }
.tag .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 16px/1 var(--font-body); padding: 14px 22px; border-radius: var(--r);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--one); color: var(--one-ink); }
.btn-primary:hover { background: #EDC459; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--panel); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- score anatomy bar (the one visual every page shares) ---------- */
.anatomy { display: grid; gap: 8px; }
.anatomy-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.anatomy-name { font-size: 13px; font-weight: 700; letter-spacing: 0.2px; }
.anatomy-name .v { color: var(--dim); font-weight: 500; }
.anatomy-score { font-family: var(--font-display); font-size: 40px; line-height: 0.9; }
.anatomy.one .anatomy-score, .anatomy.one .anatomy-name { color: var(--one); }
.anatomy.ufc .anatomy-score, .anatomy.ufc .anatomy-name { color: var(--dwcs); }
.bar {
  position: relative; height: 16px; border-radius: 4px; background: var(--panel-2);
  overflow: hidden; display: flex;
}
.bar .seg { height: 100%; border-right: 1px solid var(--bg); transform-origin: left; }
.bar .seg:last-child { border-right: 0; }
.bar .neg {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(135deg, var(--neg) 0 3px, transparent 3px 6px);
  opacity: 0.9;
}
.bar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: 0.35; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 2px; list-style: none; }
.legend li { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend .swatch.hatch { background: repeating-linear-gradient(135deg, var(--neg) 0 2px, transparent 2px 4px); }
@media (prefers-reduced-motion: no-preference) {
  .anatomy.animate .seg { animation: grow 0.9s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--r-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th {
  text-align: left; font-size: 13px; font-weight: 700; color: var(--muted);
  padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
}
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data td .sub { display: block; font-size: 13px; color: var(--dim); }

/* ---------- code ---------- */
pre.code {
  font-family: var(--font-code); font-size: 13.5px; line-height: 1.7;
  background: #0A1220; border: 1px solid var(--line-soft); border-radius: var(--r);
  padding: 18px 20px; overflow-x: auto; color: #D6DCE5; margin: 14px 0 20px;
}
pre.code .c { color: var(--dim); }
pre.code .k { color: var(--one); }
pre.code .t { color: var(--dwcs); }
code { font-family: var(--font-code); font-size: 0.9em; background: var(--panel-2); padding: 1px 6px; border-radius: 4px; }

/* ---------- callouts ---------- */
.callout { border-left: 3px solid var(--one); padding: 14px 18px; background: var(--panel); border-radius: 0 var(--r) var(--r) 0; color: var(--muted); font-size: 15px; margin: 18px 0; }
.callout.dwcs { border-left-color: var(--dwcs); }
.callout.warn { border-left-color: var(--neg); }
.callout strong { color: var(--text); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line-soft); padding: 40px 0 56px; margin-top: 24px; font-size: 14px; color: var(--dim); }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-foot h4 { font-size: 13px; color: var(--muted); margin-bottom: 10px; font-weight: 700; }
.site-foot ul { list-style: none; display: grid; gap: 6px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr; } }

/* ---------- background cages: ONE's circle and the UFC's octagon ---------- */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  width: 620px; height: 620px;
  animation: cage-pulse 5s ease-in-out infinite;
}
body::before { /* ONE Championship's circular cage */
  left: -220px; top: 90px; border-radius: 50%;
  border: 2px solid rgba(226, 181, 63, 0.22);
  box-shadow: inset 0 0 0 26px rgba(226, 181, 63, 0.035), 0 0 80px rgba(226, 181, 63, 0.05);
  background: radial-gradient(circle, rgba(226, 181, 63, 0.06), transparent 65%);
}
body::after { /* the UFC's octagon */
  right: -230px; bottom: -160px; animation-delay: -2.5s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M29.3 1h41.4L99 29.3v41.4L70.7 99H29.3L1 70.7V29.3z' fill='rgba(59,183,196,0.08)' stroke='rgba(59,183,196,0.48)' stroke-width='0.6'/%3E%3Cpath d='M31.4 6h37.2L94 31.4v37.2L68.6 94H31.4L6 68.6V31.4z' fill='none' stroke='rgba(59,183,196,0.22)' stroke-width='0.4'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes cage-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.035); }
}
@media (max-width: 760px) {
  body::before, body::after { width: 380px; height: 380px; }
  body::before { left: -190px; top: 120px; }
  body::after { right: -190px; bottom: -120px; }
}
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; opacity: 0.8; } }

/* ---------- headline shine: one sweep on load ---------- */
h1.display {
  background: linear-gradient(100deg, var(--text) 0 42%, #F4D67A 50%, var(--text) 58% 100%) 0 0 / 250% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-position: 100% 0;
}
@media (prefers-reduced-motion: no-preference) {
  h1.display { animation: shine 1.8s 0.3s ease-out both; }
  @keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
}
@media (forced-colors: active) { h1.display { color: CanvasText; background: none; } }

/* ---------- board rows: glow on hover ---------- */
.fighter > summary { transition: background 0.2s, box-shadow 0.2s; }
.fighter > summary:hover {
  box-shadow: inset 3px 0 0 var(--one), inset 0 0 40px rgba(226, 181, 63, 0.06), inset -3px 0 0 var(--dwcs);
}

/* ---------- holographic card hover: diagonal shimmer slides down, card lifts and glows ---------- */
.holo { position: relative; overflow: hidden; isolation: isolate; --glow: 59, 183, 196;
  transition: transform 0.4s ease, box-shadow 0.4s ease; }
.holo.one, .btn.holo { --glow: 226, 181, 63; }
.holo::after {
  content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; z-index: 2;
  pointer-events: none; opacity: 0;
  background: linear-gradient(0deg, transparent, transparent 30%, rgba(var(--glow), 0.3));
  transform: rotate(-45deg); transition: transform 0.5s ease, opacity 0.5s ease;
}
.holo:hover { transform: scale(1.03); box-shadow: 0 0 20px rgba(var(--glow), 0.5); }
.holo:hover::after { opacity: 1; transform: rotate(-45deg) translateY(100%); }
@media (prefers-reduced-motion: reduce) { .holo:hover { transform: none; } .holo::after { transition: opacity 0.3s; } }

/* ---------- link underlines that draw in ---------- */
.site-foot a, .tape-foot a, .facts a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s ease, color 0.2s;
  padding-bottom: 2px;
}
.site-foot a:hover, .facts a:hover { background-size: 100% 1px; text-decoration: none; color: var(--text); }
.tape-foot a:hover { background-size: 100% 1px; text-decoration: none; }
.nav a:not(.gh) { position: relative; }
.nav a:not(.gh)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--one); transform: scaleX(0); transition: transform 0.3s ease;
}
.nav a:not(.gh):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- buttons: light sweep on hover, press feedback ---------- */
.btn { position: relative; overflow: hidden; transition: transform 0.15s ease, background 0.2s, box-shadow 0.2s; }
.btn-primary::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent); transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-primary:hover::before { left: 120%; }
.btn:active { transform: translateY(1px) scale(0.98); }

/* ---------- featured card: slow gold-to-teal border ---------- */
.tape { position: relative; isolation: isolate; }
.tape::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--angle, 0deg), var(--one), transparent 30%, var(--dwcs) 50%, transparent 80%, var(--one));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.8; z-index: -1;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@media (prefers-reduced-motion: no-preference) {
  .tape::before { animation: spin-border 8s linear infinite; }
  @keyframes spin-border { to { --angle: 360deg; } }
}

/* ---------- small touches ---------- */
::selection { background: rgba(226, 181, 63, 0.35); color: var(--text); }
html { scrollbar-color: var(--line) var(--bg); scrollbar-width: thin; }
.field input, .field select { transition: border-color 0.2s, box-shadow 0.2s; }
.chip { transition: color 0.2s, background 0.2s, border-color 0.2s; }

/* ---------- touch screens: no hover-only effects that would stick after a tap ---------- */
@media (hover: none) {
  .holo::after { display: none; }
  .holo:hover { transform: none; box-shadow: none; }
  .btn-primary::before { display: none; }
  .fighter > summary:hover { box-shadow: none; }
}

/* ---------- comfortable tap targets on phones and tablets ---------- */
@media (max-width: 960px), (hover: none) {
  .tape-foot a, .facts a { display: inline-block; padding: 11px 0; background-position: 0 calc(100% - 9px); }
  .brand { padding: 7px 0; }
}

/* ---------- footer layout ---------- */
.site-foot .foot-name { color: var(--text); font-weight: 700; margin-bottom: 6px; }
.site-foot .foot-copy { margin-top: 10px; }
.site-foot .foot-sub { margin-top: 18px; }
@media (max-width: 760px) {
  .site-foot { padding: 32px 0 40px; }
  .site-foot .wrap { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .site-foot .foot-about { grid-column: 1 / -1; }
  .site-foot ul { gap: 2px; }
  .site-foot li a { display: inline-block; padding: 6px 0; background-position: 0 calc(100% - 4px); }
}

/* ---------- selects: light chevron so it shows on the dark background (iOS draws a dark one) ---------- */
select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23A3AEBF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 38px !important;
}
select::-ms-expand { display: none; }

/* ---------- phones: nav wraps and centres so every item, including Code, is visible ---------- */
@media (max-width: 860px) {
  .site-head .wrap { justify-content: center; padding-bottom: 6px; }
  .brand { width: 100%; justify-content: center; }
  .nav { width: 100%; margin: 4px 0 0; padding: 0; overflow: visible; flex-wrap: wrap; justify-content: center; gap: 2px 4px; mask-image: none; -webkit-mask-image: none; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .nav .gh { margin-left: 4px; }
}
@media (max-width: 860px) { .site-head { position: static; } }
