/* 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); }

/* Sign-in page with the group beside the form */
.auth.has-group { place-items: start center; align-content: start; grid-template-columns: minmax(0, 1.25fr) minmax(0, 27rem); gap: 3rem clamp(2rem, 6vw, 5.5rem); max-width: 76rem; margin-inline: auto; padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 3rem); background: none; }
body[data-mode="login"], body[data-mode="guest"] { 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.has-group .auth-card { position: sticky; top: 2rem; padding: clamp(1.4rem, 3vw, 2rem); border-radius: 24px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); }
.auth-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.auth.has-group .auth-card .auth-brand { display: none; }
.auth-group { display: grid; gap: 1.3rem; align-content: start; min-width: 0; }
.auth-pill { justify-self: start; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; padding: 0.3rem 0.9rem 0.3rem 0.4rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); color: #dce7fb; font-size: var(--step--1); }
.auth-pill b { background: var(--sky); color: var(--navy); border-radius: 999px; padding: 0.05rem 0.7rem; white-space: nowrap; }
.auth-hero { font-family: var(--font-display); font-size: clamp(2.2rem, 1.3rem + 3vw, 3.6rem); font-weight: 800; line-height: 1.25; }
html[lang="en"] .auth-hero { line-height: 1.08; }
.auth-lead { color: #c9d6f2; font-size: var(--step-1); max-width: 36rem; }
.auth-line { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.auth-line li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.55rem; align-items: center; padding: 0.55rem 0.9rem; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); min-width: 6.5rem; }
.auth-line i { grid-row: 1 / 3; width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 2px dashed rgba(0, 191, 255, 0.8); }
.auth-line .is-on { border-color: var(--sky); background: rgba(0, 191, 255, 0.14); }
.auth-line .is-on i { background: var(--sky); border: 0; box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.25); }
.auth-line .is-soon i { border-style: solid; }
.auth-line b { font-size: 1rem; }
.auth-line .is-mystery b { font-size: 1.15rem; color: #d5e2fb; }
.auth-line small { color: #a9bfe6; font-size: 0.78rem; }
.auth-block { display: grid; gap: 0.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.auth-block h3 { font-size: var(--step--1); font-weight: 600; color: var(--sky); }
.auth-block p { color: #dce7fb; }
.auth-big { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; color: var(--white) !important; line-height: 1.5; }
html[lang="en"] .auth-big { line-height: 1.3; }
.auth-values { margin: 0.4rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.6rem; }
.auth-values dt { font-weight: 700; }
.auth-values dd { margin: 0.2rem 0 0; color: #a9bfe6; font-size: 0.95rem; }
.auth-contact ul { list-style: none; margin: 0; padding: 0; display: grid; }
.auth-contact li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.6rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.auth-contact li span:first-child { color: #a9bfe6; }
.auth-contact a { color: var(--white); text-decoration-color: var(--sky); text-underline-offset: 0.3em; }
@media (max-width: 60rem) {
  .auth.has-group { grid-template-columns: 1fr; }
  .auth.has-group .auth-card { position: static; width: 100%; justify-self: stretch; }
  .auth-jump { display: inline-flex !important; }
}
.auth-jump { display: none; justify-self: start; align-items: center; gap: 0.4rem; min-height: 2.6rem; padding: 0 1.1rem; border-radius: 999px; background: var(--sky); color: var(--navy); font-weight: 700; text-decoration: none; }
@media (max-width: 34rem) { .auth-values { grid-template-columns: 1fr; } }

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