/* Composition (Layout Patterns) */

#app {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-m);
}

/* Landing page shell: header / content / footer */
.landing {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-l);
  padding-bottom: var(--space-xl);
}

/* Two-column layout at desktop; single column on mobile */
.landing__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
  align-self: center;
}

@media (min-width: 900px) {
  .landing__content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }
}

/* === TRY FLOW LAYOUT === */

.try-flow {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-base);
}

.try-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-m);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  /* Sticky header */
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.try-step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-m);
}

.try-step[hidden] {
  display: none;
}

.try-step-content {
  max-width: 480px;
  width: 100%;
}

.try-step-centered {
  text-align: center;
}

/* === LIST VIEW LAYOUT === */

.list-view {
  max-width: 500px;
  margin: 0 auto;
  padding: var(--space-m);
  min-height: 100vh;
  background: var(--c-base);
}

.list-header {
  margin-bottom: var(--space-l);
  padding: var(--space-m);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Ensure border exists for visual separation like dashboard */
  border-bottom: 1px solid var(--c-border);
}

.list-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.list-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--space-m);
  border-bottom: 1px solid var(--c-border);
}

.list-footer {
  margin-top: var(--space-l);
  text-align: center;
}

/* === DASHBOARD LAYOUT === */

.dashboard {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--space-m);
  min-height: 100vh;
  background: var(--c-base);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-l);
  padding: var(--space-m);
  border-bottom: 1px solid var(--c-border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dashboard-welcome {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.dashboard-welcome h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.dashboard-welcome p {
  color: var(--c-text-soft);
}

.dashboard-metrics {
  margin-bottom: var(--space-xl);
}

.dashboard-lists {
  margin-bottom: var(--space-xl);
}

.dashboard-lists h2 {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-m);
}

.lists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-m);
}

.dashboard-upsell {
  margin-bottom: var(--space-xl);
}

.dashboard-cta {
  text-align: center;
  padding: var(--space-l) 0;
}

/* === STATS ROW === */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-s);
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat {
  text-align: center;
  padding: var(--space-m);
  background: var(--c-surface);
  border-radius: 12px;
  border: 1px solid var(--c-border);
}

.stat-value {
  font-family: var(--ff-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--c-accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--c-text-soft);
  margin-top: var(--space-xs);
}
