/* ==========================================================
   Modest Movement theme — modern muslim fashion, urban editorial
   Palette: Terracotta · Sage · Warm White · Forest · Sand
   Type: DM Serif Display (headline) · Plus Jakarta Sans (body) · Sora (labels)
   Geometric: square blocks, offset colour planes, vertical rules.
   ========================================================== */
:root {
  --terra: var(--accent, #c97b66);
  --sage: #a6b09a;
  --sage-soft: #dfe3d6;
  --warm: #f8f4ec;
  --forest: #3a4a3f;
  --sand: #e5cdb6;
  --white: #ffffff;
  --muted: #66705f;
  --line: rgba(58, 74, 63, .18);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --label: "Sora", "Plus Jakarta Sans", system-ui, sans-serif;
  --wrap: 1240px;
  --g: 32px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--warm); color: var(--forest); font-family: var(--sans); font-size: 15.5px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.12; color: var(--forest); }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--g); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--terra); color: var(--warm); }

.label { font-family: var(--label); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--terra); }
.label a:hover { text-decoration: underline; }
.meta { font-family: var(--label); font-size: 11px; color: var(--muted); letter-spacing: .04em; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.meta .bar { width: 14px; height: 1px; background: currentColor; }

/* ---------- 01 Editorial header: one row ---------- */
.strip { background: var(--forest); color: var(--sand); font-family: var(--label); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.strip .wrap { display: flex; justify-content: space-between; align-items: center; height: 34px; gap: 16px; }
.strip .wrap span:last-child { color: var(--warm); opacity: .8; }
.head { border-bottom: 1px solid var(--forest); background: var(--warm); position: sticky; top: 0; z-index: 40; }
.head .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 36px; height: 88px; }
.head .logo img { height: 56px; width: auto; }
.head nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(16px, 2.6vw, 38px); justify-content: center; }
.head nav a { font-family: var(--label); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; padding: 8px 0; border-bottom: 2px solid transparent; transition: border-color .2s, color .2s; }
.head nav a:hover { color: var(--terra); }
.head nav a.active { border-color: var(--terra); color: var(--terra); }
.head form { display: flex; align-items: center; border: 1px solid var(--forest); height: 40px; width: 230px; }
.head form input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 12px; font: inherit; font-size: 13.5px; outline: none; color: var(--forest); }
.head form button { border: 0; background: var(--forest); color: var(--warm); width: 40px; height: 100%; cursor: pointer; display: grid; place-items: center; }
.head .toggle { display: none; background: none; border: 0; cursor: pointer; color: var(--forest); padding: 6px; }

