/* Rand Smedley — author site
   Palette taken from the cover of The Geronimo Solution:
   dusk sky, mesa rust, sunset amber, weathered bone lettering,
   and the cover's teal "future" lattice used sparingly. */

:root {
  --sky: #14293e;
  --sky-deep: #0c1a29;
  --sky-line: #27415a;
  --mesa: #b4532c;
  --amber: #e9a24b;
  --bone: #eee3ce;
  --dust: #b3a690;
  --holo: #57d2c6;

  --display: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --text: "Literata", Georgia, "Times New Roman", serif;

  --measure: 36rem;
  --wide: 68rem;
}

* { box-sizing: border-box; }

html { background: var(--sky-deep); }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 120% 60% at 50% 0%, #1b3550 0%, transparent 70%),
    var(--sky-deep);
  color: var(--bone);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--bone); }
:focus-visible { outline: 2px solid var(--holo); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--bone); color: var(--sky-deep); padding: .5rem 1rem; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  color: var(--bone);
  margin: 0 0 .5em;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }

/* The series line echoes the teal line at the top of the cover */
.series {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--holo);
  margin: 0 0 .4rem;
}

/* ---------- Masthead & navigation ---------- */

.masthead {
  position: relative;
  background: var(--sky-deep);
}
.masthead img {
  width: 100%;
  aspect-ratio: 1200 / 600;
  max-height: 80vh;
  object-fit: cover;
  object-position: center 45%;
}
.masthead-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 5rem 1rem 1.5rem;
  text-align: center;
  background: linear-gradient(to bottom, transparent, rgba(12, 26, 41, 0.92));
}
.masthead-title .name {
  font-size: clamp(1.9rem, 6.5vw, 4.4rem);
  letter-spacing: 0.22em;
  margin: 0 0 .15em;
  padding-left: 0.22em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}
.masthead-title .series { margin: 0; font-size: clamp(.95rem, 2vw, 1.2rem); letter-spacing: .12em; }
.masthead h1.visually-hidden,
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.nav {
  border-top: 1px solid var(--sky-line);
  border-bottom: 1px solid var(--sky-line);
  background: rgba(12, 26, 41, 0.92);
}
.nav ul {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1.75rem;
}
.nav a {
  display: inline-block;
  padding: .8rem 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--dust);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--bone); }
.nav a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--mesa); }

/* Interior pages: a slim lettered header instead of the full masthead */
.page-head {
  text-align: center;
  padding: 3.5rem 1rem 2rem;
  background:
    linear-gradient(to bottom, rgba(12,26,41,.35), var(--sky-deep)),
    url("img/vanguard.jpg") center 45% / cover no-repeat;
}
.page-head .brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.22em;
  color: var(--bone);
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

/* Home: slim top bar + hero */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 2rem;
  flex-wrap: wrap;
  padding: .25rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--sky-line);
  background: var(--sky-deep);
}
.brand-sm {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .2em;
  color: var(--bone);
  text-decoration: none;
}
.topbar .nav { border: 0; background: none; }
.topbar .nav ul { padding: 0; justify-content: flex-end; }

.hero {
  position: relative;
  background: var(--sky-deep);
}
.hero-bg {
  display: block;
  width: 100%;
  height: clamp(20rem, 60vh, 44rem);
  object-fit: cover;
  object-position: 70% 32%;
}
.hero::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: clamp(20rem, 60vh, 44rem);
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, var(--sky-deep) 0%, rgba(12,26,41,.55) 22%, rgba(12,26,41,0) 48%);
}
.hero-inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 34rem);
  gap: 2.5rem;
  align-items: end;
  margin-top: -14rem;
  padding: 0 clamp(1.25rem, 5vw, 5rem) 2.5rem;
}
.hero-cover {
  border-radius: 3px;
  box-shadow: 0 30px 60px -18px rgba(0,0,0,.85), 0 0 0 1px rgba(238,227,206,.12);
}
.hero-title { font-size: clamp(2.2rem, 4.2vw, 3.3rem); margin-bottom: .35em; text-shadow: 0 2px 16px rgba(0,0,0,.7); }
.hero .hook { text-shadow: 0 1px 10px rgba(0,0,0,.8); margin-bottom: 0; }
.hero .series { text-shadow: 0 1px 3px rgba(0,0,0,.95), 0 0 14px rgba(0,0,0,.8); }
.hero .button-row { margin-top: 1.25rem; }

