/* ---------------------------------------------------------------------------
   azmackay.com — A Z Mackay
   Dark literary sibling of adammackay.com. Same structural bones (nav, prose,
   .btn, .img-wrap, page-config driven rendering); inverted ground, serif-led
   typography, hairline rules instead of cards and shadows.

   Rules that differ from adammackay.com and should stay differed:
     - the whole page is dark, not just the hero
     - body copy is serif everywhere; sans is reserved for labels and nav
     - no drop shadows (they do not read on a dark ground) — use rules
     - one gold accent per screen
   See styleguide.md §2.
   --------------------------------------------------------------------------- */

:root{
  /* ground */
  --ink:#10131a;            /* page ground */
  --ink-raised:#171b24;     /* raised panel */
  --ink-deep:#0b0e14;       /* footer, deepest field */

  /* type */
  --bone:#ece6dc;           /* primary type */
  --bone-mid:#a8a296;       /* secondary type */
  --bone-dim:#6f6b62;       /* tertiary, metadata */

  /* accent — used sparingly, once per screen */
  --gold:#d4a574;
  --gold-light:#e8c9a0;
  --gold-dark:#b8935f;

  /* structure */
  --rule:#2a2f3a;
  --rule-soft:#1d222b;

  /* type stacks — no webfonts, no external requests */
  --display:'Newsreader','Spectral','Playfair Display',Georgia,'Times New Roman',serif;
  --serif:'Newsreader','Lora','Merriweather',Georgia,'Times New Roman',serif;
  --sans:'Inter','Source Sans Pro',system-ui,-apple-system,sans-serif;

  --radius:3px;
  --max-w:720px;
  --max-w-wide:1080px;
  --nav-h:64px;
  --transition:0.2s cubic-bezier(0.4,0,0.2,1);
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;font-size:16px;overflow-x:clip;}
body{
  font-family:var(--serif);
  color:var(--bone);
  background:var(--ink);
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.skip-link{position:absolute;top:-100%;left:0;z-index:9999;padding:8px 20px;background:var(--gold);color:var(--ink);font-family:var(--sans);font-size:14px;text-decoration:none;}
.skip-link:focus{top:0;}

/* --- nav ------------------------------------------------------------------ */
#site-nav{
  position:fixed;top:0;left:0;right:0;z-index:1000;height:var(--nav-h);
  background:rgba(16,19,26,0.92);backdrop-filter:blur(8px);
  border-bottom:1px solid var(--rule-soft);
  display:flex;align-items:center;
  transition:transform var(--transition),border-color var(--transition);
}
#site-nav.hidden{transform:translateY(-100%);}
#site-nav.scrolled{border-bottom-color:var(--rule);}
.nav-inner{width:100%;max-width:var(--max-w-wide);margin:0 auto;padding:0 28px;display:flex;align-items:center;justify-content:space-between;gap:24px;}
.nav-logo a{
  font-family:var(--display);font-size:1.05rem;font-weight:600;
  color:var(--bone);text-decoration:none;letter-spacing:0.08em;
  text-transform:uppercase;
}
.nav-logo a:hover{color:var(--gold);}
.nav-links{display:flex;align-items:center;gap:2px;list-style:none;}
.nav-links a{
  display:block;padding:6px 14px;
  font-family:var(--sans);font-size:0.78rem;font-weight:500;
  letter-spacing:0.06em;text-transform:uppercase;
  color:var(--bone-mid);text-decoration:none;
  transition:color var(--transition);
}
.nav-links a:hover{color:var(--bone);}
.nav-links a.active{color:var(--gold);}
.nav-toggle{display:none;background:none;border:none;cursor:pointer;padding:8px;color:var(--bone);}
.nav-toggle svg{width:22px;height:22px;}

/* --- layout --------------------------------------------------------------- */
#site-main{padding-top:var(--nav-h);min-height:100vh;}
.page-content{max-width:var(--max-w);margin:0 auto;padding:48px 28px 96px;}

.section-header{padding:72px 28px 0;max-width:var(--max-w);margin:0 auto;}
.section-header h1{font-family:var(--display);font-size:clamp(2rem,4.5vw,2.9rem);font-weight:600;color:var(--bone);line-height:1.15;margin-bottom:14px;letter-spacing:-0.01em;}
.section-header p{font-family:var(--serif);font-size:1.1rem;color:var(--bone-mid);max-width:34em;line-height:1.65;}
.section-divider{width:40px;height:1px;background:var(--gold);margin:28px 0 0;}
/* A page whose title is a logotype rather than set type. */
.section-header h1.has-wordmark{margin-bottom:18px;}
.section-header h1.has-wordmark img{display:block;width:100%;max-width:460px;height:auto;}