/* ---------- Section heading: vertical rule + title ---------- */
.section { padding-top: 72px; }
.heading { display: flex; align-items: stretch; gap: 18px; margin-bottom: 30px; }
.heading::before { content: ""; width: 4px; background: var(--terra); }
.heading > div { flex: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.heading h2 { font-size: clamp(26px, 2.8vw, 36px); }
.heading small { display: block; font-family: var(--label); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.heading a { font-family: var(--label); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.heading a:hover { color: var(--terra); }

/* ---------- Image ---------- */
.img { position: relative; overflow: hidden; background: var(--sand); }
.img img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
a:hover .img img { transform: scale(1.04); }
.img .ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 56px; color: var(--warm); background: var(--sage); }
.r-45 { aspect-ratio: 4 / 5; } .r-34 { aspect-ratio: 3 / 4; } .r-32 { aspect-ratio: 3 / 2; } .r-11 { aspect-ratio: 1 / 1; }
.caption { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

/* ---------- 02 Cover story: sage plane + offset terracotta block ---------- */
.cover { background: var(--sage); margin-top: 0; }
.cover .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 70px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.cover .pic { position: relative; padding: 0 0 26px 26px; }
.cover .pic::before { content: ""; position: absolute; left: 0; bottom: 0; width: 70%; height: 70%; background: var(--terra); }
.cover .pic .img { aspect-ratio: 4 / 5; position: relative; }
.cover .text { position: relative; padding-left: 34px; border-left: 1px solid var(--forest); }
.cover .text .no { font-family: var(--serif); font-size: 88px; line-height: .8; color: var(--warm); position: absolute; right: 0; top: -20px; opacity: .8; }
.cover h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.02; margin: 16px 0 20px; max-width: 620px; }
.cover h1 a:hover { color: var(--warm); }
.cover .dek { font-size: 17px; max-width: 520px; }
.cover .label { color: var(--forest); }
.btn-line { display: inline-flex; gap: 12px; align-items: center; margin-top: 28px; font-family: var(--label); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; background: var(--forest); color: var(--warm); padding: 14px 22px; transition: background .2s; }
.btn-line:hover { background: var(--terra); }
.cover-cap { padding: 0 var(--g); max-width: var(--wrap); margin: 10px auto 0; }

/* ---------- Cards ---------- */
.card { display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 22px; line-height: 1.2; }
.card h3 a:hover { color: var(--terra); }
.card .ex { font-size: 14.5px; color: var(--muted); }
.card.boxed { background: var(--white); padding: 16px 16px 20px; border-top: 4px solid var(--sage); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

/* Modest Edit: sage panel */
.panel { background: var(--sage-soft); padding: 60px 0 64px; margin-top: 72px; border-top: 1px solid var(--sage); border-bottom: 1px solid var(--sage); }
.panel .section { padding-top: 0; }

/* Culture: forest panel */
.panel.dark { background: var(--forest); border: 0; }
.panel.dark .heading h2, .panel.dark .card h3 { color: var(--warm); }
.panel.dark .heading > div { border-color: rgba(248,244,236,.25); }
.panel.dark .heading small, .panel.dark .heading a { color: var(--sand); }
.panel.dark .label { color: var(--sand); }

/* Street journal gallery */
.strip-gallery { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.strip-gallery .card { flex: 0 0 250px; scroll-snap-align: start; }

/* ---------- Layout with sidebar ---------- */
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 50px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 110px; }
.box { background: var(--white); border: 1px solid var(--line); }
.box h4 { font-family: var(--label); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--warm); background: var(--forest); padding: 12px 18px; margin: 0; }
.box .in { padding: 16px 18px; }
.box form { display: flex; border-bottom: 1px solid var(--forest); }
.box form input { flex: 1; border: 0; background: transparent; padding: 8px 0; font: inherit; outline: none; color: var(--forest); }
.box form button { border: 0; background: none; cursor: pointer; color: var(--forest); }
.box ol { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.box ol li { counter-increment: p; display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.box ol li:last-child { border-bottom: 0; }
.box ol li::before { content: counter(p, decimal-leading-zero); font-family: var(--serif); font-size: 22px; color: var(--terra); line-height: 1; }
.box ol a { font-family: var(--serif); font-size: 17px; line-height: 1.25; }
.box ol a:hover { color: var(--terra); }
.box ol small { display: block; font-family: var(--label); font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.box.note { background: var(--sand); border: 0; }
.box.note h4 { background: var(--terra); }
.box.note .in { font-size: 14.5px; }
.box.note .in p + p { margin-top: 8px; }
.box.note .in strong { display: block; font-family: var(--label); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; margin-top: 12px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; padding-top: 40px; flex-wrap: wrap; font-family: var(--label); }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--forest); font-size: 13px; padding: 0 10px; }
.pagination a:hover { background: var(--forest); color: var(--warm); }
.pagination .current { background: var(--terra); border-color: var(--terra); color: var(--warm); }
.pagination .disabled { opacity: .3; }

/* ---------- Footer ---------- */
.footer { margin-top: 90px; background: var(--forest); color: var(--warm); }
.footer .top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; padding: 56px 0 40px; }
.footer img { height: 48px; width: auto; }
.footer p { font-size: 14px; opacity: .8; margin-top: 14px; max-width: 340px; }
.footer h5 { font-family: var(--label); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--sand); margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: 4px 0; font-size: 14.5px; }
.footer li a:hover { color: var(--sand); }
.footer .bottom { border-top: 1px solid rgba(248,244,236,.2); padding: 18px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--label); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.footer .blocks { display: flex; height: 10px; }
.footer .blocks span { flex: 1; }

/* ---------- Listing page ---------- */
.list-hero { background: var(--sand); }
.list-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; padding-top: 54px; padding-bottom: 40px; }
.list-hero h1 { font-size: clamp(44px, 6vw, 84px); line-height: .95; }
.list-hero p { color: var(--forest); max-width: 460px; }
.empty { padding: 60px 0; text-align: center; }
.empty h3 { font-size: 30px; }
.empty p { color: var(--muted); margin-top: 8px; }

