/* MTG Commander website: shared styles for every page (/, /features/, /download/, /patch_notes/).
   The game's own fonts (SIL Open Font License), served from here: nothing from third parties. */
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("../fonts/crimson-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Crimson Pro"; src: url("../fonts/crimson-600.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0907; --bg2: #120f0b; --panel: #17130e; --panel2: #1e1912; --line: #3a3124; --line2: #574629;
  --text: #ebe0c8; --muted: #b9aa8c; --dim: #8a7d66;
  --gold: #e2bc62; --gold-hi: #f5d98e; --gold-deep: #9b7a35;
  --head: "Cinzel", Georgia, "Times New Roman", serif;
  --body: "Crimson Pro", Georgia, "Times New Roman", serif;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 19px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; letter-spacing: .04em; color: var(--gold-hi); margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 18px; } }

/* ---------------------------------------------------------------- the bar at the top */
.bar { position: sticky; top: 0; z-index: 50; background: rgba(11, 9, 7, .84); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(226, 188, 98, .18); }
.bar .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { font-family: var(--head); font-size: 20px; color: var(--gold-hi); text-decoration: none; letter-spacing: .06em; white-space: nowrap; }
.bar nav { display: flex; gap: 24px; margin-left: auto; }
.bar nav a { color: var(--muted); text-decoration: none; font-size: 17px; padding: 4px 0; border-bottom: 2px solid transparent; }
.bar nav a:hover { color: var(--gold-hi); }
.bar nav a.on { color: var(--gold-hi); border-bottom-color: var(--gold); }
.bar .cta { padding: 9px 18px; font-size: 15px; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line2); color: var(--gold-hi); border-radius: 6px; width: 44px; height: 40px; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 900px) {
  .bar nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(11, 9, 7, .97); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; }
  .bar nav.open { display: flex; }
  .bar nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: grid; place-items: center; }
  .bar .cta { margin-left: 0; }
}

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px; border-radius: 8px; text-decoration: none; cursor: pointer;
       font: 700 18px/1 var(--head); letter-spacing: .05em; border: 1px solid var(--gold); transition: transform .15s, box-shadow .15s, background .15s; }
