/* ==========================================================================
   Olivier Cavadenti · planète étrange, encre et papier
   ========================================================================== */

:root {
  --paper: #efeae0;
  --paper-2: #f7f4ec;
  --ink: #161616;
  --ink-soft: #55504a;
  --line: rgba(22, 22, 22, 0.22);
  --blue: #8fb4de;
  --blue-deep: #3456a0;
  --red: #c1473b;
  --yellow: #f2c230;
  --ochre: #e58a2f;
  --sage: #a5c63b;
  --lilac: #b9b4c4;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Spectral", Georgia, serif;
  --mono: "DM Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 5vw, 64px);
  --wrap: 1240px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .17 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 2px dashed var(--red); outline-offset: 4px; }
::selection { background: var(--blue); color: var(--paper-2); }
img, canvas { display: block; max-width: 100%; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { top: 12px; }

.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

.h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 8px 0 0;
  text-wrap: balance;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: linear-gradient(var(--paper) 30%, rgba(239, 234, 224, 0));
}
.nav__brand {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  text-decoration: none;
}
.nav__links { display: flex; gap: clamp(12px, 2.4vw, 28px); }
.nav__links a { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.nav__links a:hover { text-decoration: underline; text-decoration-color: var(--red); }
@media (max-width: 520px) { .nav__brand { display: none; } .nav { justify-content: flex-end; } }

/* ---------- Ink canvases ---------- */
.ink { width: 100%; height: auto; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(24px, 5vw, 72px); align-items: center;
  padding: 96px var(--gutter) 0;
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 84px; } }
.hero__title {
  margin: 14px 0 22px;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  font-weight: 900;
  font-size: clamp(3.4rem, 9vw, 7.4rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
  color: var(--yellow);
  -webkit-text-stroke: 2.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 6px 6px 0 var(--red);
}
.hero__lede { margin: 0; max-width: 30ch; font-size: clamp(1.1rem, 2vw, 1.35rem); font-style: italic; }
.hero__creds { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; }
.hero__creds span { border-top: 1.5px solid var(--ink); padding-top: 6px; }

/* screen-print frame */
.print { margin: 0; }
.print__art {
  aspect-ratio: 4 / 5; width: 100%;
  border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  background: var(--red);
}
.print__cap {
  display: flex; justify-content: space-between; margin-top: 14px;
  font-family: var(--body); font-style: italic; font-size: 0.95rem; color: var(--ink-soft);
}

/* ---------- Sections ---------- */
.planches, .journal, .transmissions, .contact {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) var(--gutter) 0;
}
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }

