/* Reflectopia — shared site styles (tokens, header, nav, footer,
   home-page components). Edit here to change the whole site. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --base03: #002b36; --base02: #073642; --base01: #586e75; --base00: #657b83;
    --base0: #839496; --base1: #93a1a1; --base2: #eee8d5; --base3: #fdf6e3;
    --orange: #cb4b16; --teal: #2aa198; --yellow: #b58900;
    --page-bg: var(--base2); --surface: var(--base3); --border: rgba(0,0,0,0.07);
    --text-hi: var(--base02); --text-pri: var(--base01); --text-sec: var(--base00); --text-muted: var(--base1);
  }
  html { scroll-behavior: smooth; }
  body { font-family: "Cormorant Garamond", Georgia, serif; background: var(--page-bg); color: var(--text-sec); min-height: 100vh; }

  .site-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 40px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 16px rgba(0,0,0,0.05); }
  .site-logo { font-family: "DM Mono", monospace; font-size: 11px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-pri); text-decoration: none; }
  .site-nav { display: flex; gap: 32px; list-style: none; }
  .site-nav a { font-family: "DM Mono", monospace; font-size: 10px; font-weight: 300; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
  .site-nav a:hover { color: var(--orange); }

  .hero { background: radial-gradient(circle at 50% 18%, rgba(203,75,22,0.20) 0%, rgba(7,54,66,0.92) 38%, #061014 100%); padding: 72px 40px 76px; text-align: center; position: relative; overflow: hidden; border-bottom: 1px solid rgba(238,232,213,0.10); min-height: calc(100vh - 56px); display: flex; align-items: center; justify-content: center; }
  .hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 50% 38%, rgba(255,198,112,0.12) 0%, transparent 42%), radial-gradient(circle at 50% 100%, rgba(42,161,152,0.10) 0%, transparent 54%); pointer-events: none; }
  .hero-content { position: relative; z-index: 1; max-width: 920px; margin: 0 auto; }
  .hero-mark { width: min(520px, 82vw); height: auto; display: block; margin: 0 auto 26px; filter: drop-shadow(0 0 34px rgba(203,75,22,0.28)); }
  .hero-eyebrow { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: rgba(238,232,213,0.72); margin-bottom: 20px; }
  .hero-title { font-size: clamp(38px, 5.4vw, 68px); font-weight: 300; line-height: 1.08; color: var(--base3); margin-bottom: 20px; letter-spacing: -0.01em; }
  .hero-title em { font-style: italic; color: var(--orange); }
  .hero-subtitle { font-size: clamp(16px, 2vw, 20px); font-weight: 300; font-style: italic; color: rgba(238,232,213,0.78); max-width: 560px; margin: 0 auto; line-height: 1.65; }

  .section { max-width: 1100px; margin: 0 auto; padding: 72px 40px; }
  .section-label { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 40px; display: flex; align-items: center; gap: 16px; }
  .section-label::after { content: ""; flex: 1; height: 1px; background: var(--border); max-width: 200px; }

  .shelf { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }

  .book-card { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; text-decoration: none; color: inherit; display: block; box-shadow: 0 4px 24px rgba(0,0,0,0.07); }
  .book-card:hover { transform: translateY(-4px); box-shadow: 0 12px 48px rgba(0,0,0,0.14); }
  .book-card.inactive { cursor: default; opacity: 0.45; }
  .book-card.inactive:hover { transform: none; box-shadow: 0 4px 24px rgba(0,0,0,0.07); }

  .book-spine { height: 3px; width: 100%; }
  .book-spine.orange { background: var(--orange); }
  .book-spine.teal   { background: var(--teal); }
  .book-spine.yellow { background: var(--yellow); }
  .book-spine.both   { background: linear-gradient(90deg, var(--orange) 50%, var(--teal) 50%); }

  .book-inner { padding: 28px 24px 22px; }
  .book-number { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 22px; }

  .book-image-area { width: 96px; height: 96px; margin: 0 auto 24px; }
  .book-circle { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--base2); position: relative; overflow: visible; }
  .book-circle::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid currentColor; pointer-events: none; }
  .book-circle::after { content: ""; position: absolute; inset: -11px; border-radius: 50%; border: 1px dashed currentColor; opacity: 0.5; pointer-events: none; }
  .book-circle.orange { color: var(--orange); }
  .book-circle.teal   { color: var(--teal); }
  .book-circle.yellow { color: var(--yellow); }
  .book-circle.both   { color: var(--orange); }
  .book-circle img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 20%; display: block; }
  .book-circle-placeholder { font-size: 42px; line-height: 1; opacity: 0.35; }

  .book-title { font-size: 21px; font-weight: 400; line-height: 1.15; color: var(--text-hi); margin-bottom: 8px; text-align: center; }
  .book-subtitle { font-size: 13px; font-weight: 300; font-style: italic; color: var(--text-sec); line-height: 1.55; text-align: center; margin-bottom: 22px; min-height: 44px; }
  .book-meta { border-top: 1px solid var(--border); padding-top: 16px; display: flex; align-items: center; justify-content: space-between; }
  .book-status { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; }
  .book-status.available { color: var(--teal); }
  .book-status.coming    { color: var(--text-muted); }
  .book-status.building  { color: var(--orange); }
  .book-read-link { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); text-decoration: none; display: flex; align-items: center; gap: 6px; transition: gap 0.2s; }
  .book-card:hover .book-read-link { gap: 10px; }
  .book-read-link::after { content: "→"; }

  .about-strip { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .about-inner { max-width: 1100px; margin: 0 auto; padding: 72px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
  @media (max-width: 700px) { .about-inner { grid-template-columns: 1fr; gap: 40px; } }
  .about-heading { font-size: clamp(28px, 3.5vw, 42px); font-weight: 300; line-height: 1.2; color: var(--text-hi); margin-bottom: 20px; }
  .about-heading em { font-style: italic; color: var(--orange); }
  .about-body { font-size: 17px; font-weight: 300; line-height: 1.75; color: var(--text-sec); }
  .about-body p + p { margin-top: 16px; }
  .layers-list { list-style: none; display: flex; flex-direction: column; gap: 26px; }
  .layer-item { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; }
  .layer-num { font-family: "DM Mono", monospace; font-size: 10px; font-weight: 400; color: var(--orange); padding-top: 4px; }
  .layer-text { font-size: 16px; font-weight: 300; line-height: 1.55; color: var(--text-sec); display: flex; flex-direction: column; gap: 4px; }
  .layer-text strong { font-weight: 500; color: var(--text-pri); }
  .layer-text em { font-size: 15px; font-weight: 300; font-style: italic; color: rgba(101,123,131,0.78); }

  .concept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
  .concept-cell { background: var(--surface); padding: 28px 24px; transition: background 0.2s; }
  .concept-cell:hover { background: var(--base2); }
  .concept-tag { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
  .concept-reduction { font-size: 21px; font-weight: 300; font-style: italic; color: var(--text-hi); line-height: 1.2; margin-bottom: 8px; }
  .concept-question  { font-size: 13px; font-weight: 300; font-style: italic; color: var(--text-sec); line-height: 1.55; }

  .site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 36px 40px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 20px; }
  .footer-left { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.16em; color: var(--text-muted); text-transform: uppercase; }
  .footer-centre { font-family: "Cormorant Garamond", serif; font-size: 15px; font-weight: 300; font-style: italic; color: var(--text-sec); text-align: center; }
  .footer-right { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.12em; color: var(--text-muted); text-align: right; }

  @media (max-width: 640px) {
    .site-nav { display: none; }
    .hero { padding: 48px 24px 56px; min-height: auto; }
    .hero-mark { width: min(430px, 92vw); margin-bottom: 22px; }
    .section { padding: 48px 24px; }
    .site-footer { grid-template-columns: 1fr; text-align: left; padding: 28px 24px; gap: 12px; }
    .footer-centre, .footer-right { text-align: left; }
    .site-header { padding: 0 24px; }
  }

/* --- shared chrome helpers for book pages --- */
.site-header, .site-footer { width: 100%; align-self: stretch; }
body.book-page { padding-top: 0 !important; }

