/* Kelly Likes Cards — homepage styles. Brand: espresso + copper, warm premium and welcoming. */

:root {
  --bg: #14100b;
  --bg-alt: #1a150d;
  --surface: #201a12;
  --surface-2: #2a2216;
  --border: #33291d;
  --gold: #e08a3c;
  --gold-bright: #f0a24a;
  --teal: #86bf8f;
  --text: #f4ece0;
  --muted: #ac9c86;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
  --wrap: 1080px;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(224,138,60,.12), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(134,191,143,.05), transparent 55%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(var(--wrap), 92vw); margin: 0 auto; }
.wrap.narrow { max-width: 720px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(20,16,11,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: .2px; }
.brand-mark { font-size: 1.25rem; }
.brand-name { font-size: 1.05rem; }
.nav { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.4rem); }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600; }
.nav a:hover { color: var(--text); }
.nav-cta {
  color: #1c1206 !important;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  padding: .5rem .9rem; border-radius: 999px; font-weight: 800;
}
.nav-cta:hover { filter: brightness(1.06); }

/* ---------- Hero ---------- */
.hero { padding: clamp(3.5rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem) clamp(2.5rem, 6vw, 5rem); }
.hero-inner { width: min(var(--wrap), 92vw); margin: 0 auto; max-width: 860px; }
.eyebrow { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.08; margin: 0 0 1.1rem; font-weight: 850; letter-spacing: -.5px; }
.gold { color: var(--gold-bright); }
.lede { font-size: clamp(1.05rem, 2.4vw, 1.28rem); color: var(--muted); margin: 0 0 2rem; max-width: 640px; }

.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.3rem; border-radius: 999px; text-decoration: none;
  font-weight: 750; font-size: 1rem; border: 1px solid transparent; transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { color: #1c1206; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { color: var(--text); border-color: var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: var(--gold); }

/* ---------- Bands ---------- */
.band { padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid var(--border); }
.band.alt { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.band h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0 0 .6rem; letter-spacing: -.3px; }
.section-lede { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 0 2rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 .5rem; font-size: 1.18rem; }
.card p { margin: 0; color: var(--muted); }
.link-card { text-decoration: none; color: var(--text); transition: transform .12s ease, border-color .15s ease; display: flex; flex-direction: column; }
.link-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.card-link { margin-top: 1rem; color: var(--gold); font-weight: 700; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; background: var(--bg-alt); }
.footer-inner { display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--gold); }
.footer-fine { color: var(--muted); font-size: .95rem; margin: .3rem 0 0; }

.nav a.active { color: var(--gold); }

/* ---------- Hamburger ---------- */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 42px; height: 38px; padding: 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Page head + filters ---------- */
.page-head { padding: clamp(2rem, 5vw, 3.2rem) 0 1rem; }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.2rem; }
.filters input, .filters select {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: .6rem .8rem; font-size: .95rem; font-family: inherit;
}
.filters input[type="search"] { min-width: 220px; flex: 1 1 240px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--gold); }
.count { color: var(--muted); font-size: .9rem; margin-left: auto; }

