/* ============================================================================
   SkyBreeder — dark theme, matching the floating-castle mockup.
   ========================================================================== */
:root {
  --navy: #0c1c30;
  --navy-2: #102740;
  --navy-3: #16314c;
  --panel: #faf7f0;       /* warm cream calculator/dex cards */
  --panel-line: #e7ded0;
  --ink: #1f2a37;
  --ink-soft: #5c6b7a;
  --gold: #e3a23a;
  --gold-2: #d2872a;
  --sky: #56b6e6;
  --cloud: #cfe6f3;
  --radius: 16px;
  --shadow: 0 18px 44px rgba(6, 18, 32, 0.30);
  --shadow-sm: 0 6px 18px rgba(6, 18, 32, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: #dfeaf3;
  background: var(--navy);
  line-height: 1.55;
}
h1, h2, h3, h4, .brand-name { font-family: "Poppins", "Inter", sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1120px, 92vw); margin: 0 auto; }
.muted { color: var(--ink-soft); }
.small { font-size: .86rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* gold section heading with side rules + spark */
.section-heading { display: flex; align-items: center; justify-content: center; gap: 16px; }
.section-heading h2 { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.1rem); color: var(--ink); }
.section-heading.light h2 { color: #fff; }
.section-heading .rule {
  height: 2px; width: clamp(40px, 12vw, 130px);
  background: linear-gradient(90deg, transparent, var(--gold));
}
.section-heading .rule:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.section-heading::after { content: ""; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 24, 40, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav { display: flex; align-items: center; gap: 30px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.18rem; color: #fff; }
.brand-mark { width: 38px; height: 38px; object-fit: contain; }
.brand-accent { color: var(--gold); }
.nav-links { display: flex; gap: 26px; margin-left: 6px; font-weight: 600; font-size: .92rem; }
.nav-links a { color: #b9c8d8; padding: 4px 0; position: relative; transition: color .15s; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.nav-actions { margin-left: auto; display: flex; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06);
  cursor: pointer; font-size: 1rem; transition: transform .12s, background .12s;
}
.icon-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.12); }
.icon-btn.profile { background: linear-gradient(135deg, var(--gold), var(--gold-2)); border: none; }

/* ---------- hero (castle banner) ---------- */
.hero {
  position: relative;
  background: #bfe0f0 url("../img/hero.webp") no-repeat center center;
  background-size: cover;
  padding-bottom: 56px;
}
.hero-content {
  color: #fff;
  max-width: 640px;
  padding: clamp(44px, 7vw, 96px) 0 clamp(28px, 5vw, 56px);
}
.hero-content .eyebrow {
  margin: 0 0 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  font-size: .78rem; color: #fff;
  text-shadow: 0 2px 10px rgba(12, 28, 48, .55);
}
.hero-content h1 {
  margin: 0; font-size: clamp(2.5rem, 6.4vw, 4.6rem); line-height: 1.02; font-weight: 800;
  text-shadow: 0 4px 22px rgba(12, 28, 48, .5);
}
.hero-content .hero-sub {
  margin: 16px 0 0; max-width: 460px; font-size: 1.04rem; color: #eef6fb;
  text-shadow: 0 2px 10px rgba(12, 28, 48, .5);
}
.hero .container:not(.hero-content) { position: relative; z-index: 2; }

/* calculator card */
.calc-card {
  background: var(--panel); border: 1px solid var(--panel-line);
  border-radius: 22px; box-shadow: var(--shadow);
  padding: 22px clamp(16px, 3vw, 34px) 16px; color: var(--ink);
}
.calc-card .section-heading { margin-bottom: 18px; }
.calc-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr 1.15fr;
  align-items: start; gap: 14px;
}
.parent-slot { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.slot-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.op { align-self: center; font-size: 1.5rem; font-weight: 800; color: var(--gold); }

.creature-frame {
  --accent: var(--sky);
  width: 118px; height: 118px; border-radius: 16px; overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 6px 16px rgba(6,18,32,.18);
  display: grid; place-items: center; background: #e9eef3;
}
.creature-frame.result { box-shadow: 0 0 0 3px rgba(227,162,58,.25), 0 6px 16px rgba(6,18,32,.18); }

/* placeholder art tile (until real creature art is produced) */
.art-tile {
  position: relative; width: 100%; height: 100%; min-width: 64px; min-height: 64px;
  display: grid; place-items: center; color: #fff;
  font-family: "Poppins"; font-weight: 800;
}
.creature-frame .art-tile { font-size: 2.6rem; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.art-tile .art-icon { position: absolute; right: 6px; bottom: 5px; font-size: .9rem; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); z-index: 2; }
.art-tile .art-img {
  position: relative; z-index: 1; width: 100%; height: 100%;
  object-fit: contain; padding: 6%;
  filter: drop-shadow(0 4px 10px rgba(6,18,32,.35));
}
/* soft radial glow behind the transparent creature so it pops on its tint */
.art-tile::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 55% at 50% 45%, rgba(255,255,255,.28), transparent 70%);
}
.art-tile.empty {
  background: #eef2f6 !important; color: #9aa8b5; border-radius: 14px;
  border: 2px dashed #cbd5df; font-size: 2rem;
}

