@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Raleway:wght@400;500;600&display=swap');

/* ============================================================
   CODEX LIBRARY · codexlibrary.com
   A chapter of the Breath Awakens brand: same layout and fonts
   (Cormorant Garamond + Raleway), with its own colours drawn from the
   Codex landing photo, Lake Titicaca at dawn, in deeper hues.
   Variable names still say "violet"; the values are lake blues.
   ============================================================ */

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

:root {
  /* Brand: taken from the Codex landing photo (Lake Titicaca at dawn), in darker hues */
  --violet: #2F5F95;          /* lake blue, for links and small accents */
  --violet-ink: #1D3461;      /* deep lake blue, headings */
  --violet-deep: #0F1A30;     /* night lake, nav, dark bands, footer */
  --violet-mid: #1E3560;      /* mountain shadow, top of title bars */
  --sky: #8FCFE6;             /* dawn sky, spiral on dark */
  --gold: #C9A227;            /* landing buttons, the Monad point */
  --gold-light: #E6CD74;
  --gold-dark: #876A10;
  --teal: #2F7F7A;
  --stone: #EEE8DD;
  --stone-deep: #DDD4C5;
  --offwhite: #FAF8F4;
  --white: #FFFFFF;

  --text: #1A2233;
  --text-soft: #4A5364;
  --text-muted: #6A7385;
  --text-light: #F2F5F7;      /* snow */

  /* Family colour ticks (one per shelf) */
  --fam-A: #C9A227;  /* The Door */
  --fam-B: #B0506A;  /* Heart, Centre, Identity */
  --fam-C: #3F7F86;  /* Mirror, Boundary, Machine */
  --fam-D: #3C89C9;  /* Earth, Ocean, Sky, Time */
  --fam-E: #B86A3C;  /* Word, Tale, Play, Age */
  --fam-F: #3E8A5A;  /* The Great Story */
  --fam-G: #2B4C7E;  /* Conclave */
  --fam-H: #7C8A3A;  /* The Lived Life */
  --fam-I: #8A7563;  /* Amazon shelf */

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Raleway', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --nav-h: 72px;
}

html { scroll-behavior: smooth; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font-body); color: var(--text); background: var(--offwhite);
  line-height: 1.75; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 500; line-height: 1.2; color: var(--violet-ink); }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
