/* ============================================================
   Ziza Landing Page — Sprint 31
   ============================================================ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #E61010;
  --primary-d: #c20d0d;
  --dark:      #0f172a;
  --mid:       #334155;
  --light:     #f8fafc;
  --muted:     #94a3b8;
  --card-bg:   #ffffff;
  --border:    #e2e8f0;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,.08);
  --trans:     .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  cursor: pointer;
  border: none;
}
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(230,16,16,.35); }
.btn-outline  { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 14px 0;
}
.header-inner { display: flex; align-items: center; gap: 24px; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.nav { display: flex; gap: 20px; flex: 1; }
.nav-link { color: var(--mid); font-weight: 500; transition: color var(--trans); }
.nav-link:hover { color: var(--primary); }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #fff1f2 0%, #fff 60%, #f0f9ff 100%);
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero-inner { display: flex; align-items: center; gap: 48px; }
.hero-text { flex: 1; }
.hero-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.highlight { color: var(--primary); }
.hero-sub { font-size: 1.1rem; color: var(--mid); margin-bottom: 32px; max-width: 480px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* Phone mockup */
.hero-visual { flex: 0 0 280px; }
.phone-mockup {
  width: 240px;
  height: 440px;
  background: var(--dark);
  border-radius: 36px;
  padding: 24px 16px;
  margin: 0 auto;
  box-shadow: 0 24px 64px rgba(15,23,42,.25);
  position: relative;
}
.phone-mockup::before {
  content: "";
  width: 80px; height: 12px;
  background: #1e293b;
  border-radius: 6px;
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
}
.phone-screen { background: #f8fafc; border-radius: 20px; height: 100%; overflow: hidden; padding: 16px; }
.app-preview { height: 100%; display: flex; flex-direction: column; gap: 12px; }
.app-map { flex: 1; background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.app-card { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.app-card-title { font-weight: 700; font-size: .85rem; margin-bottom: 4px; }
.app-card-eta { font-size: .75rem; color: var(--primary); font-weight: 600; }
.app-card-driver { font-size: .75rem; color: var(--mid); margin-top: 4px; }

/* ── Features ── */
.features { padding: 80px 0; }
.section-title { font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 48px; font-size: 1.05rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow var(--trans), transform var(--trans);
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--mid); font-size: .9rem; }

/* ── Categories ── */
.categories { background: #fff1f2; padding: 80px 0; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 48px; }
.cat-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  position: relative;
  transition: border-color var(--trans), box-shadow var(--trans);
}
.cat-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.cat-featured { border-color: var(--primary); }
.cat-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  font-size: .7rem; font-weight: 700;
  padding: 2px 10px; border-radius: 99px;
}
.cat-icon { font-size: 2.5rem; margin-bottom: 10px; }
.cat-card h3 { font-weight: 700; margin-bottom: 4px; }
.cat-card p { color: var(--mid); font-size: .85rem; }
.cat-price { font-weight: 700; color: var(--primary); font-size: .9rem; margin-top: 8px; }

/* ── Driver CTA ── */
.driver-cta { background: var(--dark); color: #fff; padding: 80px 0; }
.driver-cta-inner { display: flex; align-items: center; gap: 48px; }
.driver-text { flex: 1; }
.driver-text h2 { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.driver-text p { color: #94a3b8; margin-bottom: 20px; }
.driver-benefits { list-style: none; margin-bottom: 28px; }
.driver-benefits li { padding: 6px 0; color: #e2e8f0; font-size: .95rem; }
.driver-visual { flex: 0 0 280px; }
.earnings-card {
  background: #1e293b;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid #334155;
}
.earnings-label { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.earnings-amount { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.earnings-sub { color: var(--muted); font-size: .8rem; margin-bottom: 16px; }
.earnings-bar { background: #334155; border-radius: 99px; height: 8px; overflow: hidden; }
.earnings-fill { background: var(--primary); height: 100%; border-radius: 99px; transition: width 1s ease; }

/* ── Download ── */
.download { padding: 80px 0; text-align: center; }
.download h2 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.download p { color: var(--muted); margin-bottom: 32px; }
.store-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--dark);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius);
  transition: transform var(--trans), box-shadow var(--trans);
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,.2); }
.store-icon { font-size: 1.8rem; }
.store-btn small { display: block; font-size: .7rem; color: var(--muted); }
.store-btn strong { font-size: 1rem; }

/* ── Footer ── */
.footer { background: var(--dark); color: #94a3b8; padding: 48px 0 24px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .logo { color: var(--primary); margin-bottom: 8px; }
.footer-tagline { font-size: .85rem; margin-bottom: 4px; }
.footer-copy { font-size: .75rem; margin-top: 8px; color: #475569; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h4 { color: #e2e8f0; font-size: .9rem; margin-bottom: 4px; }
.footer-links a { font-size: .85rem; transition: color var(--trans); }
.footer-links a:hover { color: var(--primary); }
.footer-note { font-size: .75rem; color: #475569; margin-top: 8px; }

/* ── Coming soon toast ── */
.coming-soon-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,.88);
  color: #fff;
  padding: 12px 32px;
  border-radius: 99px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .03em;
  z-index: 600;
  pointer-events: none;
  opacity: 1;
  transition: opacity .4s ease;
  white-space: nowrap;
}
.coming-soon-toast[hidden] { display: none; }
.coming-soon-toast.fade-out { opacity: 0; }

/* ============================================================
   Admin WYSIWYG — Sprint 51
   ============================================================ */

/* ── Footer admin trigger link ── */
.admin-trigger-link {
  display: inline-block;
  cursor: pointer;
  opacity: .35;
  font-size: .75rem;
  color: #475569;
  transition: opacity var(--trans), color var(--trans);
  text-decoration: none;
}
.admin-trigger-link:hover { opacity: 1; color: var(--primary); }

/* ── Admin login modal ── */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-modal[hidden] { display: none; }

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(4px);
}

.admin-modal-box {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(15,23,42,.3);
  padding: 32px;
  width: min(380px, 90vw);
  z-index: 1;
}
.admin-modal-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--dark);
}
.admin-modal-box > p {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 20px;
}
.admin-modal-box input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  margin-bottom: 12px;
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
  background: var(--light);
}
.admin-modal-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230,16,16,.15);
}
.admin-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .85rem;
  color: #dc2626;
  margin-bottom: 12px;
}
.admin-error[hidden] { display: none; }
.admin-show-pw { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted, #64748b); margin: -4px 0 12px; cursor: pointer; }
.admin-show-pw input { width: auto; margin: 0; cursor: pointer; }
.admin-modal-actions { display: flex; gap: 10px; margin-top: 4px; }

/* ── Admin login: Google button + divider ── */
.admin-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #3c4043;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--trans), box-shadow var(--trans);
}
.admin-google-btn:hover { background: #f7f8f8; box-shadow: 0 1px 4px rgba(15,23,42,.12); }
.admin-google-btn:disabled { opacity: .6; cursor: not-allowed; }
.admin-google-btn[hidden] { display: none; }
.admin-login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--muted, #94a3b8);
  font-size: .8rem;
  margin: 4px 0 12px;
}
.admin-login-divider::before,
.admin-login-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}
.admin-login-divider span { padding: 0 10px; }
.admin-login-divider[hidden] { display: none; }

