/* ============================================================
   DHUHA THEME — theme.css
   Layout + components, ported 1:1 from the React prototype's
   inline styles into reusable classes. Pairs with the token
   sheet colors_and_type.css (loaded first).
   ============================================================ */

/* ---------------- Shell / layout ---------------- */
html, body { margin: 0; min-height: 100vh; }
body { overflow-x: hidden; }

.dhuha-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.dhuha-stage {
  position: relative;
  padding: 48px 56px 120px;
  max-width: 1100px;
  width: 100%;
}

/* Top hairline gold strip */
.top-hairline {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gold-gradient-h); background-size: 200% 100%;
  animation: gold-shimmer 6s ease infinite;
  z-index: 100;
}

#dhuha-root { position: relative; z-index: 2; }

/* Module fade-in — content is visible by default; the entrance is a
   subtle rise only (transform), never an opacity gate, so it can never
   leave content hidden if a browser pauses animations. */
.fade-in { animation: modIn 460ms var(--ease-brand); }
@keyframes modIn {
  from { transform: translateY(12px); }
  to   { transform: translateY(0); }
}

/* Divider */
.divider { height: 1px; background: var(--border-subtle); margin: 48px 0; position: relative; }
.divider::before { content: ''; position: absolute; top: 0; left: 0; width: 80px; height: 1px; background: var(--gold-gradient-h); }