a { color: var(--violet); text-decoration: none; transition: color .3s var(--ease); }
a:hover { color: var(--gold-dark); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 2000; background: var(--gold); color: var(--violet-deep); padding: .5rem 1rem; }
.skip-link:focus { top: 1rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.narrow { max-width: 760px; margin: 0 auto; }
.section { padding: 6rem 0; }
.section-tight { padding: 4rem 0; }
.bg-white { background: var(--white); }
.bg-stone { background: var(--stone); }
.bg-deep { background: var(--violet-deep); color: var(--text-light); }
.bg-deep h2, .bg-deep h3 { color: var(--gold-light); }

.eyebrow {
  font-family: var(--font-body); font-size: .74rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: .9rem;
}
.bg-deep .eyebrow, .hero .eyebrow, .page-head .eyebrow { color: var(--gold-light); }
.divider { width: 60px; height: 1px; background: var(--gold); margin: 1.5rem auto; opacity: .7; }
.diamond { display: block; text-align: center; color: var(--gold); font-size: 1rem; margin: 0 auto 1.2rem; letter-spacing: .5em; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header .subtitle { font-family: var(--font-heading); font-size: 1.25rem; font-style: italic; color: var(--text-muted); margin: .4rem auto 0; }
.bg-deep .section-header .subtitle { color: rgba(242,245,247,.72); }
.lead { font-family: var(--font-heading); font-size: clamp(1.35rem, 2.2vw, 1.6rem); line-height: 1.6; color: var(--violet-ink); }
.prose p { max-width: 70ch; color: var(--text-soft); font-size: 1.06rem; margin-bottom: 1.3rem; }
.prose p.lead { color: var(--violet-ink); }

/* ---------- Buttons (Breath Awakens sliding fill) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; padding: .95rem 2.2rem;
  font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  border: 1.5px solid var(--gold); color: var(--gold-dark); background: transparent; cursor: pointer;
  position: relative; overflow: hidden; z-index: 0; transition: color .4s var(--ease), border-color .4s var(--ease);
}
.btn::before { content: ''; position: absolute; inset: 0; left: -101%; width: 100%; background: var(--gold); transition: left .4s var(--ease); z-index: -1; }
.btn:hover { color: var(--violet-deep); }
.btn:hover::before { left: 0; }
.btn-solid { background: var(--gold); color: var(--violet-deep); }
.btn-solid::before { background: var(--gold-light); }
.btn-light { border-color: rgba(242,245,247,.8); color: var(--text-light); }
.btn-light::before { background: var(--text-light); }
.btn-small { padding: .6rem 1.2rem; font-size: .7rem; letter-spacing: .14em; }
.btn[aria-disabled="true"] { border-color: var(--stone-deep); color: var(--text-muted); cursor: default; background: var(--stone); }
.btn[aria-disabled="true"]::before { display: none; }
.ext::after { content: '\2197'; font-size: .95em; letter-spacing: 0; }

/* ---------- Navigation ---------- */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease); padding: 1.1rem 0; }
.navbar.scrolled, .navbar.solid { background: rgba(15,26,48,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: .65rem 0; box-shadow: 0 2px 30px rgba(0,0,0,.25); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1240px; margin: 0 auto; padding: 0 2rem; }
.nav-logo { display: flex; align-items: center; gap: .8rem; color: var(--gold-light); }
.nav-logo:hover { color: var(--gold-light); }
.nav-logo svg { width: 44px; height: 44px; flex: none; }
.nav-logo .wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo .wordmark strong { font-family: var(--font-heading); font-weight: 500; font-size: 1.45rem; letter-spacing: .08em; color: var(--gold-light); }
.nav-logo .wordmark small { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(242,245,247,.7); margin-top: .2rem; }
.nav-links { display: flex; gap: 1.9rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text-light); font-size: .76rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; position: relative; padding: .3rem 0; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--gold); transition: width .4s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold-light); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; z-index: 1001; }
.hamburger span { width: 26px; height: 2px; background: var(--text-light); transition: transform .4s var(--ease), opacity .3s; }

/* ---------- Home hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; color: var(--text-light); background: var(--violet-deep) url('../images/lake-titicaca.jpg') center 60%/cover no-repeat; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,26,48,.62) 0%, rgba(15,26,48,.32) 42%, rgba(15,26,48,.72) 100%); }
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 820px; padding: 7rem 2rem 5rem; }
.hero-mark { width: 92px; height: 92px; margin: 0 auto 1.6rem; color: var(--gold-light); }
.hero h1 { color: var(--text-light); font-weight: 400; letter-spacing: .03em; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero h1 em { display: block; font-size: .5em; font-style: italic; color: var(--gold-light); margin-top: .7rem; letter-spacing: .01em; }
.hero-parent { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; opacity: .85; margin: 1.6rem auto 2.6rem; }
.hero-parent a { color: var(--text-light); border-bottom: 1px solid rgba(230,205,116,.5); }
.hero-buttons { display: flex; gap: 1.1rem; justify-content: center; flex-wrap: wrap; }
.hero-caption { position: absolute; bottom: 1.5rem; left: 0; right: 0; text-align: center; z-index: 1; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(242,245,247,.6); }

/* ---------- Interior page heads ---------- */
.page-head { position: relative; padding: calc(var(--nav-h) + 5rem) 0 4.5rem; background: radial-gradient(120% 140% at 50% 0%, var(--violet-mid) 0%, var(--violet-deep) 62%); color: var(--text-light); text-align: center; overflow: hidden; }
.page-head.has-photo { background-size: cover; background-position: center; }
.page-head.has-photo::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,26,48,.72), rgba(15,26,48,.62)); }
.page-head .watermark { position: absolute; right: -60px; top: 50%; width: 420px; height: 420px; transform: translateY(-50%); color: rgba(230,205,116,.09); pointer-events: none; }
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { color: var(--text-light); font-size: clamp(2.4rem, 5vw, 3.6rem); }
.page-head .subtitle { font-family: var(--font-heading); font-style: italic; font-size: 1.3rem; color: var(--gold-light); margin: .6rem auto 0; }
.page-head p.intro { color: rgba(242,245,247,.85); margin: 1.4rem auto 0; font-size: 1.02rem; }

