/* Bazho Platform — shared foundation: fonts, colour, type, controls.
   Colours come straight from the Bazho logo: deep navy and sky blue. */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); font-weight: 400; 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: "Plex Arabic"; src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2"); font-weight: 500 600; 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: "Plex Arabic"; src: url("../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2"); font-weight: 700 800; 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; }

:root {
  --navy: #000040;
  --night: #00002a;
  --sky: #00bfff;
  --sky-deep: #0090d6;
  --sky-pale: #d9f4ff;
  --paper: #f3f8fc;
  --white: #ffffff;
  --ink: #0b0f3a;
  --ink-soft: #4a5183;
  --line: #d3deeb;
  --warn: #b35300;
  --bad: #b3261e;
  --good: #0a7a4b;

  --font-body: "Plex", "Plex Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-display: "Bricolage", "Plex Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.6rem, 1.6rem + 5vw, 5rem);

  --radius: 10px;
  --radius-big: 22px;
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
html[lang="en"] body { line-height: 1.6; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; margin: 0; text-wrap: balance; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.55rem 1.4rem;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--sky); color: var(--navy); }
.btn-primary:hover { background: #4fd4ff; }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: #10106a; }
.btn-ghost { background: transparent; border-color: currentColor; }
.btn-ghost:hover { background: rgba(0, 191, 255, 0.14); }
.btn-small { min-height: 2.25rem; padding: 0.2rem 0.9rem; font-size: var(--step--1); }
.btn-danger { background: transparent; color: var(--bad); border-color: currentColor; }
.btn-danger:hover { background: #fdecea; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.linklike { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

/* Form fields */
.field { display: grid; gap: 0.35rem; }
.field > label, .field > .label { font-weight: 600; font-size: var(--step--1); }
.field .hint { font-size: var(--step--1); color: var(--ink-soft); }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.6rem 0.9rem;
  background: var(--white); border: 1.5px solid #b9c7d9; border-radius: var(--radius);
}
.field textarea { min-height: 7rem; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--sky); outline-offset: 1px; border-color: var(--sky-deep); }
.form-note { font-size: var(--step--1); min-height: 1.5em; }
.form-note.is-bad { color: var(--bad); font-weight: 600; }
.form-note.is-good { color: var(--good); font-weight: 600; }

/* Sign-in pages */
.auth {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 2rem 1.25rem;
  color: var(--white);
  background:
    radial-gradient(60rem 30rem at 100% 0%, rgba(0, 191, 255, 0.34), transparent 60%),
    radial-gradient(40rem 26rem at 0% 100%, rgba(0, 191, 255, 0.22), transparent 62%),
    var(--navy);
}
.auth-card { width: min(100%, 27rem); display: grid; gap: 1.4rem; }
.auth-brand { display: flex; align-items: center; gap: 0.8rem; }
.auth-brand img { width: 4.2rem; height: auto; }
.auth-brand b { font-family: var(--font-display); font-size: var(--step-2); }
.auth-card h1 { font-size: var(--step-3); }
.auth-card .lead { color: #c9d6f2; }
.auth-form { display: grid; gap: 1rem; }
.auth .field input { background: rgba(255, 255, 255, 0.97); color: var(--ink); border-color: transparent; }
.auth .form-note.is-bad { color: #ffb4ab; }
.auth .form-note.is-good { color: #8ff0c4; }
.auth-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: var(--step--1); color: #c9d6f2; }
.auth-langs { display: flex; gap: 0.3rem; }
.auth-langs button { background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.35); color: inherit; border-radius: 999px; padding: 0.15rem 0.8rem; cursor: pointer; font-size: var(--step--1); }
.auth-langs button[aria-pressed="true"] { background: var(--white); color: var(--navy); border-color: var(--white); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