/* Module head + title + lede */
.mod-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.mod-num { font-family: var(--font-mono); font-size: 11px; color: var(--gold); font-weight: 600; letter-spacing: 0.1em; }
.mod-label { font-family: var(--font-body); font-size: 11px; color: var(--fg-2); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; }
.mod-title { font-family: var(--font-display); font-size: clamp(36px, 5vw, 56px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 18px; }
.mod-title em { font-style: italic; color: var(--gold); font-weight: 500; }
.mod-lede { font-size: 18px; line-height: 1.55; color: var(--fg-2); max-width: 60ch; margin: 0 0 32px; }

/* ---------------- Left Rail ---------------- */
.rail {
  position: sticky; top: 0; align-self: start; height: 100vh;
  border-right: 1px solid var(--border-subtle);
  padding: 40px 28px 28px;
  background: color-mix(in srgb, var(--bg-elev-1) 80%, transparent);
  backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 28px; z-index: 10;
}
.rail-brand { cursor: pointer; text-decoration: none; border: none; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.rail-brand img { width: 64px; height: auto; }
.rail-brand .est { font-family: var(--font-mono); font-size: 10px; color: var(--fg-2); letter-spacing: 0.2em; text-transform: uppercase; }

.rail-nav { display: flex; flex-direction: column; gap: 2px; list-style: none; margin: 0; padding: 0; }
.rail-nav a {
  cursor: pointer; border: none; text-decoration: none;
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px;
  padding: 10px 8px; border-radius: 10px;
  color: var(--fg-2); background: transparent;
  transition: all 160ms var(--ease-out);
}
.rail-nav a .num { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); }
.rail-nav a .label { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.rail-nav a:hover { color: var(--fg-1); }
.rail-nav a.is-active { color: var(--fg-1); background: var(--gold-soft); }
.rail-nav a.is-active .num { color: var(--gold); }
.rail-nav a.is-active .label { font-style: italic; }
.rail-nav a .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: 0; }
.rail-nav a.is-active .dot { opacity: 1; }

.rail-spacer { flex: 1; }

/* Theme toggle */
.theme-toggle {
  display: inline-flex; gap: 2px; padding: 5px;
  background: var(--bg-elev-2); border: 1px solid var(--border-strong);
  border-radius: 100px; align-self: flex-start;
}
.theme-toggle button {
  background: transparent; color: var(--fg-2);
  border: none; cursor: pointer; border-radius: 100px;
  padding: 6px 12px; font-family: var(--font-body); font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.theme-toggle button.is-active { background: var(--gold); color: var(--fg-on-gold); }

/* Cart summary button */
.rail-cart {
  background: var(--bg-elev-1); border: 1px solid var(--border-subtle);
  border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  text-align: left; color: var(--fg-1); width: 100%;
}
.rail-cart .ico {
  position: relative; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold-soft); color: var(--gold);
}
.rail-cart .count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); color: var(--fg-on-gold);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  display: grid; place-items: center; padding: 0 4px;
}
.rail-cart .lbl { font-family: var(--font-body); font-size: 10px; color: var(--fg-2); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
.rail-cart .amt { font-family: var(--font-display); font-size: 15px; font-style: italic; color: var(--gold); }

/* Mobile top bar (hidden on desktop) */
.mobile-bar { display: none; }

/* ---------------- Buttons ---------------- */
.btn {
  font-family: var(--font-body); font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 260ms var(--ease-out), opacity 160ms;
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 16px; font-size: 11px; border-radius: 8px; }
.btn-md { padding: 14px 26px; font-size: 13px; border-radius: 14px; }
.btn-lg { padding: 18px 34px; font-size: 14px; border-radius: 16px; }
.btn-gold {
  background: var(--gold-gradient-h); background-size: 200% 100%;
  animation: gold-shimmer 6s ease infinite;
  color: var(--fg-on-gold);
  box-shadow: 0 8px 32px -8px rgba(201,168,76,0.35);
}
.btn-ghost { background: transparent; color: var(--fg-1); border: 1px solid var(--border-strong); }
.btn-text {
  background: transparent; color: var(--gold); padding: 8px 0;
  border-bottom: 1px dotted var(--gold); border-radius: 0;
  letter-spacing: 0.04em; text-transform: none; font-weight: 600;
}
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------------- Badges ---------------- */
.badge {
  font-family: var(--font-body); font-weight: 700; font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 100px;
  display: inline-flex; align-items: center; gap: 6px;
}
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-gold  { color: var(--gold);    border: 1px solid var(--gold);          background: color-mix(in srgb, var(--gold) 12%, transparent); }
.badge-green { color: var(--success); border: 1px solid var(--success);       background: color-mix(in srgb, var(--success) 12%, transparent); }
.badge-red   { color: var(--error);   border: 1px solid var(--error);         background: color-mix(in srgb, var(--error) 12%, transparent); }
.badge-blue  { color: var(--info);    border: 1px solid var(--info);          background: color-mix(in srgb, var(--info) 12%, transparent); }
.badge-plain { color: var(--fg-2);    border: 1px solid var(--border-strong); background: var(--bg-elev-1); }

/* Eyebrow (also defined in tokens; kept for parity) */
.eyebrow {
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--gold); }

.hairline { width: 80px; height: 1px; background: var(--gold-gradient-h); }

