/* ============================================================
   Base - reset, typography, layout primitives, atmosphere
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f-body);
  background: var(--night);
  color: var(--text);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  letter-spacing: .01em;
}

/* page-wide base: single clean surface (dark atmosphere retired) */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: var(--night);
  z-index: -3;
}

/* faint camel-ring motif (opt-in via .ring-motif) */
.ring-motif::before {
  content: "";
  position: absolute; inset: 0;
  background: url("../assets/logo-mark.png") no-repeat;
  background-size: min(420px, 42vw);
  background-position: var(--end, left) -120px;
  opacity: .06;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

/* M-02: screen-reader only utility (visually hidden, focusable) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* M-02: skip link becomes visible on focus */
.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 9999;
  width: auto;
  height: auto;
  clip: auto;
  white-space: normal;
  background: var(--surface-2);
  border: 2px solid var(--gold);
  border-radius: var(--r-sm);
  color: var(--text-strong);
  font-family: var(--f-display);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

/* numerals + latin fragments always LTR + tabular */
.num, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* --- typography scale --- */
.display {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.18; color: var(--text-strong); }

/* .eyebrow uses a neutral token by default.
   --gold is reserved for honors, records, champions, and the Sword only.
   Use .eyebrow--honor to apply gold on genuine honor surfaces. */
.eyebrow {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--sand-dim);
}
html[lang="ar"] .eyebrow { letter-spacing: .12em; }
/* Honor eyebrow modifier: festival champion, Sword, records, champions only */
.eyebrow--honor { color: var(--gold); }

.lead { font-size: clamp(1.02rem, 1.4vw, 1.22rem); color: var(--sand); font-weight: 300; }

/* --- layout --- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 112px); position: relative; }
.section--tight { padding-block: clamp(40px, 5vw, 72px); }

.grid { display: grid; gap: clamp(16px, 2.4vw, 30px); }
.stack { display: flex; flex-direction: column; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
.section-head__line { flex: 1; height: 1px; background: linear-gradient(to var(--end, left), var(--line), transparent); min-width: 40px; align-self: center; margin-bottom: 10px; }

/* utility */
.gold-text { color: var(--gold); }
.green-text { color: var(--green-deep); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* entrance animations */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; animation: rise .9s var(--ease-out) forwards; }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* view transition */
#app > .view { animation: fade .5s var(--ease) both; }
