/* SchoolFace's public site: the landing page, the sign-up form, the legal pages.
   Colours are the app's `schoolface` preset (src/tokens.css); the font is the
   app's own. Logical properties throughout, so Arabic (rtl) needs no overrides. */

@font-face {
  font-family: 'JannaLT';
  src: url('../fonts/JannaLT-Regular.woff') format('woff');
  font-display: swap;
}

:root {
  --brand-50: #eff9f5; --brand-100: #d7f0e5; --brand-200: #b0e2cc;
  --brand-500: #64c39b; --brand-600: #45a67d; --brand-700: #348063; --brand-900: #1e4839;
  --bg: #ffffff;
  --bg-tint: var(--brand-50);
  --surface: #ffffff;
  --text: #0c2219;
  --text-muted: #4d6359;
  --border: #dbe7e1;
  --danger: #c0392b;
  --danger-bg: #fdecea;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(12, 34, 25, 0.10);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1a16;
    --bg-tint: #13231d;
    --surface: #17261f;
    --text: #e5f1eb;
    --text-muted: #a3b8ae;
    --border: #2a3d34;
    --danger: #ff8a7a;
    --danger-bg: #3a1f1b;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 'JannaLT', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-700); }
@media (prefers-color-scheme: dark) { a { color: var(--brand-500); } }
h1, h2, h3 { line-height: 1.3; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.1rem; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.75em 1.5em;
  border: 0;
  border-radius: 999px;
  background: var(--brand-600);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--brand-700); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; }
.btn-small { padding: 0.45em 1.1em; font-size: 0.9rem; }
.btn-quiet { background: transparent; color: var(--brand-700); border: 1.5px solid var(--brand-600); }
.btn-quiet:hover { background: var(--brand-50); }
@media (prefers-color-scheme: dark) { .btn-quiet { color: var(--brand-500); } .btn-quiet:hover { background: var(--bg-tint); } }

/* ---- Header ---- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.top-row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.top-nav { display: flex; gap: 18px; margin-inline-start: auto; }
.top-nav a { color: var(--text-muted); text-decoration: none; }
.top-nav a:hover { color: var(--text); }
.langs { display: flex; gap: 2px; border: 1px solid var(--border); border-radius: 999px; padding: 2px; }
.langs a { padding: 0.15em 0.6em; border-radius: 999px; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; }
.langs a[aria-current] { background: var(--brand-600); color: #fff; }
@media (max-width: 720px) {
  .top-nav { display: none; }
  .langs { margin-inline-start: auto; }
  .top .btn-small { display: none; }
}

/* ---- Hero ---- */
.hero { background: linear-gradient(160deg, var(--brand-50), var(--bg) 70%); padding: 56px 0 40px; }
@media (prefers-color-scheme: dark) { .hero { background: linear-gradient(160deg, #13281f, var(--bg) 70%); } }
.hero-row { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 36em; }
.note { color: var(--text-muted); font-size: 0.9rem; }
.phone {
  justify-self: center;
  width: min(300px, 80vw);
  padding: 10px;
  border-radius: 36px;
  background: #0c2219;
  box-shadow: var(--shadow);
}
.phone img { border-radius: 28px; aspect-ratio: 1 / 2; object-fit: cover; object-position: top; }
@media (max-width: 820px) {
  .hero-row { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
}

/* ---- Sections ---- */
.section { padding: 56px 0; }
.section-tint { background: var(--bg-tint); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feature-shot { background: var(--bg-tint); padding: 18px 18px 0; height: 300px; overflow: hidden; }
.feature-shot img { width: 78%; margin: 0 auto; border-radius: 16px 16px 0 0; box-shadow: var(--shadow); }
.feature figcaption { padding: 16px 18px 20px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.more { margin-top: 28px; color: var(--text-muted); }

.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.steps p { margin: 0; color: var(--text-muted); }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-600); color: #fff; font-weight: 700; margin-bottom: 10px; }

.limits { margin: 32px 0; background: var(--surface); border: 1px solid var(--border); border-inline-start: 4px solid var(--brand-600); border-radius: var(--radius); padding: 20px 24px; }
.limits ul { margin: 0 0 12px; padding-inline-start: 1.2em; }
.limits p { margin: 0; color: var(--text-muted); }

/* ---- The demo flag, the full version, feedback ---- */
.demo-flag { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin-top: 4px; padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--brand-600); font-size: 0.92rem; }
.demo-flag span { color: var(--text-muted); }
.demo-flag a { font-weight: 700; }
.custom { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .custom { grid-template-columns: 1fr; gap: 16px; } }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; padding-inline-start: 44px; }
.ticks li::before { content: "✓"; position: absolute; inset-inline-start: 14px; top: 11px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-600); color: #fff; font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; }
.feedback { max-width: 760px; }
.prompts { margin: 0 0 20px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.prompts li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; color: var(--text-muted); font-size: 0.92rem; }

/* ---- Form ---- */
.form { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.field label, .field legend { font-weight: 700; padding: 0; }
.field input[type=text], .field input:not([type]), .field input[type=email], .field input[type=tel], .field select {
  width: 100%;
  padding: 0.65em 0.8em;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.field input:focus, .field select:focus { border-color: var(--brand-600); outline: none; }
.has-error input, .has-error select { border-color: var(--danger) !important; }
.hint { margin: 0; color: var(--text-muted); font-size: 0.88rem; }
.field-error { margin: 0; color: var(--danger); font-size: 0.9rem; }
.alert { background: var(--danger-bg); color: var(--danger); border-radius: 10px; padding: 12px 16px; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.check input { margin-top: 0.4em; width: 18px; height: 18px; flex: none; accent-color: var(--brand-600); }

.designs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .designs { grid-template-columns: 1fr; } }
.field .design { padding: 14px; font-weight: 400; }
.design { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); }
.design:has(input:checked) { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
@media (prefers-color-scheme: dark) { .design:has(input:checked) { box-shadow: 0 0 0 3px #224436; } }
.design input { position: absolute; inset-inline-end: 12px; top: 14px; accent-color: var(--brand-600); }
.design-name { font-weight: 700; }
.design-rows { display: flex; flex-wrap: wrap; gap: 6px; }
.period { font-size: 0.8rem; padding: 0.15em 0.6em; border-radius: 999px; background: var(--brand-100); color: var(--brand-900); }
.period-avg { background: transparent; border: 1px dashed var(--brand-600); color: var(--text-muted); }
@media (prefers-color-scheme: dark) { .period { background: #224436; color: var(--text); } }

.sent { text-align: center; padding: 40px 0; }

/* ---- Guides ---- */
.guides { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; }
@media (max-width: 720px) { .guides { grid-template-columns: 1fr; } }
.guide { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.guide h2 { font-size: 1.15rem; margin-bottom: 0.3em; }
.guide p { color: var(--text-muted); margin: 0 0 12px; }
.guide-files { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-files [aria-disabled] { opacity: 0.5; cursor: default; }

/* ---- Legal ---- */
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }
.legal p { color: var(--text-muted); }

/* ---- Footer ---- */
.foot { border-top: 1px solid var(--border); padding: 24px 0; color: var(--text-muted); font-size: 0.9rem; }
.foot-row { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--text-muted); }
