/* josephmraz.com — shared site styles */
:root{
  --bg:#0b0c0e;
  --bg2:#141619;
  --bg3:#1b1e22;
  --line:#2a2e33;
  --text:#e9e6df;
  --muted:#9a9da3;
  --amber:#d9a15a;
  --amber-dim:#8a6a3f;
  --red:#a8453f;
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', serif;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:
    radial-gradient(ellipse at 50% -10%, rgba(217,161,90,0.06), transparent 60%),
    var(--bg);
  color:var(--text);
  font-family:var(--serif);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--amber);}
.wrap{max-width:880px;margin:0 auto;padding:0 24px;}

/* ---------- NAV ---------- */
nav{
  position:sticky;top:0;z-index:10;
  background:rgba(11,12,14,0.85);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);
}
nav .wrap{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 24px;
}
.brand{
  font-family:var(--mono);
  letter-spacing:0.12em;
  font-size:13px;
  color:var(--muted);
  text-decoration:none;
}
.brand b{color:var(--amber);font-weight:600;}
nav ul{list-style:none;display:flex;gap:22px;margin:0;padding:0;}
nav a.navlink{
  font-family:var(--mono);
  font-size:12px;letter-spacing:0.08em;text-transform:uppercase;
  color:var(--muted);text-decoration:none;
}
nav a.navlink:hover{color:var(--amber);}

/* ---------- HERO ---------- */
header.hero{
  padding:100px 0 70px;
  text-align:center;
  border-bottom:1px solid var(--line);
}
.eyebrow{
  font-family:var(--mono);
  font-size:12px;letter-spacing:0.25em;text-transform:uppercase;
  color:var(--amber-dim);
  margin-bottom:22px;
}
h1.title{
  font-size:clamp(38px,7vw,64px);
  margin:0 0 18px;
  letter-spacing:0.02em;
  font-weight:400;
}
.tagline{
  color:var(--muted);
  font-size:18px;
  font-style:italic;
  max-width:520px;
  margin:0 auto 30px;
}
.comps{
  font-family:var(--mono);
  font-size:12px;
  color:var(--muted);
  letter-spacing:0.04em;
}
.comps em{color:var(--amber);font-style:normal;}

/* ---------- HERO WITH COVER (book pages) ---------- */
.hero-cover .hero-cover-inner{
  display:flex;
  gap:48px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
}
.hero-cover .cover-art{
  width:230px;
  max-width:70%;
  border-radius:5px;
  border:1px solid var(--line);
  box-shadow:0 24px 60px rgba(0,0,0,0.55);
}
.hero-cover .hero-copy{
  max-width:420px;
  text-align:left;
}
.hero-cover .hero-copy .eyebrow{margin-bottom:16px;}
.hero-cover .hero-copy .title{margin:0 0 16px;}
.hero-cover .hero-copy .tagline{margin:0 0 16px;max-width:none;}
.hero-cover .hero-copy .comps{text-align:left;}
@media (max-width:640px){
  .hero-cover .hero-cover-inner{flex-direction:column;text-align:center;}
  .hero-cover .hero-copy{text-align:center;}
  .hero-cover .hero-copy .comps{text-align:center;}
}

/* ---------- ATMOSPHERE BAND (full-bleed image section) ---------- */
.atmosphere{padding:0;border-bottom:1px solid var(--line);}
.atmosphere-bg{
  position:relative;
  min-height:280px;
  background-size:cover;
  background-position:center;
  display:flex;
  align-items:center;
  justify-content:center;
}
.atmosphere-bg::before{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(11,12,14,0.25), rgba(11,12,14,0.88));
}
.atmosphere-caption{
  position:relative;z-index:1;
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--amber);
  text-align:center;
  max-width:420px;
  padding:0 24px;
}

/* ---------- DIVIDER MARK ---------- */
.divider{display:flex;justify-content:center;padding:36px 0 0;}
.divider img{width:34px;height:34px;opacity:0.8;}

/* ---------- SECTIONS ---------- */
section{padding:70px 0;border-bottom:1px solid var(--line);}
section.noborder{border-bottom:none;}
h2.sectitle{
  font-family:var(--mono);
  font-size:13px;
  letter-spacing:0.2em;
  text-transform:uppercase;
  color:var(--amber-dim);
  margin:0 0 28px;
}
.pitch p{
  font-size:19px;
  color:#d8d5cd;
  max-width:640px;
}
.pitch p.small{
  font-size:16px;
  color:var(--muted);
}

