/* riyad.ing, shared by every page: fonts, colours, type, the top bar, buttons and the footer.
   Little Rally's own look: paper, ink, ember and moss; Barlow Condensed italic over Nunito.
   Night is the same paper burnt dark, not a new palette. */
/* Self-hosted, so the first paint never waits on another server: the condensed display face in its one weight,
   and Nunito as one variable file. Latin only; anything else falls back to the stack in --display/--body. */
@font-face { font-family: 'Barlow Condensed'; font-style: italic; font-weight: 800; font-display: swap; src: url(fonts/barlow-condensed-800-italic.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(fonts/nunito.woff2) format('woff2'); }

:root {
  --paper: #fbf0dc;
  --paper-2: #f2dfbf;
  --paper-3: #e9d1aa;
  --ink: #3a2a1f;
  --ink-soft: #6b5644;
  --rule: #dcc39c;
  --ember: #d95f2b;
  --ember-ink: #a4401a;
  --moss: #376a32;
  --frame: #2b1f17;
  --on-ember: #fff8ee;
  --ember-fill: #b94a1c;
  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1c1510; --paper-2: #271d16; --paper-3: #33261c;
    --ink: #f4e6cd; --ink-soft: #bba68a; --rule: #45352a;
    --ember: #f07a45; --ember-ink: #f59a6c; --moss: #7cb572; --frame: #0e0a07; --on-ember: #1c1510; --ember-fill: #f07a45;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .theme .sun { display: block; }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
}
:root[data-theme="dark"] {
  --paper: #1c1510; --paper-2: #271d16; --paper-3: #33261c;
  --ink: #f4e6cd; --ink-soft: #bba68a; --rule: #45352a;
  --ember: #f07a45; --ember-ink: #f59a6c; --moss: #7cb572; --frame: #0e0a07; --on-ember: #1c1510; --ember-fill: #f07a45;
  color-scheme: dark;
}
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 17px/1.6 var(--body);
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ember-ink); outline-offset: 3px; }
img { display: block; max-width: 100%; }
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
h1, h2, h3, h4 { font-family: var(--display); font-style: italic; font-weight: 800; line-height: 0.95; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
p { margin: 0; }
.eyebrow { font: 800 12px/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ember-ink); }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: max(14px, env(safe-area-inset-top, 0px)); padding-bottom: 14px; }
.mark { font: italic 800 30px/1 var(--display); color: var(--ink); text-decoration: none; min-height: 44px; display: flex; align-items: center; letter-spacing: -0.01em; }
.mark span { color: var(--ember); }
.theme {
  width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center;
  background: none; color: var(--ink); border: 2px solid var(--ink); border-radius: 12px; cursor: pointer;
  transition: background .15s ease;
}
.theme .sun { display: none; }

/* Buttons: .btn.go the one to press, .btn the other */
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: italic 800 22px/1 var(--display); letter-spacing: 0.01em; padding: 14px 22px 13px; border-radius: 12px; border: 2px solid var(--ink); color: var(--ink); transition: transform .15s ease, background .15s ease; }
.btn.go { background: var(--ember-fill); border-color: var(--ember-fill); color: var(--on-ember); }
/* Hover only where there is a real pointer: on touch screens a tap leaves :hover stuck, which would refill
   the demoted desktop button and leave things lifted. */
@media (hover: hover) {
  .theme:hover { background: var(--paper-2); }
  .btn:hover { transform: translateY(-2px); }
  .btn.go:hover { background: var(--ember-ink); border-color: var(--ember-ink); }
}
/* On touch screens a desktop-only button can't be the one to press: the any-device one goes first and takes the colour. */
@media (hover: none) and (pointer: coarse) {
  .cta .desk { order: 2; background: none; border-color: var(--ink); color: var(--ink); }
  .cta .any { order: 1; background: var(--ember-fill); border-color: var(--ember-fill); color: var(--on-ember); }
}

/* Footer */
.sig { padding-top: 56px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.sig a { text-underline-offset: 0.2em; padding-block: 12px; }
.sig a:hover { color: var(--ember); }

@media (prefers-reduced-motion: reduce) {
  .btn, .theme { transition: none; }
  .btn:hover { transform: none; }
}
