/* ======================================================================
   Notes on the Pac Sun Avant Garde — zine stylesheet
   Single static file. Designed to deploy as-is to Neocities.
   ====================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Archivo+Black&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root{
  --paper: #FAFAFA;
  --paper-2: #F7F7F5;
  --paper-3: #DEDAD0;
  --mb-blue: #1A4DB3;
  --mb-red:  #D8332A;
  --mb-yellow:#F2B800;
  --mb-green:#3FA84D;
  --mb-violet:#7B5BB8;
  --mb-teal: #1F7E8C;
  --ink:     #111111;
  --ink-2:   #2A2823;
  --ink-mute:#6B6657;
  --ink-faint:#A39D8A;
  --pacsun-blue: #1D3FBE;
  --swiss-red:   #CC2020;
  --halftone-yellow: #F0C000;

  --font-sans:  'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display:'Archivo Black','Archivo','Helvetica Neue',Helvetica,Arial,sans-serif;
  --font-serif: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --font-mono:  'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

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

html,body{ margin:0; padding:0; background:var(--paper); color:var(--ink); }
body{
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a{ color: var(--ink); text-decoration: underline; text-decoration-thickness:1px; text-underline-offset:2px; }
a:hover{ background: var(--halftone-yellow); }

/* ---------- top bar ---------- */
.topbar{
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items:baseline;
  padding: 14px 28px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  background: var(--paper);
  position: sticky; top:0; z-index: 10;
}
.topbar a{ text-decoration:none; }
.topbar .masthead{ font-family: var(--font-display); letter-spacing:.04em; font-size:13px; color:var(--ink); }
.topbar .running{ color: var(--ink-mute); font-style: normal; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topbar .back{ color: var(--ink); font-weight:700; }

/* ---------- shared reading frame ---------- */
.reading{
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 28px 80px;
}

.chapter-mark{ text-align:left; margin-bottom: 36px; }
.chapter-mark .num{
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}
.chapter-mark hr{
  border:0; border-top: 6px solid var(--ink);
  margin: 14px 0 14px; width: 80px;
}
.chapter-mark h1{
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0;
  text-transform: uppercase;
}

/* ---------- plate ---------- */
.plate{
  margin: 0 0 40px 0;
  border: 1px solid var(--ink);
  background: var(--paper-3);
}
.plate img{
  display:block;
  width:100%;
  height:auto;
  max-height: 460px;
  object-fit: cover;
}

/* ---------- prose ---------- */
.prose{
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
  hyphens: auto;
  text-wrap: pretty;
}
.prose p{ margin: 0; text-indent: 1.5em; }
.prose p + p{ margin-top: 0; }
.prose p:first-of-type{ text-indent: 0; }
.prose .dropcap{
  font-family: var(--font-display);
  float: left;
  font-size: 64px;
  line-height: .9;
  padding: 4px 8px 0 0;
  color: var(--ink);
}
.prose .pqblue{
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--mb-blue);
  margin: 24px 0;
  padding: 0;
  text-indent: 0 !important;
  hyphens: none;
  max-width: 60ch;
}
.prose .pqred{
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: bold;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--mb-red);
  margin: 24px 0;
  padding: 0;
  text-indent: 0 !important;
  hyphens: none;
  max-width: 60ch;
}
.prose .pqyellow{
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: bold;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--mb-red);
  margin: 24px 0;
  padding: 0;
  text-indent: 0 !important;
  hyphens: none;
  max-width: 60ch;
}
.prose .pqyellow{
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: bold;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--mb-yellow);
  margin: 24px 0;
  padding: 0;
  text-indent: 0 !important;
  hyphens: none;
  max-width: 60ch;
}
.prose .pqcenter{
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--ink);
  text-align: center;
  margin: 24px auto;
  padding: 0;
  text-indent: 0 !important;
  hyphens: none;
  max-width: 28ch;
}
.prose .pq-bracket{
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  border-left: 8px solid var(--mb-blue);
  border-right: 8px solid var(--mb-red);
  padding: 16px 24px;
  margin: 40px 0;
  text-indent: 0 !important;
}
.prose .pq-mark{
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 22px 0 22px 28px;
  margin: 48px 0;
  position: relative;
  text-indent: 0 !important;
}
.prose .pq-mark::before{
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  bottom: -1px;
  width: 6px;
  background: var(--mb-blue);
}
.prose .pq-mark::after{
  content: "❞";
  position: absolute;
  right: 0;
  bottom: -14px;
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--mb-red);
  line-height: 1;
  background: var(--paper);
  padding: 0 8px;
}
.prose .panel{
  margin: 56px 0;
  position: relative;
}
.prose .panel p{
  color: var(--ink-2);
}