/* ---------- Welcome ---------- */
.welcome .prose p:first-child::first-letter { font-family: var(--font-heading); float: left; font-size: 4.2rem; line-height: .82; padding: .35rem .6rem 0 0; color: var(--gold); }

/* ---------- Find your door (chooser) ---------- */
.chooser { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.door {
  position: relative; display: flex; flex-direction: column; min-height: 360px; color: var(--text-light);
  background: var(--violet-deep); overflow: hidden; isolation: isolate; border-top: 3px solid var(--tick);
  box-shadow: 0 6px 30px rgba(15,26,48,.12); transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.door img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.door::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(15,26,48,.45) 0%, rgba(15,26,48,.82) 55%, rgba(15,26,48,.94) 100%); }
.door:hover { transform: translateY(-5px); box-shadow: 0 14px 44px rgba(15,26,48,.22); color: var(--text-light); }
.door:hover img { transform: scale(1.05); }
.door-body { margin-top: auto; padding: 1.8rem 1.6rem 1.7rem; }
.door .q { font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-light); margin-bottom: .8rem; line-height: 1.6; }
.door h3 { color: var(--white); font-size: 1.6rem; margin-bottom: .6rem; }
.door p { font-size: .88rem; line-height: 1.65; color: rgba(242,245,247,.86); }
.door .go { display: inline-block; margin-top: 1.1rem; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); }

/* ---------- How these were written ---------- */
.written { display: grid; grid-template-columns: 180px 1fr; gap: 3.5rem; align-items: center; max-width: 980px; margin: 0 auto; }
.written .mark { width: 180px; height: 180px; color: var(--gold-light); }
.written p { font-family: var(--font-heading); font-size: clamp(1.25rem, 2.1vw, 1.5rem); line-height: 1.7; color: rgba(242,245,247,.92); max-width: none; }

/* ---------- Nine shelves grid (home) ---------- */
.shelves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.shelf {
  display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.6rem 1.5rem; background: var(--white);
  border-left: 3px solid var(--tick); box-shadow: 0 2px 20px rgba(15,26,48,.05); color: var(--text);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.shelf:hover { transform: translateY(-3px); box-shadow: 0 10px 34px rgba(15,26,48,.1); color: var(--text); }
.shelf .glyph { width: 38px; height: 38px; flex: none; color: var(--tick); }
.shelf .letter { font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); }
.shelf h3 { font-size: 1.35rem; margin: .1rem 0 .35rem; }
.shelf p { font-size: .86rem; line-height: 1.6; color: var(--text-soft); }
.shelf .count { display: inline-block; margin-top: .6rem; font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); }
.shelf.paid .count { color: var(--fam-I); }
.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 3rem; }

/* ---------- Library page tools ---------- */
.start-ribbon { background: var(--gold); color: var(--violet-deep); font-size: .86rem; }
.start-ribbon .container { display: flex; align-items: center; justify-content: center; gap: .6rem 1.4rem; flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; text-align: center; }
.start-ribbon strong { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; }
.start-ribbon a { color: var(--violet-deep); font-weight: 600; border-bottom: 1px solid rgba(15,26,48,.45); }
.start-ribbon a:hover { color: var(--violet-deep); border-bottom-color: var(--violet-deep); }

