/* ═══════════════════════════════════════════════════════════════════════════
   ALIMAJ THEME — Base
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── BODY ── */
body {
  font-family: var(--font-sans);
  background-color: var(--af-ink);
  color: var(--af-smoke);
  line-height: 1.6;
  min-height: 100vh;
  cursor: crosshair;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── GRAIN OVERLAY — matches approved preview exactly ── */
#alimaj-grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.6s steps(2) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0);    }
  50%  { transform: translate(-3%, 4%); }
  100% { transform: translate(3%, -3%); }
}

/* ── PAGE WRAPPER ── */
#page {
  position: relative;
  overflow: hidden;
}

#main-content {
  padding-top: var(--nav-h);
}

/* ── CONTAINER ── */
.alimaj-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.alimaj-container--narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── SECTION DEFAULTS ── */
.alimaj-section {
  padding: var(--space-32) var(--gutter);
  position: relative;
}

.alimaj-section--dark {
  background-color: var(--af-dim);
}

.alimaj-section--ink {
  background-color: var(--af-ink);
}

.alimaj-section--flush {
  padding-left: 0;
  padding-right: 0;
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-20);
}

/* ── LABEL (eyebrow text) ── */
.alimaj-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-thin);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--page-accent, var(--af-gold));
  margin-bottom: var(--space-4);
}

/* ── DIVIDER RULE ── */
.alimaj-rule {
  height: 1px;
  background: rgba(245, 243, 239, 0.07);
  margin: var(--space-16) 0;
}

.alimaj-rule--gold {
  background: rgba(200, 149, 42, 0.25);
  height: 1px;
}

.alimaj-rule--blush {
  background: rgba(232, 0, 110, 0.2);
}

.alimaj-rule--vertical {
  width: 1px;
  height: 80px;
  background: rgba(200, 149, 42, 0.3);
  margin: 0 auto;
}

/* ── "MORE" LINK ── */
.alimaj-more {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-thin);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(245, 243, 239, 0.38);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  transition: color var(--trans-base);
}
.alimaj-more::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  transition: width var(--trans-slow);
}
.alimaj-more:hover {
  color: var(--page-accent, var(--af-gold));
}
.alimaj-more:hover::after {
  width: 48px;
}

/* ── GHOST WATERMARK ── */
.alimaj-ghost {
  position: absolute;
  font-family: var(--font-serif);
  font-weight: var(--weight-light);
  font-style: italic;
  font-size: var(--text-display);
  letter-spacing: -0.04em;
  color: rgba(232, 0, 110, 0.025);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1;
  z-index: var(--z-below);
}

/* ── FOLIO LINE ── */
.alimaj-folio {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-thin);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 243, 239, 0.12);
}

/* ── SEPARATOR GEM ── */
.alimaj-gem {
  display: inline-block;
  color: var(--page-accent, var(--af-gold));
  font-size: 8px;
  vertical-align: middle;
  margin: 0 6px;
}

/* ── FOCUS STYLES ── */
:focus-visible {
  outline: 2px solid var(--af-gold);
  outline-offset: 3px;
}

/* ── FRONT PAGE HUB — no top padding needed, hub manages its own layout ── */
.front-page #main-content,
body.home #main-content {
  padding-top: 0;
}