/* --- hero ----------------------------------------------------------------- */
/* No gradient panel: the page is already dark. The hero is space and a rule. */
.hero{padding:104px 28px 64px;border-bottom:1px solid var(--rule-soft);}
.hero-inner{max-width:var(--max-w);margin:0 auto;}
.hero .prose h1{
  font-family:var(--display);
  font-size:clamp(2.4rem,6vw,3.6rem);
  font-weight:600;line-height:1.08;letter-spacing:-0.02em;
  color:var(--bone);margin:0 0 24px;border:none;
}
/* the em line under the name becomes the eyebrow */
.hero .prose em{
  display:block;font-style:normal;
  font-family:var(--sans);font-size:0.75rem;font-weight:600;
  letter-spacing:0.18em;text-transform:uppercase;
  color:var(--gold);margin-bottom:20px;
}
.hero .prose p{font-family:var(--serif);font-size:1.25rem;line-height:1.6;color:var(--bone-mid);max-width:32em;}
.hero .prose p:has(a.btn){display:flex;flex-wrap:wrap;gap:12px;margin-top:32px;}
.hero-photo{display:none;} /* portrait belongs on /about, not the hero */
.hero-photo-wrap{display:none;}

/* --- buttons -------------------------------------------------------------- */
.btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:12px 26px;border-radius:var(--radius);
  font-family:var(--sans);font-size:0.78rem;font-weight:600;
  letter-spacing:0.08em;text-transform:uppercase;
  text-decoration:none;cursor:pointer;border:1px solid transparent;
  transition:all var(--transition);
}
.btn-primary{background:var(--gold);color:var(--ink);border-color:var(--gold);}
.btn-primary:hover{background:var(--gold-light);border-color:var(--gold-light);color:var(--ink);}
.btn-outline{background:transparent;color:var(--bone);border-color:var(--rule);}
.btn-outline:hover{border-color:var(--bone-mid);color:var(--bone);}
.prose p:has(a.btn){display:flex;flex-wrap:wrap;gap:12px;align-items:center;}
.prose a.btn{text-decoration:none;}
.prose a.btn-primary,.prose a.btn-primary:hover{color:var(--ink);}

/* --- prose ---------------------------------------------------------------- */
.prose h1,.prose h2,.prose h3,.prose h4{font-family:var(--display);color:var(--bone);line-height:1.2;font-weight:600;}
.prose h1{font-size:2rem;margin:0 0 0.6em;}
.prose h2{
  font-size:1.05rem;font-family:var(--sans);font-weight:600;
  letter-spacing:0.14em;text-transform:uppercase;color:var(--gold);
  margin-top:3.2em;margin-bottom:1.2em;padding-bottom:0.9em;
  border-bottom:1px solid var(--rule-soft);clear:both;
}
.prose h3{font-size:1.35rem;margin-top:2.2em;margin-bottom:0.5em;clear:both;letter-spacing:-0.01em;}
.prose h4{font-size:0.78rem;font-family:var(--sans);font-weight:600;letter-spacing:0.12em;text-transform:uppercase;color:var(--bone-dim);margin-top:2em;margin-bottom:0.6em;}
.prose p{margin-bottom:1.3em;font-family:var(--serif);font-size:1.08rem;color:var(--bone);}
.prose ul,.prose ol{margin:0.9em 0 1.4em 1.4em;}
.prose li{margin-bottom:0.5em;font-family:var(--serif);font-size:1.08rem;}
.prose li::marker{color:var(--gold-dark);}
.prose a{color:var(--bone);text-decoration:underline;text-decoration-color:var(--gold-dark);text-decoration-thickness:1px;text-underline-offset:4px;transition:color var(--transition),text-decoration-color var(--transition);}
.prose a:hover{color:var(--gold);text-decoration-color:var(--gold);}
.prose strong{font-weight:600;color:var(--bone);}
.prose em{font-style:italic;color:var(--bone);}
.prose blockquote{
  border-left:1px solid var(--gold);padding:4px 0 4px 24px;margin:2em 0;
  font-family:var(--display);font-size:1.3rem;line-height:1.5;
  color:var(--bone);font-style:italic;
}
.prose blockquote p{margin:0;font-size:inherit;font-family:inherit;}
.prose hr{border:none;border-top:1px solid var(--rule-soft);margin:3em 0;clear:both;}
.prose code{font-family:'JetBrains Mono','Fira Code',monospace;font-size:0.85em;background:var(--ink-raised);padding:2px 6px;border-radius:2px;color:var(--gold-light);}
.prose table{width:100%;border-collapse:collapse;margin:1.8em 0;font-size:0.95rem;}
.prose th{background:none;color:var(--gold);padding:8px 14px 8px 0;text-align:left;font-family:var(--sans);font-size:0.72rem;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;border-bottom:1px solid var(--rule);}
.prose td{padding:12px 14px 12px 0;border-bottom:1px solid var(--rule-soft);font-family:var(--serif);color:var(--bone-mid);}

