/* ==========================================================================
   Jerry Shields — Author Site
   Design system: warm daylight paper tones, companion-not-twin to
   natedischer.com. Amber is the one connective thread between the two
   sites; everything else inverts the value scale (dark ops file -> warm
   human paper).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Color tokens */
  --paper:      #F4EFE3;   /* warm parchment base */
  --paper-dim:  #ECE4D2;   /* recessed panels */
  --ink:        #221E17;   /* warm near-black, not pure black */
  --ink-soft:   #59503F;   /* secondary text */
  --slate:      #3C4A52;   /* dusty storm-blue, structural */
  --amber:      #B97A34;   /* burnished amber — the thread back to Nate's site */
  --amber-deep: #8F5C24;
  --pine:       #435548;   /* muted storm-green, sparing accent */
  --rule:       #D9CCAE;   /* hairline on paper */
  --rule-soft:  #E4DAC3;

  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  'IBM Plex Mono', 'DejaVu Sans Mono', monospace;

  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

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

/* Reduced motion respected globally */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------
   Signature element: the horizon band.
   A thin gradient line beneath the header that shifts hue per page —
   a small system tying "time of day / weather" to where you are on
   the site. Dawn on Home, high daylight on Books, late-afternoon amber
   on About, dusk-slate on News. Subtle, not a hero graphic.
   -------------------------------------------------------------------- */
.horizon {
  height: 4px;
  width: 100%;
}
.horizon--dawn   { background: linear-gradient(90deg, #6E7A6A 0%, #C9A15B 45%, #E7C77D 100%); }
.horizon--day    { background: linear-gradient(90deg, #7C8B96 0%, #B97A34 55%, #DDB877 100%); }
.horizon--amber  { background: linear-gradient(90deg, #435548 0%, #8F5C24 50%, #B97A34 100%); }
.horizon--dusk   { background: linear-gradient(90deg, #2C3438 0%, #59503F 50%, #8F5C24 100%); }

/* --------------------------------------------------------------------
   Header / Nav
   -------------------------------------------------------------------- */
header.site {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: var(--max);
  margin: 0 auto;
}

.logotype {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}
.logotype em {
  font-style: italic;
  color: var(--amber-deep);
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--amber-deep);
  border-color: var(--amber);
}
.nav-links a.current {
  color: var(--ink);
  border-color: var(--ink);
}

.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--rule);
    z-index: 20;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 16px 32px;
    border-bottom: 1px solid var(--rule-soft);
    width: 100%;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--rule);
    border-radius: 3px;
    padding: 8px 12px;
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--ink);
    cursor: pointer;
  }
  header.site { position: relative; }
}

/* --------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 2px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--amber-deep); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--ink);
  color: var(--paper);
}
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* --------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------- */
.hero {
  padding: 88px 0 76px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pine);
  margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: italic;
  color: var(--amber-deep);
}
.hero p.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-portrait {
  position: relative;
}
.hero-portrait img {
  width: 100%;
  border-radius: 3px;
  filter: sepia(6%) saturate(92%);
}
.hero-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--rule);
  border-radius: 3px;
  transform: translate(14px, 14px);
  z-index: -1;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 380px; }
}

/* --------------------------------------------------------------------
   Sections / Cards
   -------------------------------------------------------------------- */
section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.section-divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  margin: 0;
}
.section-head .tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.book-feature {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 52px;
  align-items: start;
  background: var(--paper-dim);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 40px;
}
.book-feature img {
  border-radius: 3px;
  box-shadow: 0 18px 40px -18px rgba(34, 30, 23, 0.35);
}
.book-feature .status {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
  border: 1px solid var(--pine);
  border-radius: 2px;
  padding: 5px 10px;
  margin-bottom: 16px;
}
.book-feature h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.1rem;
  margin: 0 0 6px;
}
.book-feature .series-tag {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.book-feature p.blurb {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.book-feature p.blurb em { font-style: italic; color: var(--ink); }

@media (max-width: 760px) {
  .book-feature { grid-template-columns: 1fr; padding: 28px; }
  .book-feature img { max-width: 260px; margin: 0 auto; }
}

/* Roadmap / timeline (order-agnostic, so no numbered markers —
   presented as a horizon list instead, matching the site's own motif) */
.roadmap {
  border-left: 2px solid var(--rule);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.roadmap-item {
  position: relative;
}
.roadmap-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
}
.roadmap-item.is-live::before { background: var(--pine); }
.roadmap-item h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 4px;
}
.roadmap-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.roadmap-item .status-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
}

