/* =====================================================================
   front.css - front page (default.asp) only. Builds on dsl.css tokens.
   ===================================================================== */
body.dsl-front {
  margin: 0;
  background: var(--dsl-bg);
  color: var(--dsl-text);
  font: 15px/1.5 var(--dsl-sans);
}
.dsl-front img { max-width: 100%; }
.dsl-front .dslnav { position: sticky; top: 0; }
.fp-wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.fp-wrap a, .fp-hero a { color: var(--dsl-gold-hi); text-decoration: none; }
.fp-wrap a:hover, .fp-hero a:hover { text-decoration: underline; }

/* ----- Buttons ----- */
.fp-btn-play {
  display: inline-block; padding: 9px 20px; border: 1px solid #ffcf7a; border-radius: 4px;
  background: linear-gradient(180deg, #f0b24a, #c87a12); color: #1a0d00 !important;
  font: 700 15px var(--dsl-serif); letter-spacing: .08em; box-shadow: 0 0 14px rgba(222,150,29,.35);
}
.fp-btn-play:hover { background: linear-gradient(180deg, #ffc867, var(--dsl-gold)); text-decoration: none !important; }
.fp-btn-ghost {
  display: inline-block; padding: 9px 18px; border: 1px solid rgba(255,210,122,.6); border-radius: 4px;
  background: rgba(0,0,0,.35); color: var(--dsl-gold-hi) !important; font: 700 14px var(--dsl-serif); letter-spacing: .06em;
}
.fp-btn-ghost:hover { background: rgba(222,150,29,.15); text-decoration: none !important; }

/* ----- Hero: rotating DSL Art ----- */
/* Taller on wide screens so the 3:2 paintings aren't cropped to a thin strip
   (the script in default.asp picks each painting's crop around its faces). */
.fp-hero { position: relative; height: clamp(440px, 34vw, 600px); overflow: hidden; background: #000; border-bottom: 1px solid var(--dsl-line); }
.fp-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.fp-slide.on { opacity: 1; }
.fp-slide img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transform: scale(1.04); transition: transform 9s linear; }
.fp-slide.on img { transform: scale(1); }
.fp-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(13,11,8,.88) 0%, rgba(13,11,8,.4) 34%, rgba(13,11,8,0) 55%),
              linear-gradient(0deg, var(--dsl-bg) 0%, rgba(13,11,8,0) 30%);
}
.fp-hero-copy { position: absolute; z-index: 2; left: 0; right: 0; top: 50%; transform: translateY(-50%); }
.fp-hero-copy .fp-inner { max-width: 470px; }
.fp-hero h1 { margin: 0 0 12px; color: #fff; font: 700 44px/1.08 var(--dsl-serif); text-shadow: 0 2px 16px rgba(0,0,0,.8); }
.fp-hero h1 span { color: var(--dsl-gold); }
.fp-hero p { margin: 0 0 22px; color: #e6dac2; font-size: 17px; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
.fp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fp-cap {
  position: absolute; z-index: 2; right: 16px; bottom: 18px; display: flex; align-items: center; gap: 10px;
  padding: 4px 6px; background: rgba(0,0,0,.55); border: 1px solid rgba(222,150,29,.3); border-radius: 999px;
  color: #d8c8a6; font-size: 13px;
}
.fp-cap a { font-weight: 600; }
#fpCap { min-width: 120px; text-align: center; }
.fp-count { color: var(--dsl-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fp-hnav {
  width: 26px; height: 26px; padding: 0; border: 1px solid rgba(222,150,29,.5); border-radius: 50%;
  background: transparent; color: var(--dsl-gold-hi); font-size: 18px; line-height: 22px; cursor: pointer;
}
.fp-hnav:hover { background: rgba(222,150,29,.2); }

/* ----- Sections & cards ----- */
.fp-main { padding: 8px 0 10px; }
.fp-sec { margin-top: 34px; }
.fp-sec-hd { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.fp-sec-hd h2 { margin: 0; color: var(--dsl-gold); font: 700 22px var(--dsl-serif); letter-spacing: .05em; }
.fp-sec-hd .fp-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--dsl-line), transparent); }
.fp-sec-hd a { font-size: 13px; }
.fp-card { background: var(--dsl-panel); border: 1px solid var(--dsl-line); border-radius: 6px; }
.fp-card-hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--dsl-line); }
.fp-card-hd h3 { margin: 0; color: #f1dcae; font: 700 17px var(--dsl-serif); letter-spacing: .04em; }
.fp-card-hd a { font-size: 13px; }
.fp-card-bd { padding: 16px 18px; }
.fp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }

/* ----- Keeps ----- */
.fp-keeps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fp-keep { position: relative; overflow: hidden; padding: 16px 16px 14px; text-align: center; background: linear-gradient(180deg, #1f1910, var(--dsl-panel)); }
.fp-keep::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--k, var(--dsl-gold)); }
.fp-keep h3 { margin: 0; color: #fff; font: 700 17px var(--dsl-serif); }
.fp-keep .fp-fx { min-height: 18px; margin: 3px 0 12px; color: var(--dsl-muted); font-size: 12px; font-style: italic; }
.fp-keep .fp-flag { display: block; height: 42px; margin: 0 auto 8px; }
.fp-keep .fp-owner { color: var(--dsl-gold-hi); font-size: 15px; font-weight: 700; }
.fp-keep .fp-meta { margin-top: 4px; color: var(--dsl-muted); font-size: 12px; }
.fp-keep .fp-meta b { color: #d9c9a6; font-weight: 600; }
.fp-under { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; padding: 10px 6px; }
.fp-under-label { grid-column: 1 / -1; margin-bottom: 8px; color: var(--dsl-muted); text-align: center; font: 700 12px var(--dsl-serif); letter-spacing: .14em; }
.fp-under > div:not(.fp-under-label) { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--dsl-muted); font-size: 13px; border-left: 1px solid var(--dsl-line); }
.fp-under > div:nth-child(2) { border-left: 0; }
.fp-under b { display: block; color: var(--dsl-text); font-weight: 600; }

/* ----- Leaderboards ----- */
table.fp-board { width: 100%; border-collapse: collapse; font-size: 14px; }
.fp-board th { padding: 7px 8px; border-bottom: 1px solid var(--dsl-gold-lo); color: var(--dsl-gold); text-align: left; font: 700 11px var(--dsl-sans); letter-spacing: .08em; text-transform: uppercase; }
.fp-board td { padding: 5px 8px; border-bottom: 1px solid #241c10; vertical-align: middle; }
.fp-board tbody tr:nth-child(odd) td { background: rgba(255,255,255,.02); }
.fp-board tbody tr:hover td { background: rgba(222,150,29,.08); }
.fp-board .fp-num { text-align: right; font-variant-numeric: tabular-nums; }
.fp-board .fp-rank { width: 34px; color: var(--dsl-muted); font-variant-numeric: tabular-nums; }
.fp-board tr.fp-top3 .fp-rank { color: var(--dsl-gold-hi); font-weight: 700; }
.fp-board tr.fp-top3 .fp-name { color: #fff; font-weight: 600; }
.fp-board .fp-sub { color: var(--dsl-muted); }
.fp-board img { display: block; }
.fp-empty { color: var(--dsl-muted); font-style: italic; }

.fp-spot {
  display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid #4a3512; border-radius: 6px;
  background: radial-gradient(ellipse at 20% 50%, rgba(222,150,29,.18), transparent 70%), #120e08;
}
.fp-lbl { color: var(--dsl-gold); font: 700 11px var(--dsl-serif); letter-spacing: .14em; text-transform: uppercase; }
.fp-spot .fp-who { color: #fff; font: 700 22px/1.2 var(--dsl-serif); }
.fp-spot .fp-what { color: var(--dsl-muted); font-size: 14px; }
.fp-spot .flagwave { margin-left: auto; }

/* TEAM: ME - sized like a 50x21 mini flag, in the panel's dark/gold palette */
.loner-pk-badge {
  display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 21px;
  border: 1px solid var(--dsl-gold-lo); border-radius: 3px; background: linear-gradient(180deg, #2a1d0b, #140e06);
  color: var(--dsl-gold-hi); font: 700 8.5px/1 var(--dsl-serif); letter-spacing: .06em; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,210,122,.08), 0 0 6px rgba(222,150,29,.18); cursor: help;
}

/* AGL */
.fp-champ { margin-bottom: 14px; padding: 6px 0 16px; border-bottom: 1px solid var(--dsl-line); text-align: center; }
.fp-champ .fp-who { margin-top: 8px; color: #fff; font: 700 22px var(--dsl-serif); }
.fp-rec { color: var(--dsl-gold-hi); font-weight: 700; }
.fp-champ .fp-what, .fp-champ2 .fp-what { color: var(--dsl-muted); font-size: 14px; }
.fp-champ2 { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--dsl-line); border-radius: 6px; background: #120e08; }
.fp-champ2 .fp-who { color: #fff; font-weight: 700; }
.fp-legend { margin-top: 10px; color: var(--dsl-muted); font-size: 12px; }
/* Gladiator names link to their AGL record: keep the name's own colour, hint with a dotted underline. */
.fp-wrap a.fp-glad { color: inherit; text-decoration: underline dotted rgba(222,150,29,.55); text-underline-offset: 3px; }
.fp-wrap a.fp-glad:hover, .fp-wrap a.fp-glad:focus { color: var(--dsl-gold-hi); text-decoration: underline solid; }

/* Belt shine: a light band sweeps across the belt. The belts are transparent
   PNGs, so the band is masked to the belt's own shape (--belt, set inline to
   the same image) instead of streaking across the empty background. */
.shine-wrap { position: relative; display: inline-block; line-height: 0; }
.shine-wrap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.85) 50%, rgba(255,255,255,0) 60%) no-repeat;
  background-size: 250% 100%;
  background-position: 150% 0;
  -webkit-mask: var(--belt) center / 100% 100% no-repeat;
  mask: var(--belt) center / 100% 100% no-repeat;
  animation: beltShineSweep 4.5s ease-in-out infinite;
}
@keyframes beltShineSweep { 0%, 55% { background-position: 150% 0; } 85%, 100% { background-position: -50% 0; } }

/* ----- News: parchment reading surfaces -----
   dsl_news.asp / algoron_news.asp are edited by hand (FrontPage-style
   <font> markup). These rules restyle that markup in place so the files
   keep working exactly as they are edited today. */
.fp-paper {
  overflow: hidden; border: 1px solid #d9c194; border-radius: 6px; background: #f3e6c8; color: #2a1d0c;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 30px rgba(0,0,0,.45);
}
.fp-paper .fp-card-hd { border-bottom: 2px solid #2a1d0c; }
.fp-paper .fp-card-hd h3 { color: #2a1d0c; font-size: 22px; }
.fp-paper .fp-card-hd span { color: #6d5530; font-size: 12px; }
.fp-masthead { padding: 16px 18px 10px; border-bottom: 3px double #2a1d0c; text-align: center; }
.fp-masthead .fp-name { color: #1d1206; font: 44px/1 "UnifrakturMaguntia", "Old English Text MT", serif; }
.fp-masthead .fp-line:empty { display: none; }
.fp-masthead .fp-line { margin-top: 8px; padding-top: 6px; border-top: 1px solid #2a1d0c; color: #4b3618; font: 600 11px var(--dsl-serif); letter-spacing: .12em; text-transform: uppercase; }

.fp-news { position: relative; padding: 6px 22px 18px; }
.fp-news.is-collapsed { max-height: 900px; overflow: hidden; }
.fp-news.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 110px; background: linear-gradient(rgba(243,230,200,0), #f3e6c8); }
.fp-more { display: block; width: 100%; padding: 10px; border: 0; border-top: 1px dashed #c8ad7c; background: none; color: #8a1c0f; font: 700 13px var(--dsl-sans); cursor: pointer; }
.fp-more:hover { background: rgba(138,28,15,.06); }

.fp-news img[src*="fafddbci"], .fp-news img[src*="aagfeibg"] { display: none; }   /* old banner images - replaced by the card headings */
.fp-news font { font-family: inherit; }
.fp-news p { margin: 0 0 10px; }
.fp-news a, .fp-news a:visited { color: #8a1c0f !important; text-decoration: underline; }
.fp-news table { width: 100%; border-collapse: collapse; }
.fp-news td { padding: 0 9px 0 0; }
.fp-news td + td { padding: 0 0 0 9px; }
.fp-news font[size="5"] { display: inline-block; margin-top: 14px; color: #3a1608; font: 700 21px/1.25 var(--dsl-serif); }
.fp-news font[size="4"], .fp-news .auto-style11 { font-size: 12px; }
.fp-news font[size="1"] { color: #7b6440; font-size: 12px; font-weight: 400; }
.fp-news font[size="2"], .fp-news .auto-style3 { font-size: 14.5px; line-height: 1.6; }
.fp-news td b:first-child { color: #5a2a0a; }

.fp-herald .fp-news { font-family: "EB Garamond", Georgia, serif; }
.fp-herald .fp-news font[size="5"] { display: block; text-align: center; font: 700 26px/1.15 "EB Garamond", Georgia, serif; }
.fp-herald .fp-news font[size="2"] { font-size: 17px; line-height: 1.5; }
.fp-herald .fp-news font[size="1"] { display: block; text-align: center; }

/* ----- Flags ----- */
.flagwave { display: inline-block; transform-origin: 0% 50%; animation: waveFlag 2.2s ease-in-out infinite; backface-visibility: hidden; cursor: pointer; }
.flagwave.flag-paused { animation-play-state: paused; }
@keyframes waveFlag {
  0% { transform: skewY(0) scaleX(1); } 12% { transform: skewY(-3deg) scaleX(.985); } 28% { transform: skewY(1.5deg) scaleX(1.01); }
  41% { transform: skewY(-2deg) scaleX(.99); } 57% { transform: skewY(3deg) scaleX(1.015); } 70% { transform: skewY(-1deg) scaleX(.99); }
  85% { transform: skewY(2deg) scaleX(1.005); } 100% { transform: skewY(0) scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .flagwave, .shine-wrap::after { animation: none; }
  .fp-slide, .fp-slide img { transition: none; }
}

/* ----- Responsive ----- */
@media (max-width: 1060px) {
  .fp-keeps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .fp-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .fp-hero { height: 470px; }
  .fp-hero::after { background: linear-gradient(0deg, rgba(13,11,8,.95) 15%, rgba(13,11,8,.35) 70%); }
  .fp-hero-copy { top: auto; bottom: 64px; transform: none; }
  .fp-hero h1 { font-size: 30px; }
  .fp-hero p { font-size: 15px; }
  .fp-actions .fp-btn-ghost { display: none; }
  .fp-cap { left: 16px; right: 16px; bottom: 14px; justify-content: space-between; overflow: hidden; white-space: nowrap; font-size: 12px; }
  .fp-under { grid-template-columns: 1fr 1fr; row-gap: 10px; }
  .fp-under > div:nth-child(4) { border-left: 0; }
  .fp-news table, .fp-news tbody, .fp-news tr, .fp-news td { display: block; width: auto !important; padding: 0 !important; }
  .fp-board .fp-hide-sm { display: none; }
  .fp-spot { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .fp-keeps { grid-template-columns: 1fr; }
  .dslnav-online { display: none; }
}
