/* Weekly Waifu — site styles
   Splash colors (first-pass):
   Nova #4B3F8C indigo | Mochi #E8A88A peach | Rita #C2185B magenta
   Vesper #00ACC1 cyan | Kai #8B0000 ink red-black | Soren #B39DDB soft lavender-steam
   Lane: Waifus lavender | Husbandos red | Shop green
*/

:root {
  --bg: #000000;
  --text: #f5f5f7;
  --muted: #a8a8b8;
  --lavender: #b39ddb;
  --lavender-deep: #7e57c2;
  --red: #c62828;
  --red-deep: #8b0000;
  --green: #2e7d32;
  --green-bright: #43a047;
  --splash-nova: #4B3F8C;
  --splash-mochi: #E8A88A;
  --splash-rita: #C2185B;
  --splash-vesper: #00ACC1;
  --splash-kai: #8B0000;
  --splash-soren: #B39DDB;
  --drawer-w: 280px;
  --header-h: 72px;
  --rail-w: 300px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  overflow-x: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* —— Header / W button —— */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1a1a1a;
  padding: 0 1rem;
  overflow: hidden;
}
.w-btn {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  border: 2px solid #E11D2E;
  background: #000;
  padding: 6px;
  cursor: pointer;
  border-radius: 8px;
  display: grid; place-items: center;
  transition: background .2s, border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.w-btn-logo {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.w-btn:hover, .w-btn[aria-expanded="true"] {
  background: #1a0508;
  border-color: #ff3b4d;
  box-shadow: 0 0 12px rgba(225, 29, 46, .45);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  line-height: 0;
}
.wordmark-img {
  height: 44px;
  width: auto;
  max-width: min(280px, 55vw);
  object-fit: contain;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.wordmark-hero {
  margin: .5rem 0 1.5rem;
  text-align: center;
  line-height: 0;
}
.wordmark-hero-img {
  height: clamp(56px, 12vw, 96px);
  width: auto;
  max-width: min(720px, 92vw);
  object-fit: contain;
  display: inline-block;
  filter: drop-shadow(0 4px 18px rgba(225, 29, 46, .25));
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Drawer —— */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 160;
  width: var(--drawer-w);
  background: #0a0a0a;
  border-right: 1px solid #222;
  transform: translateX(-105%);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  padding: calc(var(--header-h) + .5rem) 0 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.drawer.open { transform: translateX(0); }
.drawer a {
  display: block;
  padding: 1rem 1.25rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
  margin-right: 1rem;
}
.drawer a.waifus { background: var(--lavender); color: #1a1028; }
.drawer a.husbandos { background: var(--red); color: #fff; }
.drawer a.shop { background: var(--green); color: #fff; }
.drawer a:hover { filter: brightness(1.1); }

/* —— Page shell —— */
.page { padding-top: var(--header-h); min-height: 100vh; }
.page-inner { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.page-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 1.25rem;
  font-weight: 900;
}

/* —— Landing panels —— */
.landing {
  min-height: calc(100vh - var(--header-h));
  display: flex; flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem 2rem;
}

.panels {
  display: flex;
  gap: clamp(.75rem, 2vw, 1.5rem);
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1100px;
  flex: 1;
  min-height: min(70vh, 620px);
}
.panel {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1.5rem 1rem 2rem;
  min-width: 0;
  /* parallelogram / rhombus vertical bars — sloped edges */
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  transform: skewX(-4deg);
  transition: filter .2s, transform .2s;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
}
.panel > * { transform: skewX(4deg); } /* unskew content */
.panel:hover { filter: brightness(1.12); transform: skewX(-4deg) scale(1.02); }
.panel-waifus { background: linear-gradient(180deg, #d1c4e9 0%, var(--lavender-deep) 55%, #4a148c 100%); }
.panel-husbandos { background: linear-gradient(180deg, #ef5350 0%, var(--red) 50%, #4a0000 100%); }
.panel-shop { background: linear-gradient(180deg, #66bb6a 0%, var(--green) 50%, #1b5e20 100%); }

.panel-label {
  font-weight: 900;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
  z-index: 2;
}
.panel-rotator {
  position: absolute;
  inset: 8% 10% 18%;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.panel-rotator img {
  position: absolute;
  max-height: 100%;
  max-width: 90%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .6s ease;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.4));
}
.panel-rotator img.active { opacity: 1; }

/* Mobile / tablet: no skew, no overlapping parallelograms */
@media (max-width: 900px) {
  /* Header: W + horizontal logo side-by-side (no center overlap with menu) */
  .site-header {
    justify-content: flex-start;
    gap: .75rem;
    padding: 0 .75rem;
  }
  .w-btn {
    position: static;
    transform: none;
    flex-shrink: 0;
  }
  .wordmark {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
  }
  .wordmark-img {
    height: 40px;
    max-width: 100%;
    width: auto;
  }

  .landing {
    min-height: auto;
    padding: 1rem 1rem 2rem;
    width: 100%;
    max-width: 100%;
  }
  /* Avoid double wordmark (header + hero) on small screens */
  .landing .wordmark-hero { display: none !important; height: 0 !important; margin: 0 !important; overflow: hidden !important; }

  .panels {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    flex: none;
  }
  .panel {
    flex: none;
    width: 100%;
    max-width: 100%;
    min-height: 240px;
    min-width: 0;
    clip-path: none;
    transform: none;
    border-radius: 16px;
    overflow: hidden;
    isolation: isolate;
    padding: 1.25rem 1rem 1.5rem;
  }
  .panel > * { transform: none; }
  .panel:hover { transform: none; filter: brightness(1.08); }
  .panel-rotator {
    inset: 12% 12% 22%;
    max-width: 100%;
  }
  .panel-rotator img {
    max-width: 85%;
    max-height: 90%;
  }
  .panel-label {
    position: relative;
    z-index: 2;
  }

  /* Character bars: flat cards on narrow */
  .char-bar {
    transform: none;
    clip-path: none;
    border-radius: 14px;
    padding: 1rem 1.1rem;
  }
  .char-bar > * { transform: none; }
  .char-bar:hover { transform: none; }

  .hub { grid-template-columns: 1fr; }
  .shop-rail { position: static !important; max-height: none !important; width: 100%; }
}

@media (max-width: 560px) {
  .char-bar img { height: 90px; }
  .wordmark-img { height: 36px; max-width: 100%; }
  .w-btn { width: 42px; height: 42px; }
}

/* —— Character index (slanted splash bars) —— */
.char-index {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.char-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 140px;
  padding: 1rem 1.5rem 1rem 2rem;
  /* slanted parallelogram */
  clip-path: polygon(2% 0, 100% 0, 98% 100%, 0 100%);
  transform: skewX(-6deg);
  color: #fff;
  transition: filter .2s, transform .2s;
}
.char-bar > * { transform: skewX(6deg); }
.char-bar:hover { filter: brightness(1.1); transform: skewX(-6deg) translateX(4px); }
.char-bar img {
  height: 120px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.35));
}
.char-bar .name {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: .03em;
}
.char-bar .tag { opacity: .9; font-size: .95rem; margin-top: .15rem; }

.char-bar.nova { background: var(--splash-nova); }
.char-bar.mochi { background: var(--splash-mochi); color: #2a1810; }
.char-bar.rita { background: var(--splash-rita); }
.char-bar.vesper { background: var(--splash-vesper); color: #062028; }
.char-bar.kai { background: linear-gradient(90deg, #1a0000, var(--splash-kai)); }
.char-bar.soren { background: var(--splash-soren); color: #2a1f3d; }



/* —— Character hub —— */
.hub {
  display: grid;
  grid-template-columns: 1fr var(--rail-w);
  gap: 1.5rem;
  align-items: start;
  min-height: calc(100vh - var(--header-h) - 2rem);
}
@media (max-width: 900px) {
  .hub { grid-template-columns: 1fr; }
  .shop-rail { position: static !important; max-height: none !important; }
}
.hub-main { min-width: 0; }
.char-name {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  margin: 0 0 .75rem;
  line-height: 1.1;
}
.char-name.kai {
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  letter-spacing: .02em;
  color: #ff5252;
  text-shadow: 0 0 24px rgba(139,0,0,.5);
}
.char-name.soren {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  color: #e1d4f7;
}
.char-name.vesper {
  font-family: ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #80deea;
}
.char-name.nova {
  letter-spacing: .06em;
  color: #b39ddb;
  text-shadow: 0 0 20px rgba(75,63,140,.6);
}
.char-name.mochi { color: #ffccbc; }
.char-name.rita {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f48fb1;
}

.lore {
  color: var(--muted);
  max-width: 40rem;
  margin-bottom: 1.5rem;
}
.section-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin: 1.5rem 0 .75rem;
  font-weight: 700;
}

.art-carousel {
  position: relative;
  height: 320px;
  background: #0d0d0d;
  border: 1px solid #222;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.art-carousel img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .5s;
  padding: 1rem;
}
.art-carousel img.active { opacity: 1; }

.comics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
}
.comics-grid a, .comics-grid figure {
  margin: 0;
  background: #111;
  border: 1px solid #222;
  border-radius: 8px;
  overflow: hidden;
}
.comics-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.comics-grid figcaption { font-size: .7rem; padding: .35rem .5rem; color: var(--muted); }

.shop-rail {
  position: sticky;
  top: calc(var(--header-h) + .75rem);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 1.5rem);
  overflow-y: auto;
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 1rem;
}
.shop-rail h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}

/* —— Product tiles —— */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.shop-rail .product-grid {
  grid-template-columns: 1fr;
}
.product-tile {
  display: flex;
  flex-direction: column;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .2s, transform .15s;
  color: var(--text);
}
.product-tile:hover {
  border-color: var(--lavender);
  transform: translateY(-2px);
}
.product-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #1a1a1a;
}
.product-tile .meta {
  padding: .65rem .75rem .8rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.product-tile .meta .ptitle {
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.3;
}
.product-tile .meta .price {
  font-size: .75rem;
  color: var(--muted);
}

.muted { color: var(--muted); }
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: .9rem;
}
.back-link:hover { color: var(--text); }

.footer-note {
  text-align: center;
  color: #555;
  font-size: .8rem;
  padding: 2rem 1rem;
}

/* —— Drawer socials —— */
.drawer-socials {
  margin-top: auto;
  padding: 1.25rem 1.25rem 0.5rem;
  border-top: 1px solid #222;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.drawer-socials-label {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #666;
  font-weight: 700;
}
.drawer-socials a {
  clip-path: none !important;
  margin-right: 0 !important;
  padding: 0.4rem 0 !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  background: transparent !important;
  color: var(--muted) !important;
}
.drawer-socials a:hover { color: var(--text) !important; filter: none !important; }
.drawer-socials-soon {
  font-size: 0.8rem;
  color: #555;
  padding: 0.25rem 0;
}

/* —— Site footer —— */
.site-footer {
  margin-top: 2rem;
  padding: 2rem 1.25rem 2.5rem;
  border-top: 1px solid #1a1a1a;
  text-align: center;
  background: #050505;
}
.site-footer-brand {
  margin: 0 0 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #888;
}
.site-footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.85rem;
}
.site-footer-socials a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.site-footer-socials a:hover { color: var(--lavender); }
.footer-soon {
  color: #555;
  font-size: 0.85rem;
}
.site-footer-note {
  margin: 0;
  font-size: 0.75rem;
  color: #444;
}
