/* ── Landing page styles ──────────────────────────────────────────────────── */
/* Builds on top of app.css CSS variables */

/* ── Language switcher ───────────────────────────────────────────────────── */
.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-btn {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .35rem .7rem;
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: background .15s;
  font-weight: 600;
}
.lang-btn:hover { background: var(--border); opacity: 1; }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  min-width: 110px;
  z-index: 200;
  overflow: hidden;
}
.lang-dropdown.open { display: block; }

.lang-option {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  padding: .55rem 1rem;
  text-align: left;
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: background .12s;
  border-radius: 0;
}
.lang-option:hover { background: var(--surface2); opacity: 1; }
.lang-option.active { color: var(--accent); font-weight: 700; }

/* ── Tab navigation ──────────────────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  position: sticky;
  top: 60px;
  z-index: 90;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  padding: .85rem 1.4rem;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  border-radius: 0;
  letter-spacing: .02em;
}
.tab-btn:hover { color: var(--text); opacity: 1; }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Tab panels ──────────────────────────────────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Hero section ────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem 3rem;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(124,58,237,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(232,67,147,0.08) 0%, transparent 55%);
  pointer-events: none;
}

.hero-icon {
  width: 72px;
  height: 72px;
  opacity: 0.85;
  flex-shrink: 0;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .35rem .9rem;
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.hero-badge span { color: var(--accent2); font-weight: 700; }

/* ── Already-logged-in banner ────────────────────────────────────────────── */
.logged-in-banner {
  display: none;
  margin: 0 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(63,185,80,0.12), rgba(63,185,80,0.05));
  border: 1px solid rgba(63,185,80,0.3);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.logged-in-banner.visible { display: flex; }
.logged-in-banner-text {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .95rem;
}
.logged-in-banner-text .dot.green { width: 10px; height: 10px; }
.logged-in-banner a.btn-success {
  padding: .5rem 1.2rem;
  border-radius: 8px;
  background: var(--success);
  color: #fff;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  transition: opacity .15s;
}
.logged-in-banner a.btn-success:hover { opacity: .85; }

/* ── Welcome / login layout ──────────────────────────────────────────────── */
.welcome-privacy {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.welcome-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
  align-items: start;
}
.welcome-layout .landing-login-card { order: 2; }
.welcome-layout .welcome-features   { order: 1; }

.welcome-features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: border-color .2s;
}
.feature-card:hover { border-color: rgba(255,255,255,0.2); }

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(232,67,147,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent2);
}

.feature-text h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.feature-text p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Login card (landing variant) ────────────────────────────────────────── */
.landing-login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 110px;
}
.landing-login-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ── Example charts section ──────────────────────────────────────────────── */
.charts-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem 4rem;
}

.charts-intro {
  text-align: center;
  margin-bottom: 2.5rem;
}
.charts-intro h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: .75rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.charts-intro p {
  color: var(--text-muted);
  font-size: .95rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

.example-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.example-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color .2s;
  position: relative;
}
.example-chart-card:hover { border-color: rgba(255,255,255,0.2); }
.example-chart-card.full-width { grid-column: 1 / -1; }

.example-chart-card h3 {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .35rem;
}
.example-chart-card .chart-desc {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.example-chart-wrapper {
  position: relative;
  height: 280px;
}
.example-chart-wrapper.short { height: 240px; }

/* watermark */
.chart-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
}
.chart-watermark-text {
  font-size: 2.2rem;
  font-weight: 900;
  color: rgba(255,255,255,0.07);
  letter-spacing: .12em;
  transform: rotate(-30deg);
  white-space: nowrap;
  user-select: none;
  text-transform: uppercase;
}
:root.light .chart-watermark-text { color: rgba(0,0,0,0.06); }

/* ── SportClimb App tab ──────────────────────────────────────────────────── */
.app-tab-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  padding: 3rem 2rem;
  gap: 1.25rem;
}
.app-tab-icon {
  font-size: 4rem;
  opacity: 0.4;
}
.app-tab-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
}
.app-tab-content p {
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.7;
  font-size: .95rem;
}
.coming-soon-badge {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff;
  padding: .4rem 1.1rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .welcome-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .welcome-layout .landing-login-card { order: 1; }
  .welcome-layout .welcome-features   { order: 2; }
  .landing-login-card { position: static; }
  .example-charts-grid { grid-template-columns: 1fr; }
  .example-chart-card.full-width { grid-column: 1; }
  .hero-title { font-size: 2rem; }
  .tab-nav { padding: 0 1rem; }
  .tab-btn { padding: .75rem 1rem; font-size: .82rem; }
}

@media (max-width: 600px) {
  .hero { padding: 2.5rem 1rem 2rem; }
  .hero-title { font-size: 1.6rem; }
  .hero-subtitle { font-size: .9rem; }
  .welcome-layout { padding: 1.5rem 1rem 3rem; }
  .charts-section { padding: 1rem 1rem 3rem; }
  .logged-in-banner { margin: 0 1rem 1rem; }
  .example-chart-wrapper { height: 220px; }
  .example-chart-wrapper.short { height: 200px; }
  .chart-watermark-text { font-size: 1.5rem; }
  .tab-btn { padding: .65rem .75rem; font-size: .78rem; }
  .hero-icon { width: 52px; height: 52px; }
}