/* ---------- Layout ---------- */

main { display: block; }
.section { padding: 4.5rem 1.25rem; }
.section + .section { border-top: 1px solid var(--sky-line); }
.wrap { max-width: var(--wide); margin: 0 auto; }
.prose { max-width: var(--measure); margin: 0 auto; }
.prose h2 { margin-top: 2.5rem; }
.lede { font-size: 1.3rem; line-height: 1.55; color: var(--bone); }
.muted { color: var(--dust); }
.small { font-size: .95rem; }

/* Book feature: big cover beside the copy */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.feature .cover img {
  border-radius: 3px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(238,227,206,.08);
}
.hook {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.35;
  color: var(--amber);
  margin-bottom: 1.25rem;
}

.button {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  padding: .8rem 1.5rem;
  border-radius: 3px;
  background: var(--mesa);
  color: var(--bone);
  text-decoration: none;
  border: 1px solid #cf6a3f;
}
.button:hover { background: #c55f35; color: #fff; }
.button.ghost { background: transparent; border-color: var(--dust); color: var(--bone); }
.button.ghost:hover { border-color: var(--bone); }
.button[aria-disabled="true"] { background: transparent; border: 1px dashed var(--dust); color: var(--dust); cursor: default; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin-top: 1.5rem; }

/* Next book: a quiet line with a warm rule, not a card */
.next {
  text-align: center;
  padding: 3rem 1.25rem;
  background: linear-gradient(90deg, transparent, rgba(180,83,44,.16), transparent);
}
.next p { margin: 0; }
.next-inner { display: flex; align-items: center; justify-content: center; gap: 2rem; max-width: var(--wide); margin: 0 auto; text-align: left; }
.next-cover { width: 9.5rem; border-radius: 2px; box-shadow: 0 20px 40px -14px rgba(0,0,0,.8); }
@media (max-width: 560px) { .next-inner { flex-direction: column; text-align: center; gap: 1.25rem; } }
.next-cover-link, .hero-cover-link { display: block; cursor: zoom-in; border-radius: 3px; }
.hero-cover { transition: transform .2s ease; }
.hero-cover-link:hover .hero-cover { transform: scale(1.03); }
.next-cover-link:hover .next-cover { transform: scale(1.03); }
.next-cover { transition: transform .2s ease; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6,13,21,.97); display: grid; place-items: center; padding: 1.5rem; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: calc(100vw - 3rem); max-height: calc(100vh - 3rem); width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.8); border-radius: 3px; cursor: default; }
.lightbox-close { position: absolute; top: .75rem; right: 1rem; font-size: 2.5rem; line-height: 1; color: var(--bone); background: none; border: 0; cursor: pointer; padding: .25rem .5rem; }
body.lb-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .next-cover { transition: none; } }
.next .when { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3.5vw, 2rem); }

/* Stories: two covers, different calls to action */
.stories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 2.5rem;
}
.story { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.story img { border-radius: 2px; box-shadow: 0 16px 30px -12px rgba(0,0,0,.7); }
.story h3 { margin-bottom: .25rem; }
.story .when { font-size: .95rem; color: var(--holo); margin-bottom: .6rem; }
.story p { font-size: 1.02rem; }

/* Doorways to the world pages */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-top: 2rem; }
.door {
  display: block;
  text-decoration: none;
  color: var(--bone);
  border-left: 3px solid var(--mesa);
  padding: .25rem 0 .25rem 1.25rem;
}
.door h3 { color: var(--bone); }
.door p { color: var(--dust); margin: 0; font-size: 1.02rem; }
.door:hover h3 { color: var(--amber); }