/* ── Admin toolbar (fixed bottom-right) ── */
.admin-toolbar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 500;
  background: var(--dark);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(15,23,42,.45);
  flex-wrap: wrap;
  max-width: calc(100vw - 40px);
}
.admin-toolbar[hidden] { display: none; }

.admin-toolbar-label {
  color: var(--primary);
  font-weight: 700;
  font-size: .82rem;
  white-space: nowrap;
  margin-right: 2px;
}
.admin-toolbar-sep {
  width: 1px;
  height: 20px;
  background: #334155;
  flex-shrink: 0;
}
.admin-tb-btn {
  background: transparent;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #e2e8f0;
  padding: 5px 11px;
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--trans), border-color var(--trans), color var(--trans);
  white-space: nowrap;
  line-height: 1.2;
}
.admin-tb-btn:hover  { background: #1e293b; border-color: #475569; }
.admin-tb-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.admin-tb-btn:disabled { opacity: .5; cursor: not-allowed; }

.admin-format-btns { display: flex; gap: 4px; }
.admin-format-btns[hidden] { display: none; }

.admin-tb-save        { background: #065f46; border-color: #065f46; color: #d1fae5; }
.admin-tb-save:hover  { background: #047857; border-color: #047857; }
.admin-tb-save:disabled { opacity: .6; }

.admin-tb-logout       { color: #f87171; border-color: #7f1d1d; }
.admin-tb-logout:hover { background: #7f1d1d; color: #fca5a5; }

/* ── Edit mode — contenteditable elements ── */
.editable-active {
  outline: 2px dashed rgba(249,115,22,.6);
  outline-offset: 4px;
  border-radius: 4px;
  cursor: text;
  min-height: 1em;
  transition: outline-color var(--trans), background var(--trans);
}
.editable-active:focus {
  outline: 2px solid var(--primary);
  background: rgba(249,115,22,.04);
}

/* Top banner in edit mode */
body.edit-mode::before {
  content: "✏ Edit Mode — click any highlighted text to edit  ·  use toolbar to format  ·  💾 Save when done";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 7px 16px;
  font-size: .78rem;
  font-weight: 600;
  z-index: 200;
  letter-spacing: .02em;
}
body.edit-mode .header { top: 36px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-inner, .driver-cta-inner { flex-direction: column; }
  .hero-visual { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
}
