/* ==========================================================================
   moulintour.com · "Affiche 1900" — lithograph poster: cream paper, flat
   vermilion / mustard / ink / teal, thick outlines, offset print shadows.
   ========================================================================== */
:root {
  --cream: #f3e4c4; --cream-2: #ead6ad; --ink: #1d1914; --red: #d8342a; --red-dk: #a8231b; --mustard: #e3a72f; --teal: #1f6f6b;
  --bg: var(--cream); --bg-2: var(--cream-2); --surface: #fbf1dc; --surface-2: #f6e7c8;
  --text: #2b241b; --muted: #6a5a45; --heading: var(--ink);
  --accent: var(--red); --accent-2: var(--mustard); --on-accent: #fff8ea;
  --line: rgba(29, 25, 20, .18); --line-strong: var(--ink);
  --radius: 4px; --radius-lg: 6px; --btn-radius: 4px;
  --f-display: "Abril Fatface", "Didot", Georgia, serif; --f-body: "Work Sans", system-ui, sans-serif; --f-label: "Work Sans", system-ui, sans-serif;
  --label-case: uppercase; --label-track: .16em;
  --header-bg: rgba(243, 228, 196, .94);
  --shadow: 6px 6px 0 var(--ink);
  --focus: var(--teal);
}
body {
  background-color: var(--cream);
  background-image:
    radial-gradient(rgba(29, 25, 20, .06) 1px, transparent 1.2px),
    radial-gradient(rgba(168, 35, 27, .05) 1px, transparent 1.2px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px;
}
h1, h2, h3 { letter-spacing: .005em; }
h1 em, h2 em, h3 em { font-style: normal; color: var(--red); }
.eyebrow { color: var(--teal); font-weight: 700; }
.lead { color: var(--text); }

/* Buttons: printed blocks with offset shadow */
.btn { border: 2.5px solid var(--ink); font-weight: 700; letter-spacing: .1em; box-shadow: 4px 4px 0 var(--ink); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--red); color: var(--on-accent); }
.btn-ghost { background: var(--mustard); color: var(--ink); }
.text-link { color: var(--red); }