/* Character sheet */
.sheet {
  margin: 2rem auto 0;
  max-width: 60rem;
}
.sheet img { border-radius: 3px; box-shadow: 0 0 0 1px rgba(238,227,206,.1); }
.sheet figcaption { margin-top: .75rem; font-size: .95rem; color: var(--dust); text-align: center; }
.sheet figcaption strong { color: var(--bone); font-family: var(--display); font-weight: 600; }
.sheet + .sheet { margin-top: 3.5rem; }
.sheet-wide { max-width: var(--wide); }
.author-note {
  margin: 1.5rem 0 3rem;
  padding: 1.75rem 2rem;
  border-left: 3px solid var(--amber);
  background: rgba(20,41,62,.55);
  font-style: italic;
}
.author-note h2 { font-style: normal; font-size: 1.5rem; color: var(--amber); margin-top: 0; }
.author-note p:last-child { margin-bottom: 0; }
.gallery-head { margin-top: 1rem; margin-bottom: .25rem; }
.cast-head { margin: 3.5rem 0 1.25rem; padding-bottom: .5rem; border-bottom: 1px solid var(--sky-line); }

.coming-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.coming-list li { padding: .5rem 0; border-bottom: 1px solid var(--sky-line); color: var(--dust); }
.coming-list li strong { color: var(--bone); font-family: var(--display); font-weight: 600; }

/* History page */
.contact-form { display: grid; gap: .4rem; margin: 2rem 0 1rem; }
.contact-form label { font-family: var(--display); font-weight: 600; margin-top: .75rem; }
.contact-form input, .contact-form textarea {
  font: inherit; font-size: 1.05rem; color: var(--bone);
  background: rgba(12,26,41,.7); border: 1px solid var(--sky-line); border-radius: 3px;
  padding: .7rem .85rem; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--holo); outline-offset: 1px; border-color: transparent; }
.contact-form textarea { resize: vertical; }
.contact-form .button { justify-self: start; margin-top: 1.25rem; cursor: pointer; }
.contact-form .button:disabled { opacity: .6; cursor: wait; }
.botcheck { display: none; }
.form-status { margin: .5rem 0 0; min-height: 1.5em; }
.form-status.ok { color: var(--holo); }
.form-status.err { color: var(--amber); }
.note {
  border: 1px solid var(--sky-line);
  border-left: 3px solid var(--holo);
  padding: 1rem 1.25rem;
  margin: 0 0 2.5rem;
  font-size: 1rem;
  color: var(--dust);
}
.people dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--amber);
  margin-top: 2rem;
}
.people dd { margin: .35rem 0 0; }
.people dd p:last-child { margin-bottom: 0; }

/* About */
.about { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; max-width: 56rem; margin: 0 auto; }
.portrait-placeholder {
  aspect-ratio: 4 / 5;
  border: 1px dashed var(--dust);
  display: grid; place-items: center;
  text-align: center;
  padding: 1rem;
  color: var(--dust);
  font-size: .95rem;
}

.portrait { border-radius: 3px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.7); }

/* Footer */
.footer {
  border-top: 1px solid var(--sky-line);
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
  color: var(--dust);
  font-size: .95rem;
}
.footer p { margin: .25rem 0; }
.footer .imprint { width: 11rem; margin: 0 auto 1.25rem; }
.footer a { color: var(--dust); }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .section { padding: 3rem 1rem; }
  .feature { grid-template-columns: 1fr; }
  .feature .cover { max-width: 18rem; margin: 0 auto; }
  .stories, .doors { grid-template-columns: 1fr; }
  .story { grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; }
  .about { grid-template-columns: 1fr; }
  .about .portrait-placeholder, .about img { max-width: 14rem; }
  .masthead img { aspect-ratio: 16 / 10; }
  .topbar { justify-content: center; padding-top: .6rem; }
  .topbar .nav ul { justify-content: center; }
  .hero-bg, .hero::before { height: auto; aspect-ratio: 16 / 9; }
  .hero-bg { object-position: 88% center; }
  .hero-inner { grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; margin-top: -4.5rem; padding: 0 1rem 1rem; align-items: start; }
  .hero-copy { padding-top: 5rem; }
  .hero .series { font-size: .95rem; }
  .hero-title { font-size: 1.75rem; }
  .hero .hook { font-size: 1.05rem; }
  .masthead-title { position: static; padding: .75rem 1rem 1.25rem; background: none; }
  .nav ul { gap: 0 1.1rem; }
  .nav a { font-size: 1rem; padding: .65rem 0; }
}

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