/* ============================================================
   DAN MANNES - PORTFOLIO WIREFRAME
   Shared stylesheet · all pages
   Brand: sun-faded modern heritage (see dan-mannes-brand-book.html)
   ============================================================ */

/* ---------- 2.1 · Color tokens (exact, per master prompt) ---------- */
:root {
  --bone:   #F4EFE5;  /* primary background - the page itself */
  --canvas: #E7DDC8;  /* secondary bg, cards, alternating bands */
  --khaki:  #C9B893;  /* borders-on-dark, muted fills, hovers */
  --palm:   #5A6650;  /* mid green - italic accents, secondary UI */
  --pine:   #2F3527;  /* deep green - dark sections, footer, tickers */
  --harbor: #263239;  /* navy - film/motion contexts only */
  --clay:   #A8593B;  /* THE accent - links, eyebrows, monogram */
  --wing:   #7E2F27;  /* faded heritage red - rare; live-dots, tags */
  --ink:    #211E18;  /* body text - warm near-black, never #000 */
  --rule:   rgba(33,30,24,.18); /* hairline rules */

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono:  'IBM Plex Mono', 'Courier New', monospace;

  --maxw: 1180px;
  --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Reset & base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

/* Film grain - fixed full-page overlay, ~5% */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: .05; background-image: var(--grain);
}

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

/* ---------- Ticker strip (Pine band, scrolling mono) ---------- */
.ticker {
  background: var(--pine); color: var(--bone);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 9px 0; white-space: nowrap; overflow: hidden;
}
.ticker span { display: inline-block; padding-left: 100%; animation: tick 40s linear infinite; }
.ticker.slim { font-size: 10px; padding: 7px 0; }
@keyframes tick { to { transform: translateX(-100%); } }

/* ---------- Sticky nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,239,229,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav .mark {
  font-family: var(--serif); font-weight: 600; font-size: 18px; letter-spacing: .02em;
  text-decoration: none;
}
.nav .links { display: flex; gap: 26px; align-items: center; }
.nav .links a {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; opacity: .72; transition: opacity .2s, color .2s;
}
.nav .links a:hover, .nav .links a[aria-current="page"] { opacity: 1; }
.nav .links a[aria-current="page"] { color: var(--clay); }
.nav .links a.hello { color: var(--clay); opacity: 1; }
.nav .menu-toggle {
  display: none; background: none; border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  padding: 7px 14px; cursor: pointer; color: var(--ink);
}
@media (max-width: 760px) {
  .nav .links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bone);
    border-bottom: 1px solid var(--rule);
  }
  .nav .links.open { display: flex; }
  .nav .links a { padding: 16px 32px; width: 100%; border-top: 1px dashed var(--rule); }
  .nav .menu-toggle { display: block; }
}

/* ---------- Shared type components ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--clay); display: block; margin-bottom: 20px;
}
.display {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(64px, 10vw, 132px);
  line-height: .95; letter-spacing: -.015em;
}
.display em, h2 em { font-style: italic; font-weight: 400; color: var(--palm); }
h2.sec-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -.01em; line-height: 1.1;
}
.mono-label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(33,30,24,.55);
}
.body-copy { max-width: 68ch; color: rgba(33,30,24,.85); }
.index-no { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--clay); }

/* ---------- Placeholder image blocks (wireframe) ----------
   Every .ph is a labeled stand-in for a real photo/film frame.
   data-label text is rendered center; slate caption sits below. */