.pick-select {
  font: inherit; font-weight: 700; font-size: .92rem; color: var(--ink);
  border: 1px solid var(--panel-line); border-radius: 9px; padding: 6px 8px;
  background: #fff; cursor: pointer; max-width: 130px;
}
.result-name { font-family: "Poppins"; font-weight: 700; font-size: 1.05rem; }
.pick-elems { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pick-elems.left { justify-content: flex-start; }
.elem {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  color: var(--elem); background: color-mix(in srgb, var(--elem) 15%, white);
}

/* traits panel */
.traits-panel {
  background: #fff; border: 1px solid var(--panel-line); border-radius: 14px;
  padding: 12px 14px; text-align: left; display: flex; flex-direction: column; align-self: stretch;
}
.traits-head { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.info { cursor: help; opacity: .55; }
.traits-list { list-style: none; margin: 0 0 12px; padding: 0; flex: 1; }
.traits-empty { color: var(--ink-soft); font-size: .85rem; }
.trait-row { display: flex; align-items: center; gap: 8px; font-size: .9rem; padding: 4px 0; }
.trait-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.trait-name { font-weight: 600; }
.chance { margin-left: auto; font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.chance.likely { color: #1f8b4c; background: #e2f3e8; }
.chance.possible { color: #9a7320; background: #f6edd8; }
.traits-note { color: var(--ink-soft); font-size: .8rem; line-height: 1.4; }
.traits-fineprint { color: var(--ink-soft); font-size: .7rem; line-height: 1.35; padding-top: 8px; margin-top: 4px; border-top: 1px dashed var(--panel-line); list-style: none; }
.btn-breed {
  margin-top: auto; border: none; cursor: pointer; color: #fff; font-weight: 700; font-size: .95rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  padding: 11px 14px; border-radius: 11px; transition: transform .12s, box-shadow .12s, opacity .12s;
}
.btn-breed .heart { margin-left: 4px; }
.btn-breed:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(210,135,42,.4); }
.btn-breed:disabled { opacity: .5; cursor: not-allowed; }
.calc-note { text-align: center; color: var(--ink-soft); font-size: .76rem; margin: 14px 0 2px; }

/* ---------- sections ---------- */
.section { padding: 62px 0; }
.dex-band { background: linear-gradient(180deg, #eef4f8 0%, #e4edf3 100%); color: var(--ink); }
.dex-band .section-heading h2 { color: var(--ink); }
.section-topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 20px; flex-wrap: wrap; }
.dex-count { font-weight: 700; color: var(--ink-soft); font-size: .9rem; }
.dex-search { font: inherit; padding: 9px 16px; border-radius: 999px; border: 1px solid #cfdae3; min-width: 240px; background: #fff; }

/* dex grid */
.dex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.dex-card { background: #fff; border: 1px solid #e7eef3; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.dex-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.dex-art { position: relative; aspect-ratio: 1/1; }
.dex-art .art-tile { font-size: 3rem; }
.dex-art .art-img { padding: 8%; }
.src-badge {
  position: absolute; top: 9px; right: 9px; font-size: .64rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  color: #fff; background: rgba(15,34,52,.6); backdrop-filter: blur(3px);
}
.src-badge.bred { background: rgba(210,135,42,.92); }
.src-badge.both { background: rgba(86,150,160,.92); }
.dex-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dex-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dex-name { font-family: "Poppins"; font-weight: 700; color: var(--ink); }
.dex-stars { font-size: .8rem; letter-spacing: -1px; white-space: nowrap; }
.dex-stars .on { color: var(--gold); }
.dex-stars .off { color: #cdd7df; }
.dex-rarity.unknown { font-size: .72rem; color: var(--ink-soft); font-weight: 700; }
.trait-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.trait-chip {
  --c: #8893a0; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 7px;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, white);
  border: 1px solid color-mix(in srgb, var(--c) 28%, white);
}
.trait-chip.muted-chip { --c: #9aa6b2; font-style: italic; font-weight: 600; }
.dex-obtain { margin: 2px 0 0; font-size: .78rem; color: var(--ink-soft); line-height: 1.4; margin-top: auto; }
.dex-obtain span { font-weight: 700; color: var(--ink); }

/* ---------- popular combos (dark) ---------- */
.combos-band {
  background:
    radial-gradient(900px 360px at 85% 120%, rgba(86,182,230,.10), transparent 60%),
    linear-gradient(180deg, #102740 0%, #0c1c30 100%);
  color: #eaf2fa;
}
.section-kicker { text-align: center; color: #a9bccd; margin: 6px 0 26px; }
.combos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.combo-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 16px 16px 18px;
}
.combo-row { display: flex; align-items: flex-start; justify-content: center; gap: 6px; }
.combo-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 30%; }
.combo-tile .art-tile { width: 100%; aspect-ratio: 1/1; border-radius: 11px; border: 2px solid rgba(255,255,255,.16); font-size: 1.4rem; }
.combo-tile-name { font-size: .76rem; font-weight: 700; text-align: center; }
.combo-op { align-self: center; padding-top: 18px; opacity: .65; font-weight: 800; }
.combo-meta { text-align: center; margin-top: 14px; display: flex; flex-direction: column; gap: 3px; }
.combo-title { font-family: "Poppins"; font-weight: 700; }
.combo-note { font-size: .8rem; color: #f0b24c; }

/* ---------- breeding guides ---------- */
.guides-band { background: linear-gradient(180deg, #eef4f8 0%, #e4edf3 100%); color: var(--ink); }
.guides-band .section-heading h2 { color: var(--ink); }
.dark-kicker { color: var(--ink-soft); }
.guide-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 8px 0 36px; }
.guide-card { background: #fff; border: 1px solid #e7eef3; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.guide-icon { font-size: 1.9rem; margin-bottom: 8px; }
.guide-card h3 { margin: 0 0 8px; font-size: 1.12rem; color: var(--ink); }
.guide-card p { margin: 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.55; }
.guide-card strong { color: var(--ink); }

.recipe-block { background: #fff; border: 1px solid #e7eef3; border-radius: var(--radius); padding: 22px clamp(16px,3vw,28px); box-shadow: var(--shadow-sm); }
.recipe-title { margin: 0 0 16px; font-size: 1.25rem; color: var(--ink); display: flex; align-items: baseline; gap: 10px; }
.recipe-count { font-size: .82rem; font-weight: 700; color: var(--gold-2); }
.recipe-table { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px; }
.r-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.r-cre { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.r-cre .art-tile.mini { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.r-cre .art-tile.mini .art-icon { display: none; }
.r-name { font-weight: 600; color: var(--ink); white-space: nowrap; }
.r-op { color: var(--gold-2); font-weight: 800; margin: 0 2px; }
.r-row .r-cre:last-child .r-name { color: var(--gold-2); }
.recipe-special { margin: 16px 0 0; font-size: .86rem; color: var(--ink-soft); }
.recipe-special strong { color: var(--ink); }

/* ---------- tier list ---------- */
.tier-band {
  background:
    radial-gradient(900px 360px at 12% -10%, rgba(86,182,230,.10), transparent 60%),
    linear-gradient(180deg, #102740 0%, #0c1c30 100%);
  color: #eaf2fa;
}
.tier-rows { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.tier-row { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: stretch; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; overflow: hidden; }
.tier-label { background: color-mix(in srgb, var(--t) 26%, transparent); border-right: 3px solid var(--t); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 14px 8px; text-align: center; }
.tier-letter { font-family: "Poppins"; font-weight: 800; font-size: 1.8rem; color: var(--t); line-height: 1; }
.tier-desc { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #b9c8d8; margin-top: 4px; }
.tier-members { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.tier-chip { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: .82rem; font-weight: 600; }
.tier-chip .art-tile.mini { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.tier-chip .art-tile.mini .art-icon { display: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); padding: 50px 0 24px; border-top: 1px solid rgba(255,255,255,.06); }
.footer-inner { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr 1fr; gap: 24px; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-col h4 { margin: 0 0 12px; color: #fff; font-size: .98rem; }
.footer-col a { display: block; color: #9fb2c4; padding: 4px 0; font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.socials { margin-top: 14px; display: flex; gap: 10px; }
.socials a {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.07); font-size: 1rem;
}
.socials a:hover { background: rgba(255,255,255,.14); }
.footer-base { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); text-align: center; }
.disclaimer { font-size: .82rem; color: #7f93a6; }

/* ---------- light theme toggle ---------- */
body.light { background: #eef4f8; color: var(--ink); }
body.light .site-header { background: rgba(255,255,255,.9); border-bottom-color: #e2e9ef; }
body.light .brand, body.light .nav-links a.active { color: var(--ink); }
body.light .nav-links a { color: #5c6b7a; }
body.light .combos-band { background: linear-gradient(180deg,#102740,#0c1c30); }
body.light .site-footer { background: #102740; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .nav-links { display: none; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .op { display: none; }
  .parent-slot.offspring, .traits-panel { grid-column: 1 / -1; }
  .dex-grid { grid-template-columns: repeat(2, 1fr); }
  .combos-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
  .hero { padding-top: clamp(120px, 46vw, 240px); }
}
@media (max-width: 560px) {
  .calc-grid { grid-template-columns: 1fr; }
  .dex-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