/* --- images --------------------------------------------------------------- */
.prose .img-wrap{margin:32px 0;line-height:0;}
.prose .img-wrap img{display:block;width:100%;border-radius:var(--radius);}
.prose .img-wrap:has(img.book-cover){float:right;max-width:210px;margin:0 0 28px 36px;}
.prose .img-wrap:has(img.book-cover) img{border:1px solid var(--rule);}
.prose .img-wrap:has(img.article-sq){float:right;clear:right;max-width:160px;margin:1.2em 0 0 28px;}
.prose .img-wrap:has(img.article-sq) img{width:160px;height:160px;object-fit:cover;border:1px solid var(--rule);}
.prose .img-wrap:has(img.article-sq)+p{overflow:hidden;}
.prose .img-wrap:has(img.article-card){float:right;clear:right;max-width:300px;margin:1.2em 0 12px 28px;}
.prose .img-wrap:has(img.article-card) img{width:100%;height:auto;border:1px solid var(--rule);}
.prose .img-wrap:has(img.article-card)+p{overflow:hidden;}
/* A plate is an inset portrait, floated so the prose leads. Full width would put
   the writing below the fold, which is the wrong emphasis for an author page. */
.prose .img-wrap:has(img.plate){float:right;clear:right;max-width:320px;margin:0.4em 0 24px 36px;}
.prose .img-wrap:has(img.plate) img{border:1px solid var(--rule);}
.prose .img-wrap:has(img.plate)+p{overflow:hidden;}
@media (max-width:640px){
  .prose .img-wrap:has(img.plate){float:none;max-width:100%;margin:0 0 24px;}
  .prose .img-wrap:has(img.plate)+p{overflow:visible;}
}
@media (max-width:640px){
  .prose .img-wrap:has(img.book-cover){float:none;max-width:170px;margin:0 auto 28px;}
  .prose .img-wrap:has(img.article-sq),
  .prose .img-wrap:has(img.article-card){float:none;max-width:100%;margin:1.5em 0 16px;}
  .prose .img-wrap:has(img.article-sq) img{width:100%;height:200px;}
  .prose .img-wrap:has(img.article-sq)+p,
  .prose .img-wrap:has(img.article-card)+p{overflow:visible;}
}

/* The Future Tense wordmark: transparent PNG, sits directly on the ground.
   No border, no radius, no panel. It is lettering, not a picture. */
.prose .img-wrap:has(img.wordmark){margin:0 0 36px;}
.prose .img-wrap:has(img.wordmark) img{width:100%;max-width:520px;height:auto;border:none;border-radius:0;}

/* A strip is a full-width mark with the vertical dead space trimmed. The topic
   marks are 1200x630 and carry their meaning horizontally (a divergence, an
   orbit, a section through strata), so cropping top and bottom loses nothing
   and keeps a scannable list scannable. Never crop these horizontally. */
.prose .img-wrap:has(img.strip){margin:20px 0 28px;}
.prose .img-wrap:has(img.strip) img{
  width:100%;height:210px;object-fit:cover;object-position:center;
  border:1px solid var(--rule);
}
@media (max-width:640px){
  .prose .img-wrap:has(img.strip) img{height:150px;}
}

/* --- the work entry (novels) ---------------------------------------------- */
/* Markdown shape this styles:
     ### Title
     **Meta line** — form · setting
     Premise paragraph.
     `Status: ...`
   The status pill is a <code> span so it stays plain markdown.            */
.prose .work-meta,
.prose p.work-meta{
  font-family:var(--sans);font-size:0.72rem;font-weight:600;
  letter-spacing:0.12em;text-transform:uppercase;color:var(--bone-dim);
  margin-bottom:1em;
}
.prose .status{
  display:inline-block;font-family:var(--sans);font-size:0.72rem;font-weight:500;
  letter-spacing:0.06em;color:var(--bone-mid);background:var(--ink-raised);
  border:1px solid var(--rule);border-radius:2px;padding:5px 12px;
}

