/* HIMMA Journal: standalone article pages in the Rose Quartz palette. */
:root {
  --base: #F4DFE6;
  --surface: #FAEEF2;
  --ink: #2E1B2E;
  --accent: #A23B7A;
  --muted: #6E5A68;
  --logo: #DDAEAD;
  --pink-light: #E9C4D1;
  --hairline: #E0C9D2;
  --f-display: "Bodoni Moda", "Amiri", serif;
  --f-body: "Albert Sans", "IBM Plex Sans Arabic", sans-serif;
  --gutter: clamp(1rem, 5vw, 4rem);
  --measure: 44rem;
}
html[lang="ar"] {
  --f-display: "Amiri", "Bodoni Moda", serif;
  --f-body: "IBM Plex Sans Arabic", "Albert Sans", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.j {
  background: var(--base); color: var(--ink);
  font-family: var(--f-body); font-weight: 300; font-size: 1.0625rem; line-height: 1.75;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
html[lang="ar"] body.j { font-size: 1.125rem; line-height: 1.95; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--surface); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.45; letter-spacing: 0; }

.j-eyebrow { font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
html[lang="ar"] .j-eyebrow { letter-spacing: 0; font-size: .9rem; }
.j-meta { font-size: .82rem; color: var(--muted); letter-spacing: .04em; }
.j-link { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
html[lang="ar"] .j-link { letter-spacing: 0; font-size: .92rem; }

/* header */
.j-nav { position: sticky; top: 0; z-index: 10; background: rgba(250, 238, 242, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--hairline); }
.j-nav__inner { max-width: 76rem; margin: 0 auto; padding: .7rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.j-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.j-brand span { font-family: "Bodoni Moda", serif; letter-spacing: .38em; font-size: .82rem; }
.j-nav__links { display: flex; align-items: center; gap: clamp(.8rem, 2.4vw, 2rem); font-size: .85rem; }
.j-nav__links a { text-decoration: none; }
.j-nav__links a:hover, .j-nav__links a[aria-current] { color: var(--accent); }
.j-lang { border: 1px solid var(--ink); border-radius: 999px; padding: .25rem .8rem; }
.j-lang[lang="ar"] { font-family: "IBM Plex Sans Arabic", sans-serif; }
.j-lang[lang="en"] { font-family: "Albert Sans", sans-serif; }
@media (max-width: 640px) {
  .j-nav__links a:not(.j-lang):not([aria-current]) { display: none; }
  .j-brand span { display: none; }
}

.j-main { max-width: 76rem; margin: 0 auto; padding: 0 var(--gutter) clamp(3rem, 8vw, 6rem); }

/* journal index */
.j-hero { text-align: center; padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.j-hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin: .8rem 0 1rem; }
.j-lead { max-width: 36rem; margin: 0 auto; color: var(--muted); }
.j-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.j-card a { display: flex; flex-direction: column; gap: .7rem; text-decoration: none; height: 100%; }
.j-card__img { aspect-ratio: 3 / 4; overflow: hidden; background: var(--pink-light); }
.j-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.22, 1, .36, 1); }
.j-card a:hover img { transform: scale(1.04); }
.j-card h2 { font-size: clamp(1.35rem, 2.4vw, 1.6rem); }
.j-card p:not(.j-meta) { color: var(--muted); font-size: .95rem; }
.j-card .j-link { align-self: flex-start; margin-top: auto; color: var(--accent); }

/* article */
.j-article { max-width: var(--measure); margin: 0 auto; }
.j-crumbs { display: flex; gap: .5rem; font-size: .8rem; color: var(--muted); padding: 1.6rem 0 0; }
.j-crumbs a { text-decoration: none; }
.j-crumbs a:hover { color: var(--accent); }
.j-article__head { padding: clamp(1.5rem, 5vw, 3rem) 0 1.5rem; }
.j-article__head h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); margin: .8rem 0 1rem; }
.j-figure { margin: 0 calc(-1 * min(var(--gutter), 3rem)) 2rem; background: var(--pink-light); }
.j-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 640px) { .j-figure { margin-inline: calc(-1 * var(--gutter)); } }
.j-answer { background: var(--ink); color: var(--surface); padding: clamp(1.4rem, 4vw, 2rem); margin-bottom: 2rem; }
.j-answer .j-eyebrow { color: var(--logo); margin-bottom: .6rem; }
.j-answer p:last-child { font-size: 1.08rem; line-height: 1.7; }
.j-answer a { color: var(--pink-light); }
.j-toc { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 1.3rem 0; margin-bottom: 1rem; }
.j-toc ol { margin-top: .6rem; padding-inline-start: 1.2rem; display: grid; gap: .25rem; font-size: .95rem; }
.j-toc a { text-decoration: none; }
.j-toc a:hover { color: var(--accent); }