/* ---------------- Image box ---------------- */
.imgbox {
  position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden;
  background: var(--bg-elev-2); border: 1px solid var(--border-subtle);
}
.imgbox img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.imgbox.cover { background: #000; }
.imgbox.cover img { object-fit: cover; }
.imgbox.noborder { border: none; }
.imgbox .caption {
  position: absolute; left: 14px; bottom: 14px;
  font-family: var(--font-mono); font-size: 10px;
  color: #F0E6CC; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
  padding: 4px 10px; border-radius: 100px;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid rgba(201,168,76,0.4);
}
/* corner ticks */
.imgbox.frame .tick { position: absolute; width: 12px; height: 12px; pointer-events: none; }
.imgbox.frame .tl { top: 10px; left: 10px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.imgbox.frame .tr { top: 10px; right: 10px; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.imgbox.frame .bl { bottom: 10px; left: 10px; border-bottom: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.imgbox.frame .br { bottom: 10px; right: 10px; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }

/* ---------------- Generic grids & cards ---------------- */
.grid { display: grid; }
.card {
  background: var(--bg-elev-1); border: 1px solid var(--border-subtle);
  border-radius: 16px; box-shadow: var(--shadow-card);
}
.card-gold { border-color: var(--border-gold); }
.gold-top { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gold-gradient-h); }

/* Stat tiles */
.stat-tile { padding: 14px 16px; background: var(--bg-elev-2); border-radius: 12px; border: 1px solid var(--border-subtle); }
.stat-tile .k { font-family: var(--font-body); font-size: 10px; color: var(--fg-2); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.stat-tile .v { font-family: var(--font-display); font-size: 28px; color: var(--fg-1); font-weight: 600; }
.stat-tile .d { font-family: var(--font-mono); font-size: 11px; color: var(--gold); }

/* ---------------- Home: hero ---------------- */
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero-cap {
  position: absolute; bottom: -24px; left: -24px;
  background: var(--bg-elev-1); border: 1px solid var(--border-subtle);
  border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow-card); min-width: 180px;
}
.hero-cap .lab { font-family: var(--font-mono); font-size: 10px; color: var(--gold); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.hero-cap .big { font-family: var(--font-display); font-size: 28px; color: var(--fg-1); font-weight: 600; margin-top: 2px; }
.hero-cap .big span { font-size: 14px; color: var(--fg-2); }
.hero-cap .sub { font-family: var(--font-body); font-size: 11px; color: var(--fg-2); margin-top: 2px; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pillar { background: var(--bg-elev-1); border: 1px solid var(--border-subtle); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); position: relative; }
.pillar .imgbox { border: none; border-bottom: 1px solid var(--border-subtle); border-radius: 0; }
.pillar .body { padding: 20px; }
.pillar h3 { font-family: var(--font-display); font-style: italic; font-size: 28px; color: var(--gold); font-weight: 600; margin: 10px 0 6px; }
.pillar p { font-size: 13px; color: var(--fg-2); line-height: 1.55; margin: 0; }

.facts-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center; }
.facts-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.facts-tiles .v { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }

.cta-strip {
  padding: 40px 44px; border-radius: 24px;
  background: var(--bg-elev-1); border: 1px solid var(--border-gold);
  position: relative; overflow: hidden;
}
.cta-strip .glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.1), transparent 60%); pointer-events: none; }
.cta-strip .row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; position: relative; }
.cta-strip h2 { font-family: var(--font-display); font-size: 36px; font-weight: 600; letter-spacing: -0.02em; margin: 8px 0 4px; }
.cta-strip p { color: var(--fg-2); font-size: 15px; margin: 0; max-width: 52ch; }

/* ---------------- Shop ---------------- */
.shop-selector { display: grid; gap: 10px; margin-bottom: 28px; }
.shop-selector button {
  background: transparent; border: 1px solid var(--border-subtle);
  border-radius: 14px; padding: 14px 12px; cursor: pointer; text-align: left;
  position: relative; overflow: hidden; transition: all 160ms var(--ease-out);
}
.shop-selector button.is-active { background: var(--bg-elev-1); border-color: var(--gold); }
.shop-selector .u { font-family: var(--font-mono); font-size: 9px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; }
.shop-selector button.is-active .u { color: var(--gold); }
.shop-selector .n { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--fg-1); margin-top: 4px; }
.shop-selector button.is-active .n { font-style: italic; }
.shop-selector .p { font-family: var(--font-mono); font-size: 11px; color: var(--fg-2); margin-top: 6px; }
.shop-selector button.is-active .p { color: var(--gold); }

