/* DooTickets — shared styles for /terms and /privacy
   Tokens mirror /landing.html exactly. */

:root {
  --gold: #FAD700;
  --gold-light: #FFE44D;
  --gold-dim: rgba(250,215,0,0.15);
  --dark:  #080807;
  --dark2: #0F0F0D;
  --dark3: #181816;
  --dark4: #201F1C;
  --text:  #F2EDE4;
  --muted: #7A7570;
  --faint: rgba(242,237,228,0.06);
  --border: rgba(250,215,0,0.18);
  /* derived from --text for readable long-form body copy */
  --text-soft: rgba(242,237,228,0.74);

  --header-h: 72px;
  --gutter: 64px;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Outfit', sans-serif;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* GRAIN OVERLAY (as on landing) */
body::after {
  content:'';
  position:fixed; inset:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events:none; z-index:9999; opacity:.5;
}

::-webkit-scrollbar { width:3px; height:3px; }
::-webkit-scrollbar-track { background:var(--dark); }
::-webkit-scrollbar-thumb { background:var(--gold); border-radius:2px; }

::selection { background: var(--gold); color: var(--dark); }

a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-light); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- LANGUAGE VISIBILITY ---------- */
html[lang="en"] [data-l="ar"],
html[lang="ar"] [data-l="en"] { display: none !important; }

/* Arabic typography: Outfit / Cormorant have no Arabic glyphs */
html[lang="ar"] body,
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] .toc, html[lang="ar"] button {
  font-family: 'IBM Plex Sans Arabic', var(--font-sans);
}
html[lang="ar"] em { font-style: normal; }
/* letter-spacing / uppercase break Arabic joining */
html[lang="ar"] .eyebrow,
html[lang="ar"] .toc summary,
html[lang="ar"] .back-link,
html[lang="ar"] .foot-links a,
html[lang="ar"] .meta-line { letter-spacing: 0; text-transform: none; }
html[lang="ar"] .prose { line-height: 2; }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 300;
  background: var(--gold); color: var(--dark);
  padding: 10px 18px; border-radius: 2px;
  font-size: .8rem; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--dark); }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  height: var(--header-h);
  background: rgba(8,8,7,.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px; height: 100%;
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo img { height: 40px; width: auto; display: block; }

.header-actions { display: flex; align-items: center; gap: 22px; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--muted);
  font-size: .78rem; font-weight: 500;
  line-height: 1;
  transition: border-color .3s;
  direction: ltr; /* keep "EN | ع" order stable in both directions */
}
.lang-toggle:hover { border-color: var(--gold); }
.lang-toggle .opt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 34px; padding: 0 10px;
  transition: color .3s, background .3s;
}
.lang-toggle .opt-en { letter-spacing: .12em; }
.lang-toggle .opt-ar { font-family: 'IBM Plex Sans Arabic', var(--font-sans); font-size: .95rem; }
.lang-toggle .sep { width: 1px; height: 18px; background: var(--border); }
html[lang="en"] .lang-toggle .opt-en,
html[lang="ar"] .lang-toggle .opt-ar { color: var(--dark); background: var(--gold); }

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color .3s;
  white-space: nowrap;
}
.back-link:hover { color: var(--gold); }
.back-link .arrow { display: inline-block; transition: transform .3s; }
.back-link:hover .arrow { transform: translateX(-3px); }
html[dir="rtl"] .back-link .arrow { transform: scaleX(-1); }
html[dir="rtl"] .back-link:hover .arrow { transform: scaleX(-1) translateX(-3px); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 88px var(--gutter) 72px;
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 90% at 15% 0%, var(--gold-dim) 0%, transparent 60%);
  opacity: .45; pointer-events: none;
}
html[dir="rtl"] .hero::before {
  background: radial-gradient(ellipse 60% 90% at 85% 0%, var(--gold-dim) 0%, transparent 60%);
}
.hero > * { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: .72rem; font-weight: 400; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 26px;
}
.eyebrow::after { content: ''; width: 48px; height: 1px; background: var(--gold); }
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  font-weight: 600; line-height: 1.02;
  margin-bottom: 26px;
  overflow-wrap: break-word;
}
.hero h1 em { font-style: italic; color: var(--gold); }
html[lang="ar"] .hero h1 { font-size: clamp(2.1rem, 5vw, 3.9rem); line-height: 1.3; font-weight: 600; }
.meta-line {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px 22px;
}
.meta-line strong { color: var(--text); font-weight: 500; }
.hero-intro {
  margin-top: 26px; max-width: 640px;
  font-size: 1.02rem; color: var(--text-soft); line-height: 1.8;
}

