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

:root {
  --bg-primary: #f0ede6;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #2f2c2c;
  --text-secondary: #6b6762;
  --text-muted: #9a958e;
  --red: #e53031;
  --red-hover: #c9282a;
  --orange: #ff7a00;
  --gradient: linear-gradient(135deg, #e33237 0%, #ff7a00 100%);
  --gradient-text: linear-gradient(90deg, #e33237 5.5%, #ff7a00 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: .25s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nav-height: 72px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }

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

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

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

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

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(240,237,230,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,.05);
  transition: transform var(--transition);
}

.navbar.hidden { transform: translateY(-100%); }

.navbar .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  flex: 1;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-btn {
  background: none;
  border: 2px solid rgba(0,0,0,.1);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.lang-btn:hover { border-color: var(--red); color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover { background: var(--red-hover); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--red);
  color: var(--red);
}

.btn-outline:hover { background: var(--red); color: #fff; }

.btn-lg {
  padding: 14px 32px;
  font-size: 17px;
  border-radius: 14px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Mobile menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all var(--transition);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  padding: 140px 0 80px;
  text-align: center;
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}

.hero .gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-buttons .btn svg {
  width: 20px;
  height: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229,48,49,.08);
  color: var(--red);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

/* ===== Devices ===== */
.devices {
  padding: 60px 0;
}

.devices-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.device-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all var(--transition);
  cursor: default;
}

.device-item:hover { transform: translateY(-4px); }

.device-item:hover .device-icon { color: var(--orange); }

.device-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.device-icon svg { width: 36px; height: 36px; }

.device-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ===== Section common ===== */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -.01em;
}

.section-subtitle {
  text-align: center;
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 48px;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Locations ===== */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.location-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.location-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.location-flag {
  font-size: 32px;
  line-height: 1;
}

.location-info h4 {
  font-size: 15px;
  font-weight: 600;
}

.location-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.location-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-left: auto;
  flex-shrink: 0;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font);
}

.faq-question:hover { color: var(--red); }

.faq-arrow {
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.active .faq-arrow { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
}

.faq-item.active .faq-answer { max-height: 300px; }

.faq-answer p {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Download CTA ===== */
.download-section {
  padding: 80px 0;
}

.download-box {
  background: var(--gradient);
  border-radius: 24px;
  padding: 64px 48px;
  text-align: center;
  color: #fff;
}

.download-box h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
}

.download-box p {
  font-size: 17px;
  opacity: .9;
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-white {
  background: #fff;
  color: var(--red);
  font-weight: 700;
}

.btn-white:hover { background: #f5f5f5; transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 2px solid rgba(255,255,255,.3);
}

.btn-ghost:hover { background: rgba(255,255,255,.28); }

/* ===== Footer ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(0,0,0,.06);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--red); }

/* ===== Auth Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .2s ease;
}

.modal-overlay.show {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform .25s ease;
}

.modal-overlay.show .modal { transform: translateY(0); }

.modal h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal .modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(0,0,0,.08);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: border-color var(--transition);
  outline: none;
}

.form-input:focus { border-color: var(--red); }

.form-input.error { border-color: var(--red); }

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 6px;
  display: none;
}

.form-error.show { display: block; }

.modal .btn { width: 100%; margin-top: 8px; }

.modal-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.modal-footer a {
  color: var(--red);
  font-weight: 600;
  cursor: pointer;
}

.modal-footer a:hover { text-decoration: underline; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
}

.modal-close:hover { color: var(--text-primary); }

/* ===== User Panel (post-login) ===== */
.user-panel { display: none; }

.user-panel.show { display: block; }

.landing-content.hidden { display: none; }

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.panel-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.panel-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.panel-card .value {
  font-size: 28px;
  font-weight: 800;
}

.panel-card .value.gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .hero h1 { font-size: 38px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .locations-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(240,237,230,.98);
    backdrop-filter: blur(16px);
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(0,0,0,.05);
  }

  .hero { padding: 110px 0 60px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }

  .section-title { font-size: 28px; }
  .features-grid { grid-template-columns: 1fr; }
  .locations-grid { grid-template-columns: 1fr; }
  .panel-grid { grid-template-columns: 1fr; }

  .download-box { padding: 40px 24px; }
  .download-box h2 { font-size: 24px; }

  .modal { padding: 28px; }

  .footer .container { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; }
  .devices-grid { gap: 24px; }
  .download-buttons { flex-direction: column; align-items: center; }
  .download-buttons .btn { width: 100%; }
}
