/* Afrozal — design journal: white pages, big photography, Fraunces headlines, adire-indigo accent, mud-cloth band */
:root {
  --page: #ffffff;
  --ink: #1c1813;
  --muted: #625a50;
  --rule: #e6e1d8;
  --soft: #f4f1eb;
  --red: #2f3f9e;
  --navy: #1b2540;
  --measure: 38rem;
  --display: "Fraunces", Georgia, serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 1.0625rem/1.7 var(--text); }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: min(76rem, 100% - 2rem); margin-inline: auto; }

/* Masthead */
.site-head { }
.site-head .wrap { display: flex; flex-direction: column; align-items: center; padding: 1.6rem 0 0; }
.brand { color: var(--ink); text-decoration: none; font: 600 clamp(2.4rem, 6vw, 3.6rem)/1 var(--display); letter-spacing: -.03em; font-variation-settings: 'SOFT' 100, 'WONK' 1; }
/* The one decorative element: a strip of hand-painted bogolan zigzags under the masthead */
.band { height: 22px; background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22' viewBox='0 0 44 22'%3E%3Cpath d='M0 15 L11 6 L22 15 L33 6 L44 15' fill='none' stroke='%23f3efe6' stroke-width='2.4' stroke-linecap='round'/%3E%3Ccircle cx='11' cy='17' r='1.6' fill='%23f3efe6'/%3E%3Ccircle cx='33' cy='17' r='1.6' fill='%23f3efe6'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center; }
.muted { color: var(--muted); font-weight: 400; font-size: .9rem; }
.nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem 2rem; padding: 1rem 0 .9rem; font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); }

/* Home: cover story */
.cover { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding: clamp(2rem, 4vw, 3.5rem) 0; }
.cover figure { margin: 0; }
.cover img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.cover h1 { font: 500 clamp(3rem, 6.8vw, 6rem)/.95 var(--display); letter-spacing: -.035em; font-variation-settings: 'SOFT' 50; margin: 0 0 1.5rem; }
.cover p { font-size: 1.2rem; line-height: 1.6; color: var(--muted); max-width: 30rem; margin: 0 0 2rem; }
.cover .start { display: inline-block; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: .15rem; }
.cover .start:hover { color: var(--red); }

.credit { font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.credit a { color: inherit; }

/* Home: the guides */
.issue { border-top: 1px solid var(--ink); padding: 2.5rem 0 4.5rem; }
.issue > h2 { font: 500 clamp(1.9rem, 4vw, 2.6rem)/1.1 var(--display); margin: 0 0 2rem; }
.stories { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 1.75rem; }
.story { position: relative; }
.story img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; margin-bottom: 1rem; transition: opacity .2s; }
.story h3 { font: 500 1.5rem/1.15 var(--display); margin: 0 0 .5rem; }
.story h3 a { color: var(--ink); text-decoration: none; }
.story h3 a::after { content: ""; position: absolute; inset: 0; }
.story p { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.55; }
.story:hover h3 a, .story:focus-within h3 a { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1px; }
.story:hover img { opacity: .9; }
.story.lead { grid-column: span 2; grid-row: span 2; }
.story.lead img { aspect-ratio: 4 / 4.4; }
.story.lead h3 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.story.lead p { font-size: 1.08rem; }

/* Article */
.article-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: end; padding: clamp(2rem, 4vw, 3.5rem) 0 2.5rem; border-bottom: 1px solid var(--rule); }
.article-top.no-photo { grid-template-columns: 1fr; }
.crumbs { font-size: .9rem; margin: 0 0 1.5rem; color: var(--muted); }
.crumbs a { color: inherit; }
.article-top h1 { font: 500 clamp(2.5rem, 5.6vw, 4.6rem)/1 var(--display); margin: 0 0 1.25rem; letter-spacing: -.025em; text-wrap: balance; }
.standfirst { font-size: 1.2rem; line-height: 1.6; color: var(--muted); max-width: 34rem; margin: 0; }
.updated { font-size: .88rem; color: var(--muted); margin: 1.75rem 0 0; }
.article-top figure { margin: 0; }
.article-top img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; }

.prose { width: min(var(--measure), 100% - 2rem); margin: 0 auto; padding: 3rem 0 4.5rem; }
.prose > p:first-child::first-letter { float: left; font: 500 4.6rem/.8 var(--display); padding: .35rem .6rem 0 0; color: var(--red); }
.prose h2 { font: 500 2rem/1.15 var(--display); margin: 3rem 0 .8rem; letter-spacing: -.01em; }
.prose h3 { font: 600 1.12rem/1.35 var(--text); margin: 2rem 0 .5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2rem; }
.prose li { margin-bottom: .5rem; }
.prose strong { font-weight: 600; }
.prose blockquote { margin: 2.5rem 0; padding: 1.5rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font: italic 400 1.6rem/1.35 var(--display); text-align: center; }

.note { background: var(--soft); border-left: 3px solid var(--red); padding: 1rem 1.25rem; margin: 2rem 0; }
.note p:last-child { margin-bottom: 0; }

.fit-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0 2rem; font-size: .98rem; }
.fit-table th, .fit-table td { text-align: left; vertical-align: top; padding: .85rem .5rem .85rem 0; border-bottom: 1px solid var(--rule); }
.fit-table th { font-weight: 600; width: 30%; }
.fit-table caption { text-align: left; color: var(--muted); font-size: .9rem; padding-bottom: .5rem; }

.folds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: 1rem; margin: 0 0 2.5rem; }
.folds figure { margin: 0; }
.folds svg { background: var(--soft); }
.folds figcaption { font-weight: 600; margin-top: .5rem; font-size: .92rem; }

.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr)); gap: 1rem .75rem; margin: 1.5rem 0 2rem; padding: 0; list-style: none; }
.palette li { margin: 0; font-size: .9rem; }
.palette span { display: block; height: 3.2rem; margin-bottom: .4rem; }

.faq details { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: .6rem 0 0; }

.related { border-top: 1px solid var(--ink); margin-top: 3.5rem; padding-top: 1.5rem; }
.related h2 { margin-top: 0; font-size: 1.5rem; }
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.related li { margin: 0; position: relative; }
.related img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%; width: 100%; margin-bottom: .6rem; }
.related a { font: 500 1.2rem/1.25 var(--display); color: var(--ink); text-decoration: none; }
.related a::after { content: ""; position: absolute; inset: 0; }
.related li:hover a { text-decoration: underline; text-decoration-color: var(--red); }

/* Footer */
.site-foot { background: var(--ink); color: #c7c6cf; font-size: .92rem; padding: 3rem 0; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; justify-content: space-between; align-items: end; }
.site-foot .foot-brand { font: 500 2rem/1 var(--display); color: #fff; margin: 0 0 .75rem; }
.site-foot a { color: #fff; }
.site-foot p { margin: 0; max-width: 32rem; }
.site-foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

@media (max-width: 980px) {
  .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cover, .article-top { grid-template-columns: 1fr; }
  .article-top figure { order: -1; }
  .article-top img, .cover img { aspect-ratio: 4 / 4.2; }
  .stories { gap: 2rem 1rem; }
  .story.lead { grid-row: auto; }
  .story h3 { font-size: 1.2rem; }
  .story p { display: none; }
  .story.lead p { display: block; }
  .nav { gap: .25rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
