/* ==========================================================================
   April Kelly Editing — design system
   Tokens lifted directly from aprilannekelly.com so the two sites read as
   one brand. Do not change these values in isolation; change them in both
   places or the family resemblance breaks.
   ========================================================================== */

:root{
  --cream:#FBF4EA;
  --cream-2:#f3e9d8;
  --navy:#1E2A38;
  --gold:#A6864E;
  --gold-soft:#c4a86f;
  --charcoal:#2B2A27;
  --line:rgba(43,42,39,.14);
  --line-light:rgba(251,244,234,.18);
  --display:'Playfair Display', Georgia, serif;
  --body:'Mulish', system-ui, sans-serif;
  --script:'Pinyon Script', cursive;
  --wrap:1120px;
}

*,*::before,*::after{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:var(--body);
  font-size:16px;
  line-height:1.65;
  color:var(--charcoal);
  background:var(--cream);
  -webkit-font-smoothing:antialiased;
}

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

a{color:var(--navy);text-decoration:none}
a:hover{color:var(--gold)}

/* ---------- layout ---------- */

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

.sec{padding:88px 0}
.sec.tight{padding:64px 0}

.sec.navy{background:var(--navy);color:var(--cream)}
.sec.navy h1,.sec.navy h2,.sec.navy h3{color:var(--cream)}
.sec.navy a{color:var(--cream)}
.sec.navy a:hover{color:var(--gold-soft)}

.sec.cream2{background:var(--cream-2)}

.center{text-align:center}
.measure{max-width:680px}
.measure.center{margin-left:auto;margin-right:auto}

/* ---------- type ---------- */

h1,h2,h3,h4{font-family:var(--display);color:var(--navy);margin:0 0 .5em}

h1{font-size:clamp(2.6rem,6vw,4.4rem);font-weight:700;letter-spacing:-.01em;line-height:1.05}
h2{font-size:clamp(1.9rem,3.6vw,2.7rem);font-weight:700;line-height:1.2}
h3{font-size:1.3rem;font-weight:700;line-height:1.3}
h4{font-size:1.05rem;font-weight:700;line-height:1.35}

p{margin:0 0 1.1em}
p:last-child{margin-bottom:0}

.eyebrow{
  font-family:var(--script);
  font-size:1.95rem;
  color:var(--gold);
  line-height:1;
  margin:0 0 .35em;
  display:block;
}
.sec.navy .eyebrow{color:var(--gold-soft)}

.lead{font-size:1.12rem;line-height:1.75}

.rule{
  width:56px;height:1px;background:var(--gold);
  border:0;margin:28px 0;
}
.center .rule,.rule.center{margin-left:auto;margin-right:auto}

.small{font-size:.9rem}
.muted{opacity:.72}

/* ---------- buttons ---------- */

.btn{
  display:inline-block;
  font-family:var(--body);
  font-size:.84rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--cream);
  background:var(--navy);
  padding:17px 38px;
  border:1px solid var(--navy);
  border-radius:2px;
  cursor:pointer;
  transition:background .25s ease,color .25s ease,border-color .25s ease;
}
.btn:hover{background:var(--gold);border-color:var(--gold);color:var(--cream)}

.btn.ghost{background:transparent;color:var(--navy)}
.btn.ghost:hover{background:var(--navy);color:var(--cream)}

.sec.navy .btn{background:var(--cream);color:var(--navy);border-color:var(--cream)}
.sec.navy .btn:hover{background:var(--gold);border-color:var(--gold);color:var(--cream)}
.sec.navy .btn.ghost{background:transparent;color:var(--cream);border-color:var(--line-light)}
.sec.navy .btn.ghost:hover{background:var(--cream);color:var(--navy);border-color:var(--cream)}

/* ---------- header ---------- */

.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(251,244,234,.94);
  backdrop-filter:saturate(140%) blur(8px);
  border-bottom:1px solid var(--line);
}
.site-header .wrap{
  display:flex;align-items:center;justify-content:space-between;
  gap:24px;min-height:78px;
}

.wordmark{
  font-family:var(--display);
  font-size:1.35rem;font-weight:700;color:var(--navy);
  letter-spacing:-.01em;white-space:nowrap;
}
.wordmark .dot{color:var(--gold)}