/* --- two-column strip on the home page ------------------------------------ */
/* Columns are explicit wrappers, not bare children: the grid puts each child in
   a cell, so an unwrapped heading and its paragraphs would split across columns. */
.prose .split{display:grid;grid-template-columns:1fr 1fr;gap:24px 56px;margin:1.5em 0 0;align-items:start;}
.prose .split-col > h3:first-child{margin-top:0;}
.prose .split-col > p:last-child{margin-bottom:0;}
@media (max-width:720px){.prose .split{grid-template-columns:1fr;gap:40px;}}

/* --- subscribe band (replaces adammackay.com's modal popup) --------------- */
/* Deliberate divergence: a modal interrupt is wrong for a literary site.
   This sits inline at the foot of every page instead. See styleguide.md §7. */
#subscribe-band{border-top:1px solid var(--rule-soft);background:var(--ink-deep);}
.subscribe-inner{max-width:var(--max-w);margin:0 auto;padding:56px 28px;}
.subscribe-inner .label{font-family:var(--sans);font-size:0.72rem;font-weight:600;letter-spacing:0.16em;text-transform:uppercase;color:var(--gold);margin-bottom:14px;}
.subscribe-inner h2{font-family:var(--display);font-size:1.7rem;font-weight:600;color:var(--bone);margin-bottom:12px;letter-spacing:-0.01em;}
.subscribe-inner p{font-family:var(--serif);font-size:1.02rem;color:var(--bone-mid);max-width:34em;margin-bottom:24px;}
.subscribe-inner .btn{margin-right:12px;}

/* --- footer --------------------------------------------------------------- */
#site-footer{background:var(--ink-deep);border-top:1px solid var(--rule-soft);color:var(--bone-dim);padding:56px 28px 40px;}
.footer-inner{max-width:var(--max-w-wide);margin:0 auto;display:grid;grid-template-columns:1fr auto;gap:40px;align-items:start;}
.footer-brand{font-family:var(--display);font-size:1.05rem;letter-spacing:0.08em;text-transform:uppercase;color:var(--bone);margin-bottom:8px;}
.footer-tagline{font-family:var(--serif);font-size:0.92rem;color:var(--bone-mid);max-width:30em;}
.footer-links{display:flex;gap:22px;list-style:none;flex-wrap:wrap;}
.footer-links a{font-family:var(--sans);font-size:0.75rem;letter-spacing:0.06em;text-transform:uppercase;color:var(--bone-dim);text-decoration:none;transition:color var(--transition);}
.footer-links a:hover{color:var(--gold);}
.footer-bottom{max-width:var(--max-w-wide);margin:40px auto 0;padding-top:24px;border-top:1px solid var(--rule-soft);font-family:var(--sans);font-size:0.75rem;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;color:var(--bone-dim);}
.footer-other-name a{color:var(--bone-mid);text-decoration:underline;text-decoration-color:var(--rule);text-underline-offset:3px;}
.footer-other-name a:hover{color:var(--gold);}

/* --- accessibility -------------------------------------------------------- */
:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:2px;}
a:focus-visible,button:focus-visible,input:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--gold);outline-offset:3px;}
.nav-links a:focus-visible,.footer-links a:focus-visible{outline-offset:4px;}
.fade-in{opacity:0;transform:translateY(14px);transition:opacity 0.6s ease,transform 0.6s ease;}
.fade-in.visible{opacity:1;transform:translateY(0);}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important;}
  .fade-in{opacity:1 !important;transform:none !important;}
  #site-nav.hidden{transform:none !important;}
}

/* --- responsive ----------------------------------------------------------- */
@media (max-width:768px){
  .nav-links{display:none;flex-direction:column;align-items:flex-start;position:absolute;top:var(--nav-h);left:0;right:0;background:var(--ink);border-bottom:1px solid var(--rule);padding:12px 16px 20px;}
  .nav-links.open{display:flex;}
  .nav-links a{padding:10px 0;}
  .nav-toggle{display:block;}
  .footer-inner{grid-template-columns:1fr;gap:28px;}
  .footer-bottom{flex-direction:column;align-items:flex-start;}
}
@media (max-width:480px){
  .page-content{padding:36px 20px 72px;}
  .hero{padding:72px 20px 48px;}
  .section-header{padding:52px 20px 0;}
  .subscribe-inner{padding:44px 20px;}
}