/* ─── Comic cards (home page) ─── */
.comic-shelf { grid-template-columns: repeat(auto-fill, minmax(190px, 224px)); justify-content: start; }
.comic-card { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; text-decoration: none; color: inherit; display: block; box-shadow: 0 4px 24px rgba(0,0,0,0.07); }
.comic-card:hover { transform: translateY(-4px); box-shadow: 0 12px 48px rgba(0,0,0,0.14); }
.comic-thumb { position: relative; width: 100%; aspect-ratio: 3 / 2; background: #1a1426; overflow: hidden; }
.comic-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.comic-badge { position: absolute; top: 9px; left: 9px; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--base3); background: rgba(7,54,66,0.82); border: 1px solid rgba(238,232,213,0.28); padding: 3px 7px; border-radius: 3px; }
.comic-inner { padding: 14px 16px 13px; }
.comic-title { font-size: 17px; font-weight: 400; line-height: 1.2; color: var(--text-hi); margin-bottom: 5px; }
.comic-descriptor { font-size: 12px; font-weight: 300; font-style: italic; color: var(--text-sec); line-height: 1.5; margin-bottom: 12px; min-height: 34px; }
.comic-meta { border-top: 1px solid var(--border); padding-top: 11px; display: flex; align-items: center; justify-content: space-between; }
.comic-theme { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.comic-view-link { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); text-decoration: none; display: flex; align-items: center; gap: 6px; transition: gap 0.2s; }
.comic-view-link::after { content: "→"; }
.comic-card:hover .comic-view-link { gap: 10px; }