/* ---------- Card tiles ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; padding-bottom: 4rem; align-items: start; }
.ctile {
  background: var(--surface); border: 1px solid var(--border); border-left-width: 4px; border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; min-height: 130px;
}
.ct-body { padding: .85rem .9rem; display: flex; flex-direction: column; flex: 1; }
.ct-art { display: block; width: 100%; height: auto; background: #1a130b; border-bottom: 1px solid var(--border); }
.ctile.full { border: none; border-radius: 12px; overflow: hidden; background: transparent; min-height: 0; }
.ct-full { display: block; width: 100%; height: auto; border-radius: 12px; }
.ctile.full.noimg { min-height: 120px; background: var(--surface); border: 1px solid var(--border); }
/* view toggle */
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.vt { background: var(--surface); color: var(--muted); border: none; padding: .5rem .9rem; cursor: pointer; font: inherit; font-size: .88rem; font-weight: 700; }
.vt.on { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1c1206; }
.ctile.good { border-left-color: #5fb0ff; }
.ctile.evil { border-left-color: #e0637a; }
.ctile.neutral { border-left-color: #7c86a8; }
.ct-top { display: flex; align-items: center; gap: .5rem; }
.ct-mana { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1c1206; font-weight: 800;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; flex: none; }
.ct-name { font-weight: 750; font-size: 1rem; line-height: 1.2; flex: 1; }
.ct-stat { font-weight: 800; font-size: .9rem; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.ct-stat.atk { background: rgba(226,120,60,.18); color: #ffb783; }
.ct-stat.hp { background: rgba(226,99,122,.18); color: #ff9caf; }
.ct-ability { margin: .6rem 0 .5rem; font-size: .88rem; color: #e6dccb; flex: 1; }
.ct-ability.muted { color: var(--muted); font-style: italic; }
.ct-foot { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: space-between; }
.ct-type { color: var(--muted); font-size: .76rem; text-transform: capitalize; }
.ct-kw { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; }
.ct-kw span { background: var(--surface-2); border: 1px solid var(--border); color: var(--gold);
  font-size: .68rem; padding: .12rem .4rem; border-radius: 999px; }

/* ---------- Locations ---------- */
.locations-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; padding-bottom: 4rem; }
.loc { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; }
.loc h3 { margin: 0 0 .35rem; font-size: 1.05rem; color: var(--gold); }
.loc p { margin: 0; color: #e6dccb; font-size: .92rem; }

/* ---------- Deck-building guide ---------- */
.guide { padding-bottom: 4rem; }
.guide h2 { font-size: 1.5rem; margin: 1rem 0 1.5rem; }
.step { display: flex; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--border); }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1c1206; font-weight: 800; }
.step h3 { margin: .15rem 0 .4rem; font-size: 1.12rem; }
.step p { margin: 0; color: var(--muted); }
.step p strong { color: var(--text); }
.guide-cta { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 1.05rem; }
.guide-cta a { color: var(--gold); font-weight: 700; text-decoration: none; }

/* ---------- Deck Builder ---------- */
.link { color: var(--gold); }
.db-layout { display: grid; grid-template-columns: 1fr 360px; gap: 1.2rem; padding-bottom: 4rem; align-items: start; }
.db-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.db-filters input[type="search"], .db-filters select {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: .5rem .7rem; font-size: .9rem; font-family: inherit;
}
.db-filters input[type="search"] { flex: 1 1 140px; min-width: 120px; }
.db-legtoggle { display: inline-flex; align-items: center; gap: .4rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: .5rem .7rem; font-size: .9rem; font-weight: 700; color: var(--gold); cursor: pointer; }
.db-pool { max-height: 70vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; }

.db-row { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: .45rem .6rem; color: var(--text); font: inherit; }
.db-row:hover { border-color: var(--gold); }
.db-row.in { border-color: var(--teal); background: var(--surface-2); }
.db-mana { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #1c1206; font-weight: 800;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; flex: none; }
.db-mana.gold { width: 30px; height: 30px; font-size: 1rem; }
.db-thumb { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; object-position: top; flex: none; }
.db-legthumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; object-position: top; flex: none; }
.db-nm { flex: 1; font-weight: 650; font-size: .92rem; }
.db-st { color: var(--muted); font-size: .82rem; font-weight: 700; }
.db-st.spell { font-style: italic; font-weight: 500; }
.db-add { color: var(--gold); font-weight: 800; width: 18px; text-align: center; }

.db-deckwrap { position: sticky; top: 72px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; }
.db-deckhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: .7rem; gap: .5rem; }
.db-count { font-weight: 700; font-size: .9rem; }
.db-validity { font-size: .8rem; font-weight: 800; padding: .2rem .5rem; border-radius: 999px; }
.db-validity.ok { color: #1c1206; background: var(--teal); }
.db-validity.no { color: #ffb783; background: rgba(226,120,60,.15); }

.db-legendary { border: 1px dashed var(--border); border-radius: 10px; padding: .6rem; margin-bottom: .7rem; min-height: 44px; }
.db-legendary.filled { border-style: solid; border-color: var(--gold); }
.db-legcard { display: flex; align-items: center; gap: .55rem; }
.db-legcard strong { font-size: .95rem; } .sm { font-size: .78rem; }
.db-x, .db-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .85rem; }
.db-x:hover, .db-del:hover { color: #ff9caf; }

.db-curve { display: flex; align-items: flex-end; gap: 3px; height: 60px; margin: .3rem 0 .7rem; }
.db-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.db-barfill { width: 100%; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); border-radius: 3px 3px 0 0; min-height: 2px; }
.db-barn { font-size: .62rem; color: var(--muted); position: absolute; top: -12px; }
.db-barlbl { font-size: .62rem; color: var(--muted); margin-top: 2px; }

.db-deck { display: flex; flex-direction: column; gap: 4px; max-height: 34vh; overflow-y: auto; margin-bottom: .8rem; }
.db-actions { display: flex; gap: .5rem; margin-bottom: .8rem; }
.btn.sm { padding: .5rem .9rem; font-size: .88rem; }
.db-lbl { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .35rem; }
.db-saved-wrap { margin-bottom: .8rem; }
.db-saved { display: flex; flex-wrap: wrap; gap: .35rem; }
.db-saved-chip { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.db-saved-chip .db-load { background: none; border: none; color: var(--text); padding: .3rem .3rem .3rem .6rem; cursor: pointer; font: inherit; font-size: .82rem; }
.db-saved-chip .db-del { padding: .3rem .5rem .3rem .2rem; }
.db-code { width: 100%; background: var(--surface); color: var(--muted); border: 1px solid var(--border); border-radius: 8px; padding: .5rem; font-family: monospace; font-size: .72rem; resize: vertical; margin-bottom: .5rem; }
.db-import { display: flex; gap: .4rem; margin-top: .5rem; }
.db-import input { flex: 1; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: .5rem; font-size: .82rem; }

.db-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--gold); color: #1c1206;
  font-weight: 800; padding: .6rem 1.1rem; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; font-size: .9rem; }
.db-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 820px) {
  .db-layout { grid-template-columns: 1fr; }
  .db-deckwrap { position: static; order: -1; }
  .db-pool { max-height: 50vh; }
}

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(20,16,11,.98); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 clamp(1rem,4vw,2.5rem);
  }
  .nav.open { max-height: 360px; padding: .5rem clamp(1rem,4vw,2.5rem) 1rem; }
  .nav a { padding: .75rem 0; border-bottom: 1px solid var(--border); }
  .nav .nav-cta { text-align: center; margin-top: .6rem; border-bottom: none; }
  .count { margin-left: 0; }
}

/* ---------- Homepage: display type, feature strip, featured cards ---------- */
.hero h1, .band h2, .page-head h1 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; text-wrap: balance;
}