.j-body section { padding-top: 1.8rem; scroll-margin-top: 5rem; }
.j-body h2 { font-size: clamp(1.55rem, 3.6vw, 2.1rem); margin-bottom: .9rem; }
.j-body h3 { font-size: 1.25rem; margin: 1.2rem 0 .5rem; }
.j-body p, .j-body ul, .j-body ol, .j-body table { margin-bottom: 1.05rem; }
.j-body ul, .j-body ol { padding-inline-start: 1.3rem; }
.j-body li { margin-bottom: .4rem; }
.j-body li::marker { color: var(--accent); }
.j-body strong { font-weight: 500; }
.j-body a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.j-body table { width: 100%; border-collapse: collapse; font-size: .92rem; display: block; overflow-x: auto; }
.j-body table thead, .j-body table tbody { display: table; width: 100%; table-layout: auto; }
.j-body th, .j-body td { text-align: start; padding: .65rem .8rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.j-body th { font-weight: 500; background: var(--surface); }

.j-faq details { border-bottom: 1px solid var(--hairline); }
.j-faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative; font-weight: 400; }
html[dir="rtl"] .j-faq summary { padding: 1rem 0 1rem 2rem; }
.j-faq summary::-webkit-details-marker { display: none; }
.j-faq summary::after { content: "+"; position: absolute; inset-inline-end: 0; top: .85rem; font-size: 1.3rem; color: var(--accent); transition: transform .3s; }
.j-faq details[open] summary::after { transform: rotate(45deg); }
.j-faq details > div { padding-bottom: 1rem; color: var(--muted); }

.j-products { margin-top: 3rem; }
.j-products h2, .j-more h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 1.2rem; }
.j-products__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: 1.2rem; }
.j-product { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; }
.j-product img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; background: var(--pink-light); margin-bottom: .4rem; }
.j-product__col { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .j-product__col { letter-spacing: 0; font-size: .85rem; }
.j-product__name { font-family: var(--f-display); font-size: 1.2rem; }
.j-product .j-link { align-self: flex-start; color: var(--accent); margin-top: .2rem; }

.j-cta { margin-top: 3.5rem; background: var(--surface); border: 1px solid var(--hairline); padding: clamp(1.6rem, 5vw, 2.8rem); text-align: center; }
.j-cta h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: .6rem; }
.j-cta p { color: var(--muted); max-width: 30rem; margin: 0 auto 1.4rem; }
.j-cta__actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.j-btn { display: inline-block; background: var(--ink); color: var(--surface); text-decoration: none; padding: .9rem 1.6rem; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; border: 1px solid var(--ink); }
html[lang="ar"] .j-btn { letter-spacing: 0; font-size: .95rem; }
.j-btn:hover { background: var(--accent); border-color: var(--accent); }
.j-btn--ghost { background: transparent; color: var(--ink); }
.j-btn--ghost:hover { color: var(--surface); }

.j-more { margin-top: clamp(3.5rem, 8vw, 5.5rem); padding-top: 2.5rem; border-top: 1px solid var(--hairline); }
.j-grid--three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }

/* footer */
.j-footer { background: var(--ink); color: var(--surface); padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 1.5rem; }
.j-footer__inner { max-width: 76rem; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.j-footer__inner p { margin-top: 1rem; font-size: .88rem; color: rgba(250, 238, 242, .7); max-width: 28ch; }
.j-footer nav { display: grid; grid-template-columns: repeat(2, auto); gap: .6rem 2.4rem; font-size: .9rem; }
.j-footer nav a { text-decoration: none; color: rgba(250, 238, 242, .82); }
.j-footer nav a:hover { color: var(--logo); }
.j-brand--light span { color: var(--logo); }
.j-footer__rights { max-width: 76rem; margin: 2.5rem auto 0; font-size: .78rem; color: rgba(250, 238, 242, .55); }
