/* ==========================================================================
   ogcz — shared styles (every page)
   ========================================================================== */

:root {
  --bg: #000;
  --bg-2: #000;
  --ink: #ece7dc;
  --muted: #8b867b;
  --faint: #4a463f;
  /* accent: the ogcz gold. One gold everywhere, no lighter/darker tiers.
     Clicking "ogcz" (nav logo or the big Home wordmark) switches to the red. */
  --gold: #9b8e12;
  --gold-hi: #b5a616; /* hover only */
  --gold-lo: var(--gold);
  --accent-rgb: 155, 142, 18;
  --on-accent: #000; /* text sitting on an accent background */
  --line: rgba(var(--accent-rgb), 0.38);
  --line-soft: rgba(236, 231, 220, 0.1);

  --f-mark: "DM Serif Text", Georgia, "Times New Roman", serif;
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --nav-h: 64px;
}

/* the red ogcz */
:root[data-accent="red"] {
  --gold: #763131;
  --gold-hi: #903c3c; /* hover only */
  --gold-lo: var(--gold);
  --accent-rgb: 118, 49, 49;
  --on-accent: #000;
}
/* only while switching: let every accent color glide instead of snapping */
:root.accent-anim *,
:root.accent-anim *::before,
:root.accent-anim *::after {
  transition: color 0.5s var(--ease), background-color 0.5s var(--ease), border-color 0.5s var(--ease),
    box-shadow 0.5s var(--ease), fill 0.5s var(--ease), stroke 0.5s var(--ease) !important;
}

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

html { scroll-behavior: smooth; overflow-x: clip; color-scheme: only dark; } /* nothing can make the page wider than the screen */
/* no rubber-band stretch past the top or bottom (a phone showed black space above the page) */
html, body { overscroll-behavior-y: none; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--f-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip; /* same, but keeps sticky scenes working in every phone browser */
}
body.modal-open,
body.menu-open { overflow: hidden; }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

::selection { background: var(--gold); color: var(--on-accent); }

:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 4px; border-radius: 4px; }


/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  transition: background 0.4s;
}
/* the nav is always fully transparent, at every size and scroll position (the owner's choice:
   no black bar, no dark fade, no frosted glass) */
.nav.is-scrolled { background: none; }
/* over the Home searchlight the nav stays clear, so the light only ever dims evenly */
.nav.nav--clear { background: none; }
.nav__brand {
  font-family: var(--f-mark);
  font-size: 1.6rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: none;
  color: var(--gold); /* no extra tracking: the Home wordmark docks onto this letter-for-letter */
}
.nav__links { display: flex; gap: clamp(1.5rem, 3vw, 2.75rem); }
.nav__links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.25s;
}
.nav__links a:hover { color: #fff; }
.nav__links a.is-active { color: var(--gold); }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  position: relative;
  z-index: 2;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--gold); /* same colour as the ogcz logo */
  transition: transform 0.3s var(--ease), opacity 0.2s, background 0.2s;
}
body.menu-open .nav__burger span { background: var(--gold); }
body.menu-open .nav__burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
body.menu-open .nav__burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
body.menu-open .nav__brand { opacity: 1 !important; }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
body.menu-open .drawer { opacity: 1; visibility: visible; }
.drawer a {
  font-family: var(--f-mark);
  font-size: 2.5rem;
  padding: 0.6rem 0;
  color: rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: translateY(16px);
  transition: color 0.2s, opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
body.menu-open .drawer a { opacity: 1; transform: none; }
body.menu-open .drawer a:nth-child(2) { transition-delay: 0.05s; }
body.menu-open .drawer a:nth-child(3) { transition-delay: 0.1s; }
body.menu-open .drawer a:nth-child(4) { transition-delay: 0.15s; }
.drawer a.is-active,
.drawer a:hover { color: var(--gold); }

@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
}
@media (min-width: 641px) {
  .drawer { display: none; }
}

/* ==========================================================================
   Placeholder cards (used until real work is added)
   ========================================================================== */