/* ---------- THOUGHT SIDEBAR (track pages, when a track has 2+ entries) ----------
   position:fixed was wrong: it anchors to the viewport's top edge no matter
   where the article actually sits on the page, which is exactly why it
   rendered up in the header — 110px from the top of the SCREEN, not 110px
   from the top of the ARTICLE. Fixed can't know the difference.
   Grid + sticky fixes that: .thought-nav is laid out in normal document
   flow, in a grid column next to the article, so its starting position is
   wherever the article actually is (below the header, never inside it).
   position:sticky then keeps it on screen once you scroll past that point,
   instead of scrolling away with the rest of the page.
   .wrap.pitch sits in the center 880px column — identical max-width/margin
   math to every .wrap on the site, so it's centered exactly like the header.
   .thought-nav sits in the left gutter column, pinned to that column's own
   left edge (justify-self:start) so it sits near the browser edge rather
   than hugging the article. Below the breakpoint there isn't reliable
   gutter width for this, so it sits inline above the article instead. */
html{scroll-behavior:smooth;}
.thought-content{margin-top:30px;}
.thought-entry{scroll-margin-top:90px;max-width:640px;margin-left:auto;margin-right:auto;}
.thought-layout .wrap.pitch > iframe{display:block;max-width:640px !important;margin-left:auto;margin-right:auto;}
.thought-layout .wrap.pitch > p.small{max-width:640px;margin-left:auto;margin-right:auto;}

.thought-nav{
  display:none;
  flex-direction:column;
  gap:16px;
  max-width:880px;
  margin:0 auto 30px;
  padding:0 24px;
  box-sizing:border-box;
}
.thought-nav-title{
  font-family:var(--mono);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.2em;
  color:var(--amber-dim);
  margin-bottom:-4px;
}
.thought-nav a{
  display:block;
  font-family:var(--mono);
  font-size:15px;
  text-transform:uppercase;
  letter-spacing:0.05em;
  color:var(--muted);
  text-decoration:none;
  border-left:3px solid var(--line);
  padding:4px 0 4px 14px;
  line-height:1.5;
}
.thought-nav a:hover{color:var(--amber);border-left-color:var(--amber-dim);}
.thought-nav .tn-date{display:block;color:#8a8d93;font-size:12px;margin-top:4px;text-transform:none;letter-spacing:0;}

@media (min-width:1440px){
  .thought-layout{
    display:grid;
    grid-template-columns:minmax(226px,1fr) 880px minmax(226px,1fr);
    column-gap:36px;
    align-items:start;
  }
  .thought-layout > .wrap.pitch{
    grid-column:2;
    margin:0;
  }
  .thought-nav{
    grid-column:1;
    grid-row:1;
    justify-self:start;
    align-self:start;
    max-width:none;
    width:190px;
    padding:0;
    margin:0 0 0 32px;
    position:sticky;
    top:110px;
  }
}

/* ---------- BOOK CARDS (homepage) ---------- */
.book-card{
  display:flex;gap:24px;align-items:flex-start;flex-wrap:wrap;
  border:1px solid var(--line);
  background:var(--bg2);
  padding:26px;
  border-radius:4px;
  margin-bottom:18px;
}
.book-card .spine{
  width:80px;height:112px;flex:0 0 auto;
  background:linear-gradient(160deg, var(--bg3), var(--bg2));
  border:1px solid var(--line);
  border-radius:2px;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--mono);
  font-size:22px;
  color:var(--amber-dim);
  overflow:hidden;
}
.book-card .spine img{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
}
.book-card .info h3{
  margin:0 0 8px;
  font-weight:400;
  font-size:22px;
}
.book-card .info p{
  color:var(--muted);
  font-size:15px;
  max-width:440px;
  margin:0 0 14px;
}
.book-card .info a.readmore{
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  text-decoration:none;
  border-bottom:1px solid var(--amber-dim);
  padding-bottom:2px;
}
.book-card.placeholder{opacity:0.55;}
.book-card.placeholder .info p{font-style:italic;}