.site-nav{display:flex;align-items:center;gap:26px}
.site-nav a{
  font-size:.78rem;font-weight:600;letter-spacing:.13em;
  text-transform:uppercase;color:var(--charcoal);
  padding:6px 0;border-bottom:1px solid transparent;
}
.site-nav a:hover{color:var(--navy);border-bottom-color:var(--gold)}
.site-nav a[aria-current="page"]{color:var(--navy);border-bottom-color:var(--gold)}
.site-nav a.btn{
  font-size:.74rem;padding:13px 24px;
  color:var(--cream);border:1px solid var(--navy);
}
.site-nav a.btn:hover{background:var(--gold);border-color:var(--gold);color:var(--cream)}

.nav-toggle{
  display:none;background:none;border:0;cursor:pointer;
  font-size:.78rem;letter-spacing:.13em;text-transform:uppercase;
  font-family:var(--body);font-weight:700;color:var(--navy);padding:10px 0;
}

/* ---------- hero ---------- */

.hero{padding:104px 0 88px;text-align:center}
.hero .lead{max-width:600px;margin:0 auto 34px}
.hero .lead:last-child{margin-bottom:0}
/* Inner pages have no hero CTA, so they need less air underneath. */
.hero.compact{padding:96px 0 24px}

/* ---------- grids ---------- */

.grid{display:grid;gap:28px}
.grid.two{grid-template-columns:repeat(2,1fr)}
.grid.three{grid-template-columns:repeat(3,1fr)}
.grid.four{grid-template-columns:repeat(4,1fr)}

.split{
  display:grid;grid-template-columns:1fr 1fr;
  gap:64px;align-items:center;
}

/* ---------- cards ---------- */

.card{
  background:var(--cream);
  border:1px solid var(--line);
  border-radius:2px;
  padding:34px 30px;
  display:flex;flex-direction:column;
}
.sec.cream2 .card{background:var(--cream)}
.sec.navy .card{background:transparent;border-color:var(--line-light)}

.card .price{
  font-family:var(--display);
  font-size:1.45rem;color:var(--gold);
  margin:0 0 4px;
}
.card .price-note{font-size:.82rem;letter-spacing:.04em;opacity:.7;margin:0 0 18px}

.card ul{margin:0 0 22px;padding:0 0 0 1.1em}
.card li{margin-bottom:.5em}

.card .card-foot{margin-top:auto;padding-top:6px}

/* numbered process steps */
.step .num{
  font-family:var(--display);
  font-size:2.4rem;line-height:1;color:var(--gold);
  display:block;margin-bottom:10px;
}

/* ---------- testimonials ---------- */

.quote{
  border-left:2px solid var(--gold);
  padding:4px 0 4px 26px;
}
.quote p{font-size:1.05rem;line-height:1.75}
.quote cite{
  display:block;margin-top:14px;font-style:normal;
  font-size:.78rem;letter-spacing:.13em;text-transform:uppercase;
  color:var(--gold);
}
.quote cite .meta{
  display:block;margin-top:5px;
  letter-spacing:.08em;text-transform:none;
  color:var(--charcoal);opacity:.6;font-size:.8rem;
}
.sec.navy .quote cite .meta{color:var(--cream);opacity:.55}

/* Masonry-ish flow so a long review and a two-line one can sit together
   without leaving a crater between rows. */
.quote-columns{column-count:2;column-gap:44px}
.quote-columns .quote{
  break-inside:avoid;
  margin:0 0 34px;
  display:inline-block;width:100%;
}

@media (max-width:820px){
  .quote-columns{column-count:1}
}

/* ---------- book covers ---------- */

.covers{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:30px;
}
/* Homepage strip: six covers, one clean row. */
.covers.strip{grid-template-columns:repeat(6,1fr);gap:24px}
.cover{
  position:relative;
  aspect-ratio:2/3;
  background:var(--navy);
  border-radius:2px;
  overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 26px rgba(43,42,39,.16);
}
/* Fallback shown when a cover image is missing. The <img> sits on top and
   covers it once the file exists in /images/. */
.cover .fallback{
  font-family:var(--display);
  color:var(--cream);
  font-size:1.05rem;line-height:1.3;
  text-align:center;padding:22px;
}
.cover .fallback span{
  display:block;margin-top:10px;
  font-family:var(--body);font-size:.7rem;letter-spacing:.14em;
  text-transform:uppercase;color:var(--gold-soft);
}
/* `contain`, not `cover`: book covers are not all exactly 2:3, and cropping a
   cover clips the title or the byline, which is the one thing that must not
   happen on a credits page. Off-ratio art gets thin navy bars instead, which
   match the card behind it. Anything at 2:3 fills the box exactly. */