.ph {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(12px, 1.4vw, 20px);
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255, 240, 200, 0.08), transparent 60%),
    linear-gradient(160deg, #1a1812, #0b0a08 70%);
  color: var(--ink);
}
.ph::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: inherit;
  pointer-events: none;
}
/* default cards: flat colours. Only the Graphic Design books keep the soft glow (below). */
.ph--gold { background: linear-gradient(160deg, #2a2606, #0d0c02 75%); }
.ph--ink { background: linear-gradient(160deg, #141416, #060607 75%); }
.ph--ember { background: linear-gradient(160deg, #26120b, #0b0604 75%); }
.ph--bone { background: linear-gradient(160deg, #d8cfbb, #a79b82 75%); color: #1a160e; }
.ph--bone::before { border-color: rgba(26, 22, 14, 0.2); }
.ph--olive { background: linear-gradient(160deg, #1d1c10, #080805 75%); }
.ph--sand { background: linear-gradient(160deg, #2a2217, #0c0a06 75%); } /* Design (was the cream-white bone) */
/* the category word at the top of a card, in its category colour (same as the tags) */
.cat--gold { --cat: #cbbb2c; }
.cat--olive { --cat: #a4aa5f; }
.cat--bone { --cat: #a8906a; }
.cat--sand { --cat: #a8906a; }
.cat--ink { --cat: #7486a0; }
.cat--ember { --cat: #d9804f; }
.cat--indigo { --cat: hsl(234 38% 70%); }
.cat--teal { --cat: hsl(162 38% 70%); }
.cat--plum { --cat: hsl(306 38% 70%); }
.cat--rust { --cat: hsl(18 38% 70%); }
.cat--moss { --cat: hsl(90 38% 70%); }
[class*="cat--"] .ph__top { opacity: 1; }
[class*="cat--"] .ph__top span:first-child { color: var(--cat); }
/* dark pentadic set (five hues 72° apart, muted): indigo 234°, teal 162°, plum 306°, rust 18°, moss 90° */
.ph--indigo { background: linear-gradient(160deg, hsl(234 30% 17%), hsl(234 28% 6%) 75%); }
.ph--teal { background: linear-gradient(160deg, hsl(162 30% 17%), hsl(162 28% 6%) 75%); }
.ph--plum { background: linear-gradient(160deg, hsl(306 30% 17%), hsl(306 28% 6%) 75%); }
.ph--rust { background: linear-gradient(160deg, hsl(18 30% 17%), hsl(18 28% 6%) 75%); }
.ph--moss { background: linear-gradient(160deg, hsl(90 30% 17%), hsl(90 28% 6%) 75%); }
/* category shades (Archives): five shades of the accent, from pale to dark. They follow the
   accent, so in red mode they're shades of red. Set per category in js/site.js (CATEGORY_TONE). */
.ph--s1 { background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 14%, #3a3a3a), #0a0a09 78%); }
.ph--s2 { background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 20%, #1c1c1c), #080807 76%); }
.ph--s3 { background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 22%, #000), #070602 75%); }
.ph--s4 { background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 16%, #000), #050402 75%); }
.ph--green { background: linear-gradient(160deg, #0a2416, #030a06 76%); }
.ph--red { background: linear-gradient(160deg, #2a0e0c, #0b0404 76%); }
.ph--orange { background: linear-gradient(160deg, #2c1606, #0b0602 76%); }
.ph--violet { background: linear-gradient(160deg, #170e2c, #06040b 76%); }
.ph--pink { background: linear-gradient(160deg, #2a0c1c, #0b0307 76%); }
.ph--teal { background: linear-gradient(160deg, #06221f, #020908 76%); }
.ph--blue { background: linear-gradient(160deg, #0b1a30, #03060c 76%); }
.ph--gray { background: linear-gradient(160deg, #262626, #0a0a0a 76%); }
.ph--s5 { background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 10%, #000), #040302 75%); }

.ph__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.7;
  position: relative;
}
.ph__num {
  position: relative;
  font-family: var(--f-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.85;
  color: var(--gold);
}
.ph--bone .ph__num { color: #3a2f18; }
/* the books keep the soft glow (the ombré-dial look) */
.book3d__face .ph--gold { background: radial-gradient(120% 90% at 30% 10%, color-mix(in srgb, #6b6210 70%, transparent), transparent 60%), linear-gradient(160deg, #2a2606, #0d0c02 75%); }
.book3d__face .ph--ink { background: radial-gradient(120% 90% at 70% 0%, color-mix(in srgb, #2b2b2e 70%, transparent), transparent 60%), linear-gradient(160deg, #141416, #060607 75%); }
.book3d__face .ph--ember { background: radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, #5a2a17 70%, transparent), transparent 60%), linear-gradient(160deg, #26120b, #0b0604 75%); }
.book3d__face .ph--bone { background: radial-gradient(120% 90% at 50% 0%, #d8cfbb, #a79b82 70%); color: #1a160e; }
.book3d__face .ph--olive { background: radial-gradient(120% 90% at 30% 0%, color-mix(in srgb, #444226 70%, transparent), transparent 60%), linear-gradient(160deg, #1d1c10, #080805 75%); }
.ph__title {
  position: relative;
  font-family: var(--f-display);
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 500;
}
.media { width: 100%; height: 100%; object-fit: cover; }

/* reveal helper */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.rv.is-in { opacity: 1; transform: none; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 14px;
  transition: background 0.35s, color 0.35s, box-shadow 0.35s;
}
.btn:hover { background: var(--gold); color: var(--on-accent); box-shadow: 0 0 30px -4px rgba(var(--accent-rgb), 0.55); }
.btn.is-pulse { animation: pulse 1.4s var(--ease) 2; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6); }
  100% { box-shadow: 0 0 0 18px rgba(var(--accent-rgb), 0.0); }
}

/* ---------- footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 var(--gutter);
  padding: 24px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--faint);
}
.footer__mark { font-family: var(--f-mark); font-size: 20px; color: var(--gold-lo); }
@media (max-width: 520px) {
  .footer { flex-direction: column; align-items: flex-start; }
}

/* ---------- to top ---------- */
.totop {
  position: fixed;
  right: var(--gutter);
  bottom: 24px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #000;
  border: 1px solid var(--line-soft);
  color: var(--gold);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s var(--ease);
}
.totop.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.totop svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.totop circle { fill: none; stroke-width: 1.5; }
.totop__track { stroke: var(--line-soft); }
.totop__bar { stroke: var(--gold); stroke-dasharray: 113.1; stroke-dashoffset: calc(113.1 * (1 - var(--p, 0))); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- scrollbar: a thin gold line ---------- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-hi); }
::-webkit-scrollbar-corner { background: transparent; }
/* Firefox (no pseudo-elements): thin gold on black */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
}

/* pictures can't be dragged out, selected or long-pressed to save */
img, video { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
