/* Egypt Xmas 2026. One stylesheet, no build. Tokens first; everything else uses them. */
@font-face { font-family: 'Marcellus'; src: url(fonts/marcellus.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url(fonts/source-sans-3.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url(fonts/source-sans-3-italic.woff2) format('woff2'); font-style: italic; font-display: swap; }
@font-face { font-family: 'Noto Naskh Arabic'; src: url(fonts/noto-naskh-arabic.woff2) format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  /* palette: sand and papyrus, lapis, Nile turquoise, terracotta, gold */
  --bg: #f5ecd9; --card: #fffaf0; --ink: #2b2118; --muted: #6b5a45; --line: #e2d3b3;
  --gold: #b8892b; --gold-ink: #7a5710; --gold-soft: #f3e2b5; --lapis: #1f3f8a; --on-lapis: #fff; --nile: #11786f; --terra: #a8462a;
  --ok: #0b5e57; --warn: #6e4500; --bad: #8c3820;
  --shadow: 0 1px 2px rgb(60 40 10 / .06), 0 8px 24px rgb(60 40 10 / .07);

  /* spacing: 4px base */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  /* type: fluid, phone to desktop */
  --t-sm: .9rem; --t-base: 1.125rem;
  --t-h3: clamp(1.2rem, 1.1rem + .5vw, 1.4rem);
  --t-h2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --t-h1: clamp(2.2rem, 1.6rem + 3vw, 3.6rem);
  --radius: 16px; --col: 44rem; --tap: 3rem; --nav-h: 3.75rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    /* night over the desert */
    --bg: #11131c; --card: #1a1d2a; --ink: #f1e7d0; --muted: #b9aa8d; --line: #2f3346;
    --gold: #e0b95a; --gold-ink: #e8c46c; --gold-soft: #3a3220; --lapis: #9db2ff; --on-lapis: #11131c; --nile: #4fc9bd; --terra: #ef916b;
    --ok: #5fd6ca; --warn: #f5c060; --bad: #f6a98a;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; } /* clears the sticky jump bar */
@media (min-width: 48rem) { html { scroll-padding-top: calc(var(--nav-h) + 5.5rem); } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-base)/1.65 'Source Sans 3', system-ui, sans-serif;
  padding-bottom: calc(var(--tap) + var(--s7) + env(safe-area-inset-bottom)); /* room for the phone tab bar */
}
img { max-width: 100%; display: block; }
a { color: var(--lapis); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: 'Marcellus', Georgia, serif; font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-h1); letter-spacing: .01em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
p, ul, ol, dl, table { margin: 0; } /* element-level reset, so the .card/.callout flow spacing below wins */
p + p { margin-top: var(--s3); }
.muted, .desc { color: var(--muted); }
.desc { font-size: var(--t-base); margin-top: var(--s2); }
small, .small { font-size: var(--t-sm); }
.eyebrow { font-size: var(--t-sm); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }

/* ---------- artwork ---------- */
.art-pyramids {
  position: absolute; top: var(--s6); left: var(--s4); z-index: -1;
  width: clamp(180px, 34vw, 380px); opacity: .45; pointer-events: none;
}
.art-reef {
  --reef-top: clamp(14rem, 40vh, 26rem); --reef-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  position: fixed; top: var(--reef-top); right: 0; z-index: -1; pointer-events: none;
  height: calc(100vh - var(--reef-top) - var(--reef-bottom)); width: clamp(80px, 16vw, 220px); object-fit: cover; object-position: top; opacity: .16;
}
@media (min-width: 48rem) {
  .art-pyramids { top: calc(var(--nav-h) + var(--s6)); }
  .art-reef { --reef-bottom: 0px; }
}
@media (min-width: 64rem) {
  .art-pyramids { opacity: .95; }
  .art-reef { opacity: .7; }
}

/* ---------- layout ---------- */
.wrap { max-width: var(--col); margin: 0 auto; padding: 0 var(--s5); position: relative; }
header.top { padding: calc(var(--s8) + var(--s5)) 0 var(--s7); }
header.top h1 { margin-top: var(--s2); }
header.top .desc { margin-top: var(--s4); }
@media (min-width: 64rem) { header.top { padding-top: calc(var(--s8) + var(--s7)); } }
header.top .desc { font-size: 1.25rem; }
main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s8); } /* minmax: the chip strip must scroll, not widen the page */
section > h2 { margin-bottom: var(--s4); }
section > h2 + .desc { margin: calc(-1 * var(--s2)) 0 var(--s5); }
.stack { display: grid; gap: var(--s6); }
.stack > h2 + .desc { margin: calc(-1 * var(--s4)) 0 0; }

