/* ============================================================
   Дневник будущего — base styles
   Токены: spec.txt v1.0 (тёплый чёрный, Cormorant + Inter)
   ============================================================ */

:root {
  --bg-main:        #0A0A0A;
  --bg-card:        #141414;
  --bg-element:     #1C1C1C;
  --text-main:      #F5F1E8;
  --text-muted:     #8B8378;
  --text-secondary: #5A554D;
  --accent:         #3E2723;
  --danger:         #A23B3B;
  --border:         #1F1F1F;
  --success:        #4A5C3A;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  1.5rem;
  --sp-lg:  2rem;
  --sp-xl:  3rem;
  --sp-2xl: 5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1.2); }
}

.anim-1 { animation: fadeUp 800ms ease-out both; animation-delay: 100ms; }
.anim-2 { animation: fadeUp 900ms ease-out both; animation-delay: 600ms; }
.anim-3 { animation: fadeUp 800ms ease-out both; animation-delay: 1400ms; }
.anim-4 { animation: fadeUp 600ms ease-out both; animation-delay: 1800ms; }

/* Loader */
.loader {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: pulse 1.4s ease-in-out infinite;
}

/* Welcome */
.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 var(--sp-sm) var(--sp-lg);
}

.welcome-sigil {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-2xl);
  color: var(--text-main);
}

.welcome-sigil svg {
  width: 60px;
  height: 60px;
}

.welcome-message-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-xl);
  padding: 0 var(--sp-sm);
}

.welcome-message {
  max-width: 320px;
  width: 100%;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 2rem;
  color: var(--text-main);
  text-align: left;
}

.welcome-message p + p {
  margin-top: var(--sp-sm);
}

.welcome-sign-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--sp-lg);
  padding: 0 var(--sp-sm);
}

.welcome-sign {
  max-width: 320px;
  width: 100%;
  text-align: right;
  padding-right: var(--sp-md);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.welcome-spacer {
  flex: 1;
  min-height: var(--sp-lg);
}

.welcome-btn {
  width: 100%;
  padding: 1rem;
  min-height: 52px;
  border: none;
  border-radius: 12px;
  background: var(--text-main);
  color: var(--bg-main);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: background 200ms ease-out, transform 80ms ease-out;
}

.welcome-btn:hover  { background: #ffffff; }
.welcome-btn:active { transform: scale(0.99); }

/* Error */
.error {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-lg);
  text-align: center;
  gap: var(--sp-sm);
}

.error-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-main);
}

.error-message {
  font-size: 0.9375rem;
  color: var(--text-muted);
}