.btn.primary { color: #1a1206; background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #c79c45);
               box-shadow: 0 6px 24px rgba(226, 188, 98, .28), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.primary:hover { color: #1a1206; transform: translateY(-2px); box-shadow: 0 10px 34px rgba(226, 188, 98, .4), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn.ghost { color: var(--gold-hi); background: rgba(226, 188, 98, .06); }
.btn.ghost:hover { background: rgba(226, 188, 98, .14); color: var(--gold-hi); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------------- the big banner behind the logo (home) */
.hero { position: relative; min-height: min(94vh, 900px); display: flex; align-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .banner { position: absolute; inset: 0; background-size: cover; background-position: center 35%; transform: scale(1.04); animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.12) translate(-1.5%, -1%); } }
.hero::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 42%, rgba(11, 9, 7, .25) 0%, rgba(11, 9, 7, .7) 62%, rgba(11, 9, 7, .95) 100%),
              linear-gradient(0deg, var(--bg) 0%, rgba(11, 9, 7, 0) 28%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; text-align: center; padding-top: 40px; padding-bottom: 110px; }
.hero .tag { font-family: var(--head); color: var(--gold); letter-spacing: .32em; font-size: 14px; text-transform: uppercase; margin: 0 0 18px; text-shadow: 0 2px 8px #000; }
.hero h1 { font-size: clamp(50px, 9vw, 124px); line-height: 1; text-shadow: 0 6px 40px rgba(0, 0, 0, .9), 0 0 2px #000; }
.hero h1 span { display: block; font-size: .42em; letter-spacing: .5em; color: var(--gold); margin-top: 14px; }
.hero .lead { font-size: clamp(20px, 2.3vw, 26px); max-width: 680px; margin: 22px auto 34px; text-shadow: 0 2px 12px #000; }
.hero .lead b { color: var(--gold-hi); font-weight: 600; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .meta { margin-top: 16px; color: var(--muted); font-size: 16px; text-shadow: 0 2px 6px #000; }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; z-index: 2; transform: translateX(-50%); color: var(--dim); font-size: 13px; letter-spacing: .25em;
               text-transform: uppercase; text-decoration: none; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------------------------------------------------------------- a sub-page's head (features, download, patch notes) */
.page-head { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding: 92px 0 70px; }
.page-head .banner { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; filter: saturate(1.1); }
.page-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 9, 7, .95) 25%, rgba(11, 9, 7, .55)), linear-gradient(0deg, var(--bg), transparent 45%); }
.page-head .wrap { position: relative; z-index: 2; }
.page-head h1 { font-size: clamp(40px, 6vw, 72px); text-shadow: 0 4px 30px #000; }
.page-head p { color: var(--text); max-width: 640px; font-size: 21px; margin: 14px 0 0; }

/* ---------------------------------------------------------------- the numbers under the hero */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line);
         border-radius: var(--radius); overflow: hidden; margin: -50px auto 0; position: relative; z-index: 3; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); }
.facts div { background: var(--panel); padding: 20px 22px; }
.facts b { display: block; font: 700 26px/1.1 var(--head); color: var(--gold-hi); }
.facts span { color: var(--muted); font-size: 16px; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- sections */
section { padding: 96px 0 0; }
.eyebrow { font-family: var(--head); color: var(--gold); letter-spacing: .3em; font-size: 13px; text-transform: uppercase; margin: 0 0 10px; }
.sec-head { max-width: 760px; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(30px, 4vw, 44px); }
.sec-head p { color: var(--muted); margin: 12px 0 0; font-size: 20px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------- tiles (play modes, technical) */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .tiles, .tiles.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tiles, .tiles.three { grid-template-columns: 1fr; } }
.tile { position: relative; display: block; text-decoration: none; color: var(--text); background: linear-gradient(180deg, var(--panel2), var(--panel));
        border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; }
a.tile:hover { border-color: var(--line2); transform: translateY(-3px); color: var(--text); }
.tile img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-bottom: 1px solid var(--line); }
.tile .in { padding: 18px 20px 20px; }
.tile h3 { font-size: 18px; margin-bottom: 6px; }
.tile p { margin: 0; color: var(--muted); font-size: 17px; }
.tile .ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px;
            background: radial-gradient(circle at 35% 30%, #3b2d14, #17110a); border: 1px solid var(--gold-deep); color: var(--gold-hi); }
.tile .ic svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- a feature: text beside pictures, alternating */
.feature-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; padding: 70px 0; border-bottom: 1px solid var(--line); }
.feature-row:last-child { border-bottom: 0; }
.feature-row.flip { grid-template-columns: 1.25fr 1fr; }
.feature-row.flip .text { order: 2; }
@media (max-width: 920px) { .feature-row, .feature-row.flip { grid-template-columns: 1fr; gap: 26px; padding: 50px 0; } .feature-row.flip .text { order: 0; } }
.feature-row h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 12px; }
.feature-row p { color: var(--muted); margin: 0 0 12px; }
.feature-row ul { list-style: none; padding: 0; margin: 14px 0 0; }
.feature-row li { padding-left: 26px; position: relative; margin: 7px 0; color: var(--text); }
.feature-row li::before { content: "◆"; position: absolute; left: 3px; top: 1px; color: var(--gold); font-size: 12px; }
.shot { border-radius: var(--radius); border: 1px solid var(--line2); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); cursor: zoom-in; width: 100%; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shots .shot.wide { grid-column: span 2; }
.shot-cap { color: var(--dim); font-size: 15px; margin-top: 8px; }

/* ---------------------------------------------------------------- picture gallery (themes) */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery figure { margin: 0; }
.gallery figure:first-child { grid-column: span 2; grid-row: span 2; }
.gallery figcaption { color: var(--muted); font-size: 16px; margin-top: 6px; }
.gallery figcaption b { color: var(--gold-hi); font-family: var(--head); font-size: 14px; letter-spacing: .06em; margin-right: 6px; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery figure:first-child { grid-column: span 2; grid-row: auto; } }

/* ---------------------------------------------------------------- the picture slider */
.slider { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line2); background: #000;
          box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 6px rgba(226, 188, 98, .05); aspect-ratio: 16 / 9; }
.slides { display: flex; height: 100%; transition: transform .6s cubic-bezier(.22, .7, .2, 1); }
.slide { flex: 0 0 100%; position: relative; cursor: zoom-in; margin: 0; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 28px 22px; background: linear-gradient(0deg, rgba(0, 0, 0, .95), rgba(0, 0, 0, .75) 45%, transparent); }
.slide figcaption b { display: block; font: 700 20px/1.2 var(--head); color: var(--gold-hi); letter-spacing: .04em; }
.slide figcaption span { color: var(--text); font-size: 17px; }
@media (max-width: 640px) { .slide figcaption { padding: 30px 14px 12px; } .slide figcaption span { display: none; } }
.arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(226, 188, 98, .55);
         background: rgba(11, 9, 7, .7); color: var(--gold-hi); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.arrow:hover { background: rgba(40, 30, 14, .9); }