/* frieze: a lotus-and-zigzag band, CSS only */
.frieze {
  height: 14px; margin: var(--s5) 0 0; border: 0;
  background:
    linear-gradient(135deg, var(--gold) 25%, transparent 25%) 0 0 / 14px 14px repeat-x,
    linear-gradient(225deg, var(--gold) 25%, transparent 25%) 0 0 / 14px 14px repeat-x;
  opacity: .5;
}

/* ---------- nav: top on desktop, tab bar on phones ---------- */
nav.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 10; display: flex;
  background: var(--card); border-top: 1px solid var(--line); box-shadow: var(--shadow);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs a {
  flex: 1; display: grid; place-items: center; gap: 2px; min-height: var(--nav-h);
  padding: var(--s2) 0; text-decoration: none; color: var(--muted); font-size: var(--t-sm); font-weight: 600;
}
nav.tabs a span { font-size: 1.35rem; line-height: 1; }
nav.tabs a[aria-current] { color: var(--lapis); box-shadow: inset 0 3px 0 var(--gold); }
@media (min-width: 48rem) {
  body { padding-bottom: var(--s8); }
  nav.tabs {
    position: sticky; top: 0; inset: 0 auto auto; justify-content: center; gap: var(--s2);
    background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); box-shadow: none; border: 0; border-bottom: 1px solid var(--line);
  }
  nav.tabs a { flex: 0 0 auto; display: flex; padding: 0 var(--s5); font-size: var(--t-base); }
  nav.tabs a span { font-size: 1.1rem; }
  nav.tabs a[aria-current] { box-shadow: inset 0 -3px 0 var(--gold); }
}

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--gold);
  border-radius: var(--radius); padding: var(--s6) var(--s5); box-shadow: var(--shadow);
}
@media (min-width: 48rem) { .card { padding: var(--s7) var(--s7); } }
.card > * + * { margin-top: var(--s5); }
.card > h3 { margin-top: var(--s7); }
.card.nile { border-top-color: var(--nile); }
.card.lapis { border-top-color: var(--lapis); }
.card.terra { border-top-color: var(--terra); }
.card header { display: grid; gap: var(--s2); }

