/* Leonida Guide Hub: neon sunset look. Layout: animated sunset hero, glass cards, readable article column. */
:root {
  --bg: #12061f;
  --bg-2: #1c0b33;
  --surface: rgba(255, 255, 255, .06);
  --surface-solid: #20103a;
  --fg: #fdf1f8;
  --muted: #c3a9d6;
  --line: rgba(255, 255, 255, .14);
  --pink: #ff3d8b;
  --orange: #ff9a3d;
  --cyan: #3de6ff;
  --violet: #8b5cff;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--fg); font-family: var(--font-body); line-height: 1.6;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(139, 92, 255, .25), transparent 60%), var(--bg);
  background-attachment: fixed;
}
a { color: var(--cyan); }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); position: relative; z-index: 2; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff; padding: 56px 0 120px;
  background: linear-gradient(180deg, #2a0a4a 0%, #7a1b8f 45%, #ff3d8b 78%, #ff9a3d 100%);
}
.hero.small { padding: 36px 0 96px; }
.sun {
  position: absolute; left: 50%; bottom: 36px; width: 240px; height: 240px; margin-left: -120px; border-radius: 50%;
  background: linear-gradient(180deg, #fff3a8 0%, #ffb23d 45%, #ff3d8b 100%);
  box-shadow: 0 0 80px 20px rgba(255, 154, 61, .55);
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 18px);
  mask: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 18px);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  animation: sunrise 1.6s cubic-bezier(.2, .8, .2, 1) both, pulse 5s ease-in-out 1.6s infinite;
}
.hero.small .sun { width: 170px; height: 170px; margin-left: -85px; bottom: 28px; }
.grid-floor {
  position: absolute; left: -50%; right: -50%; bottom: 0; height: 110px;
  background-image: linear-gradient(var(--cyan) 1px, transparent 1px), linear-gradient(90deg, var(--cyan) 1px, transparent 1px);
  background-size: 48px 28px; opacity: .55; transform: perspective(200px) rotateX(55deg); transform-origin: bottom;
  animation: floor 1.4s linear infinite;
  -webkit-mask: linear-gradient(180deg, transparent, #000 60%); mask: linear-gradient(180deg, transparent, #000 60%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5; animation: drift 12s ease-in-out infinite alternate; }
.blob.b1 { width: 220px; height: 220px; background: var(--violet); top: -60px; left: -40px; }
.blob.b2 { width: 180px; height: 180px; background: var(--cyan); top: 40px; right: 8%; animation-duration: 16s; opacity: .35; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.2rem, 7vw, 4rem); line-height: 1.02; margin: 18px 0 10px; text-wrap: balance;
  text-shadow: 0 4px 30px rgba(18, 6, 31, .45); animation: rise .8s .15s cubic-bezier(.2, .8, .2, 1) both;
}
.hero h1 span { background: linear-gradient(90deg, #fff, #ffe0a8, #fff); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 5s linear infinite; }
.hero p { margin: 0; max-width: 58ch; font-size: 1.05rem; animation: rise .8s .3s cubic-bezier(.2, .8, .2, 1) both; }
.hero .notice {
  margin-top: 20px; padding: 12px 14px; border-radius: 12px; font-size: .9rem; max-width: 66ch;
  background: rgba(18, 6, 31, .45); border: 1px solid var(--line); backdrop-filter: blur(6px); animation: rise .8s .45s cubic-bezier(.2, .8, .2, 1) both;
}
.logo { display: inline-block; font-family: var(--font-display); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; padding: 6px 12px; border-radius: 999px; background: rgba(18, 6, 31, .45); border: 1px solid var(--line); animation: rise .6s both; }

/* Back button */
.back {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 600; font-size: .92rem;
  padding: 8px 16px 8px 10px; border-radius: 999px; background: rgba(18, 6, 31, .5); border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(6px); transition: transform .25s, background .25s, box-shadow .25s; animation: rise .6s both;
}
.back .arr { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--orange)); transition: transform .25s; }
.back .arr svg { width: 14px; height: 14px; }
.back:hover { background: rgba(18, 6, 31, .8); box-shadow: 0 0 24px rgba(255, 61, 139, .55); transform: translateX(-3px); }
.back:hover .arr { transform: translateX(-3px); }

/* Sticky filter bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; padding: 12px 0; background: rgba(18, 6, 31, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bar input {
  flex: 1 1 220px; min-width: 0; padding: 11px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .07); color: var(--fg); font: inherit; transition: box-shadow .25s, border-color .25s;
}
.bar input::placeholder { color: var(--muted); }
.bar input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 230, 255, .25), 0 0 24px rgba(61, 230, 255, .25); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: rgba(255, 255, 255, .07); color: var(--fg); padding: 8px 14px; border-radius: 999px; font: inherit; font-size: .85rem; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; }
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: linear-gradient(135deg, var(--pink), var(--orange)); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(255, 61, 139, .4); }

/* Content */
main { padding: 32px 0 64px; }
section { margin-bottom: 40px; }
h2 { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 14px; display: flex; align-items: center; gap: 12px; }
h2::before { content: ""; width: 10px; height: 26px; border-radius: 4px; background: linear-gradient(180deg, var(--pink), var(--orange)); }
h3 { font-family: var(--font-display); margin: 0; font-size: 1.08rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 18px; border-radius: 16px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(6px);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s;
  animation: rise .6s calc(var(--i, 0) * 70ms) cubic-bezier(.2, .8, .2, 1) both;
}
a.card::after { content: "\2192"; position: absolute; right: 16px; top: 16px; color: var(--pink); opacity: 0; transform: translateX(-6px); transition: .3s; font-weight: 700; }
a.card:hover { transform: translateY(-6px) rotate(-.4deg); border-color: var(--pink); box-shadow: 0 14px 40px rgba(255, 61, 139, .3); }
a.card:hover::after { opacity: 1; transform: none; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.card.soon { opacity: .55; border-style: dashed; }
.meta { margin-top: auto; padding-top: 8px; font-size: .78rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.tag.mine { color: #fff; background: linear-gradient(135deg, var(--violet), var(--pink)); border-color: transparent; }
.empty { color: var(--muted); }
[hidden] { display: none !important; }

/* Article pages */
article { max-width: 72ch; }
article > h2 { margin-top: 34px; }
article ul { padding-left: 1.2rem; }
article li { margin-bottom: 8px; }
article li::marker { color: var(--pink); }
.updated { color: var(--muted); font-size: .9rem; }
.callout { background: linear-gradient(135deg, rgba(255, 61, 139, .16), rgba(139, 92, 255, .16)); border: 1px solid var(--line); border-left: 4px solid var(--pink); border-radius: 12px; padding: 14px 16px; margin: 18px 0; }
.scroll { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; min-width: 520px; background: var(--surface); }
th, td { border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
thead th { background: linear-gradient(135deg, rgba(255, 61, 139, .3), rgba(139, 92, 255, .3)); font-family: var(--font-display); }
tbody th { font-family: var(--font-display); color: var(--orange); white-space: nowrap; }
.sources { font-size: .9rem; color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--muted); font-size: .85rem; }

/* Reading progress bar and scroll reveal (script.js adds .js to <html>) */
.progress { position: fixed; top: 0; left: 0; height: 4px; width: 0; z-index: 20; background: linear-gradient(90deg, var(--cyan), var(--pink), var(--orange)); box-shadow: 0 0 12px var(--pink); }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes sunrise { from { transform: translateY(120px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 80px 20px rgba(255, 154, 61, .55); } 50% { box-shadow: 0 0 110px 34px rgba(255, 61, 139, .6); } }
@keyframes floor { from { background-position: 0 0; } to { background-position: 0 28px; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.2); } }
@keyframes shine { to { background-position: 200% center; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Hero artwork: photo behind the title, characters stay visible above the text */
.hero.has-art { background: var(--bg-2); padding: 0; }
.hero.has-art .sun, .hero.has-art .blob { display: none; }
.hero.has-art::before {
  content: ""; position: absolute; inset: 0; background: var(--art) center 18% / cover no-repeat;
  animation: zoom 24s ease-in-out infinite alternate, fade 1.2s ease-out both;
}
.hero.has-art::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(18, 6, 31, .55) 0%, rgba(18, 6, 31, 0) 28%, rgba(18, 6, 31, .55) 62%, var(--bg) 100%);
}
.hero.has-art .grid-floor { z-index: 1; opacity: .35; height: 90px; }
.hero.has-art .wrap { z-index: 2; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 16px; min-height: clamp(460px, 62vw, 640px); padding-top: 24px; padding-bottom: 36px; }
.hero.has-art.small .wrap { min-height: clamp(300px, 36vw, 400px); }
.hero.has-art .text { margin-top: auto; width: 100%; }
.hero.has-art h1 { margin-top: 0; }
@keyframes zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.credit { font-size: .75rem; color: var(--muted); margin-top: 10px; }
