/* ============================================================
   Questero — Public Site
   Design system mirrored from iOS app (Color+Theme.swift)
   ============================================================ */

:root {
  /* Brand */
  --primary: #0091D5;
  --logo-primary: #006190;
  --tertiary: #D5572D;

  /* Light palette */
  --bg: #F9FAFD;
  --surface: #FFFFFF;
  --surface-bright: #F3F6FC;
  --surface-low: #EAEFFB;
  --header-bg: #D1E4FF;
  --text: #10304F;
  --text-secondary: #6A5D7E;
  --border: rgba(199, 222, 255, 0.6);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);

  --font-title: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 9999px;
  --container: 1140px;
}

[data-theme="dark"] {
  --bg: #0B1326;
  --surface: #162140;
  --surface-bright: #1A2547;
  --surface-low: #263B65;
  --header-bg: #162140;
  --text: #E2E8F0;
  --text-secondary: #94A3B8;
  --border: rgba(255, 255, 255, 0.08);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  background: var(--bg);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}
.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
}
.nav-links a:hover { color: var(--primary); opacity: 1; }
.nav-controls { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--surface-low);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text);
  transition: background 0.2s;
}
.icon-btn:hover { background: var(--header-bg); }
.lang-btn {
  width: auto;
  padding: 0 14px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.nav-toggle { display: none; }

/* Hero */
.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero .container { width: 100%; }
.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 145, 213, 0.12), transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tertiary);
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text);
  position: relative;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--primary), var(--logo-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 36px;
  position: relative;
}
.store-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-md);
}
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); opacity: 1; }
.download-badges { justify-content: flex-start; }
@media (max-width: 500px) { .download-badges { justify-content: center; } }
.store-badge .badge-icon { font-size: 22px; line-height: 1; }
.store-badge small { display: block; font-size: 10px; font-weight: 400; opacity: 0.7; letter-spacing: 0.5px; }
.store-badge strong { display: block; font-size: 15px; font-weight: 700; font-family: var(--font-title); }

/* Sections */
section { padding: 80px 0; }
.section-eyebrow {
  display: block;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tertiary);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.section-lead {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 48px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(0, 145, 213, 0.3); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 145, 213, 0.15), rgba(0, 145, 213, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--primary);
}
.card h3 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}
.card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.news-card .news-date {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--tertiary);
  margin-bottom: 10px;
}
.news-card h3 { margin-bottom: 10px; }

/* Contact */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s;
}
.contact-email:hover { transform: translateY(-2px); opacity: 1; }
.social-row { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-low);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text);
}
.social-btn:hover { background: var(--header-bg); opacity: 1; }

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: var(--text-secondary); max-width: 320px; }
.footer h4 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer li a { color: var(--text-secondary); font-size: 14px; }
.footer li a:hover { color: var(--primary); opacity: 1; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Legal */
.legal { padding: 60px 0 80px; }
.legal-content { max-width: 760px; margin: 0 auto; }
.legal h1 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}
.legal .last-updated { font-size: 13px; color: var(--text-secondary); margin-bottom: 32px; }
.legal h2 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 22px;
  margin: 36px 0 12px;
  color: var(--text);
}
.legal h3 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 17px;
  margin: 24px 0 8px;
  color: var(--text);
}
.legal p, .legal li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 12px;
}
.legal ul { padding-left: 24px; margin-bottom: 16px; }
.legal strong { color: var(--text); }
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 24px 0;
}
.callout p { color: var(--text); }
.callout p:last-child { margin-bottom: 0; }

/* Tablet */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: span 3; }
}

/* Mobile */
@media (max-width: 820px) {
  .container { padding: 0 20px; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    order: 3;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: background 0.3s; }
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 18px;
    align-items: flex-start;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 16px; }
  .nav-controls { gap: 6px; order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: span 2; }
  section { padding: 60px 0; }
  .hero { padding: 56px 0 48px; min-height: calc(100vh - 64px); }
  .hero h1 { font-size: clamp(34px, 8vw, 48px); }
  .hero-subtitle { font-size: 16px; }
  .section-lead { font-size: 16px; margin-bottom: 36px; }
  .card { padding: 22px; }
  .contact-card { padding: 28px 20px; }
  .legal { padding: 40px 0 60px; }
  .legal h1 { font-size: 32px; }
}

/* Small phones */
@media (max-width: 500px) {
  .container { padding: 0 16px; }
  .navbar .container { height: 56px; }
  .nav-links { top: 56px; }
  .logo { font-size: 18px; }
  .logo-icon { width: 28px; height: 28px; }
  .nav-controls .icon-btn { width: 32px; height: 32px; font-size: 13px; }
  .lang-btn { padding: 0 10px; }
  .hero { padding: 40px 0; min-height: calc(100vh - 56px); }
  .hero h1 { font-size: 32px; line-height: 1.1; }
  .hero-subtitle { font-size: 15px; margin-bottom: 28px; }
  .store-badges { flex-direction: column; align-items: center; width: 100%; }
  .store-badge { width: 100%; max-width: 280px; justify-content: center; }
  .section-title { font-size: 26px; }
  section { padding: 48px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .footer { padding: 36px 0 20px; margin-top: 40px; }
  .card-grid { gap: 16px; }
  .contact-email { font-size: 14px; padding: 12px 18px; }
}
