/* =====================================================================
   Fiction Bank — Shared styles (design tokens, reset, common widgets)
   Educational UI clone. Generic branding. No real authentication.
   ===================================================================== */

:root {
  /* Brand palette (Bufete Smith: petrol blue & gold) */
  --brand:          #2a5d6f;   /* primary petrol blue   */
  --brand-hover:    #1f4a57;   /* petrol hover          */
  --brand-dark:     #1a3d47;   /* navy header           */
  --brand-darker:   #0f2830;   /* darkest petrol        */
  --link:           #2a5d6f;   /* petrol link           */
  --link-hover:     #1f4a57;   /* petrol hover          */
  --green:          #a89254;   /* gold accent           */
  --green-hover:    #8f7847;   /* gold hover            */

  --text:           #222a33;
  --muted:          #5a6472;
  --line:           #d6dbe2;
  --line-strong:    #9aa3af;
  --error:          #9c1f2e;
  --bg:             #f4f6f9;
  --card:           #ffffff;

  --radius:         6px;
  --radius-lg:      10px;
  --shadow-card:    0 10px 30px rgba(8, 28, 56, .18);
  --shadow-soft:    0 2px 10px rgba(8, 28, 56, .08);

  --font: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --maxw: 1200px;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--link-hover); }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid #4a8eaf;
  outline-offset: 2px;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ----------------------------- Brand mark --------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: inherit;
}
.brand:hover { text-decoration: none; }
.brand__mark { width: 26px; height: 26px; flex: 0 0 auto; }
.brand__name { font-size: 1.18rem; line-height: 1; }

/* Custom brand image (logo + name in a single file).
   Replace assets/brand-logo.svg with your own image.
   Recommended: 320 × 80 px (a 4:1 ratio), transparent background, SVG or PNG. */
.brand__img { height: 40px; width: auto; max-width: 240px; display: block; }
.brand__fallback { display: inline-flex; align-items: center; gap: 9px; }

/* Educational banner */
.edu-banner {
  margin: 0;
  background: #fff7df;
  color: #5a4a00;
  text-align: center;
  font-size: .8rem;
  padding: 6px 12px;
  border-bottom: 1px solid #ecd98a;
}

/* =====================================================================
   Login widget (shared between landing hero + login page)
   ===================================================================== */
.login {
  background: var(--card);
  width: 100%;
}

.login__field { position: relative; margin-bottom: 4px; }

.login__label {
  display: block;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 2px;
}

/* Underline-style inputs (matches reference) */
.login__input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 10px 2px;
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  outline: none;
  transition: border-color .15s ease;
}
.login__input:focus { border-bottom: 2px solid var(--brand); padding-bottom: 9px; }
.login__input::placeholder { color: #7a8492; }

.login__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.login__show {
  background: none;
  border: 0;
  color: var(--link);
  font-weight: 700;
  font-size: .9rem;
  padding: 0;
}
.login__show:hover { text-decoration: underline; }

.login__error {
  display: none;
  align-items: center;
  gap: 5px;
  color: var(--error);
  font-size: .82rem;
  margin: 4px 0 2px;
}
.login__error::before {
  content: "";
  width: 14px; height: 14px;
  flex: 0 0 auto;
  background: var(--error);
  -webkit-mask: var(--warn-icon) center / contain no-repeat;
  mask: var(--warn-icon) center / contain no-repeat;
}
.login__field.is-invalid .login__error { display: flex; }
.login__field.is-invalid .login__input { border-bottom-color: var(--error); }

:root { --warn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 1 21h22L12 2zm0 6 7 12H5l7-12zm-1 4v4h2v-4h-2zm0 5v2h2v-2h-2z'/%3E%3C/svg%3E"); }

.login__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 18px;
  flex-wrap: wrap;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  color: var(--text);
  cursor: pointer;
}
.checkbox input {
  width: 16px; height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

.login__token {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 2px solid transparent;
  border-radius: 22px;
  padding: 11px 18px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn--outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: #eef4fc; }
.btn--green {
  width: auto;
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  border-radius: var(--radius);
  padding: 12px 26px;
}
.btn--green:hover { background: var(--green-hover); border-color: var(--green-hover); text-decoration: none; }

/* "Or" divider */
.login__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--muted);
  font-size: .85rem;
}
.login__or::before, .login__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.login__links { margin-top: 16px; }
.login__links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: .92rem;
  margin-bottom: 12px;
}
.login__links a::after { content: "›"; font-weight: 700; font-size: 1.05rem; line-height: 1; }

.login__note {
  margin-top: 10px;
  font-size: .76rem;
  color: var(--muted);
  background: #e8f0f5;
  border: 1px solid #c8d8e4;
  border-radius: var(--radius);
  padding: 8px 10px;
  display: none;
}
.login__note.is-visible { display: block; }
.login__note--error {
  background: #fdecee;
  border-color: #f1b8bf;
  color: var(--error);
}

.login__hint {
  margin: 10px 0 0;
  font-size: .76rem;
  color: var(--muted);
  text-align: center;
  background: #f3f6fa;
  border: 1px dashed #c9d4e0;
  border-radius: var(--radius);
  padding: 7px 10px;
}
