/* Parked Where — Wayfinding Editorial */

:root {
  --paper:        #F4EFE6;
  --paper-deep:   #ECE5D7;
  --ink:          #1B1815;
  --ink-soft:     #4A433C;
  --ink-mute:     #80776C;
  --rule:         #D9CFBE;
  --sign:         #1F4E8C;
  --sign-deep:    #163A6B;
  --amber:        #C97A2A;

  --serif:  "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:   "Instrument Sans", "Helvetica Neue", system-ui, sans-serif;
  --arabic: "IBM Plex Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  --arabic-display: "Amiri", "IBM Plex Sans Arabic", serif;

  --col: min(640px, 92vw);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(31, 78, 140, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(201, 122, 42, .06), transparent 55%),
    var(--paper);
}

/* RTL — switch to Arabic faces */
html[dir="rtl"] body { font-family: var(--arabic); font-size: 18px; }
html[dir="rtl"] .hero,
html[dir="rtl"] .section h2,
html[dir="rtl"] .mark__top,
html[dir="rtl"] .mark__bot { font-family: var(--arabic-display); }

/* Subtle paper grain */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10  0 0 0 0 0.09  0 0 0 0 0.08  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  z-index: 100;
}

/* ── Topbar ───────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(to bottom, rgba(244, 239, 230, .85), transparent);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.mark__sign svg { display: block; box-shadow: 0 1px 0 rgba(0,0,0,.05); border-radius: 6px; }

.mark__name {
  display: inline-flex;
  flex-direction: column;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  line-height: .95;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 14, "SOFT" 50;
}
.mark__top { color: var(--ink); }
.mark__bot { color: var(--sign); font-style: italic; }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lang__btn {
  appearance: none;
  background: none;
  border: none;
  padding: 6px 4px;
  color: var(--ink-mute);
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  transition: color .2s ease;
}
.lang__btn:hover { color: var(--ink); }
.lang__btn.is-active {
  color: var(--ink);
  border-bottom: 1.5px solid var(--sign);
}
.lang__sep { color: var(--ink-mute); }
html[dir="rtl"] .lang { font-family: var(--arabic); }

/* ── Page ─────────────────────────────────────────── */
.page {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: clamp(56px, 10vw, 120px) clamp(20px, 5vw, 56px) 80px;
}

.doc {
  width: var(--col);
  max-width: 100%;
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  margin: 0 0 28px;
}
.eyebrow__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 14px; }

/* Hero */
.hero {
  font-family: var(--serif);
  font-weight: 350;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-size: clamp(48px, 9vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 0 36px;
  color: var(--ink);
}
.hero em {
  font-style: italic;
  font-weight: 400;
  color: var(--sign);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
html[dir="rtl"] .hero {
  font-weight: 700;
  letter-spacing: 0;
  font-size: clamp(40px, 8vw, 80px);
  line-height: 1.15;
}
html[dir="rtl"] .hero em { font-style: normal; }

/* Lede */
.lede {
  font-family: var(--serif);
  font-weight: 350;
  font-variation-settings: "opsz" 36;
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 56px;
  max-width: 36ch;
}
html[dir="rtl"] .lede { font-family: var(--arabic); font-weight: 400; max-width: none; }

/* Ledger — facts grid */
.ledger {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 0 0 80px;
}
.ledger__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--rule);
}
.ledger__row:last-child { border-bottom: none; }
.ledger__k {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
html[dir="rtl"] .ledger__k {
  letter-spacing: 0;
  text-transform: none;
  font-size: 15px;
  font-family: var(--arabic);
}
.ledger__v {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "opsz" 36;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink);
  text-align: right;
}
html[dir="rtl"] .ledger__v {
  font-family: var(--arabic-display);
  font-style: normal;
  text-align: left;
  font-weight: 700;
}

/* Sections */
.section {
  margin: 0 0 56px;
  padding-top: 8px;
}

.section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 72, "SOFT" 60;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
  color: var(--ink);
  position: relative;
  padding-left: 0;
}
.section h2::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--sign);
  vertical-align: middle;
  margin-right: 14px;
  transform: translateY(-6px);
}
html[dir="rtl"] .section h2 { font-weight: 700; letter-spacing: 0; }
html[dir="rtl"] .section h2::before { margin-right: 0; margin-left: 14px; }

.section p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* Permissions list */
.permissions {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 24px;
}

.permissions li {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 24px 26px;
  position: relative;
}

.permissions li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--sign);
  border-radius: 4px 0 0 4px;
}
html[dir="rtl"] .permissions li::before {
  left: auto;
  right: 0;
  border-radius: 0 4px 4px 0;
}

.permissions h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--ink);
}
html[dir="rtl"] .permissions h3 { font-family: var(--arabic); font-weight: 700; letter-spacing: 0; }

.permissions p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* End / contact */
.section--end { margin-bottom: 0; }
.contact {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--sign);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color .2s ease;
}
.contact:hover { color: var(--sign-deep); }
html[dir="rtl"] .contact { font-family: var(--arabic); font-style: normal; font-weight: 700; }

/* Footer */
.footer {
  border-top: 1px solid var(--rule);
  padding: 28px clamp(20px, 5vw, 56px);
  font-size: 13px;
  color: var(--ink-mute);
}
.footer__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.footer a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 1px; }
.footer a:hover { color: var(--ink); }

/* Page-load reveal */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.eyebrow,
.hero,
.lede,
.ledger,
.section {
  opacity: 0;
  animation: rise .8s cubic-bezier(.2,.6,.2,1) forwards;
}
.eyebrow  { animation-delay: 0.05s; }
.hero     { animation-delay: 0.18s; }
.lede     { animation-delay: 0.34s; }
.ledger   { animation-delay: 0.46s; }
.section:nth-of-type(1) { animation-delay: 0.58s; }
.section:nth-of-type(2) { animation-delay: 0.66s; }
.section:nth-of-type(3) { animation-delay: 0.74s; }
.section:nth-of-type(4) { animation-delay: 0.82s; }
.section:nth-of-type(5) { animation-delay: 0.90s; }
.section:nth-of-type(6) { animation-delay: 0.98s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; opacity: 1 !important; }
}

/* Mobile niceties */
@media (max-width: 520px) {
  .topbar { padding: 20px; }
  .mark__name { font-size: 17px; }
  .ledger__row { flex-direction: column; gap: 4px; align-items: flex-start; }
  .ledger__v { text-align: left; }
  html[dir="rtl"] .ledger__v { text-align: right; }
  .section h2::before { display: none; }
}
