/* ==========================================================================
   Rowtiger's Furry Realm — shared stylesheet
   Modern, responsive, accessible theme for the restored static site.
   ========================================================================== */

:root {
  --bg: #0f1420;
  --bg-soft: #161d2e;
  --panel: #1d2536;
  --panel-2: #232d42;
  --ink: #e9edf5;
  --ink-soft: #b7c0d0;
  --muted: #8b96ab;
  --accent: #f0a35e;      /* warm amber */
  --accent-2: #ff7aa2;    /* soft pink */
  --link: #6fc3ff;
  --link-visited: #b48cf0;
  --border: #2f3a52;
  --danger: #ff6b6b;
  --ok: #5fd38a;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --maxw: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -10%, #232d42 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #0b0f18 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.page { padding: 32px 0 56px; }

/* ---------- Header / Navigation ---------- */
.site-header {
  background: rgba(15, 20, 32, 0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 66px;
}

.brand { font-size: 1.35rem; font-weight: 800; letter-spacing: 0.02em; }
.brand a { color: var(--ink); }
.brand a:hover { text-decoration: none; color: var(--accent); }
.brand small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
}
.site-nav a:hover { background: var(--panel-2); color: var(--accent); text-decoration: none; }
.site-nav .nav-cta a { color: var(--accent); }
.site-nav .nav-cta a:hover { background: rgba(240,163,94,0.12); }

/* ---------- Hero / Home ---------- */
.hero {
  text-align: center;
  padding: 56px 20px 40px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 380px at 50% -10%, rgba(240,163,94,0.12), transparent 70%),
    transparent;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  max-width: 720px;
  margin: 0 auto;
}
.hero-actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #1b1208; border-color: var(--accent); }
.btn-primary:hover { background: #ffb877; color: #1b1208; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Cards / Sections ---------- */
.section { margin: 44px 0; }
.section-title {
  font-size: 1.6rem;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.section-lead { color: var(--muted); margin: 0 0 22px; max-width: 760px; }

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-media { background: #0b0f18; display: block; line-height: 0; }
.card-media img { width: 100%; object-fit: cover; }
.card-body { padding: 14px 16px; }
.card-body h3 { margin: 0 0 4px; font-size: 1.05rem; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.artwork {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}
.artwork .thumb { background: #0b0f18; line-height: 0; display: block; }
.artwork .thumb img { width: 100%; height: 200px; object-fit: cover; }
.artwork .cap { padding: 10px 12px; }
.artwork .cap .name { font-weight: 700; color: var(--ink); }
.artwork .cap .meta { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

/* Placeholder for lost works */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 200px;
  background:
    repeating-linear-gradient(45deg, #1b2436 0 14px, #202a40 14px 28px);
  border-bottom: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  padding: 12px;
  text-align: center;
}
.placeholder small { display: block; margin-top: 4px; opacity: 0.7; }

/* ---------- Full image viewer ---------- */
.full-figure {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 18px 0;
  text-align: center;
}
.full-figure img { max-width: 100%; }
.full-figure figcaption { margin-top: 10px; color: var(--muted); font-size: 0.9rem; }

/* ---------- Mature / warning ---------- */
.warn {
  border: 1px solid rgba(255,107,107,0.5);
  background: rgba(255,107,107,0.08);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--ink-soft);
}
.warn strong { color: var(--danger); }
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-18 { background: var(--danger); color: #fff; }
.badge-new { background: var(--ok); color: #06210f; }

/* ---------- Prose ---------- */
.prose { max-width: 800px; }
.prose p { margin: 0 0 14px; }
.prose h2, .prose h3 { color: var(--accent); }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin: 4px 0; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(10, 14, 24, 0.9);
  margin-top: 40px;
  padding: 28px 0;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-inner a { color: var(--ink-soft); }
.footer-col h4 { margin: 0 0 8px; color: var(--ink); font-size: 0.95rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 4px 0; }
.copyright { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--ink-soft); }

/* ---------- Pagination ---------- */
.pager {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ---------- Home / hero lead ---------- */
.hero-lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 760px; margin: 12px auto 0; }
.home-section { margin: 46px 0; }
.home-section > h2 { font-size: 1.6rem; margin: 0 0 18px; letter-spacing: 0.01em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover { text-decoration: none; }
.card-link h3 { margin: 14px 16px 6px; font-size: 1.05rem; color: var(--ink); }
.card-link h3 .badge { vertical-align: middle; }
.card-link p { margin: 0 16px 16px; color: var(--muted); font-size: 0.88rem; }
.card-img { background: #0b0f18; line-height: 0; }
.card-img img { width: 100%; height: 200px; object-fit: cover; }
.card.prose { padding: 18px 20px; }
.center { text-align: center; }

/* ---------- Lists ---------- */
.linklist { list-style: none; margin: 0 0 14px; padding: 0; }
.linklist li { margin: 6px 0; padding-left: 18px; position: relative; }
.linklist li::before { content: "›"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.two-col { columns: 2; column-gap: 28px; }
.bio { list-style: none; padding: 0; }
.bio li { margin: 6px 0; }
.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--panel-2); padding: 10px 14px; border-radius: 8px; display: inline-block; word-break: break-word; }

/* ---------- Age gate ---------- */
.gate { text-align: center; padding: 30px 24px; }
.gate img { max-width: 340px; width: 100%; border-radius: 10px; margin-bottom: 6px; }
.gate-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* ---------- Comics ---------- */
.comic { display: block; text-align: center; line-height: 0; }
.comic img { width: 100%; max-width: 720px; border-radius: 10px; }

@media (max-width: 720px) {
  .split { grid-template-columns: 1fr; }
  .two-col { columns: 1; }
}

/* ---------- Accessible ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #1b1208;
  padding: 8px 14px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .header-inner { flex-direction: column; padding: 12px 16px; }
  .site-nav { width: 100%; overflow-x: auto; }
  .site-nav ul { flex-wrap: nowrap; }
  .hero { padding: 40px 16px 30px; }
  .artwork .thumb img { height: 160px; }
}
