/* Carthage Fun. A playbill, not a SaaS page: sandstone paper and ink, harbour blue,
   Tyrian purple as a solid accent, gold only on the night poster. One mosaic band
   (brand/mosaic.svg) is the recurring ornament. Logical properties throughout so the
   same rules serve Arabic (rtl) and English (ltr). */
:root {
  color-scheme: light;
  --paper: #f4ecdb;
  --paper-2: #ebe0c8;
  --card: #fbf6ea;
  --ink: #17130f;
  --ink-2: #2b2520;
  --muted: #5f5a52;
  --line: #d8cbb0;
  --sea: #1f5c86;
  --sea-hover: #174a6d;
  --purple: #7a1f4b;
  --night: #0d1126;
  --night-2: #151b38;
  --night-line: #2a3260;
  --gold: #ebc063;
  --sand: #ebe2cd;
  --dusk-text: #a8aecb;
  --display: "Reem Kufi", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --story: "Aref Ruqaa", "Reem Kufi", serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
}
:root:lang(en) { --body: "Inter", "Segoe UI", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.75 var(--body); }
body:lang(en) { line-height: 1.65; }
img, svg { max-width: 100%; display: block; }
a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--sea-hover); }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 600; }
:lang(ar) h1, :lang(ar) h2 { word-spacing: .12em; }
/* Reem Kufi's Latin has a narrow word space. */
:lang(en) h1, :lang(en) h2 { word-spacing: .14em; }
p { margin: 0; }
/* Monospace fonts can't join Arabic letters, so Arabic code uses the Arabic text font. */
code:lang(ar):not([dir="ltr"]) { font-family: var(--body); font-size: .95em; }
code { font: 0.88em ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: var(--paper-2); padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The ornament: a strip of Punic mosaic */
.mosaic { height: 36px; background: url("/brand/mosaic.svg") repeat-x center / auto 36px; }
.mosaic.thin { height: 18px; background-size: auto 18px; }

/* masthead */
.bar { background: var(--paper); }
.bar .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 20px; }
.brand img { width: 36px; height: 36px; }
.bar nav { display: flex; gap: 24px; margin-inline-start: auto; font-size: 15px; align-items: center; }
.bar nav a { color: var(--muted); text-decoration: none; }
.bar nav a:hover { color: var(--ink); }
.lang { color: var(--ink) !important; font-weight: 500; }
@media (max-width: 640px) { .bar nav .opt { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 6px; font: 600 16px var(--body); text-decoration: none; transition: background-color .18s ease, color .18s ease; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-gold { background: var(--gold); color: #1a1206; }
.btn-gold:hover { background: #f3d184; color: #1a1206; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ink-2); color: var(--paper); }
.textlink { font-weight: 600; text-decoration: none; border-block-end: 1px solid currentColor; padding-block-end: 1px; }

/* 1. opening statement: type as the hero */
.opening { padding-block: clamp(48px, 9vw, 120px) clamp(40px, 6vw, 72px); }
.opening h1 { font-size: clamp(46px, 9.4vw, 128px); line-height: 1.02; letter-spacing: -0.01em; max-width: 13ch; }
.opening h1 span { color: var(--purple); }
.opening .under { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px 40px; margin-block-start: clamp(24px, 4vw, 44px); padding-block-start: 18px; border-block-start: 2px solid var(--ink); }
.opening .under p { max-width: 52ch; font-size: 18px; color: var(--ink-2); }
.opening .under a { white-space: nowrap; }
:lang(en) .opening h1 { letter-spacing: -0.03em; max-width: 12ch; }

/* 2. now showing: the game as a night-time poster */
.showing { background: var(--night); color: var(--sand); }
.showing .label { display: flex; justify-content: space-between; gap: 16px; padding-block: 16px; font-size: 14px; color: var(--dusk-text); border-block-end: 1px solid var(--night-line); }
.showing .label b { color: var(--gold); font-weight: 600; }
.poster { position: relative; margin-block-start: 28px; }
.poster img { width: 100%; height: auto; aspect-ratio: 1280 / 452; object-fit: cover; border-radius: 4px; }
.poster h2 { font-family: var(--story); font-weight: 700; color: var(--gold); font-size: clamp(60px, 12vw, 150px); line-height: .9; margin-block-start: -0.42em; position: relative; padding-inline-start: clamp(12px, 3vw, 40px); text-shadow: 0 2px 0 var(--night), 0 0 30px rgba(13, 17, 38, .7); word-spacing: normal; }
:lang(en) .poster h2 { font-family: var(--display); letter-spacing: -0.02em; }
.bill { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); padding-block: 36px 56px; }
@media (max-width: 860px) { .bill { grid-template-columns: minmax(0, 1fr); } }
.bill .pitch { font-size: clamp(19px, 2vw, 22px); line-height: 1.7; color: var(--sand); }
.bill .pitch small { display: block; font-size: 15px; color: var(--dusk-text); margin-block-start: 6px; }
.bill .act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-block-start: 28px; }
.bill .act .textlink { color: var(--sand); }
.bill .act .textlink:hover { color: var(--gold); }
/* playbill facts with dotted leaders */
.facts { margin: 0; display: grid; gap: 2px; align-content: start; }
.facts div { display: flex; align-items: baseline; gap: 10px; padding-block: 9px; }
.facts dt { color: var(--dusk-text); font-size: 15px; white-space: nowrap; }
.facts div::after { content: ""; order: 1; flex: 1; border-block-end: 1px dotted var(--night-line); transform: translateY(-4px); }
.facts dd { order: 2; margin: 0; font-weight: 600; color: var(--sand); white-space: nowrap; }
/* the cast */
.cast { border-block-start: 1px solid var(--night-line); padding-block: 28px 64px; }
.cast h3 { font-size: 14px; font-weight: 500; color: var(--dusk-text); margin-block-end: 18px; }
.cast ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cast li { display: grid; gap: 8px; }
.cast img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.cast b { font-family: var(--story); font-size: 22px; color: var(--sand); font-weight: 700; line-height: 1.2; }
:lang(en) .cast b { font-family: var(--body); font-size: 16px; font-weight: 600; }
.cast span { font-size: 13.5px; color: var(--dusk-text); line-height: 1.5; }
.cast li.wolf b { color: #e39b7c; }
@media (max-width: 760px) { .cast ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; } }

/* 3. start: the one thing you type */
.start { padding-block: clamp(56px, 8vw, 96px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 72px); align-items: center; }
@media (max-width: 860px) { .start { grid-template-columns: minmax(0, 1fr); } }
.start h2 { font-size: clamp(32px, 4.6vw, 52px); }
.start p { color: var(--ink-2); margin-block-start: 14px; max-width: 46ch; }
.composer { background: #313338; border-radius: 10px; padding: 16px; color: #dbdee1; font-family: "gg sans", var(--body); box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 18px 40px -24px rgba(23,19,15,.45); }
.composer .hint { font-size: 13px; color: #949ba4; margin-block-end: 10px; }
.composer .box { display: flex; align-items: center; gap: 12px; background: #383a40; border-radius: 8px; padding: 12px 14px; font-size: 18px; }
.composer .box .plus { width: 24px; height: 24px; border-radius: 50%; background: #b5bac1; color: #383a40; display: grid; place-items: center; font-weight: 700; font-size: 18px; line-height: 1; flex: none; }
.composer .cmd { color: #fff; }
.composer .cmd i { font-style: normal; color: #949ba4; }
.composer .caret { width: 2px; height: 22px; background: #dbdee1; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.composer .alt { margin-block-start: 10px; font-size: 13px; color: #949ba4; }
.composer .alt code { background: #1e1f22; color: #dbdee1; }

/* long-form pages (privacy, terms) */
.doc { max-width: 760px; padding-block: 48px 72px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); }
.doc .meta { color: var(--muted); font-size: 14px; margin-block: 8px 28px; }
.doc h2 { font-size: 24px; margin-block: 36px 10px; }
:lang(ar) .doc h2 { font-family: var(--body); font-weight: 600; word-spacing: normal; }
.doc h3 { margin-block: 22px 6px; font-size: 19px; font-weight: 600; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-block-start: 10px; }
.doc ul { padding-inline-start: 22px; margin: 8px 0; }
.doc li + li { margin-block-start: 4px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--card); margin-block: 10px; }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
th, td { text-align: start; padding: 10px 14px; border-block-end: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--paper-2); }
tr:last-child td { border-block-end: 0; }

/* footer: ink */
footer.site { background: var(--ink); color: #c9bfae; font-size: 15px; }
footer.site .wrap { padding-block: 40px 48px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px 48px; }
@media (max-width: 760px) { footer.site .wrap { grid-template-columns: minmax(0, 1fr); } }
footer.site .promise { max-width: 52ch; line-height: 1.7; }
footer.site .promise b { color: var(--paper); font-weight: 600; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 10px 22px; align-content: start; justify-content: end; }
@media (max-width: 760px) { footer.site nav { justify-content: start; } }
footer.site a { color: #efe6d4; }
footer.site a:hover { color: var(--gold); }
footer.site .legal { grid-column: 1 / -1; font-size: 13px; color: #8f8676; display: flex; align-items: center; gap: 10px; }
footer.site .legal img { width: 22px; height: 22px; background: var(--paper); border-radius: 4px; padding: 2px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
