/* site.h.css - site pages (home, legal pages, 404). Newspaper look: paper, ink, rules, serif titles.
   The games keep their dark table (style.h.css); only body.paper-theme is light. System fonts only. */

:root { --serif: Georgia, "Times New Roman", "Iowan Old Style", serif; }

.home, .text-page { max-width: 980px; margin: 0 auto; padding: 18px 16px 8px; }

/* ------------------------------------------------ masthead */
.masthead { text-align: center; padding: 6px 0 4px; }
.masthead-line { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 6px 2px; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  border-top: 4px double var(--ink); border-bottom: 1px solid var(--ink); }
.masthead-title { position: relative; display: inline-block; margin: 14px 0 2px; font-family: var(--serif); font-weight: 900; font-size: clamp(2.6rem, 11vw, 4.8rem); line-height: 1; letter-spacing: -.015em; color: var(--ink); }
.masthead-title span { color: var(--stamp); }
.masthead-title .beta-badge { position: absolute; top: -6px; right: -58px; font-size: .72rem; padding: 2px 10px 3px; transform: rotate(9deg); letter-spacing: .14em; }
.masthead-tagline { margin: 4px 0 14px; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.08rem; border-bottom: 4px double var(--ink); padding-bottom: 12px; }

/* ------------------------------------------------ hero */
.front-hero { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center; padding: 10px 0 4px; }
.front-hero-text h2 { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(1.8rem, 6vw, 2.7rem); line-height: 1.1; font-weight: 900; }
.front-hero-lead { margin: 0 0 18px; font-family: var(--serif); font-size: 1.08rem; line-height: 1.55; }
.front-hero-lead::first-letter { float: left; margin: .06em .1em 0 0; font-size: 3.1em; line-height: .82; font-weight: 900; color: var(--stamp); }
.front-hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.front-hero-hint { margin: 14px 0 0; }