.cover img{
  position:absolute;inset:0;
  width:100%;height:100%;object-fit:contain;
}
.cover-caption{
  margin-top:12px;font-size:.85rem;line-height:1.4;
}
.cover-caption strong{display:block;font-weight:700;color:var(--navy)}
.cover-caption span{opacity:.7}

/* ---------- goodreads shelf ---------- */

/* Goodreads ships this widget with a floated 39x60 grid and an <h2> of its
   own. We drop its inline <style> and restyle the markup its script injects,
   so the JS version and the static fallback look the same. align-items:end
   sits the spines on one baseline, which is what makes it read as a shelf
   rather than a pile. */

.shelf{margin:26px 0 16px}
.shelf h2{display:none}
.shelf .gr_grid_container{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(52px,1fr));
  gap:18px 14px;
  align-items:end;
}
.shelf .gr_grid_book_container{
  float:none;width:auto;height:auto;padding:0;overflow:visible;
}
.shelf .gr_grid_book_container img{
  width:100%;height:auto;border-radius:2px;
  box-shadow:0 6px 16px rgba(43,42,39,.2);
}
/* The snippet uses <br style="clear:both"> to escape its own floats. */
.shelf br{display:none}
/* Goodreads sets these inline, so they need the hammer. */
.shelf .gr_grid_branding{
  float:none !important;clear:none !important;
  /* It is a child of the grid container, so without this it gets squeezed
     into one 52px column and wraps one word per line. */
  grid-column:1 / -1;
  display:inline-block;margin-top:16px;
  font-size:.8rem !important;color:var(--gold) !important;
  text-decoration:none;
}
.shelf .gr_grid_branding:hover{text-decoration:underline}
.shelf noscript{display:block;margin-top:12px;font-size:.85rem;opacity:.75}
.shelf-note{opacity:.78;margin-top:4px}
/* Site links are navy and unadorned, which is right everywhere except here:
   this is the one link on the page whose whole job is to be clicked by
   someone checking they have the right April Kelly. */
.shelf-note a{color:var(--gold);border-bottom:1px solid var(--gold-soft)}

@media (max-width:720px){
  .shelf .gr_grid_container{grid-template-columns:repeat(auto-fill,minmax(46px,1fr));gap:14px 12px}
}

/* ---------- forms ---------- */

.form{max-width:660px}
.field{margin-bottom:22px}
.field label{
  display:block;margin-bottom:7px;
  font-size:.76rem;font-weight:700;letter-spacing:.13em;
  text-transform:uppercase;color:var(--navy);
}
.field input,.field select,.field textarea{
  width:100%;
  font-family:var(--body);font-size:1rem;color:var(--charcoal);
  background:var(--cream);
  border:1px solid var(--line);
  border-radius:2px;
  padding:13px 14px;
}
.field input:focus,.field select:focus,.field textarea:focus{
  outline:none;border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(166,134,78,.14);
}
.field textarea{min-height:150px;resize:vertical}
.field .hint{font-size:.83rem;opacity:.7;margin:7px 0 0}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:22px}

.honey{position:absolute;left:-9999px}

/* ---------- notes / blog ---------- */

.note-list{border-top:1px solid var(--line)}
.note-item{
  border-bottom:1px solid var(--line);
  padding:30px 0;
  display:grid;grid-template-columns:150px 1fr;gap:30px;align-items:baseline;
}
.note-item .date{
  font-size:.76rem;letter-spacing:.13em;text-transform:uppercase;
  color:var(--gold);
}
.note-item h3{margin:0 0 .35em}
.note-item p{margin:0;font-size:.97rem;opacity:.82}

.post{max-width:720px;margin:0 auto}
.post .post-meta{
  font-size:.76rem;letter-spacing:.13em;text-transform:uppercase;
  color:var(--gold);margin-bottom:10px;
}
.post h2{font-size:1.6rem;margin-top:1.6em}
.post h3{font-size:1.2rem;margin-top:1.5em}
.post blockquote{
  margin:1.6em 0;padding-left:26px;
  border-left:2px solid var(--gold);
  font-style:italic;
}
.post ul,.post ol{padding-left:1.2em}
.post li{margin-bottom:.5em}
.post-nav{
  margin-top:56px;padding-top:28px;border-top:1px solid var(--line);
}
.post .post-meta .byline,
.post .post-meta .updated,
.post .post-meta .sep{color:var(--charcoal);opacity:.6}
.post .post-meta a{color:inherit;border-bottom:1px solid var(--line)}
.post .post-meta a:hover{color:var(--gold)}