.lib-tools { position: sticky; top: var(--nav-sticky, 64px); z-index: 900; background: rgba(250,248,244,.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--stone-deep); box-shadow: 0 4px 18px rgba(15,26,48,.05); }
.fam-nav { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding: .55rem 0; border-bottom: 1px solid var(--stone); }
.fam-nav::-webkit-scrollbar { display: none; }
.fam-nav a { flex: none; display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; font-size: .74rem; font-weight: 500; letter-spacing: .06em; color: var(--text-soft); border-radius: 99px; white-space: nowrap; }
.fam-nav a::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--tick); }
.fam-nav a:hover, .fam-nav a.active { background: var(--stone); color: var(--violet-ink); }
.filters { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; padding: .7rem 0; }
.filters label { font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.filters .field { display: flex; align-items: center; gap: .5rem; }
.filters select, .filters input { font-family: var(--font-body); font-size: .88rem; color: var(--text); background: var(--white); border: 1px solid var(--stone-deep); padding: .5rem .7rem; border-radius: 0; }
.filters select:focus, .filters input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,162,39,.18); }
.filters .search { flex: 1; min-width: 200px; }
.filters .search input { width: 100%; }
.filters .result-count { font-size: .78rem; color: var(--text-muted); margin-left: auto; white-space: nowrap; }
.filters .reset { background: none; border: none; font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); cursor: pointer; padding: .3rem; }
.no-results { display: none; text-align: center; padding: 5rem 1rem; color: var(--text-muted); font-family: var(--font-heading); font-size: 1.3rem; font-style: italic; }
.no-results.show { display: block; }

/* ---------- Family sections ---------- */
.family { padding: 0 0 4.5rem; scroll-margin-top: 150px; }
.family[hidden] { display: none; }
.family-head { position: relative; padding: 5.5rem 0 3rem; margin-bottom: 2.5rem; color: var(--text-light); background: var(--violet-deep); overflow: hidden; isolation: isolate; }
.family-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.family-head::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15,26,48,.9) 0%, rgba(15,26,48,.72) 55%, rgba(15,26,48,.5) 100%); }
.family-head.no-photo { background: linear-gradient(120deg, var(--violet-deep), var(--violet-mid)); }
.family-head.no-photo::before { display: none; }
.family-head .fam-label { display: flex; align-items: center; gap: .8rem; font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light); margin-bottom: .6rem; }
.family-head .fam-label .glyph { width: 30px; height: 30px; color: var(--tick); background: rgba(250,248,244,.94); border-radius: 50%; padding: 5px; }
.family-head h2 { color: var(--white); }
.family-head p { margin-top: .7rem; font-family: var(--font-heading); font-size: 1.3rem; font-style: italic; color: rgba(242,245,247,.9); }
.family-head .tickbar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--tick); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--white); padding: 1.9rem 1.8rem 1.7rem;
  border-top: 3px solid var(--tick); box-shadow: 0 3px 24px rgba(15,26,48,.06); scroll-margin-top: 170px;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(15,26,48,.11); }
.card[hidden] { display: none; }
.card:target, .card.flash { animation: flash 2.2s var(--ease); }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px var(--gold), 0 12px 40px rgba(15,26,48,.15); } 100% { box-shadow: 0 3px 24px rgba(15,26,48,.06); } }
.card .card-fam { display: flex; align-items: center; gap: .5rem; font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .9rem; }
.card .card-fam .glyph { width: 18px; height: 18px; color: var(--tick); }
.card .start-tag { margin-left: auto; font-size: .6rem; letter-spacing: .16em; color: var(--gold-dark); border: 1px solid rgba(201,162,39,.5); padding: .1rem .5rem; }
.card h3 { font-size: 1.45rem; line-height: 1.25; margin-bottom: .8rem; }
.card p { font-size: .9rem; line-height: 1.7; color: var(--text-soft); margin-bottom: 1.4rem; }
.card .btn { margin-top: auto; align-self: flex-start; }
.card.paid .price-note { font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--fam-I); margin-bottom: .9rem; }