.shop-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
  padding: 32px; background: var(--bg-elev-1);
  border: 1px solid var(--border-subtle); border-radius: 20px;
  box-shadow: var(--shadow-card); margin-bottom: 32px;
}
.prod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.prod-card { background: var(--bg-elev-1); border: 1px solid var(--border-subtle); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.prod-card .imgbox { border: none; border-bottom: 1px solid var(--border-subtle); border-radius: 0; }
.prod-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod-card .sku { font-family: var(--font-mono); font-size: 9px; color: var(--gold); letter-spacing: 0.1em; }
.prod-card .nm { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--fg-1); }
.prod-card .sz { font-size: 12px; color: var(--fg-2); }
.prod-card .foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.prod-card .price { font-family: var(--font-display); font-size: 22px; color: var(--gold); font-weight: 600; font-style: italic; }
.prod-card .add {
  background: transparent; color: var(--gold); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 6px 12px; font-family: var(--font-body); font-size: 10px;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; text-decoration: none;
}

/* ---------------- Qty stepper ---------------- */
.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden;
  background: var(--bg-elev-1);
}
.qty button { background: none; border: none; color: var(--fg-1); padding: 8px 14px; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.qty .val { min-width: 32px; text-align: center; font-family: var(--font-mono); font-size: 13px; color: var(--gold); border-left: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); padding: 8px 0; }

/* ---------------- Product Detail tabs ---------------- */
.pdp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.thumbs button { padding: 0; background: var(--bg-elev-2); border: 1px solid var(--border-subtle); border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 1/1; }
.thumbs button.is-active { border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0.7; }
.thumbs button.is-active img { opacity: 1; }

.tabs { border-top: 1px solid var(--border-subtle); padding-top: 32px; }
.tabbar { display: flex; gap: 4px; margin-bottom: 24px; flex-wrap: wrap; }
.tabbar button {
  background: transparent; border: none; cursor: pointer; padding: 10px 16px;
  font-family: var(--font-body); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  color: var(--fg-2); border-bottom: 2px solid transparent;
}
.tabbar button.is-active { color: var(--gold); border-bottom-color: var(--gold); }
.tabpanel { display: none; }
.tabpanel.is-active { display: block; }
.ritual-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.ritual-step { padding: 22px; background: var(--bg-elev-2); border-radius: 14px; border: 1px solid var(--border-subtle); position: relative; }
.ritual-step .n { font-family: var(--font-mono); font-size: 10px; color: var(--gold); letter-spacing: 0.14em; }
.ritual-step h3 { font-family: var(--font-display); font-size: 24px; font-style: italic; color: var(--gold); margin: 8px 0 6px; }
.ritual-step p { font-size: 13px; color: var(--fg-2); margin: 0; line-height: 1.55; }
.video-wrap { position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; border: 1px solid var(--border-gold); background: var(--bg-elev-2); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

details.faq { padding: 16px; background: var(--bg-elev-2); border-radius: 12px; border: 1px solid var(--border-subtle); }
details.faq summary { cursor: pointer; font-family: var(--font-body); font-weight: 700; color: var(--fg-1); font-size: 14px; }
details.faq p { margin-top: 10px; font-size: 13px; color: var(--fg-2); }

/* spec list */
.spec { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--fg-2); }
.spec span { color: var(--gold); }
.note-dashed { padding: 10px 14px; background: var(--bg-elev-2); border: 1px dashed var(--border-gold); border-radius: 10px; font-size: 11px; color: var(--fg-2); font-family: var(--font-mono); letter-spacing: 0.04em; }

/* ---------------- Science ---------------- */
.sci-panel { padding: 32px; background: var(--bg-elev-1); border: 1px solid var(--border-gold); border-radius: 20px; box-shadow: var(--shadow-card); margin-bottom: 32px; position: relative; overflow: hidden; }
.sci-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: center; }
.sci-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metal { padding: 16px; background: var(--bg-elev-1); border: 1px solid var(--border-subtle); border-radius: 12px; }
.metal .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.metal .nm { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.metal .r { font-family: var(--font-mono); font-size: 11px; color: var(--gold); }
.metal .lim { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); margin-top: 2px; }
.disclaimer { padding: 20px 24px; background: var(--bg-elev-2); border: 1px solid var(--border-subtle); border-radius: 12px; font-size: 12px; color: var(--fg-2); line-height: 1.65; }