/* Header */
.site-header { border-bottom: 3px solid var(--ink); background: var(--header-bg); }
.brand-mark { width: 40px; height: 40px; stroke: var(--ink); stroke-width: 5; }
.brand-mark .bm-disc { fill: var(--red); stroke: var(--ink); stroke-width: 5; }
.brand-mark .sails { stroke: var(--cream); stroke-width: 6; transform-origin: 50px 50px; animation: spin 14s linear infinite; }
.brand-mark .fill { fill: var(--cream); stroke: none; }
.brand-name { font-family: var(--f-display); font-size: 24px; }
.brand-name small { display: block; font-family: var(--f-label); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--teal); margin-top: 4px; }
.nav a { font-weight: 600; font-size: 14px; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 3px; background: var(--red); transition: right .35s var(--ease-out); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.lang-switch { border: 2px solid var(--ink); border-radius: 4px; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Windmill sails (shared) */
.sails .mast { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.sails .blade { fill: var(--cream); stroke: var(--ink); stroke-width: 3; }
.sails .hub { fill: var(--ink); }
.brand-mark .sails .blade { stroke-width: 4; }

/* Hero */
.mt-hero { position: relative; padding: calc(var(--header-h) + clamp(30px, 5vw, 70px)) 0 0; overflow: hidden; border-bottom: 3px solid var(--ink); }
.mt-hero-bg { position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 72% 46%, rgba(227, 167, 47, .32) 0 6deg, transparent 6deg 12deg); animation: rays 60s linear infinite; }
.mt-hero-bg svg { display: none; }
@keyframes rays { to { background-position: 0 0; filter: hue-rotate(0deg); } }
.mt-hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 5vw, 70px); align-items: center; padding-bottom: clamp(40px, 6vw, 80px); }
.mt-stamp { display: inline-block; font-family: var(--f-label); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; padding: 8px 14px; border: 2.5px solid var(--red); color: var(--red); transform: rotate(-3deg); margin-bottom: 22px; background: var(--surface); animation: stampIn .6s .2s var(--ease-out) both; }
@keyframes stampIn { from { opacity: 0; transform: rotate(-3deg) scale(1.6); } to { opacity: 1; transform: rotate(-3deg) scale(1); } }
.mt-poster-title { font-size: clamp(48px, 8.4vw, 124px); line-height: .92; margin-bottom: 24px; text-shadow: 4px 4px 0 var(--mustard); animation: slapIn .8s var(--ease-out) both; }
.mt-poster-title em { display: block; }
@keyframes slapIn { from { opacity: 0; transform: translateY(30px) rotate(-2deg); } to { opacity: 1; transform: none; } }
.mt-poster { display: block; justify-self: center; width: min(100%, 360px); transform: rotate(2.5deg); filter: drop-shadow(10px 10px 0 var(--ink)); transition: transform .5s var(--ease-out); animation: slapIn .9s .15s var(--ease-out) both; }
.mt-poster:hover { transform: rotate(0deg) scale(1.02); }
.mt-poster svg { width: 100%; height: auto; }
.poster-paper { fill: var(--surface); stroke: var(--ink); stroke-width: 6; }
.fill-red { fill: var(--red); } .fill-ink { fill: var(--ink); } .fill-mustard { fill: var(--mustard); } .fill-teal { fill: var(--teal); } .fill-cream { fill: var(--cream); }
.stroke-ink { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.stroke-red { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; }
.stroke-cream { fill: none; stroke: var(--cream); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.mt-poster .sails { stroke: var(--cream); stroke-width: 5; stroke-linecap: round; }
.mt-poster .sails .fill, .mt-post-art .sails .fill { fill: var(--cream); stroke: none; }
.spin { transform-origin: 50px 50px; animation: spin 12s linear infinite; }
.skirt { transform-origin: 150px 330px; animation: kick 2.4s ease-in-out infinite; }
@keyframes kick { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.18) skewX(-4deg); } }
.poster-word { font-family: var(--f-display); font-size: 40px; fill: var(--ink); letter-spacing: 4px; }
.mt-ticker { position: relative; background: var(--ink); color: var(--cream); overflow: hidden; border-top: 3px solid var(--ink); }
.mt-ticker-track { display: flex; gap: 28px; width: max-content; padding: 14px 0; font-family: var(--f-display); font-size: 22px; animation: tick 38s linear infinite; }
.mt-ticker-track span:nth-child(even) { color: var(--mustard); }
@keyframes tick { to { transform: translateX(-50%); } }

/* Essentials */
.mt-steps { list-style: none; margin: 0 0 clamp(30px, 4vw, 50px); padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.mt-steps a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 24px 22px 26px; background: var(--surface); border: 3px solid var(--ink); box-shadow: var(--shadow); transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background-color .3s; }
.mt-steps li:nth-child(odd) a { transform: rotate(-1.2deg); } .mt-steps li:nth-child(even) a { transform: rotate(1deg); }
.mt-steps a:hover { transform: rotate(0) translate(-3px, -3px); box-shadow: 9px 9px 0 var(--red); }
.mt-step-n { font-family: var(--f-display); font-size: 56px; line-height: 1; color: var(--red); }
.mt-step-k { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.mt-steps strong { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.15; }
.mt-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 3px solid var(--ink); background: var(--mustard); }
.mt-facts > div { padding: 22px 24px; border-right: 3px solid var(--ink); display: flex; flex-direction: column; gap: 4px; }
.mt-facts > div:last-child { border-right: 0; }
.mt-facts b { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3vw, 40px); color: var(--ink); line-height: 1; }
.mt-facts span { font-size: 14.5px; color: var(--ink); }