/* the "now" box on the home page */
.now { background: var(--lapis); color: #fff; border: 0; }
.now .eyebrow { color: #f3e2b5; }
@media (prefers-color-scheme: dark) { .now { background: #1f3f8a; } }
.now .btn { background: #fffaf0; color: #1f3f8a; }

/* ---------- days ---------- */
.chips { display: flex; gap: var(--s3); overflow-x: auto; padding: var(--s2) 0 var(--s3); margin: 0 calc(-1 * var(--s5)); padding-inline: var(--s5); scrollbar-width: none; }
.chips a {
  flex: 0 0 auto; display: grid; place-items: center; min-width: 3.4rem; min-height: var(--tap); padding: var(--s1) var(--s3);
  border: 1.5px solid var(--gold); border-radius: 999px; text-decoration: none; color: var(--ink); line-height: 1.1; font-size: var(--t-sm);
}
.chips a b { font-size: 1.15rem; }
@media (min-width: 48rem) { .chips { flex-wrap: wrap; overflow: visible; } }
.chips a.marsa { border-color: var(--nile); }
.chips a.is-today { background: var(--lapis); border-color: var(--lapis); color: var(--on-lapis); }

.day { scroll-margin-top: var(--s5); }
.day.cairo { border-top-color: var(--gold); }
.day.marsa { border-top-color: var(--nile); }
.day.is-today { outline: 3px solid var(--gold); outline-offset: 3px; }
.day.is-past { border-top-color: var(--line); } /* no opacity: it would drop text below contrast minimums */
.card header .badge { justify-self: start; }

ul.do { list-style: none; padding: 0; display: grid; gap: var(--s4); }
ul.do li { display: grid; grid-template-columns: 2rem 1fr; gap: var(--s2); align-items: start; }
ul.do li > span:first-child { font-size: 1.3rem; line-height: 1.4; text-align: center; }
ul.do b { font-weight: 700; }
.buffer { border-left: 3px solid var(--gold); padding: var(--s3) var(--s4); background: var(--gold-soft); border-radius: 0 8px 8px 0; }
.flight { font-variant-numeric: tabular-nums; }

.badge { display: inline-flex; align-items: center; gap: var(--s1); padding: var(--s1) var(--s3); border-radius: 999px; font-size: var(--t-sm); font-weight: 700; background: var(--gold-soft); color: var(--ink); }
.badge.great, .badge.easy { background: color-mix(in srgb, var(--ok) 10%, var(--card)); color: var(--ok); }
.badge.ok, .badge.medium { background: color-mix(in srgb, var(--warn) 10%, var(--card)); color: var(--warn); }
.badge.choppy, .badge.long { background: color-mix(in srgb, var(--bad) 10%, var(--card)); color: var(--bad); }

/* ---------- weather ---------- */
.wx { display: grid; gap: var(--s3); padding: var(--s4) var(--s5); border-radius: 10px; background: color-mix(in srgb, var(--nile) 8%, transparent); }
.wx .main { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s4); }
.wx .temp { font-size: 1.5rem; font-weight: 700; }
.wx .icon { font-size: 1.6rem; }
.wx small { color: var(--muted); }
.wx:empty { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: var(--tap); padding: var(--s3) var(--s5); border-radius: 12px;
  background: var(--lapis); color: var(--on-lapis); font: inherit; font-weight: 700; text-decoration: none; border: 0; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--lapis); border: 2px solid var(--lapis); }
@media (max-width: 30rem) { .btn { width: 100%; } }
.row { display: flex; flex-wrap: wrap; gap: var(--s4); }

/* ---------- ideas ---------- */
.idea dl { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: var(--t-sm); color: var(--muted); }
.idea dt { font-weight: 700; } .idea dd { margin: 0 0 0 calc(-1 * var(--s3)); }
.idea ul { padding-left: var(--s5); display: grid; gap: var(--s2); }
.callout { border-radius: var(--radius); padding: var(--s6) var(--s5); background: color-mix(in srgb, var(--terra) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--terra) 40%, transparent); }
.callout > * + * { margin-top: var(--s4); }
.callout ul { padding-left: var(--s5); display: grid; gap: var(--s2); }

/* ---------- pack ---------- */
.pack { list-style: none; padding: 0; display: grid; gap: var(--s2); }
.pack label { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); padding: var(--s1) var(--s2); border-radius: 8px; cursor: pointer; }
.pack label:hover { background: var(--gold-soft); }
.pack input { width: 1.4rem; height: 1.4rem; accent-color: var(--nile); flex: none; }
.pack input:checked + span { text-decoration: line-through; color: var(--muted); }
.progress { font-weight: 700; color: var(--nile); }

/* ---------- tips / arabic ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: var(--s4) var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: var(--t-sm); color: var(--muted); font-weight: 700; }
.ar { font-family: 'Noto Naskh Arabic', serif; font-size: 1.35rem; direction: rtl; text-align: right; }
/* phone: each phrase is a two-line row, say + Arabic on top, meaning below */
@media (max-width: 30rem) {
  table thead { display: none; }
  table tr { display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
  table td { padding: 0; border: 0; }
  table td:nth-child(2) { grid-row: 2; grid-column: 1 / -1; color: var(--muted); }
  table .ar { white-space: nowrap; }
}
.say { font-weight: 700; color: var(--lapis); }
.numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: var(--s3); }
.numbers div { text-align: center; padding: var(--s3) var(--s2); border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.numbers .ar { display: block; text-align: center; font-size: 1.8rem; }

/* ---------- ideas: at a glance ---------- */
.glance ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.glance li { display: flex; align-items: center; gap: var(--s2); }
.glance a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: var(--s1) var(--s3);
  border: 1.5px solid var(--nile); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 1rem; font-weight: 600;
}


/* ---------- jump bar: sticky chips for in-page sections ---------- */
.jump {
  position: sticky; top: 0; z-index: 5; display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--s5)); padding: var(--s3) var(--s5);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
@media (min-width: 48rem) { .jump { top: var(--nav-h); flex-wrap: wrap; } }
.jump a, .card .chips a {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 2.75rem; padding: var(--s1) var(--s4);
  border: 1.5px solid var(--gold); border-radius: 999px; background: var(--card); color: var(--ink);
  text-decoration: none; font-size: 1rem; font-weight: 600; white-space: nowrap;
}
.card .chips { margin: 0; padding: var(--s1) 0; flex-wrap: wrap; }

/* ---------- run map ---------- */
.map { height: clamp(18rem, 55vh, 28rem); border-radius: 12px; border: 1px solid var(--line); isolation: isolate; background: var(--gold-soft); }
.leaflet-tooltip { font: 700 var(--t-sm) 'Source Sans 3', system-ui, sans-serif; }

footer { margin-top: var(--s8); padding: var(--s5) 0; color: var(--muted); font-size: var(--t-sm); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
