/* =============================================
   Drivio Web — Global Styles
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #4D87FF;
  --primary-dk: #1A6BFF;
  --bg:         #FFFFFF;
  --surface:    #F7F9FC;
  --text:       #252525;
  --text-2:     #6A7282;
  --text-3:     #8A8F9B;
  --border:     rgba(0,0,0,0.08);
  --correct:    #16A34A;
  --streak:     #F97316;
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  24px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* =============================================
   Buttons
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
  border: none;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* =============================================
   Nav
   ============================================= */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}
.nav-logo img { border-radius: 9px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a { color: var(--text-2); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .btn { color: #fff; }

/* =============================================
   Language Switcher
   ============================================= */

.lang-switcher {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

.lang-btn {
  background: none;
  border: none;
  border-radius: 7px;
  padding: 4px 9px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: background .15s, color .15s;
  letter-spacing: .3px;
}

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

.lang-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* =============================================
   Hero
   ============================================= */

.hero {
  padding: 80px 0 64px;
  overflow: hidden;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-content { flex: 1; }

.app-icon-wrap { margin-bottom: 24px; }
.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(77,135,255,.25);
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 20px;
  color: var(--text);
}

.accent { color: var(--primary); }

.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  max-width: 500px;
  margin-bottom: 28px;
}

.hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.badge-cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  background: #E8F0FF;
  color: var(--primary);
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
}

.hero-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-3);
}

.hero-image {
  flex: 0 0 320px;
  display: flex;
  justify-content: center;
}

.hero-char {
  width: 280px;
  height: 280px;
  object-fit: contain;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,.12));
}

/* =============================================
   Section commons
   ============================================= */

.section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -.3px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-2);
  text-align: center;
  margin-bottom: 48px;
}

/* =============================================
   Features
   ============================================= */

.features {
  padding: 80px 0;
  background: var(--surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: #E8F0FF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  padding: 10px;
}

.feature-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

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

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

/* =============================================
   Categories
   ============================================= */

.categories { padding: 80px 0; }

.cat-grid {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 20px;
  min-width: 110px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.cat-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 24px rgba(77,135,255,.12);
}

.cat-card--selected {
  background: #E8F0FF;
  border-color: var(--primary);
  box-shadow: 0 4px 24px rgba(77,135,255,.15);
}

.cat-card--selected .cat-letter { color: var(--primary-dk); }

.cat-desc-box {
  margin-top: 28px;
  background: #F7F9FC;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  min-height: 72px;
  display: flex;
  align-items: center;
}

.cat-desc-text {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  transition: opacity .15s;
  margin: 0;
}

.cat-letter {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.cat-name {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  text-align: center;
}

/* =============================================
   Languages
   ============================================= */

.languages {
  padding: 64px 0;
  background: var(--surface);
}

.lang-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.lang-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lang-flag { font-size: 40px; }
.lang-label { font-weight: 600; font-size: 16px; color: var(--text); }

/* =============================================
   CTA
   ============================================= */

.cta {
  padding: 96px 0;
  text-align: center;
}

.cta-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin: 0 auto 24px;
  box-shadow: 0 8px 32px rgba(77,135,255,.2);
}

.cta h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta p {
  font-size: 17px;
  color: var(--text-2);
  margin-bottom: 36px;
}

/* =============================================
   Footer
   ============================================= */

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}
.footer-brand img { border-radius: 7px; }

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a { font-size: 14px; color: var(--text-2); }
.footer-links a:hover { color: var(--primary); text-decoration: none; }

.footer-copy { font-size: 13px; color: var(--text-3); }

/* =============================================
   Legal pages
   ============================================= */

.legal-page { padding: 64px 0 96px; }

.legal-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 40px;
  font-weight: 500;
}
.legal-page .back-link:hover { color: var(--primary); text-decoration: none; }

.legal-header { margin-bottom: 48px; }
.legal-header h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 800; margin-bottom: 8px; }
.legal-header .effective { font-size: 14px; color: var(--text-3); }

.legal-body { max-width: 720px; }
.legal-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 40px 0 12px;
  color: var(--text);
}
.legal-body p { color: var(--text-2); margin-bottom: 14px; font-size: 16px; }
.legal-body ul, .legal-body ol {
  padding-left: 20px;
  color: var(--text-2);
  margin-bottom: 14px;
  font-size: 16px;
}
.legal-body li { margin-bottom: 6px; }
.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 15px;
}
.legal-body th {
  text-align: left;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}
.legal-body td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}
.legal-body a { color: var(--primary); }

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 768px) {
  .hero .container { flex-direction: column; text-align: center; }
  .hero-content { display: flex; flex-direction: column; align-items: center; }
  .hero h1 { font-size: 32px; }
  .hero-sub { text-align: center; }
  .hero-image { display: none; }

  .nav-links a:not(.btn) { display: none; }

  .features-grid { grid-template-columns: 1fr; }

  .cat-grid { gap: 12px; }
  .cat-card { min-width: 90px; padding: 18px 14px; }

  .lang-row { gap: 32px; }

  .legal-body table { font-size: 13px; }
}