/* Feed = poster wall */
.mt-articles { background: var(--cream-2); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.feed-filter button { border: 2.5px solid var(--ink); border-radius: 4px; background: var(--surface); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
.feed-filter button[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.card-link { border: 3px solid var(--ink); border-radius: 4px; box-shadow: var(--shadow); background: var(--surface); }
.feed-grid .card:nth-child(3n+1) .card-link { transform: rotate(-1deg); }
.feed-grid .card:nth-child(3n+2) .card-link { transform: rotate(.8deg); }
.feed-grid .card:nth-child(3n) .card-link { transform: rotate(-.4deg); }
.card-link:hover { transform: rotate(0) translate(-3px, -3px) !important; box-shadow: 10px 10px 0 var(--red); }
.card::before { content: ""; position: absolute; z-index: 2; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--red); border: 3px solid var(--ink); }
.card-art { border-bottom: 3px solid var(--ink); background: repeating-linear-gradient(-45deg, var(--surface-2) 0 10px, var(--cream-2) 10px 20px); }
.card[data-rubric="moulin"] .card-art { background: var(--red); }
.card[data-rubric="butte"] .card-art { background: var(--teal); }
.card[data-rubric="ville"] .card-art { background: var(--mustard); }
.mt-card-svg { width: 62%; height: 80%; }
.mt-card-svg .sails { stroke: var(--cream); stroke-width: 6; stroke-linecap: round; }
.mt-card-svg .sails .fill { fill: var(--cream); stroke: none; }
.card[data-rubric="moulin"] .mt-card-svg .fill-red { fill: var(--mustard); }
.card[data-rubric="butte"] .fill-mustard { fill: var(--cream); }
.card-num { font-family: var(--f-display); color: var(--cream); font-size: 34px; text-shadow: 3px 3px 0 var(--ink); }
.card-body h3 { font-family: var(--f-display); }
.tag { color: var(--red); }
.tag-butte { color: var(--teal); } .tag-ville { color: #9a6a0c; }
.reveal.card { opacity: 0; transform: translateY(30px) scale(.96); transition: opacity .6s var(--ease-out), transform .7s cubic-bezier(.3, 1.6, .5, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.card.is-in { opacity: 1; transform: none; }

/* Around (secondary, smaller) */
.mt-around h2 { font-size: clamp(28px, 3.4vw, 46px); }
.mt-around-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.4vw, 30px); }
.mt-around-grid .feed-grid { grid-template-columns: 1fr; }
.mt-around-grid .card-art { aspect-ratio: 3 / 1; }
.mt-around-grid .card-num { display: none; }

/* Help band */
.mt-help { background: var(--red); color: var(--on-accent); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); padding: clamp(50px, 7vw, 90px) 0; }
.mt-help-inner { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.mt-help h2 { color: var(--cream); font-size: clamp(30px, 4vw, 54px); text-shadow: 3px 3px 0 var(--ink); }
.mt-help p { max-width: 60ch; margin: 0; }
.mt-help .eyebrow { color: var(--mustard); }
.mt-stamp-btn { background: var(--mustard); color: var(--ink); font-size: 15px; padding: 18px 30px; transform: rotate(-2deg); }
.mt-stamp-btn:hover { transform: rotate(0) translate(-2px, -2px); }

/* Who / about */
.mt-who-grid, .mt-about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 5vw, 80px); align-items: start; }
.mt-how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mt-how li { padding: 28px 24px; background: var(--surface); border: 3px solid var(--ink); box-shadow: var(--shadow); }
.mt-how b { font-family: var(--f-display); font-weight: 400; font-size: 46px; color: var(--red); line-height: 1; display: block; margin-bottom: 10px; }
.mt-how p { color: var(--muted); margin: 0; }
.mt-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mt-rules li { padding: 16px 18px 16px 54px; position: relative; background: var(--surface); border: 2.5px solid var(--ink); }
.mt-rules li::before { content: "✕"; position: absolute; left: 16px; top: 13px; width: 26px; height: 26px; display: grid; place-items: center; background: var(--red); color: var(--cream); font-weight: 700; font-size: 13px; }
.mt-about-how { background: var(--cream-2); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }

/* Page heroes (a-propos, aide, legal) */
.page-hero { border-bottom: 3px solid var(--ink); background: repeating-conic-gradient(from 0deg at 85% 30%, rgba(227, 167, 47, .28) 0 5deg, transparent 5deg 10deg); }
.page-hero h1 { text-shadow: 4px 4px 0 var(--mustard); }
.crumbs { font-weight: 600; }
.legal-hero { border-bottom: 3px solid var(--ink); }
.flag { border-color: var(--red); color: var(--red); }

/* Article */
.post-hero { border-bottom: 3px solid var(--ink); background: var(--surface-2); }
.post-hero .ph-art { left: 45%; opacity: .95; }
.mt-post-art { position: absolute; right: -6%; top: 50%; height: 120%; width: auto; transform: translateY(-50%); }
.mt-post-art .sails { stroke: var(--cream); stroke-width: 5; stroke-linecap: round; transform-origin: 50px 50px; animation: spin 16s linear infinite; }
.post-hero .container { z-index: 2; }
.post-hero h1 { max-width: 15ch; text-shadow: 3px 3px 0 var(--mustard); }
.post-hero .lead { max-width: 50ch; }
.read-progress { height: 6px; background: var(--ink); top: auto; bottom: 0; }
.read-progress span { background: repeating-linear-gradient(90deg, var(--red) 0 18px, var(--mustard) 18px 36px); }
.toc-wrap { background: var(--surface); border: 3px solid var(--ink); padding: 20px; box-shadow: var(--shadow); }
.toc a { border-left-width: 3px; }
.toc a.is-active { color: var(--red); border-left-color: var(--red); background: var(--cream); }
.post-body h2 { font-size: clamp(28px, 3vw, 40px); }
.post-body h2::before { content: ""; display: block; width: 60px; height: 8px; background: var(--red); margin-bottom: 14px; box-shadow: 3px 3px 0 var(--ink); }
.post-body .tip { background: var(--mustard); border: 3px solid var(--ink); border-radius: 4px; color: var(--ink); box-shadow: var(--shadow); }
.post-body .tip strong:first-child { color: var(--red-dk); }
.post-body .checklist li::before { border-color: var(--red); }
.help-box { background: var(--teal); color: var(--cream); border: 3px solid var(--ink); border-radius: 4px; box-shadow: 8px 8px 0 var(--ink); transform: rotate(-.6deg); }
.help-box .help-kicker { color: var(--mustard); }
.help-box .help-title { color: var(--cream); }
.help-box .help-text { color: #e9f1ee; }
.related { background: var(--cream-2); border-top: 3px solid var(--ink); }
.next-article { border-top: 3px solid var(--ink); }

/* Help page */
.help-aside { border: 3px solid var(--ink); box-shadow: var(--shadow); background: var(--surface); }
.chip span { border: 2.5px solid var(--ink); border-radius: 4px; }
.chip input:checked + span { background: var(--red); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.field input, .field select, .field textarea { border: 2.5px solid var(--ink); border-radius: 4px; background: var(--surface); }
#help-success .ref { border-color: var(--red); color: var(--red); transform: rotate(-2deg); }

/* Footer, cookie, modal */
.site-footer { background: var(--ink); color: var(--cream); border-top: 6px solid var(--red); }
.site-footer .brand-name { color: var(--cream); }
.site-footer .muted, .footer-bottom, .footer-bottom button, .independence { color: #cbb995; }
.footer-grid h4 { color: var(--mustard); }
.independence { border-top-color: rgba(243, 228, 196, .2); }
.footer-bottom { border-top-color: rgba(243, 228, 196, .2); }
.cookie, .modal-card { border: 3px solid var(--ink); border-radius: 4px; box-shadow: 8px 8px 0 var(--ink); background: var(--surface); }

@media (max-width: 1000px) {
  .mt-steps { grid-template-columns: 1fr 1fr; }
  .mt-hero-grid { grid-template-columns: 1fr; }
  .mt-poster { width: min(80%, 300px); }
  .mt-how { grid-template-columns: 1fr; }
  .mt-around-grid { grid-template-columns: 1fr; }
  .mt-who-grid, .mt-about-grid { grid-template-columns: 1fr; }
  .mt-post-art { opacity: .25; right: -30%; }
}
@media (max-width: 640px) {
  .mt-steps { grid-template-columns: 1fr; }
  .mt-facts { grid-template-columns: 1fr; }
  .mt-facts > div { border-right: 0; border-bottom: 3px solid var(--ink); }
  .mt-facts > div:last-child { border-bottom: 0; }
  .mt-help-inner { grid-template-columns: 1fr; }
  .brand-name { font-size: 20px; }
  .brand-name small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-mark .sails, .spin, .skirt, .mt-ticker-track, .mt-post-art .sails, .mt-hero-bg { animation: none; }
  .mt-poster-title, .mt-poster, .mt-stamp { animation: none; }
  .reveal.card { transition: none; opacity: 1; transform: none; }
}