/* ---------- Plates ---------- */
.plates {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 2.4vw, 30px);
}
@media (max-width: 1080px) { .plates { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .plates { grid-template-columns: 1fr 1fr; gap: 12px; }
  .plate__link { padding: 8px 8px 12px; outline-offset: -5px; }
  .plate__num { display: none; }
  .plate__name { font-size: 1.2rem; }
  .plate__line { font-size: 0.86rem; }
  .plate__tag { font-size: 0.6rem; }
}

.plate__link {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 14px 14px 18px;
  text-decoration: none; color: var(--ink);
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  outline: 1px solid var(--ink); outline-offset: -7px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
a.plate__link:hover { color: var(--ink); transform: translateY(-4px) rotate(-0.6deg); box-shadow: 6px 8px 0 var(--red); }
.plate:nth-child(even) a.plate__link:hover { transform: translateY(-4px) rotate(0.6deg); box-shadow: -6px 8px 0 var(--yellow); }
.plate__art { aspect-ratio: 4 / 3; margin-bottom: 10px; border: 1.5px solid var(--ink); }
.plate__num i { text-transform: none; letter-spacing: 0.02em; font-family: var(--body); font-size: 0.95rem; }
.plate__name {
  margin: 2px 0 0;
  font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 700; font-size: 1.7rem; line-height: 1.05; letter-spacing: -0.015em;
}
.plate__line { margin: 0; flex: 1; font-size: 1rem; line-height: 1.4; }
.plate__tag { color: var(--red); margin-top: 6px; }

/* ---------- Journal ---------- */
.journal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .journal__grid { grid-template-columns: 1fr; } }
.log { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.log li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.log__when { color: var(--blue-deep); }
@media (max-width: 480px) { .log li { grid-template-columns: 1fr; gap: 2px; } }
.journal__lede { margin: 0 0 24px; max-width: 34ch; font-size: 1.15rem; font-style: italic; }
.journal__aside { margin: 22px 0 0; font-style: italic; color: var(--ink-soft); }
.rhodan { margin: 0; }
.rhodan__art { aspect-ratio: 1 / 1; max-width: 520px; margin: 0 auto; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.rhodan figcaption { max-width: 420px; margin: 8px auto 0; text-align: center; font-size: 1.02rem; }
.rhodan figcaption .label { display: block; margin-bottom: 4px; }

/* ---------- Posts ---------- */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.posts a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.posts__title { font-family: var(--display); font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 500; letter-spacing: -0.01em; transition: transform .25s; }
.posts a > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.posts__venue { font-size: 0.95rem; font-style: italic; color: var(--ink-soft); transition: transform .25s; }
.posts a:hover .posts__venue { transform: translateX(8px); }
.posts--papers .posts__title { font-size: clamp(1.1rem, 2vw, 1.4rem); }
.transmissions + .transmissions { padding-top: clamp(48px, 7vw, 80px); }
.posts a:hover .posts__title { transform: translateX(8px); color: var(--blue-deep); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 5vw, 60px); align-items: center; padding-bottom: 40px; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }
.contact__art { aspect-ratio: 1 / 1; max-width: 460px; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.contact__text p { margin: 16px 0 0; font-size: 1.15rem; }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px !important; }
.btn {
  display: inline-block; padding: 12px 22px;
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: var(--paper-2); background: var(--ink); border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--red);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { color: var(--paper-2); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--yellow); }
.btn--ghost { color: var(--ink); background: transparent; box-shadow: 4px 4px 0 var(--ochre); }
.btn--ghost:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { margin-top: clamp(48px, 8vw, 90px); }
.ink--strip { aspect-ratio: 8 / 1; min-height: 90px; }
.footer__inner {
  background: var(--ink); color: var(--paper);
  padding: 26px var(--gutter) 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; }
.footer__links a { color: var(--paper); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration-color: var(--ochre); }
.footer__small { margin: 0; font-size: 0.9rem; color: #b9c2ad; }

/* ==========================================================================
   Inner pages
   ========================================================================== */
.prose-wrap { max-width: 760px; margin: 0 auto; padding: 120px var(--gutter) 40px; }
.prose-head { margin-bottom: 36px; }
.prose-head .label a { text-decoration: none; }
.prose-title {
  margin: 10px 0 8px;
  font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 700; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1; letter-spacing: -0.025em; text-wrap: balance;
  text-shadow: 3px 3px 0 var(--yellow);
}
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--display); font-variation-settings: "SOFT" 100; letter-spacing: -0.01em; line-height: 1.15; margin: 2em 0 .5em; }
.prose h1 { font-size: 1.9rem; } .prose h2 { font-size: 1.6rem; } .prose h3 { font-size: 1.3rem; } .prose h4 { font-size: 1.1rem; }
.prose img { margin: 24px auto; border: 1.5px solid var(--ink); background: #fff; padding: 8px; }
.prose hr { border: 0; border-top: 1.5px solid var(--ink); margin: 48px 0; }
.prose code { font-family: var(--mono); font-size: .82em; background: var(--paper-2); border: 1px solid var(--line); padding: .05em .35em; }
.prose blockquote { margin: 1.5em 0; padding: 0 1.2em; border-left: 3px solid var(--red); color: var(--ink-soft); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; }
.prose figure.highlight, .prose div.highlight { margin: 1.5em 0; }
.prose pre {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  background: var(--ink); color: #e7ecd6;
  font-family: var(--mono); font-size: .8rem; line-height: 1.6;
  box-shadow: 5px 5px 0 var(--red);
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cd { color: #8b9a8e; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kt, .highlight .kc { color: #ef8a73; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sd, .highlight .si, .highlight .se, .highlight .sh { color: #b8d68f; }
.highlight .m, .highlight .mi, .highlight .mf { color: #e7b85c; }
.highlight .nf, .highlight .fm, .highlight .nb { color: #8ec5ff; }
.highlight .nc, .highlight .nn, .highlight .na, .highlight .nd { color: #e7b85c; }

.posts--page { margin-top: 32px; }

/* 404 */
.lost { max-width: 760px; margin: 0 auto; padding: 110px var(--gutter) 20px; text-align: center; }
.lost__art { aspect-ratio: 4 / 3; max-width: 520px; margin: 0 auto; }
.lost h1 { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1; font-size: clamp(4rem, 16vw, 8rem); line-height: 1; margin: 0; text-shadow: 4px 3px 0 rgba(200, 71, 47, 0.4); }
.lost p { font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