/* The short-answer block. Set apart enough that a reader skimming for the
   answer finds it without reading the essay, which is the same thing a
   machine pulling one passage off the page is doing. */
.answer{
  margin:0 0 2.2em;padding:22px 26px;
  background:var(--cream-2);
  border-left:3px solid var(--gold);
}
.answer .answer-label{
  margin:0 0 .5em;
  font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;
  color:var(--gold);
}
.answer p:last-child{margin:0;font-size:1.06rem;line-height:1.62}

/* Comparison tables. Wrapped so a wide one scrolls inside itself instead of
   pushing the whole page sideways on a phone. */
.table-wrap{margin:1.8em 0;overflow-x:auto}
.post table{border-collapse:collapse;width:100%;font-size:.95rem}
.post th,.post td{
  padding:11px 14px;text-align:left;vertical-align:top;
  border-bottom:1px solid var(--line);
}
.post thead th{
  font-family:var(--body);font-weight:700;
  font-size:.74rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--gold);border-bottom:1px solid var(--gold);
}
.post tbody th{font-weight:600}

.faq{margin-top:3em;padding-top:2em;border-top:1px solid var(--line)}
.faq h2{margin-top:0}
.faq-item{margin-bottom:1.8em}
.faq-item h3{margin:0 0 .4em;font-size:1.08rem}
.faq-item p{margin:0 0 .6em}

/* Before-and-after manuscript samples. */
.post .sample-label{
  margin:1.8em 0 .5em;
  font-size:.74rem;letter-spacing:.12em;text-transform:uppercase;
  color:var(--gold);
}
.post .sample{
  padding:18px 22px;
  background:var(--cream-2);
  border-left:3px solid var(--line);
}
.post .sample p{margin:0}

/* ---------- footer ---------- */

.site-footer{background:var(--navy);color:var(--cream);padding:64px 0 40px}
.site-footer a{color:var(--cream)}
.site-footer a:hover{color:var(--gold-soft)}
.site-footer .wordmark{color:var(--cream);font-size:1.5rem;margin-bottom:18px;display:block}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:44px}
.footer-grid h4{
  font-family:var(--body);font-size:.76rem;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;color:var(--gold-soft);
  margin-bottom:14px;
}
.footer-grid ul{list-style:none;margin:0;padding:0}
.footer-grid li{margin-bottom:9px;font-size:.95rem}
.footer-bottom{
  margin-top:48px;padding-top:22px;
  border-top:1px solid var(--line-light);
  display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;
  font-size:.83rem;opacity:.72;
}

/* ---------- motion ---------- */

.reveal{opacity:0;transform:translateY(14px);transition:opacity .7s ease,transform .7s ease}
.reveal.in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
}

/* ---------- responsive ---------- */

@media (max-width:1000px){
  .covers,.covers.strip{grid-template-columns:repeat(4,1fr)}
}

@media (max-width:900px){
  .grid.four{grid-template-columns:repeat(2,1fr)}
  .grid.three{grid-template-columns:repeat(2,1fr)}
  .split{grid-template-columns:1fr;gap:38px}
  .footer-grid{grid-template-columns:1fr 1fr}
  .covers,.covers.strip{grid-template-columns:repeat(3,1fr);gap:22px}
}

@media (max-width:720px){
  .sec{padding:64px 0}
  .hero{padding:72px 0 60px}
  .grid.two,.grid.three,.grid.four{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr;gap:32px}
  .note-item{grid-template-columns:1fr;gap:8px}
  .field-row{grid-template-columns:1fr}
  .covers,.covers.strip{grid-template-columns:repeat(2,1fr);gap:20px}

  .nav-toggle{display:block}
  .site-nav{
    display:none;
    position:absolute;left:0;right:0;top:100%;
    flex-direction:column;align-items:flex-start;gap:0;
    background:var(--cream);
    border-bottom:1px solid var(--line);
    padding:10px 28px 22px;
  }
  .site-nav.open{display:flex}
  .site-nav a{padding:12px 0;width:100%}
  .site-nav .btn{margin-top:12px;width:100%;text-align:center}
  .site-header .wrap{position:relative;flex-wrap:wrap}
}