/* ------------------------------------------------ fan of cards (dark cards on the paper) */
.fan { display: flex; justify-content: center; align-items: flex-end; padding: 22px 0 18px; min-height: 330px; }
.tcg-card { position: relative; width: min(46vw, 152px); aspect-ratio: 5 / 7.9; margin: 0 -3px; display: flex; flex-direction: column; overflow: hidden; color: #e8ebf5;
  background: linear-gradient(180deg, #1e2334, #11141f); border: 3px solid var(--rarity); border-radius: 14px;
  box-shadow: 0 14px 26px rgba(40, 25, 5, .45), 0 0 16px color-mix(in srgb, var(--rarity) 30%, transparent); transition: transform .25s ease; }
.tcg-card:nth-child(1) { transform: rotate(-6deg) translateY(12px); z-index: 1; }
.tcg-card:nth-child(2) { transform: translateY(-14px); z-index: 3; }
.tcg-card:nth-child(3) { transform: rotate(6deg) translateY(12px); z-index: 2; }
.tcg-card:hover { z-index: 5; }
.tcg-card:nth-child(1):hover { transform: rotate(-3deg) translateY(2px) scale(1.04); }
.tcg-card:nth-child(2):hover { transform: translateY(-26px) scale(1.03); }
.tcg-card:nth-child(3):hover { transform: rotate(3deg) translateY(2px) scale(1.04); }
.tcg-art { flex: 0 0 52%; overflow: hidden; border-bottom: 2px solid var(--rarity); }
.tcg-art img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.tcg-body { flex: 1; display: flex; flex-direction: column; padding: 6px 9px 8px; min-height: 0; }
.tcg-meta { display: flex; justify-content: space-between; margin: 0 0 2px; font-size: .78rem; }
.tcg-stars { color: var(--rarity); letter-spacing: .05em; }
.tcg-card h3 { margin: 0 0 4px; font-family: var(--serif); font-size: .95rem; line-height: 1.15; color: #f4f6ff; }
.tcg-flavor { margin: 0; font-size: .72rem; line-height: 1.3; color: #a9b1cc; font-style: italic; }
.tcg-rarity { margin: auto 0 0; font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--rarity); }

/* the middle card is a FULL ART: the photo covers the whole card, texts sit on a dark gradient, rainbow foil + moving sheen + sparkles */
.tcg-fullart { width: min(52vw, 196px); aspect-ratio: 5 / 7.4; border-width: 4px;
  box-shadow: 0 18px 34px rgba(40, 25, 5, .55), 0 0 26px rgba(251, 191, 36, .75), 0 0 60px rgba(251, 191, 36, .35); }
.tcg-fullart .tcg-art { position: absolute; inset: 0; border: 0; z-index: 0; }
.tcg-fullart .tcg-art img { filter: saturate(1.15) contrast(1.06); }
.tcg-fullart::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, transparent 22%, transparent 48%, rgba(5, 6, 14, .88) 100%); }
.tcg-fullart .tcg-body { position: relative; z-index: 2; margin-top: auto; flex: 0 0 auto; }
.tcg-fullart .tcg-meta { text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.tcg-fullart h3 { font-size: 1.12rem; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
.tcg-fullart .tcg-flavor { color: #e5e9fa; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.tcg-fullart .tcg-rarity { margin-top: 6px; }
.tcg-fullart .tcg-foil { position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: color-dodge; opacity: .36;
  background: linear-gradient(125deg, #ff3d6a, #ffb703, #3dff8b, #29b6ff, #b14dff, #ff3d6a); background-size: 300% 300%; animation: foil-drift 7s ease-in-out infinite alternate; }
.tcg-fullart .tcg-sheen { position: absolute; inset: 0; z-index: 4; pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .85) 48%, rgba(255, 255, 255, .15) 54%, transparent 68%); background-size: 260% 100%; animation: sheen-pass 3.6s ease-in-out infinite; }
.tcg-fullart .tcg-sparkles { position: absolute; inset: 0; z-index: 5; pointer-events: none; mix-blend-mode: screen; opacity: 0; animation: sparkle 2.8s ease-in-out infinite;
  background-image: radial-gradient(circle, #fff 0 1.2px, transparent 2px), radial-gradient(circle, #fff 0 1px, transparent 1.8px), radial-gradient(circle, #ffe9a8 0 1.4px, transparent 2.2px);
  background-size: 54px 61px, 83px 71px, 67px 97px; background-position: 4px 9px, 31px 40px, 12px 55px; }
@keyframes foil-drift { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }
@keyframes sheen-pass { 0%, 15% { background-position: 170% 0; } 65%, 100% { background-position: -80% 0; } }
@keyframes sparkle { 0%, 100% { opacity: 0; } 50% { opacity: .85; } }
.fan-caption { text-align: center; margin: 0 0 8px; }

/* ------------------------------------------------ how it works */
.how { margin-top: 26px; }
.section-title { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; font-family: var(--serif); font-size: 1.3rem; font-weight: 900; text-transform: uppercase; letter-spacing: .16em; }
.section-title::before, .section-title::after { content: ""; flex: 1; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); height: 4px; }
.how-columns { display: grid; grid-template-columns: 1fr; gap: 0; }
.how-step { position: relative; background: transparent; border: 0; border-top: 1px solid var(--ink); padding: 14px 8px 16px 60px; }
.how-number { position: absolute; left: 6px; top: 8px; margin: 0; font-family: var(--serif); font-size: 2.8rem; line-height: 1; font-weight: 900; color: var(--stamp); }
.how-step h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.15rem; }
.how-step p:last-child { margin: 0; color: var(--text); font-size: .96rem; font-family: var(--serif); line-height: 1.5; }

/* ------------------------------------------------ call to action */
.cta { margin: 26px 0 8px; padding: 22px 16px; text-align: center; border: 4px double var(--ink); background: var(--panel); }
.cta h2 { margin: 0 0 14px; font-family: var(--serif); font-size: 1.6rem; font-weight: 900; }
.cta .front-hero-buttons { justify-content: center; }
.home-note { text-align: center; margin-top: 18px; }

/* ------------------------------------------------ text pages and footer */
.text-page { max-width: 760px; font-family: var(--serif); line-height: 1.6; }
.text-page h1 { font-family: var(--serif); font-size: 2rem; font-weight: 900; margin: 8px 0 16px; padding-bottom: 8px; border-bottom: 4px double var(--ink); }
.text-page h2 { margin-top: 24px; font-family: var(--serif); border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.text-page a, .home-note a, .site-footer a { color: var(--accent-2); }
.credits-list { padding-left: 18px; font-size: .88rem; color: var(--muted); font-family: system-ui, sans-serif; }
.credits-list li { margin: 4px 0; overflow-wrap: anywhere; }
.site-footer { max-width: 760px; margin: 24px auto 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); border-top: 4px double var(--ink); text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: .9rem; }

/* ------------------------------------------------ larger screens */
@media (min-width: 820px) {
  .front-hero { grid-template-columns: 1.05fr 1fr; gap: 36px; }
  .how-columns { grid-template-columns: repeat(3, 1fr); }
  .how-step { border-top: 0; border-left: 1px solid var(--ink); padding-left: 64px; }
  .how-step:first-child { border-left: 0; }
  .tcg-card { width: 150px; }
  .tcg-fullart { width: 192px; }
}
@media (max-width: 480px) {
  .masthead-line { font-size: .6rem; letter-spacing: .1em; }
  .masthead-title .beta-badge { right: -44px; font-size: .62rem; }
  .masthead-title { margin-right: 28px; }
  .fan { min-height: 0; padding-top: 14px; }
  .tcg-card { width: 29vw; margin: 0 -2px; }
  .tcg-fullart { width: 38vw; }
  .tcg-body { padding: 5px 6px 6px; }
  .tcg-meta { font-size: .66rem; }
  .tcg-rarity { font-size: .52rem; }
  .tcg-card h3 { font-size: .78rem; }
  .tcg-fullart h3 { font-size: .9rem; }
  .tcg-flavor { display: none; }
  .tcg-art { flex-basis: 56%; }
}
@media (prefers-reduced-motion: reduce) {
  .tcg-fullart .tcg-foil, .tcg-fullart .tcg-sheen, .tcg-fullart .tcg-sparkles { animation: none; }
  .tcg-fullart .tcg-sheen { opacity: 0; }
  .tcg-card, .paper-theme .btn { transition: none; }
}
