/* ============================================================
   Auralune — «Сливовая ночь» / Plum Night design tokens
   Dark-only premium plum base, warm pink + gold accents.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400;1,6..72,500&display=swap');

:root {
  /* ---- surfaces (dark) ---- */
  --bg-app:      #160A18;   /* darkest — nav / app chrome */
  --bg-base:     #1A0E1C;   /* base screen background */
  --surface:     #2A1528;   /* raised card */
  --surface-2:   #3A1430;   /* nested / list row */
  --line:        #3D2438;   /* hairline divider */

  /* tint base — accent fills mix toward this (flips per theme) */
  --mix:         #160A18;

  /* ---- accents (tweakable base hues) ---- */
  --pink:        #D4537E;   /* action + relationships */
  --gold:        #EF9F27;   /* astro + energy + premium */

  /* derived tints — stay harmonious when base hue is tweaked */
  --pink-light:  color-mix(in oklab, var(--pink), #fff 52%);
  --pink-muted:  color-mix(in oklab, var(--pink), #fff 28%);
  --pink-deep:   color-mix(in oklab, var(--pink), #160A18 58%);
  --gold-light:  color-mix(in oklab, var(--gold), #fff 42%);
  --gold-muted:  color-mix(in oklab, var(--gold), #8A6B79 50%);
  --gold-deep:   color-mix(in oklab, var(--gold), #160A18 64%);

  /* ---- text ---- */
  --text:        #FBEAF0;   /* primary / titles */
  --text-2:      #C9A6B5;   /* secondary */
  --text-3:      #8A6B79;   /* tertiary / hints */
  --on-pink:     #FFFFFF;
  --on-gold:     #412402;

  /* ---- semantic ---- */
  --success:     #5DCAA5;
  --warning:     #EF9F27;
  --error:       #E24B4A;

  /* ---- type ---- */
  --font-sans:  'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  /* ---- shape (tweakable) ---- */
  --radius-block: 16px;
  --radius-btn:   12px;
  --radius-badge: 8px;
  --radius-card:  12px;

  /* ---- spacing rhythm (tweakable via density) ---- */
  --gap-block:    10px;   /* between blocks */
  --gap-section:  22px;   /* between sections */
  --pad-screen:   16px;   /* side margins */
  --pad-card:     14px;   /* inside cards */
}

/* ============================================================
   LIGHT THEME — «Сливовый день»
   Warm blush-cream surfaces, deep-plum text. Accent *-light vars
   are redefined DEEP so accent text stays readable on pale fills.
   ============================================================ */
[data-theme="light"] {
  --bg-app:      #EFE2E7;   /* nav / chrome */
  --bg-base:     #FBF3F4;   /* soft warm blush */
  --surface:     #FFFFFF;   /* raised card */
  --surface-2:   #F5E8ED;   /* nested / list row */
  --line:        #EAD7DE;   /* hairline */
  --mix:         #FBF3F4;   /* tint base → pale accent fills */

  --pink:        #C8436F;
  --gold:        #C0780F;

  --pink-light:  color-mix(in oklab, var(--pink), #2A1528 22%);  /* deep pink — accent text */
  --pink-muted:  color-mix(in oklab, var(--pink), #2A1528 4%);
  --pink-deep:   color-mix(in oklab, var(--pink), #fff 32%);
  --gold-light:  color-mix(in oklab, var(--gold), #2A1528 20%);  /* deep amber — accent text */
  --gold-muted:  color-mix(in oklab, var(--gold), #6E5560 24%);
  --gold-deep:   color-mix(in oklab, var(--gold), #fff 42%);

  --text:        #2A1528;   /* deep plum */
  --text-2:      #6E5560;
  --text-3:      #A38B97;
  --on-pink:     #FFFFFF;
  --on-gold:     #FFFFFF;
}

/* Always-dark island (tarot card, etc.) — re-asserts dark tokens
   regardless of the app theme. Stamp data-theme="dark" on the node. */
[data-theme="dark"] {
  --bg-app: #160A18; --bg-base: #1A0E1C; --surface: #2A1528;
  --surface-2: #3A1430; --line: #3D2438; --mix: #160A18;
  --pink: #D4537E; --gold: #EF9F27;
  --pink-light: color-mix(in oklab, var(--pink), #fff 52%);
  --pink-muted: color-mix(in oklab, var(--pink), #fff 28%);
  --pink-deep:  color-mix(in oklab, var(--pink), #160A18 58%);
  --gold-light: color-mix(in oklab, var(--gold), #fff 42%);
  --gold-muted: color-mix(in oklab, var(--gold), #8A6B79 50%);
  --gold-deep:  color-mix(in oklab, var(--gold), #160A18 64%);
  --text: #FBEAF0; --text-2: #C9A6B5; --text-3: #8A6B79;
  --on-pink: #FFFFFF; --on-gold: #412402;
}

/* ============================================================
   Screen shell
   ============================================================ */
.au-screen {
  position: relative;
  height: 100%;
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* soft radial wash at the top — sets the intimate mood */
.au-screen::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 460px; height: 420px;
  background: radial-gradient(closest-side,
    color-mix(in oklab, var(--pink), transparent 78%),
    transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.au-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--pad-screen);
  scrollbar-width: none;
}
.au-scroll::-webkit-scrollbar { display: none; }

.au-top-pad { height: 56px; flex-shrink: 0; }   /* clears the status bar */

/* ============================================================
   Typography helpers
   ============================================================ */
.au-meta {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pink-muted);
}
.au-h1 { font-size: 26px; font-weight: 500; line-height: 1.15; letter-spacing: -0.3px; color: var(--text); }
.au-h2 { font-size: 22px; font-weight: 500; line-height: 1.2;  letter-spacing: -0.2px; color: var(--text); }
.au-block-title { font-size: 12px; font-weight: 500; letter-spacing: 0.6px; text-transform: uppercase; }
.au-sub { font-size: 15px; font-weight: 500; color: var(--text); }
.au-body { font-size: 15px; font-weight: 400; line-height: 1.62; color: var(--text-2); }
.au-cap { font-size: 11.5px; font-weight: 400; color: var(--text-3); }
.au-serif { font-family: var(--font-serif); }

/* ============================================================
   Cards / blocks
   ============================================================ */
.au-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-block);
  padding: var(--pad-card);
  border: 0.5px solid transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .45s cubic-bezier(.22,.61,.36,1),
              background .35s ease, border-color .35s ease;
}
.au-card:active { transform: scale(.985); }

.au-row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface-2);
  border-radius: var(--radius-block);
  padding: var(--pad-card);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .45s cubic-bezier(.22,.61,.36,1), background .35s ease;
}
.au-row:active { transform: scale(.985); }

.au-icon-wrap {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.au-icon-pink { background: color-mix(in oklab, var(--pink), transparent 84%); }
.au-icon-gold { background: color-mix(in oklab, var(--gold), transparent 84%); }

/* ============================================================
   Buttons
   ============================================================ */
.au-btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s ease, filter .25s ease;
}
.au-btn:active { transform: scale(.975); filter: brightness(.94); }

.au-btn-primary { background: var(--pink); color: var(--on-pink); }
.au-btn-gold    { background: var(--gold); color: var(--on-gold); }
.au-btn-secondary {
  background: transparent;
  border: 0.5px solid var(--pink-muted);
  color: var(--pink-light);
}

/* ============================================================
   Badge
   ============================================================ */
.au-badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--radius-badge);
  font-size: 11px; font-weight: 500;
  letter-spacing: .3px;
  padding: 3px 8px;
}
.au-badge-pink { background: color-mix(in oklab, var(--pink), var(--mix) 55%); color: var(--pink-light); }
.au-badge-gold { background: color-mix(in oklab, var(--gold), var(--mix) 62%); color: var(--gold-light); }

/* ============================================================
   Bottom navigation
   ============================================================ */
.au-nav {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  background: color-mix(in oklab, var(--bg-app), transparent 8%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-top: 0.5px solid var(--line);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 9px 6px 26px;
}
.au-nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 2px 0;
  color: var(--text-3);
  -webkit-tap-highlight-color: transparent;
  transition: color .3s ease;
}
.au-nav-item.active { color: var(--pink); }
.au-nav-label { font-size: 10px; font-weight: 500; letter-spacing: .2px; }

/* ============================================================
   Mood chips (emotional check-in)
   ============================================================ */
.au-chip {
  border: 0.5px solid var(--line);
  background: transparent;
  color: var(--text-2);
  border-radius: 999px;
  padding: 7px 13px;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: all .3s ease;
}
.au-chip.sel {
  background: color-mix(in oklab, var(--pink), var(--mix) 50%);
  border-color: var(--pink);
  color: var(--pink-light);
}

/* ============================================================
   Soft entrance — "as if breathing"
   Transition-driven (not keyframes): the resting state is VISIBLE, so
   content can never get stuck hidden if the animation is play-pending.
   A <Reveal> wrapper flips [data-enter] 0 -> 1 on mount.
   ============================================================ */
.au-rise, .au-fade {
  transition: opacity .7s cubic-bezier(.22,.61,.36,1),
              transform .7s cubic-bezier(.22,.61,.36,1);
}
[data-enter="0"] .au-rise { opacity: 0; transform: translateY(10px); }
[data-enter="0"] .au-fade { opacity: 0; }

/* all-blocks soft entrance (used by Reveal auto-stagger, both themes) */
@keyframes au-blockrise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- navigation transitions (shared motion language) ---- */
@keyframes au-enter-push { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes au-enter-back { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
@keyframes au-enter-tab  { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
.au-view-push { animation: au-enter-push .44s cubic-bezier(.22,.61,.36,1) both; }
.au-view-back { animation: au-enter-back .44s cubic-bezier(.22,.61,.36,1) both; }
.au-view-tab  { animation: au-enter-tab  .5s  cubic-bezier(.22,.61,.36,1) both; }

/* active nav icon gentle pop */
@keyframes au-navpop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.au-nav-item.active svg { animation: au-navpop .42s cubic-bezier(.34,1.4,.5,1); }

@media (prefers-reduced-motion: reduce) {
  .au-view-push, .au-view-back, .au-view-tab { animation: none; }
  .au-nav-item.active svg { animation: none; }
}

/* loading placeholder shimmer */
@keyframes au-shimmer {
  0% { opacity: .4; } 50% { opacity: .7; } 100% { opacity: .4; }
}
.au-ph {
  background: var(--surface-2);
  border-radius: 8px;
  animation: au-shimmer 1.6s ease-in-out infinite;
}

/* star twinkle */
@keyframes au-twinkle {
  0%,100% { opacity: var(--s-min, .15); }
  50%     { opacity: var(--s-max, .8); }
}