/* ---------- How to Read ---------- */
.read-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 4rem; align-items: start; }
.rules { position: sticky; top: 100px; background: var(--violet-deep); color: var(--text-light); padding: 2.4rem 2.1rem; border-left: 3px solid var(--gold); }
.rules h2 { color: var(--gold-light); font-size: 1.7rem; margin-bottom: 1.2rem; }
.rules ul { list-style: none; }
.rules li { position: relative; padding: .7rem 0 .7rem 1.6rem; font-size: .92rem; line-height: 1.65; border-bottom: 1px solid rgba(242,245,247,.1); color: rgba(242,245,247,.9); }
.rules li:last-child { border-bottom: 0; }
.rules li::before { content: '\25C7'; position: absolute; left: 0; top: .72rem; color: var(--gold); font-size: .85rem; }
.rules .share { margin-top: 1.4rem; }
.read-section + .read-section { margin-top: 4.5rem; }
.read-section h2 { margin-bottom: 1.4rem; }
.chooser.compact { grid-template-columns: repeat(2, 1fr); }
.chooser.compact .door { min-height: 280px; }
.shelf-table { width: 100%; border-collapse: collapse; }
.shelf-table th, .shelf-table td { text-align: left; padding: 1rem .9rem; border-bottom: 1px solid var(--stone-deep); vertical-align: top; }
.shelf-table th { font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); }
.shelf-table td:first-child { width: 42%; }
.shelf-table td:first-child a { display: flex; align-items: center; gap: .7rem; font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; color: var(--violet-ink); }
.shelf-table td:first-child a:hover { color: var(--gold-dark); }
.shelf-table .glyph { width: 26px; height: 26px; flex: none; color: var(--tick); }
.shelf-table td:last-child { font-size: .92rem; color: var(--text-soft); }

/* ---------- Films ---------- */
.film-guides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.guide { background: var(--white); padding: 2rem 1.8rem; border-top: 2px solid var(--gold); box-shadow: 0 2px 20px rgba(15,26,48,.05); }
.guide h3 { font-family: var(--font-body); font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: .9rem; line-height: 1.6; }
.guide p { font-size: .95rem; color: var(--text-soft); }
.films { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.8rem; }
.film { background: var(--white); padding: 2.2rem 2.1rem 2rem; border-top: 3px solid var(--gold); box-shadow: 0 3px 24px rgba(15,26,48,.06); display: flex; flex-direction: column; }
.film-top { display: flex; gap: 1.2rem; align-items: baseline; margin-bottom: .4rem; }
.film .num { font-family: var(--font-heading); font-size: 2.8rem; line-height: 1; color: var(--gold); font-weight: 500; }
.film h3 { font-size: 1.7rem; }
.film .meta { font-size: .8rem; color: var(--text-muted); letter-spacing: .02em; margin-bottom: .8rem; }
.film .tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tag { font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: .22rem .6rem; border: 1px solid var(--stone-deep); color: var(--text-soft); background: var(--offwhite); }
.tag.attenborough { border-color: rgba(47,127,122,.4); color: var(--teal); }
.tag.cocreative { border-color: rgba(47,95,149,.35); color: var(--violet); }
.tag.field { border-color: rgba(201,162,39,.55); color: var(--gold-dark); }
.film blockquote { font-family: var(--font-heading); font-style: italic; font-size: 1.25rem; line-height: 1.55; color: var(--violet-ink); padding-left: 1.1rem; border-left: 2px solid var(--gold); margin: .2rem 0 1.3rem; }
.film h4 { font-family: var(--font-body); font-size: .66rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .5rem; }
.film ul.notice { list-style: none; margin-bottom: 1.2rem; }
.film ul.notice li { position: relative; padding-left: 1.3rem; font-size: .9rem; color: var(--text-soft); margin-bottom: .35rem; line-height: 1.6; }
.film ul.notice li::before { content: '\25C7'; position: absolute; left: 0; color: var(--gold); font-size: .75rem; top: .15rem; }
.reflect { background: var(--stone); padding: 1.1rem 1.3rem; margin-bottom: 1.3rem; }
.reflect p { font-family: var(--font-heading); font-size: 1.12rem; line-height: 1.55; color: var(--violet-ink); }
.related { list-style: none; margin-top: auto; }
.related li { border-top: 1px solid var(--stone); }
.related a { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; font-size: .88rem; font-weight: 500; color: var(--violet-ink); }
.related a:hover { color: var(--gold-dark); }
.related a::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--tick); flex: none; }
.related .soon { margin-left: auto; font-size: .6rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fam-I); }
.closing { text-align: center; }
.closing p { font-family: var(--font-heading); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-style: italic; line-height: 1.6; color: var(--gold-light); margin: 0 auto; max-width: 820px; }