.arrow.prev { left: 16px; } .arrow.next { right: 16px; }
.arrow svg { width: 22px; height: 22px; }
.thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-color: var(--line2) transparent; }
.thumbs button { flex: 0 0 132px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.thumbs button.on, .thumbs button:hover { opacity: 1; }
.thumbs button.on { border-color: var(--gold); }
.thumbs img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

/* ---------------------------------------------------------------- the big picture on click */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .93); display: none; place-items: center; padding: 3vw; cursor: zoom-out; }
.lightbox.on { display: grid; }
.lightbox img { max-height: 92vh; border: 1px solid var(--line2); border-radius: 6px; }

/* ---------------------------------------------------------------- the new set */
.newset { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
          background: radial-gradient(ellipse at 80% 20%, rgba(80, 120, 190, .16), transparent 60%), linear-gradient(180deg, var(--panel2), var(--panel));
          border: 1px solid var(--line); border-radius: 14px; padding: 44px; overflow: hidden; }
@media (max-width: 900px) { .newset { grid-template-columns: 1fr; padding: 26px; gap: 28px; } }
.newset h2 { font-size: clamp(34px, 4.5vw, 54px); }
.newset p { color: var(--muted); }
.newset ul { list-style: none; padding: 0; margin: 18px 0 26px; }
.newset li { padding-left: 28px; position: relative; margin: 8px 0; }
.newset li::before { content: "◆"; position: absolute; left: 4px; top: 1px; color: var(--gold); font-size: 13px; }
.newset .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------------------------------------------------------------- download */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 2px solid var(--gold-deep); padding-top: 18px; }
.step::before { counter-increment: s; content: counter(s); font: 700 34px/1 var(--head); color: var(--gold); display: block; margin-bottom: 10px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; font-size: 17.5px; }
.download-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
                 background: linear-gradient(90deg, #22190b, var(--panel)); border: 1px solid var(--line2); border-radius: 14px; padding: 30px 34px; }
.download-card h3 { font-size: 24px; }
.download-card p { margin: 6px 0 0; color: var(--muted); }
.spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
@media (max-width: 760px) { .spec { grid-template-columns: 1fr; } }
.spec div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.spec b { display: block; font-family: var(--head); color: var(--gold-hi); font-size: 15px; letter-spacing: .06em; margin-bottom: 4px; }
.spec span { color: var(--muted); font-size: 17px; }

/* ---------------------------------------------------------------- patch notes */
.notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 860px) { .notes { grid-template-columns: 1fr; } }
.note { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.notes .note { max-height: 470px; overflow-y: auto; scrollbar-color: var(--line2) transparent; scrollbar-width: thin; }
.note h3 { font-size: 20px; }
.note .when { color: var(--dim); font-size: 15px; margin: 4px 0 10px; }
.note h4 { font-size: 13px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; margin: 18px 0 6px; }
.note ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 17.5px; }
.note li { margin: 6px 0; }
.note li b { color: var(--text); font-weight: 600; }
.note.latest { border-color: var(--gold-deep); }
.note.latest .when { color: var(--gold); }
.notes-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 30px; align-items: start; }
@media (max-width: 860px) { .notes-layout { grid-template-columns: 1fr; } .notes-toc { display: none; } }
.notes-toc { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.notes-toc a { display: block; padding: 7px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: 16px; }
.notes-toc a small { display: block; color: var(--dim); font-size: 13px; }
.notes-toc a:hover { border-left-color: var(--gold); color: var(--text); }
.notes-full .note { margin-bottom: 22px; }

/* ---------------------------------------------------------------- questions */
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }
details { border-bottom: 1px solid var(--line); padding: 16px 2px; }
summary { cursor: pointer; font-size: 20px; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 14px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font: 700 22px/1 var(--head); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: 10px 0 2px; }

/* ---------------------------------------------------------------- the call at the bottom of a page */
.closing { margin-top: 100px; text-align: center; padding: 70px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
           background: radial-gradient(ellipse at 50% 0%, rgba(226, 188, 98, .12), transparent 65%), var(--bg2); }
.closing h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 12px; }
.closing p { color: var(--muted); margin: 0 0 26px; }

/* ---------------------------------------------------------------- footer */
footer { margin-top: 0; background: var(--bg2); padding: 40px 0 50px; color: var(--dim); font-size: 15px; border-top: 1px solid var(--line); }
footer .wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 36px; }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr; } }
footer .brand { font-size: 18px; }
footer p { margin: 8px 0; }
footer nav a { margin-right: 14px; }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.seen { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero .banner { animation: none; }
  .slides { transition: none; }
  .scroll-hint { animation: none; }
}