.ph {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}
.ph::after { content: ""; position: absolute; inset: 0; opacity: .12; background-image: var(--grain); pointer-events: none; }
.ph .ph-label {
  position: relative; z-index: 1; text-align: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(244,239,229,.85); padding: 8px 14px; border: 1px dashed rgba(244,239,229,.5);
  max-width: 85%;
}
.ph.on-light .ph-label { color: rgba(33,30,24,.6); border-color: rgba(33,30,24,.35); }
/* gradient variants (per §2.4) */
.ph-warm   { background: linear-gradient(160deg, var(--khaki) 0%, var(--clay) 55%, var(--wing) 100%); }
.ph-jungle { background: linear-gradient(200deg, var(--palm) 0%, var(--pine) 75%); }
.ph-mono   { background: linear-gradient(180deg, #8a857c 0%, var(--ink) 100%); }
.ph-canvas { background: linear-gradient(170deg, var(--canvas) 0%, var(--khaki) 100%); }
.ph-harbor { background: linear-gradient(190deg, #3d4d57 0%, var(--harbor) 80%); }
/* the arch - one per viewport, portrait leads only */
.arch { border-radius: 999px 999px 0 0; }
/* 2.39:1 letterboxed film frame */
.film-frame { background: var(--ink); padding: 4.2% 0; }
.film-frame .ph { aspect-ratio: 2.39 / 1; min-height: 0; }
.timecode {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: rgba(244,239,229,.7);
}

/* slate caption block under placeholders */
.slate {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(33,30,24,.6); line-height: 1.7; padding-top: 10px;
}
.slate b { font-weight: 500; color: var(--ink); }

/* ---------- Motif: route pill ---------- */
.route-pill {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; border: 1px solid var(--ink); border-radius: 999px;
  padding: 9px 18px;
}

/* ---------- Motif: DM roundel (spins 28s/rev) ---------- */
.roundel { animation: spin 28s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Rules / ledger rows ---------- */
.hairline { border: none; border-top: 1px solid var(--rule); }
.ledger-row {
  display: grid; grid-template-columns: 150px 1fr; gap: 24px;
  padding: 18px 0; border-bottom: 1px dashed var(--rule); align-items: baseline;
}
.ledger-row .yr { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--clay); }
.ledger-row .what b { font-family: var(--serif); font-weight: 500; font-size: 18px; display: block; }
.ledger-row .what span { font-size: 14px; color: rgba(33,30,24,.66); }
@media (max-width: 600px) { .ledger-row { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Fade-up on scroll ----------
   Hidden state only applies once main.js adds .js to <html>,
   so content stays visible if JS never runs. */
.js .fade-up { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.js .fade-up.in { opacity: 1; transform: none; }

/* ---------- Footer (Pine) ---------- */
.site-footer { background: var(--pine); color: var(--bone); padding: 84px 0 48px; }
.site-footer .cta-line {
  font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 5.5vw, 64px);
  line-height: 1.05; letter-spacing: -.01em; max-width: 15ch;
}
.site-footer .cta-line em { font-style: italic; font-weight: 400; color: var(--khaki); }
.site-footer .mailto {
  display: inline-block; margin-top: 26px; font-family: var(--mono); font-size: 13px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--khaki);
  text-decoration: none; border-bottom: 1px solid var(--khaki); padding-bottom: 4px;
}
.site-footer .mailto:hover { color: var(--bone); border-color: var(--bone); }
.footer-grid {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap;
}
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-cols h4 {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  opacity: .5; margin-bottom: 14px; font-weight: 400;
}
.footer-cols a {
  display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; text-decoration: none; opacity: .8; padding: 4px 0;
}
.footer-cols a:hover { opacity: 1; color: var(--khaki); }
.footer-base {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(244,239,229,.18);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  opacity: .55;
}

/* ---------- Filter pills (archive) ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 24px 40px; padding: 22px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-group .grp {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(33,30,24,.45); margin-right: 4px;
}
.pill {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--rule); border-radius: 999px; background: none; color: var(--ink);
  padding: 7px 16px; cursor: pointer; transition: all .2s;
}
.pill:hover { border-color: var(--ink); }
.pill.active { background: var(--pine); border-color: var(--pine); color: var(--bone); }

/* ---------- Work cards (shared: index + archive) ---------- */
.work-card { text-decoration: none; display: block; }
.work-card .ph { transition: transform .25s ease; }
.work-card:hover .ph { transform: translateY(-4px); }
.work-card .card-no {
  font-family: var(--serif); font-style: italic; font-size: 15px; color: rgba(33,30,24,.5);
  transition: color .2s;
}
.work-card:hover .card-no { color: var(--clay); }
.work-card .card-title { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.2; margin: 4px 0 2px; }
.work-card .card-meta { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(33,30,24,.55); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker span { animation: none; padding-left: 0; }
  .roundel { animation: none; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  .work-card .ph, .work-card:hover .ph { transition: none; transform: none; }
}
