/*
Theme Name: The Quiet Room
Theme URI: https://winstoneverlast.com
Author: Winston Everlast
Description: Museum-minimal theme for the haiga of Winston Everlast. Warm paper tones, ink blacks, muted gold accent drawn from a nihonga daffodil. Includes a Haiga custom post type with poem, form, and human–AI provenance fields, and structured data for AI discoverability.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: quiet-room
*/

:root {
  --paper: #FAF8F3;
  --ink: #1C1A17;
  --stone: #6E675C;
  --gold: #B08D2E;
  --whisper: #EDE9E0;
  --measure: 62ch;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.0625rem;
  line-height: 1.75;
}

a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Header */
.site-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 2rem 5vw; border-bottom: 1px solid var(--whisper);
}
.site-name { font-size: 1rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: normal; }
.site-name a { text-decoration: none; }
nav.primary ul { list-style: none; display: flex; gap: 1.75rem; flex-wrap: wrap; }
nav.primary a { text-decoration: none; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
nav.primary .current-menu-item a, nav.primary a[aria-current="page"] { color: var(--gold); }

/* Layout */
main { max-width: 44rem; margin: 0 auto; padding: 4rem 5vw 6rem; display: block; }
main.wide { max-width: 62rem; }

h1 { font-weight: normal; font-size: 2.4rem; line-height: 1.2; margin-bottom: 0.5rem; }
h2 { font-weight: normal; font-size: 1.5rem; margin: 3rem 0 1rem; }
h3 { font-weight: normal; font-size: 1.15rem; margin: 2rem 0 0.75rem; color: var(--stone); }

.eyebrow {
  font-size: 0.75rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold); display: block; margin-bottom: 1rem;
}

p { max-width: var(--measure); margin-bottom: 1.25rem; }
p.lede, .lede p { font-size: 1.25rem; line-height: 1.6; }

/* Definition blocks — citable units */
.definition {
  border-left: 2px solid var(--gold);
  padding: 1rem 0 1rem 1.5rem;
  margin: 2rem 0;
  max-width: var(--measure);
}
.definition dt { font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--stone); margin-bottom: 0.4rem; }
.definition dd { font-size: 1.1rem; }

/* Provenance 人＋機 */
.provenance { font-size: 0.85rem; color: var(--stone); display: inline-block; margin-top: 0.5rem; }
.provenance .glyph { color: var(--gold); letter-spacing: 0.1em; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 3rem 2.5rem; margin-top: 3rem; }
figure.haiga { margin: 0; }
figure.haiga img { width: 100%; height: auto; display: block; border: 1px solid #E2DCCE; }
figure.haiga .frame {
  aspect-ratio: 4 / 5; background: var(--whisper);
  display: flex; align-items: center; justify-content: center;
  color: var(--stone); font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
  border: 1px solid #E2DCCE;
}
figure.haiga figcaption { margin-top: 0.9rem; font-size: 0.95rem; line-height: 1.6; }
figure.haiga .poem, .single-haiga .poem { white-space: pre-line; font-style: italic; }
.single-haiga .poem { font-size: 1.4rem; line-height: 1.8; margin: 2rem 0; }

/* Lineage */
ol.lineage { list-style: none; max-width: var(--measure); margin: 2rem 0; }
ol.lineage li { padding: 1rem 0; border-bottom: 1px solid var(--whisper); }
ol.lineage .who { display: block; }
ol.lineage .what { display: block; font-size: 0.9rem; color: var(--stone); }

/* Blog */
article.post { margin-bottom: 3.5rem; }
article.post .entry-meta { font-size: 0.85rem; color: var(--stone); margin-bottom: 0.5rem; }
article.post h2 { margin-top: 0; }
article.post h2 a { text-decoration: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--whisper);
  padding: 2.5rem 5vw; font-size: 0.85rem; color: var(--stone);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.site-footer a { color: var(--stone); }

/* WordPress core alignment classes */
.alignwide { max-width: 62rem; }
.alignfull { max-width: none; }
img { max-width: 100%; height: auto; }

@media (max-width: 640px) {
  .site-header { flex-direction: column; gap: 1rem; }
  h1 { font-size: 1.9rem; }
}