/* small colored square sitting in front of each panel's first paragraph.
   like a numbered exhibit marker on a gallery wall. */
.prose .panel > p:first-of-type{
  text-indent: 0;
  position: relative;
  padding-left: 24px;
}
.prose .panel > p:first-of-type::before{
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 12px;
  height: 12px;
  display: block;
}

.prose .panel.yellow > p:first-of-type::before{ background: var(--mb-yellow); }
.prose .panel.blue > p:first-of-type::before{ background: var(--mb-blue); }
.prose .panel.red > p:first-of-type::before{ background: var(--mb-red); }
}
/* footnote markers */
.fn-ref{
  font-family: var(--font-mono);
  font-size: .65em;
  line-height: 0;
  vertical-align: super;
}
.fn-ref a{
  color: var(--swiss-red);
  text-decoration: none;
  padding: 0 1px;
  font-weight: 700;
}
.fn-ref a:hover{ background: var(--halftone-yellow); color: var(--ink); }

/* footnote popover */
.fnpop{
  position: absolute;
  z-index: 9999;
  display: none;
  max-width: 420px;
  background: var(--paper, #f6f1e7);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 14px 16px 14px 44px;
  font-family: var(--font-serif, Georgia, serif);
  font-size: 14px;
  line-height: 1.5;
  text-wrap: pretty;
}
.fnpop::before{
  content: "";
  position: absolute;
  left: -1px; top: -1px; bottom: -1px;
  width: 6px;
  background: var(--swiss-red);
}
.fnpop.above{ /* could add caret variation later */ }
.fnpop-num{
  position: absolute;
  left: 14px;
  top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--swiss-red);
}
.fnpop-body{ margin: 0; }
.fnpop-body i, .fnpop-body em{ font-style: italic; }
.fnpop-close{
  position: absolute;
  top: 4px;
  right: 6px;
  background: none;
  border: 0;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-mute, #6a6256);
  padding: 4px 6px;
  display: none;
}
.fnpop.sticky .fnpop-close{ display: block; }
.fnpop:not(.sticky) .fnpop-close{ display: none; }
@media (max-width: 600px){
  .fnpop{ max-width: calc(100vw - 32px); font-size: 13px; }
}

