/* ═══ MYTHOS — Temple Theme ═══════════════════════════════════════════ */

:root {
  --marble:        #f4efe4;
  --marble-dark:   #e9e1cf;
  --marble-shadow: #d8cdb4;
  --ink:           #2b2117;
  --ink-soft:      #5a4a38;
  --gold:          #a87c1f;
  --gold-bright:   #c9a227;
  --gold-pale:     #e8d9a8;
  --terracotta:    #8c3b2e;
  --night:         #191622;
  --night-soft:    #241f30;
  --laurel:        #5a6b46;
  --serif-display: "Cinzel", serif;
  --serif-deco:    "Cinzel Decorative", serif;
  --serif-body:    "Cormorant Garamond", Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif-body);
  font-size: 1.15rem;
  color: var(--ink);
  background-color: var(--marble);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.55), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(184,160,110,.14), transparent 50%),
    radial-gradient(ellipse at 60% 40%, rgba(200,185,150,.12), transparent 60%);
  line-height: 1.6;
}

/* ─── Greek key (meander) border ─── */
.meander-border {
  height: 26px;
  background-color: var(--night);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='26' viewBox='0 0 36 26'%3E%3Cpath d='M2 22 V6 H30 V14 H12 V10 H26' fill='none' stroke='%23c9a227' stroke-width='2.5'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
}

/* ═══ HEADER ═══ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(25, 22, 34, .97);
  box-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
}
.logo-mark {
  font-family: var(--serif-deco);
  font-size: 1.7rem;
  color: var(--night);
  background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.logo-text {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: .35em;
  color: var(--gold-pale);
}
.site-nav {
  display: flex;
  gap: 2rem;
}
.site-nav a {
  font-family: var(--serif-display);
  font-size: .85rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-pale);
  text-decoration: none;
  padding-bottom: .2rem;
  border-bottom: 2px solid transparent;
  transition: border-color .25s, color .25s;
}
.site-nav a:hover { color: var(--gold-bright); border-bottom-color: var(--gold-bright); }

/* ═══ HERO ═══ */
.hero {
  padding: 4.5rem 1rem 0;
  text-align: center;
  overflow: hidden;
}
.hero-columns {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 2rem;
}
.hero-content {
  flex: 1;
  padding: 1rem 0 3.5rem;
  position: relative;
}

/* Pediment */
.pediment {
  position: relative;
  max-width: 620px;
  margin: 0 auto 2.2rem;
}
.pediment svg { width: 100%; height: 90px; display: block; }
.pediment-shape {
  fill: var(--marble-dark);
  stroke: var(--gold);
  stroke-width: 2;
}
.pediment-glyph {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  font-size: 2rem;
  filter: sepia(1) saturate(3);
}

