/* ============================================================
 * Holaf Motos — app.css (全站基础样式)
 * ============================================================ */

/* ===== CSS Variables ===== */
:root {
  /* Brand */
  --primary: #D80C24;
  --primary-dark: #A00018;
  --primary-light: #FF3A4E;
  --primary-50: #FFF1F3;

  /* Ink */
  --ink: #111111;
  --ink-2: #2A2A2A;
  --ink-3: #666666;
  --ink-4: #999999;

  /* Background */
  --bg: #FAFAFA;
  --bg-card: #FFFFFF;
  --bg-dark: #0A0A0A;
  --bg-soft: #F4F4F6;

  /* Border */
  --border: #EAEAEA;
  --border-strong: #CCCCCC;

  /* Semantic */
  --success: #22C55E;
  --warn: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Radius */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow:    0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --shadow-brand: 0 8px 24px rgba(216,12,36,0.25);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
  --font-display: 'Inter', 'Bebas Neue', sans-serif;

  /* Layout */
  --header-h: 72px;
  --container: 1280px;

  /* Transitions */
  --t-fast: 0.15s ease;
  --t: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #FAFAFA; scrollbar-gutter: stable; overflow-y: scroll; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary); }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.2; }

/* ===== Layout ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }

.section { padding: 64px 0; }
.section--sm { padding: 40px 0; }
.section--lg { padding: 96px 0; }
.section--dark { background: var(--bg-dark); color: #fff; }
.section--soft { background: var(--bg-soft); }

.section__title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.section__subtitle {
  color: var(--ink-3);
  font-size: 15px;
  margin-bottom: 40px;
}
@media (min-width: 768px) {
  .section__title { font-size: 36px; }
  .section__subtitle { font-size: 17px; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: all var(--t);
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(216,12,36,0.35);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn--dark {
  background: var(--ink);
  color: #fff;
}
.btn--dark:hover { background: var(--ink-2); color: #fff; }
.btn--light {
  background: #fff;
  color: var(--ink);
}
.btn--light:hover { background: var(--primary-50); color: var(--primary); }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--block { width: 100%; }

/* ===== Forms ===== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.form-control {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50);
}
.form-control--error {
  border-color: var(--danger);
}
.form-error {
  margin-top: 6px;
  font-size: 13px;
  color: var(--danger);
}
.form-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-4);
}
.form-row {
  display: grid;
  gap: 16px;
}
@media (min-width: 768px) {
  .form-row--2 { grid-template-columns: 1fr 1fr; }
  .form-row--3 { grid-template-columns: repeat(3, 1fr); }
}

.input-group {
  display: flex;
  gap: 8px;
}
.input-group .form-control { flex: 1; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t);
}
.site-header--scrolled { box-shadow: var(--shadow-sm); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
}
.site-logo__img { height: 40px; width: 160px; display: block; }
.site-logo__text { color: var(--ink); }
.site-logo__text strong { color: var(--primary); }

.site-nav { display: none; }
.site-nav__list { display: flex; gap: 28px; }
.site-nav__link {
  position: relative;
  font-weight: 500;
  font-size: 15px;
  padding: 8px 0;
}
.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.site-nav__link:hover::after,
.site-nav__link--active::after { transform: scaleX(1); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  transition: all var(--t-fast);
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }
.lang-switch__current { color: var(--primary); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform var(--t), opacity var(--t-fast);
  margin: 0 auto;
}
.nav-toggle--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle--open span:nth-child(2) { opacity: 0; }
.nav-toggle--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1024px) {
  .site-nav { display: block; }
  .nav-toggle { display: none; }
}

/* ===== Mobile drawer ===== */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #fff;
  transform: translateX(100%);
  transition: transform var(--t);
  display: flex;
  flex-direction: column;
}
.mobile-drawer--open { transform: translateX(0); }
.mobile-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-drawer__list { padding: 12px 20px; flex: 1; overflow-y: auto; }
.mobile-drawer__link {
  display: block;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.mobile-drawer__actions { padding: 20px; border-top: 1px solid var(--border); display: grid; gap: 12px; }

/* ===== Announcement bar ===== */
.announce {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  padding: 8px 16px;
  text-align: center;
  position: relative;
}
.announce__close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 24px;
}
.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: var(--primary-light); }
.site-footer__grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  margin-bottom: 48px;
}
@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
}
.site-footer__title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.site-footer__about { color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.8; }
.site-footer__list li { margin-bottom: 10px; font-size: 14px; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ===== WhatsApp floating ===== */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform var(--t);
}
.wa-float:hover { transform: scale(1.08); color: #fff; }
.wa-float::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  animation: wa-pulse 2s infinite;
  z-index: -1;
}
@keyframes wa-pulse {
  0%   { transform: scale(0.95); opacity: 0.7; }
  70%  { transform: scale(1.3);  opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}
.badge--primary { background: var(--primary-50); color: var(--primary); }
.badge--dark { background: var(--ink); color: #fff; }
.badge--success { background: #DCFCE7; color: #166534; }
.badge--warn { background: #FEF3C7; color: #92400E; }

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--ink-3); }
.text-white { color: #fff; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.hidden { display: none !important; }
@media (max-width: 767px) { .hidden-mobile { display: none !important; } }
@media (min-width: 768px)  { .hidden-desktop { display: none !important; } }

/* ===== Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-fadeup { animation: fadeInUp 0.6s ease both; }

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 999;
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all var(--t);
  pointer-events: none;
  max-width: calc(100% - 40px);
}
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }

/* ===== Loading spinner ===== */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Login-gated price ===== */
.price-gate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-full);
  transition: all var(--t-fast);
}
.price-gate:hover { background: var(--primary); color: #fff; }

.price {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.price__sub { font-size: 13px; color: var(--ink-4); text-decoration: line-through; font-weight: 500; margin-left: 8px; }