/* ---------- Amazon shelf ---------- */
.books { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.book { display: grid; grid-template-columns: 170px 1fr; gap: 1.8rem; background: var(--white); padding: 1.8rem; box-shadow: 0 3px 24px rgba(15,26,48,.06); border-top: 3px solid var(--fam-I); scroll-margin-top: 110px; }
.book:target { animation: flash 2.2s var(--ease); }
.cover { aspect-ratio: 2 / 3; background: linear-gradient(160deg, var(--violet-mid), var(--violet-deep)); color: var(--gold-light); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 1.3rem .9rem; text-align: center; box-shadow: 6px 8px 22px rgba(15,26,48,.25); position: relative; }
.cover::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(230,205,116,.3); pointer-events: none; }
.cover svg { width: 58px; height: 58px; }
.cover .ct { font-family: var(--font-heading); font-size: 1.15rem; line-height: 1.2; color: var(--text-light); }
.cover .ca { font-size: .52rem; letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.book h3 { font-size: 1.7rem; margin-bottom: .4rem; }
.book .paid-label { font-size: .66rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--fam-I); margin-bottom: .9rem; }
.book p { font-size: .94rem; color: var(--text-soft); margin-bottom: 1.4rem; }
.book-body { display: flex; flex-direction: column; }
.book-body .btn { margin-top: auto; align-self: flex-start; }
.note-panel { margin-top: 3rem; text-align: center; color: var(--text-muted); font-size: .92rem; }
.note-panel p { margin: 0 auto; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 4rem; align-items: center; }
.about-grid img { width: 100%; box-shadow: 0 10px 40px rgba(15,26,48,.12); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 1rem; }
.pillar { background: var(--white); padding: 1.8rem 1.6rem; border-top: 2px solid var(--gold); box-shadow: 0 2px 20px rgba(15,26,48,.05); }
.pillar h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.pillar p { font-size: .9rem; color: var(--text-soft); margin-bottom: 1rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start; }
.contact-aside p { color: var(--text-soft); margin-bottom: 1.2rem; }
.contact-aside .email { font-family: var(--font-heading); font-size: 1.5rem; color: var(--violet-ink); border-bottom: 1px solid var(--gold); }
.form-group { margin-bottom: 1.4rem; }
.form-group label { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--violet-ink); margin-bottom: .5rem; }
.form-group input, .form-group textarea { width: 100%; padding: .9rem 1rem; border: 1px solid var(--stone-deep); background: var(--white); font-family: var(--font-body); font-size: .95rem; color: var(--text); border-radius: 0; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,162,39,.18); }
.form-group textarea { resize: vertical; min-height: 170px; }
.form-note { font-size: .8rem; color: var(--text-muted); margin-top: 1rem; }