/* ---------------- Story ---------------- */
.chapter { display: grid; gap: 40px; align-items: center; margin-bottom: 48px; }
.chapter .label { font-family: var(--font-mono); font-size: 11px; color: var(--gold); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }
.chapter h2 { font-family: var(--font-display); font-size: 38px; font-weight: 600; margin: 0 0 18px; letter-spacing: -0.02em; line-height: 1.1; }
.chapter p { color: var(--fg-2); line-height: 1.75; margin-bottom: 14px; }
.pullquote { padding: 48px 56px; background: var(--bg-elev-1); border: 1px solid var(--border-gold); border-radius: 24px; margin-bottom: 48px; position: relative; overflow: hidden; text-align: center; }
.pullquote .bg { position: absolute; inset: 0; background: var(--hero-gradient); pointer-events: none; }
.pullquote blockquote { font-family: var(--font-display); font-style: italic; font-size: 30px; color: var(--fg-1); font-weight: 500; margin: 0 auto 20px; max-width: 32ch; line-height: 1.35; }
.pullquote .by { font-family: var(--font-body); font-size: 11px; color: var(--fg-2); letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.timeline .item { padding: 16px; background: var(--bg-elev-1); border: 1px solid var(--border-subtle); border-radius: 12px; position: relative; }
.timeline .item .bar { position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--gold-gradient-h); }
.timeline .yr { font-family: var(--font-mono); font-size: 10px; color: var(--gold); letter-spacing: 0.14em; margin-top: 8px; }
.timeline h4 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: 6px 0 4px; color: var(--fg-1); text-transform: none; letter-spacing: 0; }
.timeline p { font-size: 12px; color: var(--fg-2); line-height: 1.5; margin: 0; }