/* ─── Comic reader page ─── */
.comic-page-main { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 56px 24px 72px; }
.comic-eyebrow { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.comic-page-title { font-size: clamp(30px, 4.5vw, 46px); font-weight: 300; line-height: 1.1; color: var(--text-hi); margin-bottom: 12px; }
.comic-page-desc { font-size: 16px; font-weight: 300; font-style: italic; color: var(--text-sec); line-height: 1.6; margin-bottom: 10px; max-width: 560px; }
.comic-zoom-hint { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 30px; display: flex; align-items: center; gap: 7px; }
.comic-poster { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 10px 48px rgba(0,0,0,0.16); cursor: zoom-in; background: #1a1426; }
.comic-lightbox { position: fixed; inset: 0; background: rgba(6,16,20,0.94); z-index: 1000; display: none; overflow: auto; cursor: zoom-out; padding: 24px; text-align: center; -webkit-overflow-scrolling: touch; }
.comic-lightbox.open { display: block; }
.comic-lightbox img { max-width: none; width: min(1024px, 96vw); height: auto; margin: 0 auto; border-radius: 4px; }
.comic-lightbox-close { position: sticky; top: 0; float: right; font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(238,232,213,0.85); background: none; border: none; cursor: pointer; padding: 6px 4px; }

/* ─── Comic theme filter chips ─── */
.comic-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.comic-chip { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.comic-chip:hover { color: var(--orange); border-color: rgba(203,75,22,0.4); }
.comic-chip.is-active { color: var(--base3); background: var(--orange); border-color: var(--orange); }

/* ─── Guestbook ─── */
.gb-main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 56px 24px 72px; }
.gb-eyebrow { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.gb-title { font-size: clamp(30px, 4.5vw, 46px); font-weight: 300; line-height: 1.1; color: var(--text-hi); margin-bottom: 12px; }
.gb-intro { font-size: 16px; font-weight: 300; font-style: italic; color: var(--text-sec); line-height: 1.6; margin-bottom: 30px; max-width: 560px; }
.gb-form { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 24px; margin-bottom: 44px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.gb-form label { display: block; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.gb-form input[type=text], .gb-form textarea { width: 100%; font-family: "Cormorant Garamond", serif; font-size: 16px; color: var(--text-hi); background: var(--base3); border: 1px solid var(--border); border-radius: 4px; padding: 10px 12px; margin-bottom: 16px; }
.gb-form textarea { min-height: 96px; resize: vertical; }
.gb-form input:focus, .gb-form textarea:focus { outline: none; border-color: var(--orange); }
.gb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gb-submit { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--base3); background: var(--orange); border: none; border-radius: 4px; padding: 12px 24px; cursor: pointer; transition: opacity 0.2s; }
.gb-submit:disabled { opacity: 0.5; cursor: default; }
.gb-status { font-size: 14px; font-style: italic; color: var(--text-sec); margin-top: 12px; min-height: 20px; }
.gb-list-label { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 18px; }
.gb-entry { border-top: 1px solid var(--border); padding: 18px 0; }
.gb-entry:first-child { border-top: none; }
.gb-msg { font-size: 17px; font-weight: 300; line-height: 1.6; color: var(--text-pri); margin-bottom: 6px; white-space: pre-wrap; word-wrap: break-word; }
.gb-meta { font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.gb-meta .gb-name { color: var(--orange); }