.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.feat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.3rem 1.35rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
a.feat { text-decoration: none; color: var(--text); transition: transform .12s ease, border-color .15s ease; }
a.feat:hover { transform: translateY(-3px); border-color: var(--gold); }
.feat h3 { margin: 0 0 .45rem; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.feat .fdot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: none; }
.feat p { margin: 0; color: var(--muted); font-size: .92rem; }
.feat .soon {
  margin-left: auto; font-size: .6rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--teal); border: 1px solid color-mix(in srgb, var(--teal) 40%, var(--surface));
  border-radius: 999px; padding: .12rem .45rem;
}
.feat-link { margin-top: auto; padding-top: .9rem; color: var(--gold); font-weight: 700; font-size: .9rem; }

.showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 1rem; }
.show-card {
  display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  background: var(--surface); transition: transform .12s ease, border-color .15s ease;
}
.show-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.show-card { text-decoration: none; }
.show-art { display: block; height: 118px; overflow: hidden; }
.show-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transform: scale(1.35); }
.show-body { display: block; padding: .6rem .7rem .75rem; }
.show-name { display: block; font-weight: 600; font-size: .92rem; color: var(--text); line-height: 1.2; }
.show-meta { display: block; margin-top: .15rem; font-size: .72rem; color: var(--muted); }