/* ---------------- Journal ---------------- */
.cats { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.cats a {
  background: transparent; color: var(--fg-2); border: 1px solid var(--border-strong);
  padding: 7px 16px; border-radius: 100px; cursor: pointer; text-decoration: none;
  font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.cats a.is-active { background: var(--gold); color: var(--fg-on-gold); border-color: var(--gold); }
.journal-feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; padding: 24px; background: var(--bg-elev-1); border: 1px solid var(--border-subtle); border-radius: 20px; margin-bottom: 32px; box-shadow: var(--shadow-card); text-decoration: none; color: inherit; }
.journal-feature .body { display: flex; flex-direction: column; gap: 14px; }
.journal-feature h2 { font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
.journal-feature p { font-size: 14px; color: var(--fg-2); line-height: 1.6; margin: 0; }
.journal-feature .meta { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.1em; }
.journal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.post-card { background: var(--bg-elev-1); border: 1px solid var(--border-subtle); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform 260ms var(--ease-out), border-color 260ms; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.post-card:hover { transform: translateY(-3px); border-color: var(--border-gold); }
.post-card .imgbox { border: none; border-bottom: 1px solid var(--border-subtle); border-radius: 0; }
.post-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .cat { font-family: var(--font-mono); font-size: 10px; color: var(--gold); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.post-card h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 2px; line-height: 1.2; }
.post-card p { font-size: 13px; color: var(--fg-2); line-height: 1.55; margin: 0; }
.post-card .meta { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.1em; margin-top: 6px; }

/* Single post (journal reader) */
.post-single { max-width: 780px; margin: 0 auto; }
.post-single h1 { font-family: var(--font-display); font-size: 54px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.08; margin: 16px 0 24px; }
.post-single .lead { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--gold); line-height: 1.45; margin: 0 0 24px; border-left: 3px solid var(--gold); padding-left: 20px; }
.post-single .content p { font-size: 17px; line-height: 1.75; color: var(--fg-1); margin-bottom: 18px; }
.post-author { margin-top: 40px; padding: 24px; background: var(--bg-elev-1); border: 1px solid var(--border-subtle); border-radius: 14px; display: flex; gap: 16px; align-items: center; }
.post-author .av { width: 52px; height: 52px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-family: var(--font-display); font-style: italic; font-size: 22px; }

/* ---------------- Forms (Ask + WP forms) ---------------- */
.ask-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; }
.form-card { padding: 32px; background: var(--bg-elev-1); border: 1px solid var(--border-subtle); border-radius: 20px; box-shadow: var(--shadow-card); }
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 28px; }
.topic { padding: 12px 14px; text-align: left; background: transparent; border: 1px solid var(--border-subtle); border-radius: 12px; cursor: pointer; position: relative; overflow: hidden; transition: all 160ms var(--ease-out); }
.topic.is-active { background: var(--bg-elev-2); border-color: var(--gold); }
.topic .t { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--fg-1); }
.topic.is-active .t { color: var(--gold); font-style: italic; }
.topic .s { font-size: 11px; color: var(--fg-2); margin-top: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field-label { font-family: var(--font-body); font-size: 10px; color: var(--fg-2); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.field input, .field textarea,
.dhuha-form input[type=text], .dhuha-form input[type=email], .dhuha-form textarea {
  padding: 12px 14px; font-family: var(--font-body); font-size: 14px;
  color: var(--fg-1); background: var(--bg-elev-2);
  border: 1px solid var(--border-subtle); border-radius: 10px; box-sizing: border-box; width: 100%;
}
.field textarea { resize: vertical; line-height: 1.55; }
.form-note { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.08em; }
.form-success { margin-top: 18px; padding: 14px 18px; background: color-mix(in srgb, var(--success) 12%, transparent); border: 1px solid var(--success); border-radius: 12px; color: var(--success); font-size: 13px; }

/* ---------------- Now capsule ---------------- */
.now-capsule {
  position: fixed; top: 24px; right: 28px; z-index: 50;
  background: color-mix(in srgb, var(--bg-elev-1) 88%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: 100px; padding: 8px 8px 8px 18px;
  backdrop-filter: blur(12px);
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 8px 32px -12px rgba(0,0,0,0.5);
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-2);
}
.now-capsule .sep { width: 1px; height: 14px; background: var(--border-strong); }
.now-capsule .gold { color: var(--gold); }
.now-capsule .dim { color: var(--fg-3); }

/* ---------------- Cart drawer ---------------- */
.cart-scrim { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity 260ms var(--ease-out); }
.cart-scrim.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw;
  background: var(--bg-elev-1); border-left: 1px solid var(--border-subtle);
  z-index: 101; transform: translateX(100%);
  transition: transform 420ms var(--ease-brand);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-head { padding: 24px 28px; border-bottom: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center; }
.cart-head .ttl { font-family: var(--font-display); font-size: 26px; font-style: italic; color: var(--fg-1); margin-top: 4px; }
.cart-close { background: transparent; border: 1px solid var(--border-strong); border-radius: 50%; width: 36px; height: 36px; color: var(--fg-1); cursor: pointer; font-size: 14px; }
.cart-body { flex: 1; overflow-y: auto; padding: 18px 28px; display: flex; flex-direction: column; gap: 14px; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--fg-2); }
.cart-empty .big { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--gold); margin-bottom: 8px; }
.cart-foot { padding: 28px; border-top: 1px solid var(--border-subtle); }
.cart-foot .row { display: flex; justify-content: space-between; margin-bottom: 14px; }
.cart-foot .sub-lbl { color: var(--fg-2); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.cart-foot .sub-amt { font-family: var(--font-display); font-size: 26px; color: var(--fg-1); font-weight: 600; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1000px) {
  .pillars, .ritual-grid, .metals, .timeline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .dhuha-shell { grid-template-columns: 1fr; }
  .dhuha-stage { padding: 88px 20px 100px; }
  .rail { display: none; }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 90; height: 64px; padding: 0 16px;
    background: color-mix(in srgb, var(--bg-elev-1) 92%, transparent); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
  }
  .mobile-bar img { height: 34px; width: auto; }
  .mobile-actions { display: flex; align-items: center; gap: 8px; }
  .mobile-bar .icon-btn { background: var(--bg-elev-2); border: 1px solid var(--border-strong); color: var(--fg-1); border-radius: 10px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }

  .hero-grid, .facts-grid, .sci-grid, .chapter, .ask-grid, .shop-detail, .pdp-grid, .journal-feature, .cta-strip .row { grid-template-columns: 1fr; }
  .now-capsule { display: none; }

  /* Mobile slide-out nav */
  .rail.mobile-open {
    display: flex; position: fixed; inset: 0; z-index: 95; height: 100vh;
    width: 280px; max-width: 86vw; border-right: 1px solid var(--border-subtle);
  }
}
@media (max-width: 560px) {
  .pillars, .ritual-grid, .metals, .timeline, .facts-tiles, .sci-tiles, .topic-grid, .spec { grid-template-columns: 1fr; }
  .shop-selector { grid-template-columns: 1fr 1fr !important; }
  .mod-title { font-size: 36px; }
}

