/* Atlas Wool Supply Co Journal — shared styles for the journal home and every entry.
   Same system as the homepage: Francois One + Work Sans, earth palette, square corners, hairline rules.
   Colours: olive #475031, sage #5d7a5f, pink #bc9490, clay #95625c, rust #8a4f35, walnut #6c4036,
   body #333, dim #757575, line #e7e4df, soft #faf8f5. */
html{scroll-behavior:smooth}
body{margin:0;background:#fff;color:#111;font-family:'Work Sans',sans-serif;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}
p,h1,h2,h3,figure,figcaption{margin:0}
img{max-width:100%;height:auto}
a{color:#8a4f35;text-decoration:none;transition:color .15s}
a:hover{color:#6c4036}
.tif{font-family:'Noto Sans Tifinagh',sans-serif;letter-spacing:3px;text-transform:none}

/* ---------- Top bar + masthead ---------- */
.masthead{background:#475031;color:#fff}
.topbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;padding:22px clamp(22px,6vw,80px)}
.brand{display:flex;align-items:center;gap:12px;color:#fff}
.brand:hover{color:#fff}
.brand span{font-size:18px;font-weight:600;letter-spacing:1.5px;white-space:nowrap}
.topbar nav{display:flex;align-items:center;gap:28px;flex-wrap:wrap}
.topbar nav a{color:#fff;font-size:12px;letter-spacing:1.5px;text-transform:uppercase;white-space:nowrap}
.topbar nav a.current{border-bottom:1px solid rgba(255,255,255,.8);padding-bottom:3px}
.hero{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,400px),1fr));align-items:center}
.hero-text{padding:clamp(48px,7vw,110px) clamp(22px,6vw,80px) clamp(48px,6vw,90px);max-width:640px}
.hero-kicker{font-size:12px;letter-spacing:2px;text-transform:uppercase;opacity:.9}
.hero-kicker .tif{font-size:15px}
.hero h1{font-family:'Francois One',sans-serif;font-weight:400;font-size:clamp(40px,5vw,66px);line-height:1.04;margin:16px 0 22px;letter-spacing:.3px}
.hero-sub{font-size:19px;line-height:1.6;letter-spacing:.3px;text-wrap:pretty}
.hero-tif{font-size:17px;line-height:1.7;opacity:.85;margin-top:18px}
.hero-art{padding:clamp(24px,4vw,56px) clamp(22px,6vw,80px) clamp(24px,4vw,56px) 0;display:flex;justify-content:center}
.hero-art canvas{width:min(100%,460px);aspect-ratio:1;display:block}

/* ---------- Entry ---------- */
.entry{max-width:1120px;margin:0 auto;padding:clamp(56px,7vw,100px) clamp(22px,6vw,80px) clamp(80px,10vw,140px)}
.narrow{max-width:680px;margin:0 auto;display:flex;flex-direction:column;gap:26px}
.entry-head{display:flex;flex-direction:column;gap:22px;border-bottom:1px solid #e7e4df;padding-bottom:28px}
.kicker{font-size:12px;letter-spacing:2px;text-transform:uppercase;color:#757575}
.kicker .tif{font-size:14px}
.entry-title{font-family:'Francois One',sans-serif;font-weight:400;font-size:clamp(30px,3.4vw,44px);color:#475031;line-height:1.1;text-wrap:balance}
.byline{display:flex;align-items:center;gap:14px}
.avatar{width:52px;height:52px;flex:0 0 auto;border-radius:50%;background:#faf8f5;border:1px solid #e7e4df;object-fit:cover;display:flex;align-items:center;justify-content:center;font-family:'Francois One',sans-serif;font-size:22px;color:#475031}
.byline-name{font-size:15px;font-weight:600;color:#111}
.byline-place{font-size:13px;letter-spacing:2px;color:#757575}
.byline-place span{font-family:'Work Sans',sans-serif;letter-spacing:1.5px;text-transform:uppercase;font-size:11px}
.body p,.narrow > p{font-size:18px;line-height:1.7;color:#333;text-wrap:pretty}

/* magazine sections: text beside images, alternating */
.spread{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,400px),1fr));gap:clamp(28px,5vw,72px);align-items:center;margin-top:clamp(64px,8vw,110px)}
.spread.top{align-items:start}
.spread.bottom{align-items:end}
.spread .body{max-width:520px;display:flex;flex-direction:column;gap:18px}
.spread h2{font-family:'Francois One',sans-serif;font-weight:400;font-size:clamp(28px,3vw,38px);line-height:1.1;text-wrap:balance}
.figs{display:flex;flex-direction:column;gap:22px}
.figs figure{display:flex;flex-direction:column;gap:8px}
.figs img{width:100%;display:block}
.caption{font-size:11px;letter-spacing:1.5px;text-transform:uppercase;color:#757575;line-height:1.5}
.plate-olive{box-shadow:10px -10px 0 rgba(71,80,49,.32)}
.plate-walnut{box-shadow:-10px -10px 0 rgba(108,64,54,.28)}
.pair{display:grid;grid-template-columns:3fr 2fr;gap:8px}
.pair img{width:100%;height:100%;object-fit:cover;display:block}
.arrow-link{display:inline-flex;gap:8px;white-space:nowrap;font-size:14px;letter-spacing:.8px}

/* ---------- Appendix: the marks ---------- */
.appendix{background:#faf8f5;border-top:1px solid #e7e4df}
.appendix-inner{max-width:1120px;margin:0 auto;padding:clamp(64px,8vw,110px) clamp(22px,6vw,80px)}
.appendix h2{font-family:'Francois One',sans-serif;font-weight:400;font-size:clamp(28px,3vw,38px);color:#475031;line-height:1.1;margin-top:12px}
.appendix .intro{font-size:18px;line-height:1.7;color:#333;text-wrap:pretty;max-width:680px;margin-top:18px}
.marks{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,200px),1fr));gap:8px;margin-top:36px}
.mark{display:flex;flex-direction:column;gap:12px}
.tile{aspect-ratio:1;min-height:0;overflow:hidden;display:flex;align-items:center;justify-content:center;padding:18%;border:1px solid}
.tile svg{width:100%;height:100%;max-height:100%;overflow:visible}
.orchard{margin:0;display:flex;flex-direction:column;gap:10px}
.orchard-plate{position:relative}
.orchard-plate img{width:100%;height:auto;display:block}
.orchard-dots{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}
/* the animation as the seventh square of the marks grid */
.tile-anim{background:#fff;border-color:#e7e4df;padding:6%}
.tile-anim canvas{width:100%;aspect-ratio:1;display:block}

/* ---------- Journal home: entry list ---------- */
.entries{max-width:1120px;margin:0 auto;padding:clamp(56px,7vw,100px) clamp(22px,6vw,80px) clamp(80px,10vw,140px)}
.entry-card{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:clamp(24px,4vw,56px);align-items:center;border-top:1px solid #111;padding-top:32px;color:inherit}
.entry-card:hover{color:inherit}
.entry-card:hover h2{color:#6c4036}
.entry-card img{width:100%;display:block}
.entry-card h2{font-family:'Francois One',sans-serif;font-weight:400;font-size:clamp(26px,3vw,36px);color:#475031;line-height:1.1;margin:12px 0 14px;transition:color .15s}
.entry-card p{font-size:17px;line-height:1.7;color:#333;text-wrap:pretty}

/* ---------- Footer ---------- */
.site-footer{background:#bc9490;color:#111;padding:56px clamp(22px,6vw,80px);display:flex;justify-content:space-between;align-items:flex-end;flex-wrap:wrap;gap:28px}
.site-footer .left{display:flex;flex-direction:column;gap:10px}
.site-footer .links{display:flex;gap:28px;flex-wrap:wrap}
.site-footer a,.site-footer p{color:#111;font-size:12px;letter-spacing:1.5px;text-transform:uppercase;white-space:nowrap}

@media (max-width:640px){
  .brand span{font-size:15px}
  .topbar nav{gap:18px}
}

/* ---------- Interactive land map (landmap.js) ---------- */
.landmap{margin-top:clamp(56px,7vw,90px);display:grid;gap:16px}
.landmap .lm-head{max-width:680px;display:flex;flex-direction:column;gap:12px}
.landmap .lm-head h2{font-family:'Francois One',sans-serif;font-weight:400;font-size:clamp(26px,2.6vw,34px);color:#475031;line-height:1.1}
.landmap .lm-head p{font-size:18px;line-height:1.7;color:#333;text-wrap:pretty}
.lm-stage{position:relative;background:#2a2723;margin:0}
.lm-stage canvas{display:block;width:100%;height:auto}
.lm-year{position:absolute;left:12px;top:6px;font-family:'Francois One',sans-serif;font-size:clamp(34px,7vw,72px);color:#fff;line-height:1;text-shadow:0 2px 12px rgba(0,0,0,.6);pointer-events:none}
.lm-controls{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center}
.lm-btn{font:600 12px 'Work Sans',sans-serif;letter-spacing:2px;text-transform:uppercase;padding:11px 18px;border:1px solid #95625c;background:#95625c;color:#fff;cursor:pointer;border-radius:0}
.lm-btn.ghost{background:transparent;color:#95625c}
.lm-btn.ghost[aria-pressed="true"]{background:#95625c;color:#fff}
.lm-btn:focus-visible,.lm-controls input:focus-visible{outline:2px solid #475031;outline-offset:2px}
.lm-slider{flex:1 1 240px;min-width:0;display:grid;gap:2px}
.lm-slider input{width:100%;accent-color:#95625c}
.lm-ticks{display:flex;justify-content:space-between;font-size:11px;color:#757575}
.lm-modes{display:flex}
.lm-modes .lm-btn + .lm-btn{border-left:0}
.lm-chart-box{border:1px solid #e7e4df;padding:16px;display:grid;gap:8px;margin-top:18px}
.lm-chart-box h3{font-family:'Francois One',sans-serif;font-weight:400;font-size:22px;color:#475031}
.lm-chart{display:block;width:100%;height:auto}
.lm-note{font-size:13px;line-height:1.6;color:#757575;max-width:760px}
@media (max-width:640px){ .lm-modes{width:100%} .lm-modes .lm-btn{flex:1;padding:11px 8px;letter-spacing:1px} }
.lm-key{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;margin-top:-6px}
.lm-key .lm-scale{display:inline-flex;align-items:center;gap:8px}
.lm-key i{display:inline-block;height:8px;width:120px}
.lm-key i.sw{width:12px;height:12px}
.lm-key b{font-weight:400}

/* "The first idea": on wide screens the maps sit in their own column; once the section stacks
   (phones), they appear inline right after the paragraph that names the five areas */
.figs-inline{display:none}
@media (max-width:860px){ .figs-side{display:none} .figs-inline{display:flex;margin:6px 0} }

/* Language switcher under the entry kicker (EN / FR / AR), same idea as the Anou blog flags */
.lang-switch{display:flex;flex-wrap:wrap;gap:8px;font-size:13px}
.lang-switch a{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border:1px solid #e7e4df;border-radius:999px;color:#757575;text-decoration:none}
.lang-switch a:hover{border-color:#475031;color:#475031}
.lang-switch a.active{background:#f1f0e8;border-color:#475031;color:#475031}
.lang-switch span{font-size:17px;line-height:1}
.lang-note{font-size:12px;color:#757575;margin-top:-12px}

/* Arabic reads right to left; Naskh for text, Kufi for headings. Arabic letters must join, so no letter-spacing or uppercase. */
html[lang="ar"] body{font-family:'Noto Naskh Arabic','Work Sans',serif}
html[lang="ar"] .entry p,html[lang="ar"] .appendix .intro{font-size:1.08em;line-height:1.9}
html[lang="ar"] .hero h1,html[lang="ar"] .entry-title,html[lang="ar"] .spread h2,html[lang="ar"] .appendix h2,html[lang="ar"] .lm-chart-box h3{font-family:'Noto Kufi Arabic','Francois One',sans-serif;font-weight:700;line-height:1.5}
html[lang="ar"] .kicker,html[lang="ar"] .hero-kicker,html[lang="ar"] .caption,html[lang="ar"] .byline-place span,html[lang="ar"] .topbar nav a{letter-spacing:0;text-transform:none}
html[lang="ar"] .lang-switch a[lang="en"],html[lang="ar"] .lang-switch a[lang="fr"]{font-family:'Work Sans',sans-serif}