/* ---------- chapter nav ---------- */
.chapnav{
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 28px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.chapnav a{
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  padding: 18px 20px;
  border: 1px solid transparent;
}
.chapnav a:hover{ background: var(--halftone-yellow); }
.chapnav .arrow{ font-size: 28px; font-family: var(--font-mono); font-weight: 400; color: var(--ink); }
.chapnav .lbl{ display:flex; flex-direction:column; gap:2px; line-height:1.1; text-transform: uppercase; letter-spacing:.02em; }
.chapnav .lbl small{ font-family: var(--font-mono); font-size: 10px; letter-spacing:.16em; color: var(--ink-mute); font-weight:500; }
.chapnav .next{ justify-content:flex-end; text-align:right; }
.chapnav .home{
  align-self:center;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  background: var(--ink);
  color: var(--paper, #f6f1e7);
  padding: 14px 22px;
  border: 1px solid var(--ink);
}
.chapnav .home:hover{ background: var(--swiss-red); color: var(--paper, #f6f1e7); border-color: var(--swiss-red); }
.chapnav .home .home-mark{ font-family: var(--font-display, serif); font-size: 22px; line-height: 1; }
.chapnav .home .home-lbl{ font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; font-weight: 700; }
.chapnav .home-legacy{
  align-self:center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 12px 18px;
  border: 1px solid var(--ink);
}
.chapnav .disabled{ display:block; }

/* ---------- footer ---------- */
.bookfoot{
  display:flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-mute);
  background: var(--paper);
  border-top: 1px solid var(--ink-faint);
}

/* ---------- notes page ---------- */
.notes{
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-serif);
}
.notes li{
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--ink-faint);
}
.notes li:target{
  background: var(--halftone-yellow);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.notes .fnum{
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--swiss-red);
  font-size: 14px;
  text-align: right;
}
.notes .ftxt{ font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.notes .fback{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  margin-left: 8px;
  padding: 0 4px;
}
.notes .fback:hover{ background: var(--halftone-yellow); }

/* ---------- index / cover page ---------- */
.cover{
  min-height: 100vh;
  background: var(--paper);
}
.cover-grid{
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 32px 80px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: stretch;
}
@media (max-width: 880px){
  .cover-grid{ grid-template-columns: 1fr; gap: 32px; padding: 36px 24px; }
}

.cover-left{ display:flex; flex-direction:column; gap: 28px; }
.cover-eyebrow{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display:flex; gap:14px; align-items:center;
}
.cover-eyebrow .dot{ width:8px; height:8px; background: var(--swiss-red); display:inline-block; }

.cover-title{
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 132px);
  line-height: .92;
  letter-spacing: -.03em;
  margin: 0;
  text-transform: uppercase;
  color: var(--ink);
}
.cover-title .small{ font-size: .42em; display:block; letter-spacing:-.01em; color: var(--ink-mute); }
.cover-title .blue{ color: var(--pacsun-blue); }

.cover-byline{
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 14px 0;
  display:flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

.cover-blurb{
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 52ch;
}

.cover-actions{
  display:flex; gap: 12px; flex-wrap: wrap;
  margin-top: 8px;
}
.cover-actions a{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 13px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border: 1px solid var(--ink);
}
.cover-actions a.ghost{ background: var(--paper); color: var(--ink); }
.cover-actions a:hover{ background: var(--halftone-yellow); color: var(--ink); }

/* cover plate */
.cover-plate{
  border: 1px solid var(--ink);
  background: var(--paper-3);
  position: relative;
  align-self: stretch;
  min-height: 480px;
  display:flex; flex-direction:column;
}
.cover-plate img{
  display:block;
  width:100%;
  height:100%;
  object-fit: cover;
  flex: 1;
}
.cover-plate .cap{
  display:flex; gap:12px;
  padding: 12px 16px;
  border-top: 1px solid var(--ink);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-mute);
}
.cover-plate .cap b{ color: var(--ink); font-weight: 700; }

/* TOC */
.toc-section{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.toc-head{
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--ink-mute);
  border-top: 6px solid var(--ink);
  padding-top: 16px;
  margin-bottom: 8px;
}
.toc{
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--ink);
}
.toc li a{
  display: grid;
  grid-template-columns: 56px 1fr 80px;
  gap: 18px;
  align-items: baseline;
  padding: 22px 8px;
  border-top: 1px solid var(--ink);
  text-decoration: none;
  font-family: var(--font-sans);
  color: var(--ink);
}
.toc li a:hover{ background: var(--halftone-yellow); }
.toc .num{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink-mute);
}
.toc .ttl{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.05;
}
.toc .ttl small{ display: none; }
.toc .pg{
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: right;
  color: var(--ink);
}

.appendix{
  margin-top: 12px;
  display:flex; flex-wrap:wrap; gap: 10px;
}
.appendix a{
  display:inline-flex; align-items:center; gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  text-decoration: none;
}
.appendix a:hover{ background: var(--halftone-yellow); }

/* ---------- responsive ---------- */
@media (max-width: 640px){
  .reading{ padding: 36px 20px 60px; }
  .chapter-mark .num{ font-size: 72px; }
  .chapter-mark h1{ font-size: 30px; }
  .prose{ font-size: 17px; }
  .topbar{ padding: 10px 16px; font-size: 10px; }
  .topbar .running{ display:none; }
  .chapnav{ grid-template-columns: 1fr; gap: 8px; padding: 18px; }
  .chapnav .home{ order: 3; }
  .chapnav .next{ order: 2; }
  .chapnav .prev{ order: 1; }
}

/* ---------- inline plates within prose ---------- */
.inline-plate{ margin: 36px 0; }
.inline-plate img{ max-height: 520px; }
.plate-pair{ background: var(--paper-3); padding: 0; }
.plate-pair .row{ display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--ink); }
.plate-pair .row img{ display:block; width:100%; height: 100%; max-height: 360px; object-fit: cover; background: var(--paper-3); }
@media (max-width: 640px){
  .plate-pair .row{ grid-template-columns: 1fr; }
}

/* section number marker (1. 2. 3. inside chapters) */
.prose p.section-num{
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 56px 0 16px;
  text-indent: 0 !important;
}
.prose p.section-num + p{ text-indent: 0 !important; }