.hero-kicker {
  font-family: var(--serif-display);
  letter-spacing: .3em;
  font-size: .85rem;
  color: var(--terracotta);
  text-transform: uppercase;
  margin-bottom: .8rem;
}
.hero-title {
  font-family: var(--serif-deco);
  font-size: clamp(3rem, 9vw, 5.5rem);
  font-weight: 900;
  letter-spacing: .12em;
  background: linear-gradient(170deg, var(--gold) 20%, #7a5a12 50%, var(--gold-bright) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 3px 14px rgba(168,124,31,.25);
}
.hero-subtitle {
  font-size: 1.4rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 1rem 0 2.2rem;
}
.hero-actions { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }

/* ─── Columns ─── */
.column {
  width: 74px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.capital {
  height: 30px;
  background: linear-gradient(#fbf7ec, var(--marble-shadow));
  border: 1px solid var(--marble-shadow);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 3px 5px rgba(90,70,40,.18);
  position: relative;
}
.capital::after {
  content: "";
  position: absolute;
  left: 8%; right: 8%; bottom: -12px;
  height: 12px;
  background: linear-gradient(#f2ecdc, #ddd2ba);
  border: 1px solid var(--marble-shadow);
  border-top: none;
}
.shaft {
  flex: 1;
  margin: 12px 7px 0;
  background: repeating-linear-gradient(
    90deg,
    #efe8d6 0px, #fdfaf2 5px, #efe8d6 10px, #d9cdb2 12px
  );
  border-left: 1px solid var(--marble-shadow);
  border-right: 1px solid var(--marble-shadow);
  box-shadow: inset 0 0 26px rgba(120,100,60,.15);
  min-height: 220px;
}
.base {
  height: 26px;
  background: linear-gradient(#f2ecdc, var(--marble-shadow));
  border: 1px solid var(--marble-shadow);
  box-shadow: 0 4px 6px rgba(90,70,40,.2);
}

/* Temple steps under hero */
.hero-steps .step {
  height: 16px;
  background: linear-gradient(#f0e9d8, #dcd1b8);
  border-top: 1px solid #fff;
  box-shadow: 0 2px 4px rgba(90,70,40,.15);
}
.hero-steps .step:nth-child(1) { margin: 0 8%; }
.hero-steps .step:nth-child(2) { margin: 0 4%; }
.hero-steps .step:nth-child(3) { margin: 0; }

/* ═══ BUTTONS ═══ */
.btn {
  font-family: var(--serif-display);
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .8rem 1.9rem;
  border-radius: 3px;
  cursor: pointer;
  border: none;
  transition: transform .15s, box-shadow .2s, background .2s;
  display: inline-block;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(165deg, var(--gold-bright), var(--gold));
  color: #fff8e6;
  box-shadow: 0 4px 14px rgba(168,124,31,.4), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-gold:hover { box-shadow: 0 6px 20px rgba(168,124,31,.55), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-gold:disabled {
  background: #b6ac96;
  color: #f0ead9;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-outline {
  background: transparent;
  color: var(--terracotta);
  box-shadow: inset 0 0 0 2px var(--terracotta);
}
.btn-outline:hover { background: rgba(140,59,46,.08); }
.btn-small { font-size: .78rem; padding: .55rem 1.1rem; }

/* ═══ SECTIONS ═══ */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}
.section-heading { text-align: center; margin-bottom: 2.8rem; }
.heading-ornament { font-size: 1.6rem; color: var(--gold); margin-bottom: .4rem; }
.section-heading h2 {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.9rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}
.section-heading h2::after {
  content: "";
  display: block;
  width: 130px;
  height: 3px;
  margin: .8rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.section-sub {
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin-top: .7rem;
}

/* ═══ PANTHEON CONTROLS ═══ */
.controls { display: flex; flex-direction: column; gap: 1.2rem; margin-bottom: 1.6rem; }
.search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: .55;
  font-size: .95rem;
}
#search-input {
  width: 100%;
  font-family: var(--serif-body);
  font-size: 1.15rem;
  padding: .85rem 1.2rem .85rem 2.7rem;
  background: #fffdf6;
  border: 2px solid var(--marble-shadow);
  border-radius: 3px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
#search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,162,39,.18);
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  justify-content: center;
}
.chip {
  font-family: var(--serif-display);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--marble-shadow);
  background: #fffdf6;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s;
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.active {
  background: linear-gradient(165deg, var(--gold-bright), var(--gold));
  border-color: var(--gold);
  color: #fff8e6;
  box-shadow: 0 3px 10px rgba(168,124,31,.35);
}
.result-count {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
  font-size: 1.02rem;
}

/* ═══ CARD GRID ═══ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.4rem;
}
.figure-card {
  background: #fffdf6;
  border: 1px solid var(--marble-shadow);
  border-top: 4px solid var(--gold);
  border-radius: 4px;
  padding: 1.4rem 1.3rem 1.2rem;
  cursor: pointer;
  transition: transform .2s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.figure-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(168,124,31,.18);
  border-radius: 2px;
  pointer-events: none;
}
.figure-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(90,70,40,.22);
}
.card-glyph { font-size: 2.1rem; line-height: 1; margin-bottom: .6rem; }
.card-name {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .05em;
  color: var(--ink);
}
.card-title {
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  margin: .25rem 0 .8rem;
  min-height: 2.6em;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--serif-display);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.card-myth { color: var(--terracotta); }
.card-tier {
  color: var(--gold);
  border: 1px solid var(--gold-pale);
  background: rgba(232,217,168,.25);
  padding: .18rem .55rem;
  border-radius: 999px;
}
.empty-state {
  text-align: center;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
  padding: 3rem 0;
}

/* ═══ ARENA ═══ */
.section-arena {
  max-width: none;
  background: var(--night);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(201,162,39,.10), transparent 55%),
    radial-gradient(ellipse at 15% 90%, rgba(140,59,46,.12), transparent 50%);
  color: var(--gold-pale);
}
.section-arena .section-heading h2 { color: var(--gold-pale); }
.section-arena .section-sub { color: #b0a68f; }
.section-arena > * { max-width: 1200px; margin-left: auto; margin-right: auto; }

.arena-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.8rem;
  align-items: start;
  padding: 0 1.5rem;
}
.fighter-slot { display: flex; flex-direction: column; gap: .7rem; }
.slot-label {
  font-family: var(--serif-display);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: .85rem;
  color: var(--gold-bright);
  text-align: center;
}
.fighter-select {
  font-family: var(--serif-body);
  font-size: 1.05rem;
  padding: .7rem .9rem;
  background: var(--night-soft);
  color: var(--gold-pale);
  border: 1.5px solid rgba(201,162,39,.45);
  border-radius: 3px;
  cursor: pointer;
}
.fighter-select:focus { outline: none; border-color: var(--gold-bright); }

.fighter-card {
  background: var(--night-soft);
  border: 1px solid rgba(201,162,39,.35);
  border-radius: 5px;
  padding: 1.4rem;
  min-height: 330px;
}
.fighter-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 280px;
  font-style: italic;
  color: #6f6858;
  font-size: 1.2rem;
}
.fc-head { display: flex; align-items: center; gap: .9rem; margin-bottom: .3rem; }
.fc-glyph { font-size: 2.4rem; }
.fc-name {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--gold-bright);
}
.fc-title { font-style: italic; color: #b0a68f; font-size: 1.02rem; margin-bottom: 1rem; }
.fc-stats { display: flex; flex-direction: column; gap: .45rem; }
.stat-row { display: grid; grid-template-columns: 82px 1fr 34px; align-items: center; gap: .6rem; }
.stat-label {
  font-family: var(--serif-display);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9a917c;
}
.stat-bar-track {
  height: 9px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
}
.stat-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  width: 0;
  transition: width .7s cubic-bezier(.25,.9,.35,1);
}
.stat-val {
  font-family: var(--serif-display);
  font-size: .8rem;
  color: var(--gold-pale);
  text-align: right;
}

.versus-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding-top: 2.4rem;
}
.versus-badge {
  font-family: var(--serif-deco);
  font-weight: 900;
  font-size: 2.3rem;
  color: var(--night);
  background: radial-gradient(circle at 35% 30%, var(--gold-bright), var(--gold) 70%);
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 0 34px rgba(201,162,39,.5), inset 0 2px 3px rgba(255,255,255,.5);
}
.btn-fight { font-size: 1.05rem; padding: .9rem 2.1rem; }

/* ═══ BATTLE REPORT ═══ */
.battle-report { padding: 3rem 1.5rem 0; }
.report-scroll {
  background: linear-gradient(#fdf9ee, #f3ecd8);
  color: var(--ink);
  border-radius: 6px;
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 5px rgba(201,162,39,.15), 0 18px 45px rgba(0,0,0,.5);
  padding: 2.4rem clamp(1.2rem, 4vw, 3rem);
  position: relative;
}
.report-scroll::before, .report-scroll::after {
  content: "❦";
  position: absolute;
  color: var(--gold);
  font-size: 1.3rem;
  opacity: .6;
}
.report-scroll::before { top: 12px; left: 18px; }
.report-scroll::after  { bottom: 12px; right: 18px; }
.report-title {
  font-family: var(--serif-display);
  text-align: center;
  letter-spacing: .2em;
  font-size: 1.35rem;
  margin-bottom: 1.6rem;
  color: var(--terracotta);
}
.battle-log { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1.8rem; }
.log-entry {
  padding: .8rem 1.1rem;
  border-left: 3px solid var(--gold);
  background: rgba(201,162,39,.07);
  border-radius: 0 4px 4px 0;
  font-size: 1.12rem;
  opacity: 0;
  transform: translateY(8px);
  animation: log-in .5s forwards;
}
.log-entry.log-round {
  font-family: var(--serif-display);
  font-size: .82rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: none;
  border-left-color: var(--terracotta);
}
@keyframes log-in { to { opacity: 1; transform: none; } }

.verdict {
  text-align: center;
  padding: 1.6rem 1rem;
  border-top: 2px solid var(--gold-pale);
  border-bottom: 2px solid var(--gold-pale);
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: log-in .6s forwards;
}
.verdict-winner {
  font-family: var(--serif-deco);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--gold);
  margin-bottom: .5rem;
}
.verdict-reason { font-size: 1.18rem; font-style: italic; color: var(--ink-soft); max-width: 700px; margin: 0 auto; }

.stat-compare { display: flex; flex-direction: column; gap: .5rem; }
.compare-row {
  display: grid;
  grid-template-columns: 44px 1fr 110px 1fr 44px;
  align-items: center;
  gap: .6rem;
  font-family: var(--serif-display);
  font-size: .8rem;
}
.compare-label {
  text-align: center;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-size: .7rem;
}
.compare-num { color: var(--ink); }
.compare-num.win { color: var(--gold); font-weight: 700; }
.compare-bar { height: 8px; border-radius: 999px; background: rgba(90,70,40,.12); overflow: hidden; }
.compare-bar span { display: block; height: 100%; border-radius: 999px; }
.compare-bar.left  { transform: scaleX(-1); }
.compare-bar .fill-a { background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.compare-bar .fill-b { background: linear-gradient(90deg, var(--terracotta), #b0543f); }

/* ═══ ABOUT & FOOTER ═══ */
.section-about { text-align: center; }
.about-text { max-width: 720px; margin: 0 auto; font-size: 1.3rem; }
.about-text p + p { margin-top: 1.1rem; }

.site-footer {
  background: var(--night);
  color: #8d8571;
  text-align: center;
  padding-bottom: 2rem;
}
.site-footer p { padding-top: 1.4rem; }
.footer-greek {
  font-family: var(--serif-display);
  letter-spacing: .35em;
  font-size: .8rem;
  color: var(--gold);
  padding-top: .5rem !important;
}

/* ═══ MODAL ═══ */
.modal-overlay[hidden] { display: none; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, .72);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  z-index: 100;
}
.modal {
  background: linear-gradient(#fdf9ee, #f1e9d4);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(201,162,39,.18), 0 25px 60px rgba(0,0,0,.5);
  border-radius: 6px;
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  padding: 2.4rem 2.2rem;
  animation: modal-in .3s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes modal-in { from { opacity: 0; transform: scale(.94) translateY(14px); } }
.modal-close {
  position: absolute;
  top: .9rem; right: .9rem;
  width: 2.2rem; height: 2.2rem;
  border: 1.5px solid var(--marble-shadow);
  background: #fffdf6;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink-soft);
  transition: all .2s;
}
.modal-close:hover { border-color: var(--terracotta); color: var(--terracotta); }

.m-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .2rem; }
.m-glyph { font-size: 2.8rem; }
.m-name { font-family: var(--serif-display); font-weight: 700; font-size: 1.9rem; color: var(--ink); }
.m-title { font-style: italic; font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 1rem; }
.m-badges { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.m-badge {
  font-family: var(--serif-display);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--gold-pale);
  background: rgba(232,217,168,.3);
  color: var(--gold);
}
.m-badge.myth { border-color: rgba(140,59,46,.4); background: rgba(140,59,46,.08); color: var(--terracotta); }
.m-section { margin-bottom: 1.2rem; }
.m-section h4 {
  font-family: var(--serif-display);
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: .35rem;
}
.m-section p, .m-section li { font-size: 1.12rem; }
.m-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.m-tag {
  font-size: .95rem;
  padding: .25rem .75rem;
  background: #fffdf6;
  border: 1px solid var(--marble-shadow);
  border-radius: 999px;
  color: var(--ink-soft);
}
.m-stats { display: flex; flex-direction: column; gap: .45rem; }
.m-stats .stat-label { color: var(--ink-soft); }
.m-stats .stat-bar-track { background: rgba(90,70,40,.12); }
.m-stats .stat-val { color: var(--ink); }
.m-actions { margin-top: 1.6rem; text-align: center; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 920px) {
  .arena-stage { grid-template-columns: 1fr; }
  .versus-block { padding-top: 0; flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .versus-badge { width: 64px; height: 64px; font-size: 1.7rem; }
}
@media (max-width: 760px) {
  .column { display: none; }
  .site-nav { gap: 1.1rem; }
  .site-nav a { font-size: .72rem; }
  .logo-text { letter-spacing: .2em; font-size: 1.1rem; }
  .compare-row { grid-template-columns: 36px 1fr 84px 1fr 36px; }
}
