/* ===========================================================
   Joel Oslund — author site
   Shared styles for index / stories / contact
   =========================================================== */

:root {
  --ink:        #16140f;   /* near-black text         */
  --ink-soft:   #4a463d;   /* secondary text          */
  --paper:      #faf7f1;   /* warm page background     */
  --paper-2:    #f1ece2;   /* slightly deeper panel    */
  --line:       #e3dccd;   /* hairline borders         */
  --accent:     #8a5a2b;   /* warm bark brown         */
  --accent-dk:  #6e4621;
  --gold:       #b08a4a;   /* warm gold accent        */
  --dark:       #1b1814;   /* dark blocks / bars      */
  --dark-2:     #25211b;
  --white:      #ffffff;
  --radius:     22px;
  --radius-sm:  14px;
  --maxw:       1180px;
  --shadow:     0 18px 40px -22px rgba(20,16,8,.45);
  --serif:      "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans:       "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -.5px; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
a  { color: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 14px;
}

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--dark);
  color: #cfc6b4;
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.announce .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  gap: 16px;
}
.announce a.newsletter { color: #cfc6b4; text-decoration: none; font-weight: 600; }
.announce a.newsletter:hover { color: #fff; }
.socials { display: flex; gap: 16px; align-items: center; }
.socials a { color: #b7ad9a; display: inline-flex; transition: color .2s, transform .2s; }
.socials a:hover { color: #fff; transform: translateY(-1px); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }
.socials--aside { gap: 18px; }
.socials--aside a { color: var(--ink-soft); }
.socials--aside a:hover { color: var(--ink); }
.socials--aside svg { width: 20px; height: 20px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,241,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 78px; gap: 24px;
}
.brand img { height: 40px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  text-decoration: none;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 0;
  position: relative;
}
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent);
}
.nav a.btn { padding: 10px 20px; color: #fff; }
.nav a.btn:hover { color: #fff; }

/* mobile nav toggle */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  padding: 14px 30px;
  border-radius: 999px;
  border: 0; cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--accent-dk); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.light { background: #fff; color: var(--ink); }
.btn.light:hover { background: var(--paper-2); }

/* ---------- Section scaffolding ---------- */
section { padding: 76px 0; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--ink-soft); margin: 0; }

/* ---------- HERO (full-width rounded block) ---------- */
.hero { padding: 40px 0 0; }
.hero-block {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  /* green gradient (matched to hero-bg.jpg foliage) over the photo, fading
     to the right so the cut-out + leaves show through */
  background-image:
    linear-gradient(100deg,
      rgba(13,31,16,.96) 0%,
      rgba(20,44,24,.90) 36%,
      rgba(28,60,33,.58) 64%,
      rgba(28,60,33,.14) 100%),
    url("Kezzog_bg.jpg");
  background-size: cover;
  background-position: center;
  color: #f3f7ef;
  min-height: 480px;
  display: flex; flex-wrap: wrap; align-items: stretch;
  box-shadow: var(--shadow);
}
.hero-block::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 16% 26%, rgba(150,200,110,.16), transparent 55%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  flex: 1 1 440px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px clamp(28px, 6vw, 72px); max-width: 640px;
}
.hero-inner .eyebrow { color: #d7ebb8; }
.hero-inner h1 { color: #fff; }
.hero-inner p { font-size: 1.1rem; color: #e4efdc; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero-media {
  position: relative; z-index: 2;
  flex: 0 1 400px;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 clamp(10px, 3vw, 28px);
}
.hero-media img {
  display: block; width: auto; max-width: 100%; max-height: 540px;
  filter: drop-shadow(0 16px 26px rgba(0,0,0,.38));
}
@media (max-width: 860px) {
  .hero-inner { flex-basis: 100%; padding-bottom: 28px; }
  .hero-media { flex-basis: 100%; align-items: flex-end; padding-bottom: 0; }
  .hero-media img { max-height: 380px; }
}

/* ---------- Progress / "Joel's Progress" ---------- */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.ring-card { text-align: center; }
.ring { position: relative; width: 132px; height: 132px; margin: 0 auto 16px; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring .track { fill: none; stroke: var(--paper-2); stroke-width: 11; }
.ring .bar {
  fill: none; stroke: var(--accent); stroke-width: 11; stroke-linecap: round;
  stroke-dasharray: var(--circ); stroke-dashoffset: var(--circ);
  transition: stroke-dashoffset 1.4s cubic-bezier(.2,.8,.2,1);
}
.ring .pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600;
}
.ring-card .label { font-weight: 600; font-size: .92rem; }
.ring-card .sub { color: var(--ink-soft); font-size: .8rem; }

/* ---------- Two-column / half-width rounded blocks ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.panel {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 360px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 40px;
  color: #fff;
  position: relative;
}
.panel.dark   { background: linear-gradient(160deg, #211d17, #322a20); }
.panel.crimson{ background: linear-gradient(160deg, #5e3a18, #8a5a2b); }
.panel.paper  { background: var(--paper-2); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.panel h2 { color: inherit; }
.panel p  { opacity: .9; margin: 0 0 22px; max-width: 38ch; }

/* feature row (image + text) */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-radius: var(--radius); overflow: hidden;
  background: var(--dark); color: #f1e9d8; box-shadow: var(--shadow);
}
.feature .media {
  background: linear-gradient(135deg, #3a2f1f, #1d1813);
  min-height: 340px; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.2rem; color: #b08a4a; text-align: center; padding: 30px;
}
.feature .body { padding: clamp(30px, 5vw, 56px); }
.feature .body h2 { color: #fff; }
.feature .body p { color: #cdc2ad; }

/* ---------- Book / story grid ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s, box-shadow .25s, opacity .6s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card .cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(150deg, var(--c1, #3a2f1f), var(--c2, #1d1813));
  display: flex; align-items: center; justify-content: center;
  color: #e9dcc2; font-family: var(--serif); font-size: 1.3rem; text-align: center; padding: 24px;
}
.card .cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.card .card-body { padding: 22px 24px 26px; }
.card .tag {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
}
.card h3 { margin: 8px 0 6px; font-size: 1.25rem; }
.card p { color: var(--ink-soft); font-size: .92rem; margin: 0 0 14px; }
.card .read {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .12em;
  font-weight: 700; color: var(--ink); text-decoration: none;
}
.card .read:hover { color: var(--accent); }

/* status pill */
.pill {
  display: inline-block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.pill.out   { background: #e7f0e7; color: #2f6b3a; }
.pill.soon  { background: #f6e9c9; color: #8a6a16; }
.pill.draft { background: var(--paper-2); color: var(--ink-soft); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 44px; align-items: start; }
.about-portrait {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: linear-gradient(160deg, #2a2218, #1a1610);
  aspect-ratio: 4 / 5;
  position: sticky; top: 100px;
}
.about-portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block;
}
.prose p { color: var(--ink-soft); margin: 0 0 1.1em; font-size: 1.05rem; }
.prose .lead { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); line-height: 1.5; }
.prose a { color: var(--accent); font-weight: 600; }
.about-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }
.about-facts span {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: .82rem; font-weight: 600; color: var(--ink-soft);
}
.divider { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { position: static; aspect-ratio: 4 / 5; max-width: 420px; margin: 0 auto; }
}

/* ---------- Page header (stories / contact) ---------- */
.page-head { padding: 64px 0 10px; text-align: center; }
.page-head .eyebrow { display: block; }
.page-head p { color: var(--ink-soft); max-width: 620px; margin: 0 auto; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 7px; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field textarea { min-height: 150px; resize: vertical; }
.contact-aside { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.contact-aside h3 { font-size: 1.1rem; }
.contact-aside ul { list-style: none; padding: 0; margin: 0; }
.contact-aside li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-aside li:last-child { border-bottom: 0; }
.contact-aside a { color: var(--accent); text-decoration: none; font-weight: 600; }
.form-note { font-size: .82rem; color: var(--ink-soft); margin-top: 4px; }

/* ---------- Newsletter strip (full-width rounded) ---------- */
.cta-strip {
  border-radius: var(--radius);
  background: linear-gradient(120deg, #5e3a18, #8a5a2b);
  color: #fff; padding: clamp(40px, 6vw, 64px); text-align: center;
  box-shadow: var(--shadow);
}
.cta-strip h2 { color: #fff; }
.cta-strip p { opacity: .92; max-width: 520px; margin: 0 auto 24px; }
.cta-form { display: flex; gap: 10px; max-width: 560px; margin: 0 auto; }
.cta-form input { flex: 1; padding: 14px 18px; border: 0; border-radius: 999px; font: inherit; }
.cta-form input:focus { outline: 3px solid rgba(255,255,255,.5); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #b7ad9a; padding: 54px 0 30px; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: center; }
.site-footer img { height: 34px; }
.site-footer .socials a { color: #b7ad9a; }
.site-footer .socials a:hover { color: #fff; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a { color: #b7ad9a; text-decoration: none; font-size: .85rem; letter-spacing: .06em; }
.foot-links a:hover { color: #fff; }
.copyright { width: 100%; text-align: center; font-size: .76rem; color: #7d7565; margin-top: 26px;
  border-top: 1px solid #322d25; padding-top: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .progress-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
  .duo, .feature, .contact-grid, .cards { grid-template-columns: 1fr; }
  .feature .media { min-height: 240px; }
}
@media (max-width: 680px) {
  .announce { font-size: .68rem; }
  .announce .newsletter { display: none; }
  .announce .wrap { justify-content: center; }
  .nav {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 24px 18px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; }
  .nav-toggle { display: block; }
  .cards { grid-template-columns: 1fr; }
  .cta-form { flex-direction: column; }
  .cta-form .btn { width: 100%; }
}

/* ---------- Scroll reveal (fade-in / up) ----------
   Only active when JS sets .js-reveal (so no-JS users see everything), and
   disabled entirely for visitors who prefer reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .page-head,
  .js-reveal .section-head,
  .js-reveal .hero-block,
  .js-reveal .feature,
  .js-reveal .cta-strip,
  .js-reveal .ring-card,
  .js-reveal .duo .panel,
  .js-reveal .about-portrait,
  .js-reveal .prose,
  .js-reveal .contact-grid > * {
    transition: opacity .7s ease, transform .7s ease;
  }
  .js-reveal .page-head:not(.is-visible),
  .js-reveal .section-head:not(.is-visible),
  .js-reveal .hero-block:not(.is-visible),
  .js-reveal .feature:not(.is-visible),
  .js-reveal .cta-strip:not(.is-visible),
  .js-reveal .ring-card:not(.is-visible),
  .js-reveal .duo .panel:not(.is-visible),
  .js-reveal .about-portrait:not(.is-visible),
  .js-reveal .prose:not(.is-visible),
  .js-reveal .contact-grid > *:not(.is-visible) {
    opacity: 0;
    transform: translateY(26px);
  }
  /* Cards fade only (keeps their hover-lift transform free). */
  .js-reveal .cards .card:not(.is-visible) { opacity: 0; }
}
