/**
 * XTender Brand Stylesheet
 * Shared across all public-facing pages
 * See /docs/BRAND-GUIDE.md for usage rules
 */

/* ===== DESIGN TOKENS ===== */
:root {
  --blue: #1565c0;
  --blue-light: #1976d2;
  --blue-50: #e3f2fd;
  --blue-100: #bbdefb;
  --orange: #f57c00;
  --orange-light: #ff9800;
  --orange-50: #fff3e0;
  --white: #ffffff;
  --gray-50: #fafbfc;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-400: #adb5bd;
  --gray-500: #868e96;
  --gray-600: #6c757d;
  --gray-800: #343a40;
  --gray-900: #212529;
  --navy: #0d1b2a;
  --green: #22c55e;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ===== SVG ICONS ===== */
.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 32px; height: 32px; }

/* ===== NAVIGATION ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 2rem; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.nav-logo img { height: 30px; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--gray-600); text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--blue); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-badges { display: flex; gap: 0.5rem; }
.nav-badges a img { height: 26px; opacity: 0.7; transition: opacity 0.2s; }
.nav-badges a:hover img { opacity: 1; }
.nav-divider { width: 1px; height: 20px; background: var(--gray-200); }
.nav-cta {
  background: var(--orange); color: var(--white);
  padding: 0.5rem 1.25rem; border-radius: 6px;
  font-weight: 600; font-size: 0.8rem;
  text-decoration: none; transition: all 0.2s var(--ease);
}
.nav-cta:hover { background: var(--orange-light); }
.nav-cta-outline {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--gray-200);
  padding: 0.45rem 1.25rem; border-radius: 6px;
  font-weight: 600; font-size: 0.8rem;
  text-decoration: none; transition: all 0.2s var(--ease);
}
.nav-cta-outline:hover { border-color: var(--blue); background: var(--blue-50); }
.nav-mobile {
  display: none; background: none; border: none;
  cursor: pointer; padding: 0.25rem; color: var(--gray-600);
}
.nav-mobile svg { width: 24px; height: 24px; }
@media (max-width: 768px) {
  .nav-links, .nav-badges, .nav-divider { display: none; }
  .nav-mobile { display: block; }
}

/* ===== BUTTONS ===== */
.btn {
  padding: 0.75rem 1.5rem; border-radius: 6px;
  font-weight: 600; font-size: 0.9rem;
  text-decoration: none; display: inline-flex;
  align-items: center; gap: 0.4rem;
  transition: all 0.2s var(--ease);
  border: none; cursor: pointer; font-family: var(--font);
}
.btn-orange { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: #e65100; }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-light); }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--gray-200); }
.btn-outline:hover { border-color: var(--blue); background: var(--blue-50); }

/* ===== SECTION HEADERS ===== */
.sec { padding: 5rem 2rem; max-width: 1100px; margin: 0 auto; }
.sec-label {
  font-family: var(--mono); font-size: 0.6rem;
  color: var(--blue); letter-spacing: 0.18em;
  text-transform: uppercase; margin-bottom: 0.5rem;
}
.sec-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800; color: var(--gray-900);
  letter-spacing: -0.02em; line-height: 1.15;
  margin-bottom: 0.75rem;
}
.sec-sub {
  color: var(--gray-600); font-size: 1rem;
  line-height: 1.6; max-width: 520px;
  margin-bottom: 2.5rem;
}

/* ===== FOOTER ===== */
footer {
  padding: 2.5rem 2rem; text-align: center;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.04);
}
.ft-logo img { height: 24px; filter: brightness(0) invert(1); margin-bottom: 0.5rem; }
footer .desc { color: var(--gray-500); font-size: 0.75rem; margin-bottom: 0.75rem; }
footer .links { display: flex; gap: 1.25rem; justify-content: center; margin-bottom: 1rem; }
footer .links a { color: var(--gray-500); text-decoration: none; font-size: 0.75rem; transition: color 0.2s; }
footer .links a:hover { color: var(--blue-light); }
footer .legal { font-size: 0.65rem; color: rgba(255,255,255,0.2); line-height: 1.5; }

