/* ===================================
   Engadina Now - Global Layout
   =================================== */

/* ===== Reset ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== Body ===== */
html, body {
  height: 100%;
  font-family: var(--font-family);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== App Container ===== */
.app-container {
  max-width: 100%;
  min-height: 100vh;
  padding-top: var(--header-height, 56px);
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

/* ===== Section Structure ===== */
.section {
  padding: var(--space-xl) var(--space-lg);
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: none;
}

.section.active {
  display: block;
}

/* Home section has no top padding (hero handles it) */
.section-home {
  padding-top: 0;
}

.section-title {
  font-size: var(--text-large);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  letter-spacing: var(--tracking-tight);
}

/* ===== Utility Classes ===== */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

/* Spacing utilities */
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }

/* ===== Loading States ===== */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl);
  color: var(--text-tertiary);
}

.loading-text {
  font-size: var(--text-small);
  margin-top: var(--space-md);
}

/* ===== Error States ===== */
.error-container {
  background: rgba(198, 123, 112, 0.05);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
}

.error-icon {
  font-size: 48px;
  opacity: 0.6;
  margin-bottom: var(--space-md);
}

.error-text {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ===== Smooth Scrolling ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Focus States for Accessibility ===== */
*:focus {
  outline: 2px solid var(--lake-blue);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--lake-blue);
  outline-offset: 2px;
}
