/* EliteLevelPirates public site.
   Chrome follows the classic 2010s framed game-portal layout.
   Gold, oxblood, crimson and the credit footer draw on Elite Level Design System v3 tokens. */

:root {
  --ink: #2A1810;
  --ink-soft: #4A3424;
  --ink-faint: #6A5240;
  --parchment: #E8D5B0;
  --font-display: "Cinzel", "Times New Roman", Times, serif;
  --font-display-deco: "Cinzel Decorative", Cinzel, "Times New Roman", Times, serif;
  --font-parchment: "EB Garamond", "Times New Roman", Times, serif;
  --stage: 920px;
  --frame: 28px;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #071018;
  color: var(--ink);
  font: 500 17px/1.45 var(--font-parchment);
}

*, *::before, *::after { box-sizing: border-box; }

img { display: block; max-width: 100%; height: auto; }

a { color: #6A3A12; text-decoration-color: rgba(106, 58, 18, 0.4); text-underline-offset: 3px; }
a:hover { color: #3A200C; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--el-charcoal-900);
  color: var(--el-text);
  font: 600 13px/1 var(--el-font-ui);
  border-radius: 6px;
}
.skip-link:focus { top: 12px; }

/* Full-bleed stormy night sea — fixed to the viewport so the skull and ships stay in the side margins */
.sea { position: relative; min-height: 100vh; }
.sea-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  z-index: 0;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 2;
  width: min(var(--stage), calc(100% - 24px));
  margin: 8px auto 20px;
}

/* Logo + emblem sit on the sea, above the framed board */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 118px;
  padding: 4px 8px 2px;
  gap: 8px;
}

.logo {
  grid-column: 2;
  justify-self: center;
  text-decoration: none;
  max-width: 520px;
  width: 100%;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.65));
}
.logo img { width: 100%; height: auto; }

.account {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--el-gold-text);
  text-align: right;
  min-width: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.account img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}
.account-kicker {
  margin: 0;
  font: 400 10px/1.2 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--el-gold-dim);
}
.account-name {
  margin: 2px 0 0;
  font: 700 12px/1.2 var(--font-display);
  color: var(--el-gold-text);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 32px;
  border: 1px solid var(--el-gold-dim);
  background: #1A100C;
  color: var(--el-gold);
  font: 700 11px/1 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Ornate wooden board around parchment */
.board {
  border: var(--frame) solid transparent;
  border-image-source: url("/assets/images/frame-ornate.png");
  border-image-slice: 64;
  border-image-width: var(--frame);
  border-image-repeat: stretch;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  background: var(--parchment);
}

/* Dark wood nav — first band inside the board */
.wood-nav {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0.38)),
    url("/assets/images/nav-wood.png");
  background-size: auto, 100% 100%;
  background-repeat: no-repeat, repeat-x;
  background-color: #2A1810;
  border-bottom: 1px solid var(--el-gold-dim);
  box-shadow: inset 0 1px 0 rgba(240, 215, 133, 0.18);
}