.status-badge{
  display:inline-block;
  font-family:var(--mono);
  font-size:10px;
  letter-spacing:0.1em;
  text-transform:uppercase;
  color:var(--amber-dim);
  border:1px solid var(--amber-dim);
  border-radius:2px;
  padding:3px 8px;
  margin-bottom:8px;
}

/* ---------- SONG GRID ---------- */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(130px,1fr));
  gap:10px;
}
.tile{
  border:1px solid var(--line);
  background:var(--bg2);
  padding:14px 12px;
  border-radius:3px;
  position:relative;
  transition:border-color .15s ease, background .15s ease;
}
.tile:hover{border-color:var(--amber-dim);background:var(--bg3);}
a.tile{display:block;text-decoration:none;color:inherit;}
.tile.active{border-color:var(--amber);}
.tile.active .status{color:var(--amber);}
.tile.active:hover{background:var(--bg3);}
.tile .num{
  font-family:var(--mono);
  font-size:11px;
  color:var(--amber-dim);
  letter-spacing:0.05em;
}
.tile .song{
  display:block;
  margin-top:6px;
  font-size:12px;
  font-family:var(--serif);
  color:var(--text);
  line-height:1.3;
}
.tile .status{
  display:block;
  margin-top:8px;
  font-size:11px;
  font-family:var(--mono);
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:0.05em;
}
.tile.corrupted{
  border-color:var(--red);
  background:linear-gradient(135deg, var(--bg2), #1f1315);
  cursor:default;
}
.tile.corrupted .num{color:var(--red);}
.tile.corrupted .status{color:#b06a66;}
.tile.corrupted::after{
  content:"";
  position:absolute;inset:0;
  background:repeating-linear-gradient(
    45deg, rgba(168,69,63,0.05) 0 2px, transparent 2px 5px
  );
  pointer-events:none;
  border-radius:3px;
}
.grid-note{
  margin-top:20px;
  font-family:var(--mono);
  font-size:12px;
  color:var(--muted);
}

/* ---------- SIGNUP ---------- */
.signup-box{max-width:520px;}
.signup-box p{color:var(--muted);font-size:15px;}
form.signup{
  display:flex;gap:10px;flex-wrap:wrap;
  margin-top:20px;
}
form.signup input[type="email"]{
  flex:1 1 260px;
  background:var(--bg2);
  border:1px solid var(--line);
  color:var(--text);
  padding:13px 14px;
  font-family:var(--serif);
  font-size:15px;
  border-radius:3px;
}
form.signup input[type="email"]:focus{outline:none;border-color:var(--amber-dim);}
form.signup button{
  background:var(--amber);
  color:#1a1408;
  border:none;
  padding:13px 22px;
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  border-radius:3px;
  cursor:pointer;
  font-weight:600;
}
form.signup button:hover{background:#e6b578;}
.signup-msg{
  margin-top:14px;
  font-family:var(--mono);
  font-size:12px;
  color:var(--amber);
  min-height:16px;
}
.signup-fineprint{margin-top:8px;font-size:12px;color:#5f6268;}
.substack-embed{max-width:480px;}
.substack-embed iframe{width:100%;max-width:480px;display:block;}

.playlist-embed{max-width:560px;margin:26px 0 34px;}
.playlist-embed iframe{width:100%;display:block;}

/* ---------- AUTHOR ---------- */
.author{display:flex;gap:24px;align-items:flex-start;flex-wrap:wrap;}
.author-photo{
  width:96px;height:96px;
  border-radius:3px;
  background:var(--bg2);
  border:1px solid var(--line);
  flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--mono);
  color:var(--muted);
  font-size:11px;
  text-align:center;
  overflow:hidden;
}
.author-photo img{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
}
.author p{max-width:520px;color:#c9c6bf;}

/* ---------- FOOTER ---------- */
footer{padding:40px 0 60px;text-align:center;}
footer .wrap{display:flex;flex-direction:column;gap:10px;align-items:center;}
footer .foot-links{display:flex;gap:18px;font-family:var(--mono);font-size:12px;}
footer .foot-links a{color:var(--muted);text-decoration:none;}
footer .foot-links a:hover{color:var(--amber);}
footer .copy{font-family:var(--mono);font-size:11px;color:#4c4f54;}