/* ---------------- Footer ---------------- */
.dhuha-footer { border-top: 1px solid var(--border-subtle); background: var(--bg-elev-1); }
.dhuha-footer-inner { max-width: var(--container-wide); margin: 0 auto; padding: 48px 56px; display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 40px; align-items: start; }
.dhuha-footer-brand img { width: 52px; height: auto; }
.dhuha-footer-tag { color: var(--fg-2); font-size: 13px; line-height: 1.6; max-width: 40ch; margin: 12px 0 0; }
.dhuha-footer-nav .footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dhuha-footer-nav a { color: var(--fg-2); text-decoration: none; border: none; font-size: 14px; }
.dhuha-footer-nav a:hover { color: var(--gold); }
.dhuha-footer-legal p { color: var(--fg-3); font-size: 11px; line-height: 1.6; margin: 0; max-width: 32ch; }
.footer-widget-title { color: var(--gold); }
@media (max-width: 900px) { .dhuha-footer-inner { grid-template-columns: 1fr; padding: 32px 20px; gap: 24px; } }

/* ---------------- Prose (page editor content) ---------------- */
.dhuha-prose { font-size: 16px; line-height: 1.75; color: var(--fg-1); max-width: 72ch; }
.dhuha-prose p { margin: 0 0 18px; }
.dhuha-prose h2 { font-family: var(--font-display); font-size: 32px; margin: 32px 0 14px; }
.dhuha-prose h3 { font-family: var(--font-display); font-size: 24px; margin: 24px 0 10px; }
.dhuha-prose ul, .dhuha-prose ol { padding-left: 1.2em; margin: 0 0 18px; }
.dhuha-prose li { margin-bottom: 8px; }
.dhuha-prose img { max-width: 100%; height: auto; border-radius: var(--radius-lg); }
.dhuha-prose blockquote { border-left: 3px solid var(--gold); padding-left: 20px; font-family: var(--font-display); font-style: italic; font-size: 20px; color: var(--gold); margin: 24px 0; }

/* ---------------- Pagination ---------------- */
.dhuha-pagination { margin-top: 48px; }
.dhuha-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dhuha-pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 10px; color: var(--fg-2);
  text-decoration: none; font-family: var(--font-mono); font-size: 13px;
}
.dhuha-pagination .page-numbers.current { background: var(--gold); color: var(--fg-on-gold); border-color: var(--gold); }
.dhuha-pagination .page-numbers:hover { border-color: var(--gold); color: var(--gold); }

/* Rail scrim (mobile) */
.rail-scrim { display: none; }
@media (max-width: 900px) {
  .rail-scrim { display: block; position: fixed; inset: 0; z-index: 94; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity 200ms; }
  .rail.mobile-open ~ .rail-scrim { opacity: 1; pointer-events: auto; }
}

/* Grain overlay parity (body.grain handled by token sheet) */