@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow, .hero h1, .hero .meta-line, .hero .hero-intro {
    opacity: 0; animation: fadeUp .8s ease forwards;
  }
  .hero h1 { animation-delay: .12s; }
  .hero .meta-line { animation-delay: .24s; }
  .hero .hero-intro { animation-delay: .34s; }
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ---------- LAYOUT ---------- */
main { flex: 1 0 auto; }
main:focus { outline: none; }
.legal-layout {
  max-width: 1280px; margin: 0 auto;
  padding: 0 var(--gutter) 110px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 80px;
  align-items: start;
}

/* ---------- TOC ---------- */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  max-height: calc(100vh - var(--header-h) - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  border-inline-start: 1px solid var(--border);
  padding-inline-start: 22px;
}
.toc summary {
  list-style: none;
  font-size: .68rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary .chev { display: none; }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc a {
  display: grid; grid-template-columns: 28px 1fr; gap: 6px;
  padding: 6px 0;
  font-size: .84rem; line-height: 1.45;
  color: var(--muted); text-decoration: none;
  transition: color .25s;
  position: relative;
}
.toc a .n { color: rgba(250,215,0,.5); font-variant-numeric: tabular-nums; font-size: .74rem; padding-top: 2px; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); font-weight: 400; }
.toc a.active .n { color: var(--gold); }
.toc a.active::before {
  content: ''; position: absolute;
  inset-inline-start: -23px; top: 8px; bottom: 8px;
  width: 2px; background: var(--gold);
}

/* ---------- ARTICLE / PROSE ---------- */
.prose {
  max-width: 760px;
  line-height: 1.8;
  color: var(--text-soft);
  font-size: 1rem;
  min-width: 0;
}
.summary-box {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 28px 30px;
  margin-bottom: 20px;
}
.prose .summary-box h2 {
  display: block;
  font-family: var(--font-sans);
  font-size: .7rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
html[lang="ar"] .prose .summary-box h2 { letter-spacing: 0; font-size: .9rem; }
.summary-box ul { margin: 0; }

.prose section {
  padding: 44px 0 8px;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.prose section:first-of-type { border-top: none; }
.prose .summary-box + section { border-top: none; }
.prose h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 600; line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
  display: flex; align-items: baseline; gap: 14px;
}
.prose h2 .num {
  font-style: italic; color: var(--gold);
  font-size: .8em; min-width: 1.6em;
  font-variant-numeric: lining-nums;
}
html[lang="ar"] .prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.65rem); line-height: 1.5; }
html[lang="ar"] .prose h2 .num { font-style: normal; font-size: .9em; }
.prose h3 {
  font-family: var(--font-sans);
  font-size: 1.02rem; font-weight: 500;
  color: var(--text);
  margin: 28px 0 10px;
}
.prose p { margin-bottom: 16px; }
.prose strong { color: var(--text); font-weight: 500; }
.prose ul, .prose ol {
  margin: 0 0 18px;
  padding-inline-start: 22px;
}
.prose li { margin-bottom: 8px; padding-inline-start: 6px; }
.prose ul li::marker { color: var(--gold); content: '◆  '; font-size: .6em; }
.prose ol li::marker { color: var(--gold); font-weight: 500; }
.prose .clause { font-variant-numeric: lining-nums; }
.prose a { overflow-wrap: anywhere; }