/* ===== ANIMATION ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== AUTH PAGES (login, signup) ===== */
.auth-page {
  margin-top: 64px; min-height: calc(100vh - 64px - 120px);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 1.5rem; background: var(--gray-50);
}
.auth-card {
  background: var(--white); border-radius: var(--radius);
  padding: 2.5rem 2rem; max-width: 440px; width: 100%;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow);
}
.auth-card.wide { max-width: 520px; }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo img { height: 28px; margin-bottom: 0.5rem; }
.auth-logo p { color: var(--gray-500); font-size: 0.8rem; }
.auth-title { font-size: 1.3rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.35rem; }
.auth-subtitle { color: var(--gray-500); font-size: 0.875rem; margin-bottom: 1.75rem; }
.form-group { margin-bottom: 1.15rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--gray-800); margin-bottom: 0.35rem; }
.form-label .optional { font-weight: 400; color: var(--gray-400); font-size: 0.75rem; }
.form-input, .form-select {
  width: 100%; padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 0.9rem; font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
  background: var(--white);
}
.form-input:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,101,192,0.08); }
.form-input::placeholder { color: var(--gray-400); }
.form-hint { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.25rem; }
.btn-submit {
  width: 100%; padding: 0.8rem;
  background: var(--blue); color: var(--white);
  border: none; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; font-family: var(--font);
  transition: background 0.2s, transform 0.1s;
}
.btn-submit:hover { background: var(--blue-light); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { background: var(--gray-400); cursor: not-allowed; }
.auth-links { text-align: center; margin-top: 1.25rem; font-size: 0.85rem; color: var(--gray-500); }
.auth-links a { color: var(--blue); text-decoration: none; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }
.auth-error {
  background: #fef2f2; border: 1px solid #fecaca; color: #dc2626;
  padding: 0.7rem 1rem; border-radius: 8px; font-size: 0.85rem;
  margin-bottom: 1.25rem; display: none;
}
.auth-success {
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a;
  padding: 0.7rem 1rem; border-radius: 8px; font-size: 0.85rem;
  margin-bottom: 1.25rem; display: none;
}
.password-toggle { position: relative; }
.password-toggle .toggle-btn {
  position: absolute; right: 0.7rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--gray-400);
  cursor: pointer; padding: 0.25rem;
}
.forgot-link { float: right; font-size: 0.75rem; color: var(--blue); text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }
@media (max-width: 480px) { .auth-card { padding: 1.75rem 1.25rem; } .form-row { grid-template-columns: 1fr; } }

/* ===== LEGAL PAGES (privacy, terms) ===== */
.legal-hero {
  margin-top: 64px; padding: 3.5rem 2rem;
  background: var(--navy); color: #fff; text-align: center;
}
.legal-hero h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.legal-hero p { color: rgba(255,255,255,0.5); font-size: 0.95rem; margin-top: 0.5rem; }
.legal-content {
  max-width: 800px; margin: 0 auto; padding: 3rem 2rem 4rem;
}
.legal-content h2 {
  font-size: 1.25rem; font-weight: 700; margin: 2.5rem 0 0.75rem;
  color: var(--blue); padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
}
.legal-content h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; color: var(--gray-900); font-weight: 600; }
.legal-content p { font-size: 0.9rem; line-height: 1.8; color: var(--gray-600); margin-bottom: 0.75rem; }
.legal-content ul, .legal-content ol { margin: 0.5rem 0 1rem 1.5rem; color: var(--gray-600); line-height: 1.8; font-size: 0.9rem; }
.legal-content li { margin-bottom: 0.35rem; }
.legal-content a { color: var(--blue); }
.effective-date {
  background: var(--gray-50); padding: 1rem 1.25rem;
  border-radius: 8px; margin-bottom: 2rem;
  border-left: 3px solid var(--blue); font-size: 0.85rem;
  color: var(--gray-600);
}
.effective-date strong { color: var(--gray-800); }
.highlight-box {
  background: var(--blue-50); padding: 1rem 1.25rem;
  border-radius: 8px; margin: 1rem 0; font-size: 0.85rem;
  color: var(--gray-600);
}
.highlight-box strong { color: var(--blue); }
.warning-box {
  background: var(--orange-50); padding: 1rem 1.25rem;
  border-radius: 8px; margin: 1rem 0;
  border-left: 3px solid var(--orange); font-size: 0.85rem;
}
.contact-box {
  background: var(--gray-50); padding: 1.5rem;
  border-radius: var(--radius); margin-top: 2.5rem;
  border: 1px solid var(--gray-200);
}
.contact-box h3 { margin-top: 0; font-size: 1rem; color: var(--gray-900); }
.contact-box p { font-size: 0.85rem; }
