/* TrainerPost - Editorial Premium Magazine */

:root {
  --paper: #faf7f2;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-muted: #7a7a7a;
  --burgundy: #7b2233;
  --burgundy-light: #9a3a4d;
  --rule: rgba(26, 26, 26, 0.14);
  --rule-strong: rgba(26, 26, 26, 0.28);
  --serif-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --serif-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: min(1120px, 92vw);
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--burgundy);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover { color: var(--burgundy-light); }

.wrap {
  width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Left edge accent */
.edge {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 100vh;
  background: var(--burgundy);
  z-index: 100;
}

/* ---- Masthead ---------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  padding-top: 1.5rem;
}

.masthead__strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.6rem;
  margin-bottom: 1.25rem;
}

.masthead__strip-mid {
  font-style: italic;
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.masthead__name {
  display: block;
  font-family: var(--serif-display);
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: center;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 0.35rem;
}

.masthead__name:hover { color: var(--burgundy); }

.masthead__tagline {
  text-align: center;
  margin-bottom: 1.25rem;
}

.masthead__tagline span {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ---- Navigation -------------------------------------------------- */

.nav {
  border-top: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

/* ---- Buttons ----------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--serif-body);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--burgundy);
  background: var(--burgundy);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn:hover {
  background: var(--burgundy-light);
  border-color: var(--burgundy-light);
  color: var(--paper);
}

.btn--lg {
  padding: 0.85rem 1.75rem;
  font-size: 0.78rem;
}

.btn--block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn--ghost {
  background: transparent;
  color: var(--burgundy);
  margin-top: 0.75rem;
}

.btn--ghost:hover {
  background: var(--burgundy);
  color: var(--paper);
}

/* ---- Typography helpers ------------------------------------------ */

.kicker {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin: 0 0 0.5rem;
}

.kicker--center { text-align: center; }

.dateline {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0;
}

.dropcap::first-letter {
  float: left;
  font-family: var(--serif-display);
  font-size: 4.2em;
  line-height: 0.78;
  padding-right: 0.12em;
  padding-top: 0.06em;
  color: var(--burgundy);
  font-weight: 700;
}

.ornament {
  text-align: center;
  color: var(--burgundy);
  font-size: 1rem;
  margin: 2.5rem 0;
  opacity: 0.5;
  letter-spacing: 0.5em;
}

/* ---- Lead / Hero ------------------------------------------------- */

.lead {
  padding: 3.5rem 0 2rem;
}

.lead__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.lead__hed {
  font-family: var(--serif-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.lead__deck {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0 0 2rem;
  line-height: 1.55;
}

.lead__body {
  columns: 2;
  column-gap: 3rem;
  column-rule: 1px solid var(--rule);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.lead__body p {
  margin: 0 0 1rem;
  break-inside: avoid;
}

.lead__cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.lead__cta-note {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-muted);
  margin: 0;
}

/* ---- Section heads ----------------------------------------------- */

.sec-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.sec-head__title {
  font-family: var(--serif-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin: 0 0 1rem;
}

.sec-head__rule {
  width: 60px;
  height: 1px;
  background: var(--burgundy);
  margin: 0 auto;
}

/* ---- Services desk ----------------------------------------------- */

.desk {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--rule);
}

.desk__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule-strong);
}

.desk__item {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background 0.25s ease;
}

.desk__item:hover {
  background: rgba(123, 34, 51, 0.04);
}

.desk__item:nth-child(3n) { border-right: none; }
.desk__item:nth-last-child(-n+3) { border-bottom: none; }

.desk__icon-frame {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border: 1px solid var(--rule);
  background: rgba(123, 34, 51, 0.04);
  padding: 0.35rem;
}

.desk__icon {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.desk__name {
  font-family: var(--serif-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.desk__blurb {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}

/* ---- How it works ------------------------------------------------ */

.how {
  padding: 2rem 0 4rem;
}

.how__band {
  border: 1px solid var(--rule-strong);
  padding: 2.5rem 2rem;
  background: rgba(123, 34, 51, 0.03);
}

.how__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
}

.how__step h3 {
  font-family: var(--serif-display);
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.how__step p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

.how__num {
  font-family: var(--serif-display);
  font-size: 1.4rem;
  color: var(--burgundy);
  font-weight: 700;
}

/* ---- Letters / Testimonials -------------------------------------- */

.letters {
  padding: 2rem 0 4rem;
  border-top: 1px solid var(--rule);
}

.letters__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.letter {
  margin: 0;
  padding: 0;
}

.letter blockquote {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--burgundy);
}

.letter figcaption {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.letter__tag {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-top: 0.25rem;
}

/* ---- Page head (inner pages) ------------------------------------- */

.page-head {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}

.page-head__hed {
  font-family: var(--serif-display);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  max-width: 20ch;
}

.page-head__deck {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0;
  line-height: 1.6;
}

/* ---- Raids ------------------------------------------------------- */

.raids {
  padding: 2.5rem 0 4rem;
}

.raids__layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
}

.raids__contents-label,
.register__label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.raids__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.raids__list li { margin-bottom: 0.15rem; }

.raids__boss-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  font-family: var(--serif-body);
  font-size: 0.88rem;
  padding: 0.55rem 0.65rem;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.raids__boss-btn:hover {
  color: var(--ink);
  background: rgba(123, 34, 51, 0.05);
}

.raids__boss-btn.is-active {
  color: var(--burgundy);
  border-left-color: var(--burgundy);
  font-weight: 600;
  background: rgba(123, 34, 51, 0.06);
}

.raids__boss-thumb {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  flex-shrink: 0;
}

.raids__boss-art {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.type-icon {
  width: 1.1rem;
  height: 1.1rem;
  object-fit: contain;
  vertical-align: middle;
}

.type-icon--pill {
  width: 0.95rem;
  height: 0.95rem;
}

.type-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.raids__pill--type {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.raids__report-head {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.raids__report-title {
  font-family: var(--serif-display);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.raids__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.raids__pill {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--rule-strong);
  color: var(--ink-soft);
}

.counter-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.counter-table thead {
  border-bottom: 2px solid var(--ink);
}

.counter-table th {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  text-align: left;
  padding: 0.65rem 0.75rem;
  color: var(--ink-muted);
}

.counter-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}

.counter-table tbody tr:hover {
  background: rgba(123, 34, 51, 0.03);
}

.counter-table .col-rank {
  width: 2.5rem;
  font-family: var(--serif-display);
  color: var(--burgundy);
  font-weight: 700;
}

.counter-table .col-name {
  font-family: var(--serif-display);
  font-weight: 600;
}

.counter-table .col-type {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.counter-table .col-move {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.rating-cell {
  min-width: 140px;
}

.rating-bar {
  height: 3px;
  background: var(--rule);
  margin-bottom: 0.3rem;
}

.rating-bar span {
  display: block;
  height: 100%;
  background: var(--burgundy);
  transition: width 0.4s ease;
}

.rating-num {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- Friend register --------------------------------------------- */

.register {
  padding: 2.5rem 0 4rem;
}

.register__layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
}

.fc-form {
  border: 1px solid var(--rule-strong);
  padding: 1.5rem;
  background: rgba(123, 34, 51, 0.02);
}

.fc-field {
  margin-bottom: 1rem;
}

.fc-field label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.fc-field input,
.fc-field select {
  width: 100%;
  font-family: var(--serif-body);
  font-size: 0.95rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
}

.fc-field input:focus,
.fc-field select:focus {
  outline: none;
  border-color: var(--burgundy);
}

.fc-row {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 0.75rem;
}

.fc-form__note {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--burgundy);
  margin: 0.75rem 0 0;
  min-height: 1.2em;
}

.register__listings-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
  margin-bottom: 0;
}

.register__count {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-style: italic;
}

.fc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fc-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.fc-card.is-mine {
  background: rgba(123, 34, 51, 0.04);
  padding-inline: 0.75rem;
  margin-inline: -0.75rem;
}

.team-badge {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--rule-strong);
  min-width: 4.5rem;
  text-align: center;
}

.team-badge--mystic { color: #2563a8; border-color: #2563a8; }
.team-badge--valor { color: #c03028; border-color: #c03028; }
.team-badge--instinct { color: #c9a020; border-color: #c9a020; }

.fc-card__trainer {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.15rem;
}

.fc-card__code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  margin: 0 0 0.25rem;
}

.fc-card__meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin: 0;
}

.bump-btn {
  font-family: var(--serif-body);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--burgundy);
  background: transparent;
  color: var(--burgundy);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.bump-btn:hover:not(:disabled) {
  background: var(--burgundy);
  color: var(--paper);
}

.bump-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--rule-strong);
  color: var(--ink-muted);
}

/* ---- Blog -------------------------------------------------------- */

.blog-index {
  padding: 2.5rem 0 4rem;
}

.blog-toc {
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

.blog-toc__list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  columns: 2;
  column-gap: 3rem;
}

.blog-toc__list li {
  margin-bottom: 0.65rem;
  break-inside: avoid;
}

.blog-toc__list a {
  font-family: var(--serif-display);
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
}

.blog-toc__list a:hover { color: var(--burgundy); }

.blog-toc__date {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-family: var(--serif-body);
  font-style: italic;
}

.blog-article {
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.blog-article:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.blog-article__head {
  margin-bottom: 1.5rem;
}

.blog-article__title {
  font-family: var(--serif-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}

.blog-article__date {
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 0;
}

.blog-article__body {
  columns: 2;
  column-gap: 2.5rem;
  column-rule: 1px solid var(--rule);
  font-size: 0.98rem;
}

.blog-article__body p {
  margin: 0 0 1rem;
  break-inside: avoid;
}

.blog-article__body p:first-child::first-letter {
  float: left;
  font-family: var(--serif-display);
  font-size: 3.6em;
  line-height: 0.78;
  padding-right: 0.1em;
  padding-top: 0.05em;
  color: var(--burgundy);
  font-weight: 700;
}

.blog-article__cta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---- Colophon / Footer ------------------------------------------- */

.colophon {
  border-top: 2px solid var(--ink);
  padding: 2.5rem 0 2rem;
  margin-top: 2rem;
}

.colophon__rule {
  display: none;
}

.colophon__grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.colophon__name {
  font-family: var(--serif-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.colophon__tag {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

.colophon__flourish {
  color: var(--burgundy);
  margin: 0.5rem 0 0;
  opacity: 0.6;
}

.colophon__kicker {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin: 0 0 0.5rem;
}

.colophon__legal p {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin: 0 0 0.5rem;
  line-height: 1.55;
}

.colophon__nav ul {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

.colophon__nav li { margin-bottom: 0.25rem; }

.colophon__nav a {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.colophon__nav a:hover { color: var(--burgundy); }

.colophon__foot {
  text-align: center;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--ink-muted);
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  margin: 0;
}

/* ---- Reveal animation -------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Responsive -------------------------------------------------- */

@media (max-width: 900px) {
  .lead__body,
  .blog-article__body,
  .blog-toc__list {
    columns: 1;
    column-rule: none;
  }

  .desk__grid {
    grid-template-columns: 1fr;
  }

  .desk__item {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }

  .desk__item:last-child { border-bottom: none; }

  .how__grid,
  .letters__grid {
    grid-template-columns: 1fr;
  }

  .raids__layout,
  .register__layout {
    grid-template-columns: 1fr;
  }

  .colophon__grid {
    grid-template-columns: 1fr;
  }

  .masthead__strip {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
  }

  .nav__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .nav__links {
    justify-content: center;
  }

  .btn--discord {
    text-align: center;
  }

  .fc-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .counter-table .col-move {
    display: none;
  }

  .counter-table th:nth-child(4),
  .counter-table td:nth-child(4) {
    display: none;
  }
}

@media (max-width: 600px) {
  html { font-size: 16px; }

  .lead__head {
    flex-direction: column;
    gap: 0.5rem;
  }
}