.wood-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 6px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.wood-nav a,
.wood-nav .nav-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  font: 700 13px/1 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--el-gold);
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}
.wood-nav a:hover { color: var(--el-gold-hi); }
.wood-nav a[aria-current="page"] {
  color: var(--el-gold-hi);
  box-shadow: inset 0 -3px 0 var(--el-gold);
}
.nav-soon {
  color: var(--el-gold-dim);
  cursor: default;
  gap: 6px;
}
.nav-soon small {
  font: 500 8px/1 var(--el-font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C8BAB0;
}

/* Parchment content */
.parchment {
  background-image:
    linear-gradient(180deg, rgba(255, 250, 235, 0.2), rgba(80, 50, 20, 0.06)),
    url("/assets/images/panel-parchment.png");
  background-size: cover;
  background-color: var(--parchment);
  color: var(--ink);
  padding: 14px 16px 16px;
}

.parchment h1,
.parchment h2,
.parchment h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.page-head { margin: 0 0 14px; }
.page-head h1 { margin: 0; font-size: 26px; }
.lead { margin: 8px 0 0; color: var(--ink-soft); font-size: 18px; }

.gold-frame {
  border: 3px solid var(--el-gold-dim);
  box-shadow:
    0 0 0 1px #5A4020,
    inset 0 0 0 1px rgba(240, 215, 133, 0.55),
    0 4px 12px rgba(0, 0, 0, 0.28);
  background: #1A1010;
}

/* Homepage hero + promo */
.hero-row {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 12px;
  align-items: stretch;
}

.carousel { position: relative; overflow: hidden; }
.carousel .slides { position: relative; aspect-ratio: 1400 / 560; background: #120808; }
.carousel figure {
  margin: 0;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 360ms ease;
  pointer-events: none;
}
.carousel figure.is-active { opacity: 1; pointer-events: auto; position: relative; }
.carousel img { width: 100%; height: 100%; object-fit: cover; }

.dots {
  position: absolute;
  left: 10px;
  bottom: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--el-gold);
  background: rgba(18, 8, 8, 0.7);
  cursor: pointer;
}
.dots button.is-active {
  background: var(--el-gold);
}

.promo {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
}
.promo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.promo-inner {
  position: relative;
  z-index: 1;
  padding: 12px 10px 12px;
  background: linear-gradient(180deg, rgba(18, 8, 8, 0) 0%, rgba(18, 8, 8, 0.78) 55%, rgba(18, 8, 8, 0.9) 100%);
  text-align: center;
}
.promo-inner p {
  margin: 0 0 8px;
  color: var(--el-gold-hi);
  font: 700 14px/1.2 var(--font-display);
  letter-spacing: 0.04em;
}

.btn-play-now,
a.btn-play-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  padding: 0 12px;
  border-radius: 3px;
  background: radial-gradient(circle at 38% 32%, #D42040 0%, #8B0018 55%, #4A000C 100%);
  border: 1.5px solid #E03050;
  box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.18), 0 3px 10px rgba(0, 0, 0, 0.5);
  color: #fff;
  font: 700 15px/1 var(--font-display);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
a.btn-play-now:hover { color: #fff; filter: brightness(1.08); }

/* Poll on the left, ticker + three tiles on the right — same as the classic portal */
.lower {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px 18px;
  margin-top: 14px;
  align-items: start;
}

.poll h2,
.ticker h2 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6A3A10;
}

.poll fieldset { border: 0; margin: 0; padding: 0; }
.poll legend {
  font: italic 500 16px/1.35 var(--font-parchment);
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.poll label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
  font-size: 16px;
  cursor: pointer;
}
.poll button,
.btn-secondary,
button.btn-secondary {
  margin-top: 10px;
  min-height: 28px;
  padding: 0 16px;
  border: 1px solid #5A3A18;
  background: linear-gradient(180deg, #5A3820, #2A1810);
  color: var(--el-gold);
  font: 700 12px/1 var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(240, 215, 133, 0.2);
}
.poll-result { margin: 8px 0 0; font-style: italic; color: var(--ink-soft); }
.poll[data-voted="true"] button { display: none; }

.lower-right { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.ticker {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
}
.ticker h2 { margin: 0; }
.ticker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
  flex: 1;
  min-width: 0;
}
.ticker-list li { margin: 0; padding: 0; border: 0; }
.ticker-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}
.ticker-list a:hover { color: #3A200C; }
.ticker-list time {
  font: 500 13px/1.4 var(--el-font-ui);
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}
.ticker-placeholder { font-style: italic; color: var(--ink-faint); margin: 0; }

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.tile {
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  position: relative;
  display: block;
  min-height: 0;
}
.tile:hover { color: inherit; filter: brightness(1.06); }
.tile img { width: 100%; aspect-ratio: 800 / 480; object-fit: cover; }
.tile-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 18px 8px 8px;
  background: linear-gradient(180deg, transparent, rgba(12, 6, 4, 0.82));
  color: var(--el-gold);
  font: 700 13px/1.15 var(--font-display);
  letter-spacing: 0.05em;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* Inner pages */
.inset {
  background: rgba(255, 250, 235, 0.35);
  border: 1px solid #8A6A40;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  padding: 12px 14px 14px;
}
.inset.stacked { margin-top: 12px; }

.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 12px 14px;
}
.post-card:hover { color: inherit; }
.post-card h2 { margin: 6px 0 0; font-size: 22px; }
.post-card p { margin: 6px 0 0; color: var(--ink-soft); }
.post-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.date { font: 500 12.5px/1 var(--el-font-ui); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.chip-placeholder {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--el-gold-dim);
  color: #5A2010;
  font: 700 10px/1 var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(212, 175, 55, 0.15);
}

.article { max-width: 42rem; }
.article-body { margin-top: 12px; }
.article-body > * + * { margin-top: 0.9em; }
.article-body h2 { font-size: 20px; }
.article-body code {
  font-family: var(--el-font-mono);
  font-size: 13px;
  background: rgba(42, 24, 16, 0.08);
  padding: 0 5px;
  border-radius: 3px;
}
.placeholder-banner {
  margin: 0 0 14px;
  padding: 8px 12px;
  border-left: 3px solid var(--el-gold-dim);
  background: rgba(212, 175, 55, 0.12);
  font-style: italic;
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 12px 14px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1A100C;
  color: var(--el-gold);
  font: 700 14px/1 var(--font-display);
  border: 1px solid var(--el-gold-dim);
}
.step h2 { margin: 6px 0 0; font-size: 18px; }
.step p { margin: 6px 0 0; color: var(--ink-soft); }

.address-block { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.address {
  font: 500 16px/1.3 var(--el-font-mono);
  background: rgba(42, 24, 16, 0.1);
  border: 1px solid #8A6A40;
  padding: 8px 12px;
  color: var(--ink);
}
button[data-copy] { margin-top: 0; }

.empty-card h2 { margin: 0; }
.empty-card p { margin: 8px 0 0; color: var(--ink-soft); }

/* Footer lives on the sea, under the board */
.site-footer {
  padding: 12px 8px 8px;
  color: var(--el-text-muted);
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
}
.footer-mark { width: 18px; height: 18px; flex: 0 0 18px; }
.site-footer .el-credit { min-height: 0; color: var(--el-text-muted); justify-content: center; }
.footer-build { font: var(--el-type-mono-sm); color: var(--el-text-muted); }
.footer-legal {
  margin: 6px 0 0;
  font: 500 11.5px/1.4 var(--el-font-ui);
  color: var(--el-text-muted);
}
.footer-legal a { color: var(--el-text-3); }
.made-with {
  margin: 8px 0 0;
  font: 500 11.5px/1.3 var(--el-font-ui);
  color: var(--el-text-muted);
}

@media (max-width: 860px) {
  :root { --frame: 16px; }
  .masthead { grid-template-columns: auto 1fr auto; min-height: 86px; }
  .logo { grid-column: 2; max-width: 300px; }
  .account img { width: 44px; height: 44px; flex-basis: 44px; }
  .account-copy { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; grid-column: 1; }
  .wood-nav { display: none; }
  .wood-nav[data-open="true"] { display: block; }
  .wood-nav ul { flex-direction: column; align-items: stretch; }
  .wood-nav a, .wood-nav .nav-soon { justify-content: flex-start; }
  .hero-row, .lower, .tiles { grid-template-columns: 1fr; }
  .promo { min-height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel figure { transition: none; }
}
