/* spoilme.io — hand-written CSS, no build step. Fonts: self-hosted woff2 (see @font-face below). */

@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/space-mono-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/space-mono-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/space-mono-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Space Mono'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/assets/fonts/space-mono-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Special Elite'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/special-elite-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Special Elite'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/fonts/special-elite-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img, svg { max-width: 100%; display: block; }

:root {
  --paper: #EDE4CE;
  --paper-card: #FFFFFF;
  --ink: #17140F;
  --ink-muted: #6b6558;
  --stamp: #1B3B5C;

  --font-display: 'Special Elite', system-ui, serif;
  --font-body: 'Space Mono', ui-monospace, monospace;

  --container: 1280px;

  --spl-ease: cubic-bezier(0.2, 0, 0, 1);
  --spl-t1: 110ms;
  --spl-t2: 200ms;
  --spl-t3: 340ms;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); text-transform: uppercase; line-height: 1.15; margin: 0 0 1rem; font-weight: normal; text-align: center; }
h1 { font-size: clamp(2.1rem, 5.5vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 4px solid var(--ink); }
.site-header .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.logo span { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; }
.site-nav { display: flex; flex-wrap: wrap; gap: .3rem; }
.site-nav a {
  display: inline-block;
  clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.7rem .7rem 1.1rem;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  text-decoration: none;
}
.site-nav a[aria-current="page"], .site-nav a:hover, .site-nav a:focus-visible { background: var(--stamp); }
.lang-switch { display: flex; gap: .35rem; font-size: .65rem; }
.lang-switch a { font-weight: 700; text-decoration: none; color: var(--ink); border: 1px solid var(--ink); padding: .3rem .5rem; }
.lang-switch a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* ---------- hero ---------- */
.hero { padding-block: 4rem; border-bottom: 2px solid var(--ink); position: relative; overflow: hidden; }
.hero .kicker { display: flex; align-items: center; justify-content: center; gap: 1rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1.5rem; }
.hero .kicker::before { content: ""; width: 3rem; height: 3px; background: var(--ink); flex: none; }
.hero h1 mark { background: var(--ink); color: var(--paper); padding: 0 .4rem; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero .lede { max-width: 42em; margin-inline: auto; font-size: 1.05rem; opacity: .85; text-align: justify; }

/* ---------- stamp badge ---------- */
.stamp {
  display: inline-block; border: 4px solid var(--stamp); color: var(--stamp);
  transform: rotate(-8deg); padding: .3rem .9rem; font-weight: 700; text-transform: uppercase;
  font-size: .75rem; letter-spacing: .05em; mix-blend-mode: multiply; opacity: .85;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .stamp { animation: spl-stamp-hit both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@keyframes spl-stamp-hit { from { opacity: 0; transform: rotate(-8deg) scale(1.6); } to { opacity: .85; transform: rotate(-8deg) scale(1); } }

/* ---------- redaction-lift (signature moment) ---------- */
.redacted { position: relative; display: inline-block; padding: 0 .3rem; color: transparent; cursor: help; }
.redacted::before { content: ""; position: absolute; inset: 0; background: var(--ink); clip-path: inset(0 0 0 0); }
.redacted:hover, .redacted:focus, .redacted:focus-within { color: var(--paper); }
@media (prefers-reduced-motion: no-preference) {
  .redacted::before { transition: clip-path var(--spl-t2) var(--spl-ease); }
  .redacted:hover::before, .redacted:focus::before, .redacted:focus-within::before { clip-path: inset(0 100% 0 0); }
}

/* ---------- section furniture reveal (R2 clip-wipe) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .spl-reveal { animation: spl-unroll both; animation-timeline: view(); animation-range: entry 5% entry 45%; }
  }
}
@keyframes spl-unroll { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.section { padding-block: 4rem; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: 1rem; margin-bottom: 2.5rem; }
.section-intro { max-width: 60ch; margin: 0 auto 2.5rem; text-align: justify; }

/* ---------- case-file grid + cards ---------- */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px; }
.case-card { border: 2px solid var(--ink); background: var(--paper-card); padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; min-height: 20rem; text-decoration: none; color: var(--ink); }
.case-card .ref { font-size: .65rem; font-weight: 700; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .3rem; text-align: center; }

/* ---------- case-file photo (thumbnails + homepage clip) ---------- */
.case-photo { display: block; width: 100%; height: auto; border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.case-card .case-photo-wrap { aspect-ratio: 1 / 1; overflow: hidden; margin-bottom: 1rem; }
.case-card .case-photo-wrap .case-photo { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-wrap { max-width: 220px; margin: 0 auto 2rem; transform: rotate(-2deg); }
.hero-photo-wrap .case-photo { box-shadow: 6px 6px 0 var(--ink); }
.article-photo-wrap { max-width: 260px; margin: 0 auto 1.75rem; }
@media (max-width: 640px) {
  .hero-photo-wrap { max-width: 160px; }
}
.case-card h3 { font-size: 1.4rem; text-decoration: underline; text-decoration-thickness: 3px; margin: 0; }
.case-card .excerpt { font-size: .8rem; font-style: italic; opacity: .75; margin-top: 1rem; text-align: justify; }
.case-card .open-file { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border: 2px solid var(--ink); padding: .8rem 1rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.case-card:hover .open-file, .case-card:focus-visible .open-file { background: var(--ink); color: var(--paper); }

/* button/card feedback (B2 hard-offset-push) */
.case-card, .btn {
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform var(--spl-t1) var(--spl-ease), box-shadow var(--spl-t1) var(--spl-ease);
}
.case-card:hover, .btn:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.case-card:active, .btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: .75rem;
  border: 2px solid var(--ink); background: var(--paper-card); color: var(--ink);
  padding: 1rem 1.25rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; text-decoration: none;
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--paper); }

/* ---------- links (link treatment L7: bracket-arrow-reveal) ---------- */
.prose a, .link-arrow {
  color: var(--ink); text-decoration: underline; text-underline-offset: 2px;
}
.prose a::after, .link-arrow::after {
  content: "▸"; display: inline-block; opacity: 0; transform: translateX(-4px); margin-inline-start: .3em;
  transition: opacity var(--spl-t1) var(--spl-ease), transform var(--spl-t1) var(--spl-ease);
}
.prose a:hover::after, .link-arrow:hover::after,
.prose a:focus-visible::after, .link-arrow:focus-visible::after { opacity: 1; transform: none; }

/* ---------- case trail (breadcrumb, filed as a folder path) ---------- */
.case-trail {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45rem;
  font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em;
  margin-bottom: 1.25rem;
}
.case-trail a {
  color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
  padding: 0 .15rem;
}
.case-trail a:hover, .case-trail a:focus-visible { background: var(--ink); color: var(--paper); text-decoration: none; }
/* the separator rides WITH the crumb it precedes, so a wrapped trail never leaves
   a dangling "/" at the end of a line (mobile) and hovering a link never
   highlights the slash */
.case-trail .crumb { display: inline-flex; align-items: center; gap: .45rem; }
.case-trail .crumb::before { content: "/"; opacity: .4; font-weight: 400; }
.case-trail .here { opacity: .55; }
@media (max-width: 700px) {
  /* a three-or-more-crumb trail wraps to a second line once Space Mono swaps in.
     Reserve the wrapped height up front, otherwise the swap pushes the H1 down
     and the page ships a ~0.08 layout shift it does not need. */
  .case-trail:has(.crumb + .crumb) { min-height: 3.9em; align-content: flex-start; }
}

/* ---------- prose (title-page body copy) ---------- */
.prose { max-width: 68ch; margin-inline: auto; }
.prose h2 { margin-top: 3rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .5rem; }
.prose p, .prose li { text-align: justify; }

/* ---------- FAQ accordion ---------- */
.faq { display: grid; gap: .5rem; margin-top: 2rem; }
.faq details { border: 2px solid var(--ink); background: var(--paper-card); }
.faq summary { padding: 1.1rem 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: .92rem; text-transform: none; font-family: var(--font-body); font-weight: 700; }
.faq summary .toggle { font-weight: 700; transition: transform var(--spl-t1) var(--spl-ease); flex: none; }
.faq details[open] summary .toggle { transform: rotate(45deg); }
.faq .answer { padding: 0 1.4rem 1.2rem; opacity: .82; }
.faq .answer p { text-align: justify; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-block: 4rem; margin-top: 4rem; }
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { text-decoration: underline; }
.site-footer .bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3rem; }
.site-footer h5 { font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; color: #a89e86; margin-bottom: 1rem; font-family: var(--font-body); }
.site-footer nav { display: flex; flex-direction: column; gap: .6rem; font-size: .78rem; }
.footer-bottom { max-width: var(--container); margin: 3rem auto 0; padding: 1.5rem 1.5rem 0; border-top: 1px solid #33302a; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; color: #6b6558; }

@media (max-width: 640px) {
  .site-header .bar { flex-direction: column; align-items: flex-start; }
  .hero { padding-block: 2.5rem; }
  .section { padding-block: 2.5rem; }
}
