/* The Dream — public pages. Brand tokens mirror lib/core/branding/app_branding.dart. */
:root {
  --ink: #131313;
  --surface: #232323;
  --gold: #c8a45c;
  --gold-light: #e0c89d;
  --text: #ededed;
  --muted: #a5a5a5;
  --line: rgba(200, 164, 92, 0.22);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  /* System stack first: it renders both Latin and Arabic well on every target
     device and costs no network request on a page people reach on mobile data. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Naskh Arabic", "Geeza Pro", "Droid Arabic Naskh", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ---- header ---- */
header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
header img { width: 46px; height: 46px; border-radius: 11px; }
header .name { font-weight: 700; letter-spacing: 0.2px; }
header .slogan { color: var(--muted); font-size: 13px; line-height: 1.4; }
header .grow { flex: 1; }

.langtoggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.langtoggle button {
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
}
.langtoggle button[aria-pressed="true"] { background: var(--gold); color: var(--ink); font-weight: 700; }

/* ---- type ---- */
h1 { font-size: 30px; line-height: 1.25; margin: 0 0 6px; color: var(--gold-light); }
h2 {
  font-size: 20px;
  margin: 38px 0 10px;
  color: var(--gold);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 26px; }
p, li { color: var(--text); }
ul { padding-inline-start: 22px; }
li { margin: 6px 0; }
a { color: var(--gold-light); }
.updated { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.lead { color: var(--muted); }

/* ---- blocks ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0;
}
.card h2 { margin-top: 0; border-top: 0; padding-top: 0; }

.navlinks { display: grid; gap: 14px; margin-top: 26px; }
.navlink {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  text-decoration: none;
  color: var(--text);
}
.navlink:hover { border-color: var(--gold); }
.navlink strong { display: block; color: var(--gold-light); font-size: 18px; margin-bottom: 2px; }
.navlink span { color: var(--muted); font-size: 15px; }

/* ---- teacher ---- */
.teacher {
  /* No inline margin: the figure fills the text column, so its edges line up
     with the paragraphs above and the cards below. */
  margin: 34px 0 0;
  text-align: center;
}
.teacher img {
  display: block;
  width: 100%;
  height: auto;   /* holds the 1440x1432 aspect at every width */
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.teacher figcaption {
  margin-top: 14px;
  color: var(--gold-light);
  font-size: 16px;
  line-height: 1.5;
}
.teacher figcaption span { color: var(--muted); font-size: 14.5px; }

/* ---- form ---- */
label { display: block; font-weight: 600; font-size: 15px; margin: 18px 0 6px; }
input, textarea {
  width: 100%;
  background: var(--ink);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* 16px keeps iOS Safari from zooming on focus. */
}
input:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
textarea { min-height: 120px; resize: vertical; }
.hint { color: var(--muted); font-size: 13.5px; margin: 6px 0 0; }
button.submit {
  margin-top: 26px;
  width: 100%;
  background: var(--gold);
  color: var(--ink);
  border: 0;
  border-radius: 10px;
  padding: 15px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
button.submit:hover { background: var(--gold-light); }
.err { color: #ff9a8a; font-size: 14px; margin-top: 10px; min-height: 20px; }

footer {
  margin-top: 46px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
footer a { color: var(--muted); }

/* Only the active language's block is shown; the toggle flips these. */
[data-lang] { display: none; }
[data-lang].active { display: block; }
