/* =========================================================
   Amos Kane — shared site styles
   Edit colors, type, and spacing here and every page updates.
   ========================================================= */
:root {
  --paper: #F7F5F0;
  --ink: #1A1814;
  --ink-soft: #4A453D;
  --bronze: #8B6F47;
  --bronze-deep: #6E5638;
  --line: #D8D0C2;
  --bg: var(--paper);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --rule: var(--line);
  --accent: var(--bronze);
  --card: #FFFFFF;
  --hero-overlay: linear-gradient(180deg, rgba(20,18,16,0) 30%, rgba(20,18,16,0.55) 100%);
}
[data-theme="dark"] {
  --bg: #161412;
  --fg: #EDE8DF;
  --fg-soft: #B8AF9F;
  --rule: #2E2A25;
  --accent: #C79A5E;
  --card: #1E1B18;
  --hero-overlay: linear-gradient(180deg, rgba(10,9,8,0) 25%, rgba(10,9,8,0.7) 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.5s ease, color 0.5s ease;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* modular tick rule: the signature motif */
.tick-rule {
  height: 1px;
  background-image: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 22px);
  opacity: 0.5; border: none; width: 100%;
}

/* nav */
header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
nav {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; position: relative;
}
.brand {
  font-family: 'Fraunces', serif; font-weight: 500;
  font-size: 1.25rem; letter-spacing: 0.01em;
  color: var(--fg); text-decoration: none;
  display: inline-flex; align-items: center; gap: 12px;
}
.brand-logo {
  height: 30px; width: auto; display: block;
}
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--fg-soft); text-decoration: none; transition: color 0.25s;
  position: relative; padding: 4px 0;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px; background: var(--accent);
}
.theme-toggle {
  background: none; border: 1px solid var(--rule); border-radius: 50%;
  width: 38px; height: 38px; cursor: pointer; color: var(--fg);
  display: grid; place-items: center; transition: border-color 0.25s, transform 0.4s;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(20deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.menu-btn { display: none; background: none; border: none; color: var(--fg); cursor: pointer; }

/* buttons */
.btn {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em;
  padding: 14px 28px; text-decoration: none; transition: all 0.25s; cursor: pointer;
  border: 1px solid var(--accent); display: inline-block;
}
.btn-solid { background: var(--accent); color: var(--bg); }
.btn-solid:hover { background: transparent; color: var(--accent); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* generic section + headings */
section { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.eyebrow {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.22em; color: var(--accent);
}
.page-head { padding: 72px 32px 8px; max-width: 1240px; margin: 0 auto; }
.page-head h1 {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -0.015em;
  margin: 16px 0 18px;
}
.page-head .sub {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: var(--fg-soft); max-width: 50ch;
}

/* prose */
.prose { max-width: 64ch; }
.prose h2 {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: -0.01em; margin: 0 0 14px;
}
.prose h3 {
  font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.3rem; margin: 0 0 6px;
}
.prose p { color: var(--fg-soft); font-size: 1.05rem; margin-bottom: 20px; }
.prose strong { color: var(--fg); font-weight: 600; }

/* statement band */
.band { padding: 88px 32px; text-align: center; max-width: 980px; margin: 0 auto; }
.band p {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.32; letter-spacing: -0.01em;
}
.band .accent-word { color: var(--accent); font-style: italic; }

/* footer */
footer { border-top: 1px solid var(--rule); margin-top: 64px; }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 48px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.footer-brand { font-family: 'Fraunces', serif; font-size: 1.1rem; }
.footer-tag { font-style: italic; color: var(--fg-soft); font-size: 0.95rem; }
.social { display: flex; gap: 24px; }
.social a {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--fg-soft); text-decoration: none; transition: color 0.25s;
}
.social a:hover { color: var(--accent); }
.copyright { width: 100%; font-size: 0.76rem; color: var(--fg-soft); padding-top: 8px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* responsive base */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 20px; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--bg); padding: 28px 32px;
    border-bottom: 1px solid var(--rule);
  }
  .menu-btn { display: grid; place-items: center; }
}
@media (max-width: 520px) {
  nav { padding: 16px 20px; }
  section, .band, .page-head { padding-left: 20px; padding-right: 20px; }
}

/* =========================================================
   Gallery: "view piece" cue + lightbox (Work page)
   ========================================================= */
/* Persistent label shown on cards that link to a full detail page */
.work-cue {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-top: 10px;
  transition: gap 0.25s ease;
}
.work:hover .work-cue { gap: 10px; }

/* Tiny corner glyph marking a card as enlargeable (cards without a page) */
.work-img .zoom-badge {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  opacity: 0.55; transition: opacity 0.3s ease;
  color: var(--fg); pointer-events: none;
}
.work:hover .work-img .zoom-badge { opacity: 1; }
.work-img .zoom-badge svg { width: 15px; height: 15px; }

/* Lightbox overlay */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: color-mix(in srgb, #0a0908 90%, transparent);
  backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px; gap: 20px;
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-img-wrap {
  max-width: min(1100px, 92vw); max-height: 78vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 100%; max-height: 78vh; object-fit: contain; display: block;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  transform: scale(0.96); transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
}
.lightbox.open .lightbox-img-wrap img { transform: scale(1); }
.lightbox-caption { text-align: center; color: #EDE8DF; max-width: 60ch; }
.lightbox-caption .lb-title { font-family: 'Fraunces', serif; font-size: 1.5rem; margin-bottom: 4px; }
.lightbox-caption .lb-series { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bronze); margin-bottom: 8px; }
.lightbox-caption .lb-spec { font-size: 0.9rem; color: #B8AF9F; line-height: 1.5; }
.lightbox-caption .lb-story-btn {
  display: none; align-items: center; gap: 8px; margin: 18px auto 0;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #161412; background: var(--bronze);
  padding: 12px 26px; text-decoration: none; transition: all 0.25s;
}
.lightbox-caption .lb-story-btn:hover { background: #EDE8DF; gap: 12px; }
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: none; border: 1px solid rgba(237,232,223,0.3); color: #EDE8DF;
  cursor: pointer; display: grid; place-items: center; transition: all 0.25s;
}
.lightbox-close:hover { border-color: var(--bronze); color: var(--bronze); transform: rotate(90deg); }
.lightbox-close svg { width: 20px; height: 20px; }
/* Prev/next arrows (used only when a piece has multiple images) */
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: color-mix(in srgb, #0a0908 50%, transparent);
  border: 1px solid rgba(237,232,223,0.25); color: #EDE8DF;
  cursor: pointer; display: none; place-items: center; transition: all 0.25s;
}
.lightbox-nav:hover { border-color: var(--bronze); color: var(--bronze); }
.lightbox-nav.show { display: grid; }
.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }
.lightbox-nav svg { width: 22px; height: 22px; }
body.lb-locked { overflow: hidden; }
