/* fadzmart.com — shared styles. Brand colors match lib/theme/app_theme.dart. */

@font-face {
  font-family: "Poppins";
  src: url("/assets/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/assets/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --deep-green: #2e3f2c;
  --brand: #557a4d;
  --gold: #b8945b;
  --gold-light: #cda868;
  --cream: #fefaf1;
  --paper: #fffdf8;
  --ink: #1e2a1f;
  --sub: #5f645a;
  --line: #e4decf;
  --error: #b3261e;
  --ok: #2f6b2a;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #121a14;
    --paper: #1c261e;
    --ink: #f6f0e2;
    --sub: #b9b3a5;
    --line: #2e3a2f;
    --brand: #8fb486;
    --error: #f2b8b5;
    --ok: #9fd08f;
  }
}

* { box-sizing: border-box; }

html {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.7 "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
}

/* ── Header band ─────────────────────────────────────────── */
.band {
  background: var(--deep-green);
  padding: 22px 24px;
}
.band a { display: inline-block; line-height: 0; }
.band img { height: 30px; width: auto; }
.band .inner { max-width: 720px; margin: 0 auto; }

/* ── Document pages (privacy, terms) ─────────────────────── */
main.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}
.doc h1 {
  font-size: clamp(30px, 6vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.doc .updated { color: var(--sub); font-size: 14px; margin: 0 0 32px; }
.doc .lead {
  font-size: 17px;
  border-left: 3px solid var(--gold);
  padding-left: 16px;
  margin: 0 0 40px;
}
.doc h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 44px 0 8px;
  line-height: 1.3;
}
.doc h3 { font-size: 16px; font-weight: 600; margin: 24px 0 4px; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--gold); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 24px;
  color: var(--sub);
  font-size: 14px;
}
footer .inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--sub); }

/* ── Small card pages (reset password, 404) ──────────────── */
.card-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.card-page main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
}
.card {
  width: 100%;
  max-width: 420px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
}
.card h1 { font-size: 24px; font-weight: 600; margin: 0 0 6px; line-height: 1.25; }
.card p { margin: 0 0 16px; color: var(--sub); }
.card .email { color: var(--ink); font-weight: 500; word-break: break-all; }

label { display: block; font-weight: 500; font-size: 14px; margin: 16px 0 6px; }
.field { position: relative; }
input[type="password"], input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming into the field */
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 76px 13px 14px;
}
.show {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font: 500 13px "Poppins", system-ui, sans-serif;
  color: var(--brand);
  background: none;
  border: 0;
  padding: 8px 10px;
  cursor: pointer;
}

.btn {
  display: block;
  width: 100%;
  margin-top: 24px;
  font: 600 16px "Poppins", system-ui, sans-serif;
  color: #fff;
  background: #557a4d;
  border: 0;
  border-radius: 14px;
  padding: 15px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: default; }

.msg { font-size: 14px; border-radius: 12px; padding: 12px 14px; margin-top: 16px; }
.msg.error { color: var(--error); border: 1px solid currentColor; }
.msg.ok { color: var(--ok); border: 1px solid currentColor; }
[hidden] { display: none !important; }

/* ── Home ────────────────────────────────────────────────── */
.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--deep-green);
  color: #f6f0e2;
}
.home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
}
.home .logo { width: min(300px, 70vw); height: auto; }
.home .tagline {
  font-size: 12px;
  letter-spacing: 0.24em;
  color: #cda868;
  margin: 28px 0 0;
}
.home .pitch {
  max-width: 34ch;
  font-size: 17px;
  margin: 28px 0 0;
  color: rgba(246, 240, 226, 0.85);
}
.home .soon { margin: 40px 0 0; font-size: 14px; color: rgba(246, 240, 226, 0.6); }
.home footer { border-top-color: rgba(246, 240, 226, 0.15); color: rgba(246, 240, 226, 0.6); }
.home footer a { color: rgba(246, 240, 226, 0.75); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