/* ---------- Article: split header ---------- */
.a-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0; background: var(--sage-soft); }
.a-head .text { padding: 64px 56px 48px var(--g); display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; max-width: calc(var(--wrap) * .58); margin-left: auto; width: 100%; }
.a-head h1 { font-size: clamp(36px, 4.4vw, 62px); line-height: 1.04; }
.a-head .dek { font-size: 18px; max-width: 600px; }
.a-head .byline { border-top: 1px solid var(--forest); padding-top: 14px; }
.a-head .pic { position: relative; min-height: 520px; }
.a-head .pic .img { position: absolute; inset: 0; }
.a-head .pic::after { content: ""; position: absolute; left: -18px; bottom: 40px; width: 36px; height: 160px; background: var(--terra); }
.a-cap { max-width: var(--wrap); margin: 10px auto 0; padding: 0 var(--g); text-align: right; }
.a-body { padding-top: 54px; }
.prose { font-size: 17.5px; line-height: 1.85; max-width: 720px; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-size: 30px; margin-top: 1.7em; padding-left: 16px; border-left: 4px solid var(--terra); }
.prose h3 { font-size: 23px; }
.prose a { color: var(--terra); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 1.8em 0; padding: 30px 34px; background: var(--sand); font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.35; position: relative; }
.prose blockquote::before { content: ""; position: absolute; left: 0; top: 0; width: 60px; height: 4px; background: var(--terra); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li::marker { color: var(--terra); }
.prose figure { margin: 2em 0; background: var(--white); padding: 14px; border: 1px solid var(--line); }
.prose figure img { width: 100%; }
.prose figcaption { font-size: 12px; color: var(--muted); margin-top: 10px; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 34px; max-width: 720px; }
.tags a { font-family: var(--label); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; background: var(--sage-soft); padding: 7px 12px; }
.tags a:hover { background: var(--forest); color: var(--warm); }

/* Comments */
.comments { margin-top: 60px; max-width: 720px; }
.comments h2 { font-size: 30px; }
.cmt { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cmt .av { width: 44px; height: 44px; background: var(--sage); color: var(--warm); display: grid; place-items: center; font-family: var(--serif); font-size: 18px; }
.cmt .who { font-weight: 700; font-size: 14px; }
.cmt .who span { font-family: var(--label); font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 8px; }
.cmt p { margin-top: 4px; }
.c-form { margin-top: 28px; background: var(--sand); padding: 30px; display: grid; gap: 18px; }
.c-form h3 { font-size: 26px; }
.c-form .hint { font-size: 13px; margin-top: -10px; }
.c-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.c-form label { display: block; font-family: var(--label); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.c-form input, .c-form textarea { width: 100%; border: 1px solid transparent; background: var(--warm); padding: 12px 14px; font: inherit; font-size: 15px; color: var(--forest); outline: none; resize: vertical; }
.c-form input:focus, .c-form textarea:focus { border-color: var(--forest); }
.c-form button { justify-self: start; border: 0; cursor: pointer; }
.hp { position: absolute; left: -9999px; }
.flash { padding: 14px 18px; background: var(--sage-soft); border-left: 4px solid var(--terra); margin: 16px 0; font-size: 14px; }

/* ---------- 403 ---------- */
.err { display: grid; grid-template-columns: auto 1fr; gap: 60px; align-items: center; padding: 80px 0 20px; }
.err .code { font-family: var(--serif); font-size: clamp(120px, 18vw, 230px); line-height: .85; color: var(--warm); background: var(--terra); padding: 26px 34px 20px; }
.err h1 { font-size: clamp(30px, 3.6vw, 46px); margin: 14px 0; }
.err p { color: var(--muted); max-width: 500px; margin-bottom: 8px; }

.page-wrap { max-width: 780px; padding-top: 50px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .head .wrap { grid-template-columns: auto 1fr auto; gap: 18px; }
  .head form { width: 170px; }
  .with-side { grid-template-columns: 1fr; }
  .side { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --g: 20px; }
  .head .wrap { grid-template-columns: auto 1fr auto; height: 72px; }
  .head .logo img { height: 44px; }
  .head .toggle { display: flex; justify-self: end; }
  .head nav { grid-column: 1 / -1; order: 3; }
  .head nav ul { display: none; flex-direction: column; gap: 0; padding: 8px 0 14px; }
  .head nav ul.open { display: flex; }
  .head nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .head form { display: none; }
  .cover .wrap, .a-head, .list-hero .wrap, .err { grid-template-columns: 1fr; gap: 30px; }
  .cover .text { padding-left: 22px; }
  .cover .text .no { display: none; }
  .a-head .text { padding: 34px var(--g) 30px; max-width: none; }
  .a-head .pic { min-height: 420px; order: -1; }
  .a-head .pic::after { display: none; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer .top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  :root { --g: 16px; }
  .grid-2, .grid-3, .grid-4, .side { grid-template-columns: 1fr; }
  .c-form .row { grid-template-columns: 1fr; }
  .footer .top { grid-template-columns: 1fr; }
  .strip .wrap span:last-child { display: none; }
  .prose { font-size: 16.5px; }
}
