/* ============================================================
   R2 File Manager - Main Stylesheet
   ============================================================ */

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

:root {
  --blue-dark:   #1B3A8C;
  --blue-mid:    #2352C0;
  --blue-cta:    #2563EB;
  --blue-hover:  #1D4ED8;
  --orange:      #F97316;
  --orange-dark: #EA6C0A;
  --bg-hero:     #EEF4FF;
  --bg-page:     #F8FAFC;
  --white:       #FFFFFF;
  --gray-text:   #6B7280;
  --gray-light:  #F3F4F6;
  --gray-border: #E5E7EB;
  --shadow-card: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-win:  0 8px 40px rgba(27,58,140,.18);
  --radius:      12px;
  --radius-sm:   8px;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-page);
  color: var(--blue-dark);
  line-height: 1.6;
}

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

/* ── HEADER ─────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 52px; width: auto; display: block; }

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

.nav-link {
  color: var(--blue-dark);
  font-weight: 500;
  font-size: .95rem;
  opacity: .8;
  cursor: pointer;
  transition: opacity .2s;
  text-decoration: none;
}
.nav-link:hover { opacity: 1; }

.lang-switcher { display: flex; gap: 2px; }

.lang-btn {
  background: none;
  border: 1px solid var(--gray-border);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-text);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.lang-btn:hover  { background: var(--gray-light); color: var(--blue-dark); }
.lang-btn.active { background: var(--blue-cta); color: #fff; border-color: var(--blue-cta); }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(circle at 80% 10%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.5) 28%, rgba(255,255,255,0) 50%),
    linear-gradient(145deg, #E8EEFF 0%, #F2F5FF 48%, #FFFFFF 100%);
  padding: 52px 0 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--orange-dark);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 18px;
}
.hero-title .highlight { color: var(--orange); }

.hero-subtitle {
  color: var(--blue-dark);
  font-size: 1.12rem;
  font-weight: 600;
  max-width: 500px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.hero-desc {
  color: var(--gray-text);
  font-size: 1rem;
  max-width: 500px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 500px;
  margin-bottom: 28px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
  border: 1px solid #FED7AA;
  border-left: 4px solid var(--orange);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--blue-dark);
}
.hero-highlight svg { flex-shrink: 0; color: var(--orange); }
.hero-highlight strong { color: var(--orange-dark); font-weight: 800; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .97rem;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 2px 10px rgba(249,115,22,.35);
}
.btn-primary:hover { background: var(--orange-dark); box-shadow: 0 4px 18px rgba(249,115,22,.45); }

.btn-secondary {
  background: var(--white);
  color: var(--blue-dark);
  border: 1.5px solid var(--gray-border);
  box-shadow: var(--shadow-card);
}
.btn-secondary:hover { border-color: #b0bcd4; }

.hero-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--gray-text);
  margin-top: 4px;
}

.hero-footnote svg { flex-shrink: 0; }

/* -- HERO - app screenshot -------------------------------- */
.app-screenshot {
  width: 100%;
  max-width: 680px;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-win);
  display: block;
  margin-left: auto;
}

/* ── FEATURES ─────────────────────────────────────────── */
.features-section {
  background: transparent;
  padding: 40px 0 16px;
}

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

.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: box-shadow .2s, transform .2s;
}
.feature-card:hover {
  box-shadow: 0 4px 24px rgba(27,58,140,.12);
  transform: translateY(-2px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-icon.blue   { background: #EBF2FF; }
.feature-icon.blue   svg { color: var(--blue-cta); }
.feature-icon.green  { background: #ECFDF5; }
.feature-icon.green  svg { color: #059669; }
.feature-icon.orange { background: #FFF7ED; }
.feature-icon.orange svg { color: var(--orange); }
.feature-icon.teal   { background: #F0FDFA; }
.feature-icon.teal   svg { color: #0D9488; }
.feature-icon.purple { background: #F5F3FF; }
.feature-icon.purple svg { color: #7C3AED; }
.feature-icon.indigo { background: #EEF2FF; }
.feature-icon.indigo svg { color: #4338CA; }

.feature-text { flex: 1; }

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 5px;
}
.feature-card p {
  font-size: .87rem;
  color: var(--gray-text);
  line-height: 1.45;
}

/* ── QUICK STATS BAR ─────────────────────────────────── */
.stats-bar {
  padding: 14px 0 44px;
}

.stats-bar-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--gray-border);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 14px 24px;
  backdrop-filter: blur(6px);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--blue-dark);
  padding: 4px 16px;
}

.stat-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 26px; height: 26px; }
.stat-icon.blue   svg { color: var(--blue-cta); }
.stat-icon.green  svg { color: #059669; }
.stat-icon.orange svg { color: var(--orange); }
.stat-icon.teal   svg { color: #0D9488; }

.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--gray-border);
}

/* ── HOW IT WORKS ────────────────────────────────────── */
.howto-section {
  background: var(--white);
  padding: 60px 0;
  border-top: 1px solid var(--gray-border);
  border-bottom: 1px solid var(--gray-border);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-text);
  font-size: 1rem;
  margin-bottom: 44px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.step-card {
  text-align: center;
  padding: 0 16px;
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-card p {
  color: var(--gray-text);
  font-size: .92rem;
  line-height: 1.55;
}

/* ── FAQ ─────────────────────────────────────────────── */
.faq-section {
  background: transparent;
  padding: 60px 0;
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-dark);
  cursor: pointer;
  list-style: none;
}
.faq-q::-webkit-details-marker { display: none; }

.faq-chevron {
  flex-shrink: 0;
  color: var(--gray-text);
  transition: transform .2s ease;
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-a {
  padding: 0 22px 20px;
}
.faq-a p {
  color: var(--gray-text);
  font-size: .95rem;
  line-height: 1.7;
  margin: 0;
}
.faq-a a {
  color: var(--blue-cta);
}

/* ── DOWNLOAD CTA ────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  padding: 60px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.cta-section p {
  color: rgba(255,255,255,.75);
  font-size: 1rem;
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.btn-white {
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.btn-white:hover { background: #F3F4F6; }

.cta-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: .82rem;
  color: rgba(255,255,255,.65);
}

/* ── FOOTER ──────────────────────────────────────────── */
.footer {
  background: var(--white);
  border-top: 1px solid var(--gray-border);
  padding: 20px 0 16px;
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  text-decoration: none;
}
.footer-logo-img { height: 40px; width: auto; }

.footer-tagline {
  font-size: .85rem;
  color: var(--gray-text);
  margin-bottom: 4px;
}

.footer-credits {
  font-size: .78rem;
  color: #9CA3AF;
}

.footer a {
  color: var(--blue-cta);
  text-decoration: none;
}
.footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .app-screenshot { max-width: 100%; margin: 0 auto; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 24px; }
  .stat-divider { display: none; }
  .stats-bar-inner { justify-content: flex-start; gap: 12px; }
}

@media (max-width: 560px) {
  .hero { padding: 36px 0 0; }
  .hero-title { font-size: 1.85rem; }
  .hero-actions { flex-direction: column; }
  .btn { justify-content: center; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { flex-direction: column; }
}
