/* ==========================================================
   Kirk Johnson — Author Website
   Palette: desert night. Inspired by the book covers.
   ========================================================== */

:root {
  --ink:        #17120e;   /* page background — warm near-black   */
  --card:       #241c15;   /* panels and book cards               */
  --line:       #3a2f24;   /* hairline borders                    */
  --paper:      #f0e6d6;   /* main text — sun-bleached paper      */
  --dust:       #a8977f;   /* secondary text                      */
  --title-red:  #e8402c;   /* the red of the cover titles         */
  --copper:     #cf7a3a;   /* canyon-sunset accent                */
  --max-width:  1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.06rem;
  line-height: 1.7;
}

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

a { color: var(--copper); }
a:hover { color: var(--paper); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Header / navigation ---------- */

header {
  border-bottom: 1px solid var(--line);
  background: rgba(23, 18, 14, 0.94);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  flex-wrap: wrap;
}

.brand {
  font-family: "Alfa Slab One", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
  line-height: 1;
}

.brand span { color: var(--title-red); }

nav ul {
  display: flex;
  gap: 26px;
  list-style: none;
  flex-wrap: wrap;
}

nav a {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

nav a:hover { color: var(--paper); }

nav a.active {
  color: var(--paper);
  border-bottom-color: var(--title-red);
}

/* ---------- Hero ---------- */

.hero {
  padding: 84px 0 70px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 90% 70% at 70% 0%,
      rgba(207, 122, 58, 0.16), transparent 60%);
}

.eyebrow {
  font-family: "Barlow Condensed", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.95rem;
  color: var(--copper);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: "Alfa Slab One", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.08;
  max-width: 18ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--title-red);
}

.hero p.lede {
  margin-top: 22px;
  max-width: 56ch;
  color: var(--dust);
  font-size: 1.15rem;
}

.btn-row { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: "Barlow Condensed", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 3px;
  border: 1px solid var(--title-red);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn.solid { background: var(--title-red); color: #fff; }
.btn.solid:hover { background: #c53522; color: #fff; }

.btn.ghost { color: var(--paper); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--copper); color: var(--copper); }

/* ---------- Sections ---------- */

.section { padding: 70px 0; }

.section + .section { border-top: 1px solid var(--line); }

h2.section-title {
  font-family: "Alfa Slab One", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--dust);
  margin-bottom: 40px;
  max-width: 60ch;
}

/* ---------- Book shelf ---------- */

.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 34px;
}

.book {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.book .cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #100c09;
}

.book .cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.book:hover .cover img { transform: scale(1.03); }

.book .info { padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.book h3 {
  font-family: "Alfa Slab One", Georgia, serif;
  font-weight: 400;
  font-size: 1.12rem;
  line-height: 1.3;
}

.genre {
  font-family: "Barlow Condensed", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.85rem;
  color: var(--copper);
}

.book p { color: var(--dust); font-size: 0.98rem; flex: 1; }

.book .btn { align-self: flex-start; padding: 10px 20px; font-size: 0.95rem; }

/* ---------- Free-chapter stamp ---------- */

.stamp {
  display: inline-block;
  font-family: "Barlow Condensed", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  color: var(--title-red);
  border: 2px solid var(--title-red);
  border-radius: 3px;
  padding: 5px 12px;
  transform: rotate(-2deg);
  margin-bottom: 20px;
}

/* ---------- Forms ---------- */

form { max-width: 560px; }

.field { margin-bottom: 22px; }

label {
  display: block;
  font-family: "Barlow Condensed", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  color: var(--dust);
  margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--paper);
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--copper);
  outline-offset: 1px;
  border-color: var(--copper);
}

textarea { min-height: 150px; resize: vertical; }

button.btn { cursor: pointer; background: var(--title-red); color: #fff; border: none; }
button.btn:hover { background: #c53522; }

/* ---------- Two-column about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 50px;
  align-items: start;
}

.about-grid .portrait {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.about-copy p + p { margin-top: 18px; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 50px;
  color: var(--dust);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

footer a { color: var(--dust); }
footer a:hover { color: var(--paper); }

/* ---------- Accessibility ---------- */

:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .book .cover img { transition: none; }
}
