/* =========================================================
   THE STANKER'S SHOWDOWN — design tokens
   ========================================================= */
@font-face {
  font-family: 'Brushtip';
  src: url('../fonts/BTTTRIAL.otf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Windlass';
  src: url('../fonts/Windlass.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'ManuskriptAntDReg';
  src: url('../fonts/ManuskriptAntDReg-Regular.woff2') format('woff2'),
       url('../fonts/ManuskriptAntDReg-Regular.woff') format('woff'),
       url('../fonts/ManuskriptAntDReg-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Burlesk';
  src: url('../fonts/burlesk-regular.otf') format('opentype');
  font-display: swap;
}

:root{
  /* brand */
  --bordeaux: #691622;
  --bordeaux-deep: #4a0f19;
  --violet: #4f126d;
  --violet-deep: #360a4c;
  --gold: #e0c633;
  --gold-soft: #cbae4a;

  /* structure */
  --ink: #150a0d;
  --ink-2: #1f0f14;
  --panel: #24121b;
  --panel-2: #2c1522;
  --parchment: #ecdca6;
  --text: #f1e6cf;
  --text-muted: #c9b39a;
  --line: rgba(224,198,51,0.28);

  /* type */
  --f-display: 'Brushtip', cursive;
  --f-head: 'Windlass', serif;
  --f-body: 'ManuskriptAntDReg', 'Iowan Old Style', Georgia, serif;
  --f-announce: 'Burlesk', 'Windlass', serif;

  /* rhythm */
  --gap: clamp(1.25rem, 2vw, 2.25rem);
  --radius: 2px;
  --shadow: 0 18px 40px -18px rgba(0,0,0,0.65);
  --ease: cubic-bezier(.2,.7,.2,1);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *,*::before,*::after{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

body{
  margin:0;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(79,18,109,0.35), transparent 60%),
    radial-gradient(1000px 600px at 100% 0%, rgba(105,22,34,0.4), transparent 55%),
    var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img{ max-width:100%; display:block; }
a{ color: var(--gold); text-decoration:none; }
a:hover{ color: var(--parchment); }

h1,h2,h3,h4{
  font-family: var(--f-head);
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.6em;
  line-height: 1.25;
}
h1{ font-size: clamp(2rem, 4vw, 3.1rem); }
h2{ font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3{ font-size: clamp(1.1rem, 1.6vw, 1.35rem); }

p{ margin:0 0 1em; }
.container{ max-width: 1120px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* -------- top nav -------- */
.topbar{
  position: sticky; top:0; z-index: 50;
  background: linear-gradient(180deg, rgba(21,10,13,0.96), rgba(21,10,13,0.88));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.topbar .container{
  display:flex; align-items:center; justify-content:space-between;
  height: 76px;
}
.brand{
  display:flex; align-items:center; gap:0.7rem;
  font-family: var(--f-display);
  color: var(--gold);
  letter-spacing: 0.01em;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  text-transform: none;
  line-height: 1;
}
.brand:hover{ color: var(--parchment); }

.navlinks{ display:flex; gap: clamp(1rem,2vw,2rem); list-style:none; margin:0; padding:0; }
.nav-right{ display:flex; align-items:center; }
.navlinks a{
  font-family: var(--f-head);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0.4em 0.1em;
  position: relative;
}
.navlinks a::after{
  content:''; position:absolute; left:0; right:100%; bottom:-4px; height:1px;
  background: var(--gold); transition: right .25s var(--ease);
}
.navlinks a:hover, .navlinks a[aria-current="page"]{ color: var(--gold); }
.navlinks a:hover::after, .navlinks a[aria-current="page"]::after{ right:0; }

.navtoggle{ display:none; }

/* -------- language switcher -------- */
.langswitch{
  display:flex; align-items:center; gap:0.9rem;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
}
.langswitch a{
  font-family: var(--f-head); font-size:0.78rem; letter-spacing:0.08em;
  color: var(--text-muted);
}
.langswitch a[aria-current="true"]{ color: var(--gold); }
.langswitch a:hover{ color: var(--gold); }

/* -------- announcement bar (Burlesk, countdown) -------- */
.announce-bar{
  background: linear-gradient(90deg, var(--bordeaux-deep), var(--violet-deep));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.announce-bar .container{
  display:flex; align-items:center; justify-content:center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  flex-wrap: wrap;
  padding: 0.6rem clamp(1.25rem,4vw,2.5rem);
  text-align:center;
}
.announce-text{
  font-family: var(--f-announce);
  color: var(--parchment);
  letter-spacing: 0.03em;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
}
.announce-countdown{
  display:flex; gap: 0.6rem;
}
.announce-countdown .unit{
  display:flex; flex-direction:column; align-items:center;
  min-width: 2.6em;
}
.announce-countdown .num{
  font-family: var(--f-announce);
  color: var(--gold);
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height:1;
}
.announce-countdown .lbl{
  font-family: var(--f-head);
  color: var(--text-muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.2em;
}
.announce-bar[hidden]{ display:none; }

/* -------- FAQ accordion -------- */
.faq{ list-style:none; margin:0; padding:0; }
.faq-item{
  border-bottom: 1px solid var(--line);
}
.faq-item:first-child{ border-top: 1px solid var(--line); }
.faq-item summary{
  cursor:pointer;
  padding: 1.1rem 0.2rem;
  font-family: var(--f-head);
  color: var(--parchment);
  letter-spacing: 0.03em;
  text-transform: none;
  font-size: 1rem;
  list-style: none;
  display:flex; align-items:center; justify-content:space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{
  content: '+';
  font-family: var(--f-head);
  color: var(--gold);
  font-size: 1.3rem;
  flex: none;
  transition: transform .2s var(--ease);
}
.faq-item[open] summary::after{ transform: rotate(45deg); }
.faq-item summary:hover{ color: var(--gold); }
.faq-item .faq-answer{
  padding: 0 0.2rem 1.1rem;
  color: var(--text-muted);
}

/* -------- fixed background video (home hero) -------- */
.hero-video-fixed{
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bordeaux-deep) 0%, var(--violet-deep) 100%);
}
.hero-video-fixed video{
  width: 100%; height: 100%;
  object-fit: cover;
  display:block;
}
.hero-video-fixed::after{
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(21,10,13,0.35) 0%, rgba(21,10,13,0.75) 100%);
}

/* -------- YouTube embed placeholder (rules recap video) -------- */
.video-embed-wrap{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  clip-path: polygon(18px 0,100% 0,100% calc(100% - 18px),calc(100% - 18px) 100%,0 100%,0 18px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-embed-wrap iframe{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-embed-placeholder{
  text-align: center;
  padding: 1.5rem;
}
.video-embed-placeholder .play-ring{
  width: 64px; height: 64px;
  margin: 0 auto 1rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.video-embed-placeholder .play-ring::before{
  content: '';
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--gold);
  margin-left: 4px;
}

/* -------- tournament progress: trigger tab, overlay, side drawer -------- */
.timeline-trigger{
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 60;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-right: none;
  color: var(--gold);
  font-family: var(--f-head);
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  text-transform: uppercase;
  padding: 1.1rem 0.55rem;
  writing-mode: vertical-rl;
  cursor: pointer;
  clip-path: polygon(0 12px, 100% 0, 100% 100%, 0 calc(100% - 12px));
  transition: background .2s var(--ease), color .2s var(--ease);
}
.timeline-trigger:hover{ background: var(--gold); color: var(--ink); }

.timeline-overlay{
  position: fixed; inset: 0;
  background: rgba(10,5,7,0.6);
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease);
  z-index: 65;
}
.timeline-overlay.open{ opacity: 1; pointer-events: auto; }

.timeline-drawer{
  position: fixed; top: 0; right: 0;
  height: 100vh;
  width: min(400px, 88vw);
  background: var(--ink-2);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px -18px rgba(0,0,0,0.6);
  transform: translateX(100%);
  transition: transform .3s var(--ease);
  z-index: 70;
  overflow-y: auto;
  padding: 2.2rem 1.6rem 2.5rem;
}
.timeline-drawer.open{ transform: translateX(0); }

.timeline-drawer-head{
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.5rem;
}
.timeline-close{
  background: none; border: 1px solid var(--line); color: var(--gold);
  width: 32px; height: 32px; font-size: 1rem;
  cursor: pointer; flex: none;
}
.timeline-close:hover{ border-color: var(--gold); }

.tl-list{
  position: relative;
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
}
.tl-list::before{
  content: '';
  position: absolute;
  left: 11px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}
.tl-item{
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 2.4rem;
}
.tl-item:last-child{ padding-bottom: 0; }

.tl-dot{
  position: absolute; left: 0; top: 2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: var(--ink-2);
}
.tl-item.current .tl-dot{
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(224,198,51,0.18);
}
.tl-item.past .tl-dot{
  border-color: var(--gold-soft);
  background: var(--gold-soft);
  opacity: 0.55;
}

.tl-title{
  font-family: var(--f-head);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.tl-item.current .tl-title{ color: var(--gold); }
.tl-item.past .tl-title{ color: var(--gold-soft); opacity: 0.65; }

.tl-date{
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.tl-item.past .tl-date{ opacity: 0.6; }
.tl-item.upcoming .tl-date{ opacity: 0.7; }

.tl-live{
  display: inline-flex; align-items: center; gap: 0.35em;
  font-family: var(--f-head);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: #ff5757;
}
.tl-live::before{
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ff5757;
  animation: tl-pulse 1.2s ease-in-out infinite;
}
@keyframes tl-pulse{
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,87,87,0.55); }
  50% { opacity: 0.4; box-shadow: 0 0 0 5px rgba(255,87,87,0); }
}

@media (max-width: 480px){
  .timeline-trigger{ font-size: 0.65rem; padding: 0.9rem 0.45rem; }
}

@media (max-width: 760px){
  .langswitch{ margin-left:0.5rem; padding-left:0.7rem; gap:0.6rem; }
}

@media (max-width: 760px){
  .navtoggle{
    display:block; background:none; border:1px solid var(--line); color:var(--gold);
    font-family: var(--f-head); font-size:0.75rem; letter-spacing:0.1em;
    padding:0.5em 0.8em; text-transform:uppercase; cursor:pointer;
  }
  .langswitch{ margin-left:0.5rem; padding-left:0.7rem; gap:0.6rem; }
  .announce-bar .container{ gap:0.5rem 1rem; padding:0.5rem clamp(1.25rem,4vw,2.5rem); }
  .navlinks{
    position:absolute; top:76px; left:0; right:0;
    flex-direction:column; gap:0;
    background: var(--ink-2); border-bottom:1px solid var(--line);
    max-height:0; overflow:hidden;
  }
  .navlinks.open{ max-height: 400px; }
  .navlinks a{ display:block; padding:1em clamp(1.25rem,4vw,2.5rem); border-top:1px solid var(--line); }
}

/* -------- footer -------- */
.sitefooter{
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  margin-top: 5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.sitefooter .container{
  display:flex; flex-wrap:wrap; gap:1rem; align-items:center; justify-content:space-between;
}
.foot-socials{ display:flex; gap:1rem; }
.foot-socials a{ color: var(--text-muted); }
.foot-socials a:hover{ color: var(--gold); }

/* -------- hero -------- */
.hero{
  position:relative;
  padding: clamp(4rem,10vw,7rem) 0 clamp(3rem,8vw,5rem);
  overflow:hidden;
  text-align:center;
  border-bottom: 1px solid var(--line);
}

/* opaque wrapper for content that must cover the fixed video once scrolled past the hero */
.page-cover{
  background: var(--ink);
  position: relative;
}
.eyebrow{
  font-family: var(--f-head);
  color: var(--gold-soft);
  letter-spacing:0.3em;
  font-size:0.75rem;
  text-transform:uppercase;
  margin-bottom:1.2rem;
}
.hero h1.title{
  font-family: var(--f-display);
  text-transform:none;
  letter-spacing:0.01em;
  color: var(--gold);
  font-size: clamp(2.6rem, 9vw, 6rem);
  line-height:0.95;
  margin: 0 0 0.5rem;
  text-shadow: 0 6px 30px rgba(224,198,51,0.25);
}
.hero .slogans{
  font-family: var(--f-head);
  color: var(--parchment);
  letter-spacing:0.12em;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  display:flex; gap:1rem; justify-content:center; flex-wrap:wrap;
  margin-bottom: 2.2rem;
}
.hero .slogans span:not(:last-child)::after{ content:'•'; margin-left:1rem; color:var(--gold-soft); }

.hero-lede{
  max-width: 640px; margin: 0 auto 2.2rem;
  color: var(--text-muted);
  font-size:1.05rem;
}

.cta-row{ display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }

/* -------- buttons -------- */
.btn{
  font-family: var(--f-head);
  letter-spacing:0.1em;
  text-transform:uppercase;
  font-size:0.85rem;
  padding: 0.95em 1.8em;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  display:inline-block;
  clip-path: polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
  cursor:pointer;
}
.btn:hover{ background: var(--gold); color: var(--ink); transform: translateY(-2px); }
.btn-solid{ background: var(--gold); color: var(--ink); }
.btn-solid:hover{ background: var(--parchment); color:var(--ink); }

/* -------- sections -------- */
.section{ padding: clamp(3rem,7vw,5rem) 0; }
.section-head{ max-width:680px; margin: 0 auto 2.5rem; text-align:center; }
.section-head p{ color: var(--text-muted); }

/* map-cut card, the recurring structural motif */
.card{
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  clip-path: polygon(18px 0,100% 0,100% calc(100% - 18px),calc(100% - 18px) 100%,0 100%,0 18px);
  padding: clamp(1.4rem,3vw,2.2rem);
  box-shadow: var(--shadow);
}

.grid{ display:grid; gap: var(--gap); }
.grid-3{ grid-template-columns: repeat(3,1fr); }
.grid-2{ grid-template-columns: repeat(2,1fr); }
@media (max-width: 860px){ .grid-3, .grid-2{ grid-template-columns:1fr; } }

.stat-row{
  display:flex; align-items:baseline; gap:1rem;
  padding: 0.9rem 0; border-top: 1px solid var(--line);
}
.stat-row:first-child{ border-top:none; }
.stat-num{
  font-family: var(--f-head); color: var(--gold);
  font-size: 1.8rem; min-width: 2.4ch;
}
.stat-label{ color: var(--text-muted); font-size:0.95rem; }

.divider{
  border:none; height:1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 2.5rem 0;
}

/* -------- tables -------- */
table{ width:100%; border-collapse:collapse; }
th,td{
  text-align:left; padding: 0.7em 0.9em;
  border-bottom: 1px solid var(--line);
}
th{
  font-family: var(--f-head); font-size:0.78rem; letter-spacing:0.08em;
  text-transform:uppercase; color: var(--gold-soft);
}
tbody tr:hover{ background: rgba(224,198,51,0.05); }
.table-wrap{ overflow-x:auto; }

.tag{
  display:inline-block; font-family:var(--f-head); font-size:0.72rem;
  letter-spacing:0.08em; text-transform:uppercase;
  padding:0.3em 0.7em; border:1px solid var(--line); color:var(--gold-soft);
}

/* points value emphasis */
.pt{ color: var(--gold); font-weight:normal; }
.pt-neg{ color:#d97a7a; }

/* -------- page hero (secondary pages) -------- */
.page-hero{
  padding: clamp(2.8rem,6vw,4rem) 0 2rem;
  text-align:center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(79,18,109,0.18), transparent);
}
.page-hero .eyebrow{ margin-bottom:0.8rem; }

/* -------- pools / results -------- */
.pool-nav{ display:flex; gap:0.6rem; flex-wrap:wrap; margin-bottom:1.8rem; }
.pool-nav button{
  font-family: var(--f-head); font-size:0.78rem; letter-spacing:0.08em;
  text-transform:uppercase; padding:0.6em 1.1em;
  background:transparent; border:1px solid var(--line); color:var(--text-muted);
  cursor:pointer; transition:.2s var(--ease);
}
.pool-nav button.active, .pool-nav button:hover{ border-color:var(--gold); color:var(--gold); }

.rank-1 td:first-child{ color:var(--gold); }
.rank-2 td:first-child{ color:var(--parchment); }
.rank-3 td:first-child{ color:var(--gold-soft); }

/* -------- forms / inscription -------- */
.steps{ counter-reset: step; list-style:none; padding:0; margin:0; }
.steps li{
  counter-increment: step;
  display:flex; gap:1.1rem; padding: 1.1rem 0; border-top:1px solid var(--line);
}
.steps li:first-child{ border-top:none; }
.steps li::before{
  content: counter(step,decimal-leading-zero);
  font-family: var(--f-head); color: var(--gold);
  font-size:1.1rem; flex:none; width:2ch;
}

.note-box{
  border-left: 2px solid var(--gold);
  padding: 0.9rem 1.2rem;
  background: rgba(224,198,51,0.06);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* -------- socials page -------- */
.social-card{ text-align:center; }
.social-card .icon-tile{ margin:0 auto 1.2rem; width:52px; height:52px; }
.social-card h3{ margin-bottom:0.4rem; }
.social-card p{ color:var(--text-muted); margin-bottom:1.3rem; }

.social-avatar{
  width: 84px; height: 84px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: radial-gradient(circle at 35% 30%, var(--panel-2), var(--panel));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.social-avatar img{
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.social-avatar .avatar-fallback{
  font-family: var(--f-head);
  color: var(--gold);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
}

/* placeholder edit markers */
.editable{
  position:relative;
}
.editable[data-note]::before{
  content: attr(data-note);
  position:absolute; top:-1.6em; left:0;
  font-family: var(--f-head); font-size:0.65rem; letter-spacing:0.06em;
  color: var(--violet); text-transform:uppercase; opacity:0.8;
}

/* utility */
.center{ text-align:center; }
.mt-lg{ margin-top: 3rem; }
.small{ font-size:0.88rem; color:var(--text-muted); }
