/*
 * The landing site, in Sand & Ember (DESIGN-SYSTEM.md). The values are the app's
 * tokens, copied rather than shared because this site builds nothing: a change
 * to the palette in frontend/src/app/globals.css changes here too.
 */

/* Cairo carries Arabic and Instrument Sans carries Latin, each by its range, so a
   Latin word inside Arabic copy takes its own face (§3). Two family names, not
   one: faces of one family with different weight ranges are chosen by weight, so
   the first match wins for every script and Cairo is never used. */
@font-face {
  font-family: "Cairo";
  src: url("/fonts/cairo-arabic.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-200B, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2032-2033, U+2039-203A, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --canvas: #f1ede6;
  --page: #faf7f2;
  --surface: #ffffff;
  --line: #e7e0d6;
  --ink: #1e1b18;
  --body: #57504a;
  --muted: #7d6a5c;
  --ember: #c2491f;
  --ember-deep: #a83e19;
  --ember-press: #8f3413;
  --ember-tint: #fbede6;
  --radius-lg: 12px;
  --radius-xl: 14px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: "Instrument Sans", "Cairo", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

[dir="rtl"] {
  line-height: 1.8;
}

[dir="ltr"] {
  line-height: 1.55;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
}

a {
  color: var(--ember-deep);
}

a:focus-visible {
  outline: 3px solid var(--ember-tint);
  outline-offset: 1px;
  box-shadow: 0 0 0 1px var(--ember);
  border-radius: 6px;
}

.well {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 20px;
}

.bar {
  background: var(--surface);
  border-block-end: 1px solid var(--line);
}

.bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
}

.switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.switch:hover {
  color: var(--ember-deep);
}

.hero {
  padding-block: 48px 40px;
  max-width: 640px;
}

.hero h1 {
  font-size: 28px;
  line-height: 1.15;
}

[dir="rtl"] .hero h1 {
  font-size: 27px;
  line-height: 1.45;
}

.lead {
  margin-block-start: 12px;
  font-size: 16px;
}

.status {
  margin-block-start: 20px;
  color: var(--ink);
  font-weight: 500;
}

/* The one ember element on the page: §2, rule 1. */
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-block-start: 12px;
  padding-inline: 24px;
  border-radius: var(--radius-xl);
  background: var(--ember);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

[dir="rtl"] .action {
  line-height: 1.5;
}

.action:hover {
  background: var(--ember-deep);
}

.action:active {
  background: var(--ember-press);
}

.action:focus-visible {
  border-radius: var(--radius-xl);
}

section[aria-labelledby] {
  padding-block-end: 32px;
}

h2 {
  margin-block-end: 12px;
  font-size: 17px;
}

.cards {
  display: grid;
  gap: 12px;
  list-style: none;
}

.cards li {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

h3 {
  font-size: 15px;
}

.foot {
  margin-block-start: 8px;
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  align-items: center;
  padding-block: 16px;
}

.foot-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    padding-block: 72px 56px;
  }
}