/* ---------- Footer ---------- */
footer { background: var(--violet-deep); color: var(--text-light); padding: 4.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand .nav-logo { margin-bottom: 1.2rem; }
.footer-brand p { color: rgba(242,245,247,.62); font-size: .88rem; max-width: 340px; }
.footer-links h4 { font-family: var(--font-body); font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 1rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { color: rgba(242,245,247,.66); font-size: .88rem; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(242,245,247,.1); padding-top: 1.8rem; text-align: center; font-size: .8rem; color: rgba(242,245,247,.5); }
.footer-bottom a { color: rgba(242,245,247,.7); }

/* ---------- Motion ---------- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  .door, .door img, .card, .shelf, .btn::before { transition: none; }
}
.no-js .fade-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .chooser { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .read-layout { grid-template-columns: 1fr; }
  .rules { position: static; }
  .nav-links { gap: 1.3rem; }
}
@media (max-width: 900px) {
  .shelves, .film-guides, .pillars { grid-template-columns: 1fr; }
  .films, .books { grid-template-columns: 1fr; }
  .footer-grid, .contact-grid, .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-grid img { max-width: 260px; }
  .written { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .written .mark { margin: 0 auto; width: 120px; height: 120px; }
}
@media (max-width: 860px) {
  .nav-links { position: fixed; top: 0; right: -100%; height: 100vh; width: 290px; background: var(--violet-deep); flex-direction: column; align-items: flex-start; padding: 6rem 2.2rem 2rem; gap: 1.6rem; transition: right .45s var(--ease); box-shadow: -4px 0 30px rgba(0,0,0,.3); }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: .85rem; }
  .hamburger { display: flex; }
  .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}
@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  .nav-inner { padding: 0 1rem; }
  .section { padding: 4.2rem 0; }
  .chooser, .chooser.compact, .cards { grid-template-columns: 1fr; }
  .door { min-height: 300px; }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn { justify-content: center; }
  .book { grid-template-columns: 1fr; }
  .cover { max-width: 180px; }
  .filters .result-count { margin-left: 0; width: 100%; }
  .filters .field { flex: 1 1 45%; }
  .filters .field select { width: 100%; }
  .family-head { padding: 4rem 0 2.4rem; }
  .shelf-table td:first-child { width: auto; }
  .page-head .watermark { width: 300px; height: 300px; right: -120px; }
  .nav-logo .wordmark small { display: none; }
}

/* fixes after review */
.family-head p.fam-label { font-family: var(--font-body); font-style: normal; font-size: .72rem; margin-top: 0; color: var(--gold-light); }
.page-head .watermark circle:last-child { fill: currentColor; }
.prose p.lead { font-size: clamp(1.35rem, 2.2vw, 1.6rem); line-height: 1.6; color: var(--violet-ink); }
.related { margin-top: 0; }
@media (max-width: 640px) {
  .filters { flex-wrap: nowrap; gap: .6rem; }
  .filters .field:first-child, .filters .result-count, .filters .field label[for="f-path"] { display: none; }
  .filters .field { flex: 0 0 auto; }
  .filters .field select { width: auto; max-width: 130px; }
  .filters .search { flex: 1 1 auto; min-width: 0; }
}

/* ---------- Go-live update (Oct 2026) ---------- */
/* Hero photo as a real image so it carries alt text */
.hero { background-image: none; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; z-index: -2; }
.hero::before { z-index: -1; }
/* Lighter treatment so the photos show their true colour (less blue sheen) */
.hero::before { background: linear-gradient(180deg, rgba(15,26,48,.42) 0%, rgba(15,26,48,.16) 42%, rgba(15,26,48,.58) 100%); }
.hero h1, .hero .hero-parent, .hero .eyebrow { text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.family-head::before { background: linear-gradient(90deg, rgba(15,26,48,.8) 0%, rgba(15,26,48,.42) 50%, rgba(15,26,48,.06) 100%); }
.family-head h2, .family-head p { text-shadow: 0 1px 14px rgba(0,0,0,.4); }
.door::before { background: linear-gradient(180deg, rgba(15,26,48,.08) 0%, rgba(15,26,48,.6) 52%, rgba(15,26,48,.9) 100%); }
.page-head.has-photo::before { background: linear-gradient(180deg, rgba(15,26,48,.55), rgba(15,26,48,.45)); }
/* Real book covers */
.book .cover-img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 6px 8px 22px rgba(15,26,48,.28); }
.book .isbn { font-size: .74rem; letter-spacing: .06em; color: var(--text-muted); margin: -.6rem 0 1.2rem; }
.card-cover { width: 120px; aspect-ratio: 2 / 3; object-fit: cover; margin: 0 0 1.1rem; box-shadow: 4px 6px 16px rgba(15,26,48,.22); }
@media (max-width: 640px) { .book .cover-img { max-width: 200px; } }
