/* ─── Variables ─────────────────────────────────────────────────────────── */
:root {
  --accent: #7C3AED;
  --accent-rgb: 124, 58, 237;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #aeaeb2;
  --bg-base: #f2f2f7;
  --bg-card: #ffffff;
  --bg-subtle: #f9f9fb;
  --border: #e5e5ea;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-icon: 26px;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-w: 640px;
  --max-w-privacy: 820px;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }

/* ─── Lang switcher ─────────────────────────────────────────────────────── */
.lang-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px 0;
  gap: 4px;
}
.lang-btn {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.lang-btn.active,
.lang-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── App Page Layout ───────────────────────────────────────────────────── */
.app-page {
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--bg-card);
  min-height: 100vh;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  padding: 56px 24px 40px;
  text-align: center;
  background: linear-gradient(160deg, #fff 0%, var(--bg-subtle) 100%);
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(var(--accent-rgb), 0.06), transparent);
  pointer-events: none;
}
.app-icon {
  width: 112px;
  height: 112px;
  border-radius: var(--radius-icon);
  margin: 0 auto 20px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(var(--accent-rgb), 0.22),
    0 2px 6px rgba(0, 0, 0, 0.08);
}
.app-name {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.app-tagline {
  margin-top: 8px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.status-badge.live {
  background: rgba(52, 199, 89, 0.12);
  color: #1a7a35;
}
.status-badge.review {
  background: rgba(255, 149, 0, 0.12);
  color: #9a5800;
}
.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ─── Download Buttons ──────────────────────────────────────────────────── */
.store-section {
  padding: 28px 32px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btn-store {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s;
  border: none;
}
.btn-store:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-store:active { transform: translateY(0); }
.btn-store.ios {
  background: #000;
  color: #fff;
}
.btn-store.android {
  background: #01875f;
  color: #fff;
}
.btn-store svg { flex-shrink: 0; }
.btn-coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-tertiary);
  border: 2px dashed var(--border);
  background: transparent;
}

/* ─── Section ───────────────────────────────────────────────────────────── */
.section {
  padding: 36px 24px;
  border-top: 1px solid var(--border);
}
.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

/* ─── Features ──────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.feature-card {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  border: 1px solid var(--border);
  transition: box-shadow 0.15s;
}
.feature-card:hover { box-shadow: var(--shadow-sm); }
.feature-icon { font-size: 28px; margin-bottom: 10px; line-height: 1; }
.feature-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.feature-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── Support ───────────────────────────────────────────────────────────── */
.support-card {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
}
.support-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 18px;
}
.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 22px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-contact:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.app-footer {
  margin-top: auto;
  padding: 28px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}
.app-footer a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.app-footer a:hover { color: var(--accent); text-decoration: none; }
.footer-copy {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ─── Privacy Page ──────────────────────────────────────────────────────── */
.privacy-page {
  max-width: var(--max-w-privacy);
  margin: 0 auto;
  padding: 0 20px 60px;
  animation: fadeUp 0.35s ease both;
}
.privacy-header {
  padding: 20px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.privacy-back {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}
.privacy-back:hover { text-decoration: underline; }
.privacy-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.privacy-content h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.privacy-content .effective-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.privacy-content p {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 16px;
  word-break: keep-all;
}
.privacy-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.privacy-content ul,
.privacy-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.privacy-content li {
  font-size: 15px;
  color: #444;
  line-height: 1.7;
  margin-bottom: 8px;
}
.privacy-content a { color: var(--accent); }
.privacy-content a:hover { text-decoration: underline; }
.privacy-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 48px 0;
}
.privacy-footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ─── Root / Org Page ───────────────────────────────────────────────────── */
.root-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  animation: fadeUp 0.4s ease both;
}
.root-header {
  text-align: center;
  margin-bottom: 56px;
}
.root-logo {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
}
.root-logo span { color: var(--accent); }
.root-subtitle {
  margin-top: 10px;
  font-size: 17px;
  color: var(--text-secondary);
}
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.app-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}
.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.app-card-top { display: flex; align-items: center; gap: 14px; }
.app-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.app-card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.app-card-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.app-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.root-footer {
  text-align: center;
  margin-top: 64px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 20px 32px; }
  .store-section { padding: 24px 20px 8px; }
  .section { padding: 28px 20px; }
  .privacy-content { padding: 28px 20px; }
  .privacy-header { flex-direction: column; align-items: flex-start; }
  .root-page { padding: 40px 16px 60px; }
  .apps-grid { grid-template-columns: 1fr; }
}