.callout {
  background: var(--dark3);
  border-inline-start: 2px solid var(--gold);
  padding: 18px 22px;
  margin: 8px 0 20px;
  border-radius: 0 2px 2px 0;
}
html[dir="rtl"] .callout { border-radius: 2px 0 0 2px; }
.callout p:last-child { margin-bottom: 0; }
.caps-note { color: var(--text); font-weight: 400; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 8px 0 22px;
  border: 1px solid var(--border);
  border-radius: 3px;
}
.table-wrap table {
  width: 100%; min-width: 520px;
  border-collapse: collapse;
  font-size: .9rem; line-height: 1.6;
}
.table-wrap th, .table-wrap td {
  text-align: start; vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.table-wrap th {
  background: var(--dark3);
  color: var(--gold);
  font-weight: 500; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
}
html[lang="ar"] .table-wrap th { letter-spacing: 0; font-size: .85rem; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap td:first-child { color: var(--text); font-weight: 400; }

.contact-card {
  display: grid; gap: 10px;
  background: var(--dark3);
  border: 1px solid var(--border);
  padding: 24px 26px; border-radius: 3px;
  margin: 6px 0 18px;
}
.contact-card div { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.contact-card dt { color: var(--muted); min-width: 110px; font-size: .9rem; }
.contact-card dd { color: var(--text); }

.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--dark2);
  border-top: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 34px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 18px 32px;
  flex-wrap: wrap;
}
.foot-brand { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot-brand img { height: 26px; width: auto; display: block; }
.copyright { font-size: .76rem; color: var(--muted); }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.foot-links a {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .3s;
}
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--gold); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .legal-layout { grid-template-columns: 230px minmax(0,1fr); gap: 48px; }
}

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: minmax(0,1fr); gap: 28px; padding-bottom: 80px; }
  .toc {
    position: static; max-height: none; overflow: visible;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--dark2);
    padding: 0;
  }
  .toc summary {
    margin: 0; padding: 16px 18px;
    cursor: pointer;
  }
  .toc summary .chev {
    display: inline-block;
    width: 8px; height: 8px;
    border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
    transform: rotate(45deg);
    transition: transform .25s;
    margin-top: -4px;
  }
  .toc[open] summary .chev { transform: rotate(-135deg); margin-top: 4px; }
  .toc[open] summary { border-bottom: 1px solid var(--border); }
  .toc ol { padding: 10px 18px 16px; }
  .toc a.active::before { display: none; }
  .prose { max-width: none; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 64px; }
  .logo img { height: 34px; }
  .header-actions { gap: 12px; }
  .back-link { font-size: .68rem; letter-spacing: .1em; }
  .back-link .hide-sm { display: none; }
  .hero { padding-top: 56px; padding-bottom: 44px; }
  .prose section { padding-top: 34px; }
  .summary-box { padding: 22px 18px; }
  .callout { padding: 16px 16px; }
  .contact-card { padding: 20px 18px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- PRINT ---------- */
@media print {
  body { background: #fff; color: #000; }
  body::after, .site-header, .toc, .site-footer, .skip-link { display: none !important; }
  .legal-layout { display: block; padding: 0; }
  .hero { padding: 0 0 24px; }
  .hero::before { display: none; }
  .hero h1, .prose h2, .prose h3, .prose strong, .caps-note { color: #000; }
  .hero h1 em, .eyebrow, .prose h2 .num { color: #000; }
  .prose, .hero-intro, .meta-line { color: #222; }
  .summary-box, .callout, .contact-card, .table-wrap th { background: #fff; border-color: #999; }
  .prose a { color: #000; }
  .prose section { border-color: #ccc; break-inside: auto; }
}