/* Bio / About */
.bio-columns {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
}
.bio-columns .portrait-sticky { position: sticky; top: 32px; align-self: start; }
.bio-columns .portrait-sticky img {
  border-radius: 3px;
  filter: sepia(6%) saturate(92%);
}
.bio-text p {
  margin: 0 0 22px;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.bio-text p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 3.4rem;
  font-weight: 500;
  color: var(--amber-deep);
  float: left;
  line-height: 0.8;
  padding: 6px 10px 0 0;
}

.pullquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--ink);
  border-left: 3px solid var(--amber);
  padding-left: 26px;
  margin: 36px 0;
}

@media (max-width: 820px) {
  .bio-columns { grid-template-columns: 1fr; }
  .bio-columns .portrait-sticky { position: static; max-width: 260px; }
}

/* Newsletter */
.newsletter {
  background: var(--slate);
  color: var(--paper);
  border-radius: 4px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.newsletter h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.8rem;
  margin: 0 0 12px;
}
.newsletter p { color: #C9D0D3; margin: 0; }
.newsletter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 180px;
  padding: 13px 16px;
  border-radius: 2px;
  border: 1px solid #5C6B72;
  background: #2E3A40;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.95rem;
}
.newsletter-form input[type="email"]::placeholder { color: #8FA0A6; }
.newsletter-form input[type="email"]:focus-visible,
.newsletter-form button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.newsletter-note {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #8FA0A6;
  margin-top: 10px;
}
@media (max-width: 760px) {
  .newsletter { grid-template-columns: 1fr; padding: 32px; }
}

/* --------------------------------------------------------------------
   Newsletter embed (Kit) — Kit's own inline <style> block was removed
   from the embed markup so it can't fight the site's design; these
   rules fully restyle the form to match the newsletter panel.
   -------------------------------------------------------------------- */
.newsletter-embed .formkit-form { width: 100%; max-width: none; }
.newsletter-embed [data-style="clean"] { width: 100%; }
.newsletter-embed .formkit-alert { display: none; }
.newsletter-embed .formkit-alert:not(:empty) {
  display: block;
  background: rgba(185, 122, 52, 0.15);
  border: 1px solid var(--amber);
  color: var(--paper);
  border-radius: 2px;
  padding: 10px 14px;
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 0.9rem;
  list-style: none;
}
.newsletter-embed .formkit-fields {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}
.newsletter-embed .formkit-field { flex: 1 1 220px; margin: 0; }
.newsletter-embed .formkit-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 2px;
  border: 1px solid #5C6B72;
  background: #2E3A40;
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.4;
}
.newsletter-embed .formkit-input::placeholder { color: #8FA0A6; }
.newsletter-embed .formkit-input:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
  border-color: var(--amber);
}
.newsletter-embed .formkit-submit {
  flex: 0 0 auto;
  margin: 0;
  border: none;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.15s ease;
}
.newsletter-embed .formkit-submit > span { display: block; padding: 13px 26px; }
.newsletter-embed .formkit-submit:hover,
.newsletter-embed .formkit-submit:focus-visible { background: var(--amber-deep); }
.newsletter-embed .formkit-submit:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.newsletter-embed .formkit-spinner { display: none; }
.newsletter-embed .formkit-powered-by-convertkit-container {
  margin: 10px 0 0;
  opacity: 0.6;
}
.newsletter-embed .formkit-powered-by-convertkit {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #8FA0A6;
  text-decoration: none;
}
.newsletter-embed .formkit-powered-by-convertkit:hover { color: var(--paper); }

/* News / empty state */
.empty-state {
  border: 1px dashed var(--rule);
  border-radius: 4px;
  padding: 56px 40px;
  text-align: center;
}
.empty-state .eyebrow { justify-content: center; }
.empty-state h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0 0 12px;
}
.empty-state p {
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-card {
  background: var(--paper-dim);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 32px;
}
.contact-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 0 10px;
}
.contact-card p { color: var(--ink-soft); margin: 0 0 16px; }
.contact-card a.email {
  font-family: var(--mono);
  color: var(--amber-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--amber);
}
@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
footer.site {
  border-top: 1px solid var(--rule);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-grid .logotype { font-size: 1.15rem; }
.footer-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-links a { text-decoration: none; color: var(--ink-soft); }
.footer-links a:hover { color: var(--amber-deep); }
.footer-fine {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-top: 20px;
}
