/* ============================================================================
   refine.css — THE PLATFORM REFINEMENT LAYER
   Calm dark + warm gold, balanced breathing room. Loaded AFTER styles.css so it
   lifts the whole platform — all ~125 screens inherit this — without touching
   the base stylesheet or any render code. Mindvalley-class: generous space,
   one focal point, quiet confidence. Boldness spent on the signature; everything
   else disciplined.
   ============================================================================ */

:root {
  /* Refined warm-gold palette (your Shush direction, cleaned + deepened) */
  --ground: #0b0708;
  --ground-deep: #070405;
  --panel: #14100f;
  --surface: #181311;
  --surface-2: #1e1714;
  --surface-hi: #241b17;
  --line: #2e2420;
  --line-soft: #211915;
  --hairline: rgba(245,230,210,.055);
  --hairline-2: rgba(245,230,210,.10);

  --bone: #f4ecdf;
  --bone-dim: #c2b4a2;
  --muted: #8a7c6b;

  /* the warm gold — refined, slightly richer */
  --accent: #c9a25c;
  --accent-hi: #e0bd76;
  --accent-deep: #8f6f33;
  --accent-glow: rgba(201,162,92,.14);
  --accent-ink: #1a1206;

  /* OPENED spacing scale — this is the #1 lever for "premium not crowded" */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 14px; --sp-4: 22px;
  --sp-5: 34px; --sp-6: 52px; --sp-7: 76px; --sp-8: 104px;

  /* refined type scale — larger display, calmer body */
  --fs-xs: 11px; --fs-sm: 12.5px; --fs-base: 14px; --fs-md: 15.5px;
  --fs-lg: 19px; --fs-xl: 26px; --fs-2xl: 34px; --fs-3xl: 46px;

  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.30);
  --shadow: 0 12px 40px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.55);
}

/* ---- BREATHING ROOM: open the main content column, focus the width ---------- */
.main-inner {
  padding: var(--sp-6) var(--sp-6) !important;
  max-width: 1180px !important;       /* focused, not sprawling */
  margin: 0 auto;
}
@media (max-width: 1100px) { .main-inner { padding: var(--sp-5) var(--sp-4) !important; } }

/* ---- CARDS: generous padding, soft lift, calm borders ----------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--sp-5) !important;
  margin-bottom: var(--sp-4) !important;
  box-shadow: var(--shadow-sm);
  transition: border-color .25s cubic-bezier(.16,1,.3,1), transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s;
}
.card:hover {
  border-color: var(--hairline-2);
  box-shadow: var(--shadow);
}

/* ---- TYPOGRAPHY: larger, lighter display titles with air ------------------- */
.topbar { margin-bottom: var(--sp-6) !important; }
.topbar h2 {
  font-size: var(--fs-3xl) !important;
  font-weight: 600 !important;
  letter-spacing: -.025em !important;
  line-height: 1.08 !important;
}
.card h3 {
  font-size: var(--fs-lg) !important;
  font-weight: 600 !important;
  margin-bottom: var(--sp-3) !important;
  letter-spacing: -.01em;
}
h1 { letter-spacing: -.03em; font-weight: 600; }

/* ---- GRIDS: more gap between cards (the airy feel) -------------------------- */
.grid, .feature-grid, .pillar-grid { gap: var(--sp-4) !important; }
.grid.c2, .grid.c3 { gap: var(--sp-5) !important; }

/* ---- BUTTONS: calmer, more refined ----------------------------------------- */
.btn {
  border-radius: var(--r-sm);
  font-weight: 600;
  letter-spacing: .01em;
  padding: 11px 20px;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, background .18s;
}
.btn.sm { padding: 7px 15px; border-radius: var(--r-sm); }

/* ---- THE RAIL (sidebar): quieter, more spacious ---------------------------- */
.rail, .sidebar, nav.rail {
  background: var(--ground-deep) !important;
  border-right: 1px solid var(--hairline) !important;
}

/* ---- KV ROWS, BADGES, NOTICES: soften the borders to hairlines ------------- */
.kv { border-bottom: 1px solid var(--hairline) !important; padding: 9px 0 !important; }
.badge { border-radius: 999px; }
.notice { border-radius: var(--r); padding: var(--sp-4) !important; }

/* ---- GATE / AUTH screens: center, breathe, focus --------------------------- */
.gate {
  max-width: 520px; margin: 0 auto; padding: var(--sp-7) var(--sp-5);
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
}
.gate h1 { font-size: var(--fs-3xl); margin-bottom: var(--sp-3); }
.gate .legalbox {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: var(--sp-5); margin: var(--sp-4) 0;
}

/* ---- focus visibility (quality floor) -------------------------------------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  .card, .btn { transition: none !important; }
}

/* ============================================================================
   PAGE TRANSITIONS — real routed-page flow (every screen, via the router)
   ============================================================================ */
#view { will-change: opacity, transform; }
.pe-page-leaving {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.pe-page-entering {
  opacity: 0;
  transform: translateY(16px);
}
.pe-page-entering.pe-page-in {
  opacity: 1;
  transform: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

/* ============================================================================
   AUDIO REPORT — NotebookLM-style generated audio artifact
   ============================================================================ */
.audio-report { background: linear-gradient(135deg, var(--surface), var(--ground-deep)); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: var(--sp-5); margin-bottom: var(--sp-4); }
.ar-head { display: flex; align-items: center; gap: 18px; margin-bottom: var(--sp-4); }
.ar-orb { width: 60px; height: 60px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, var(--accent-hi), var(--accent-deep)); box-shadow: 0 0 38px var(--accent-glow); }
.ar-orb.playing { animation: ar-orb-pulse 1.4s var(--ease, cubic-bezier(.16,1,.3,1)) infinite; }
@keyframes ar-orb-pulse { 0%,100% { transform: scale(1); box-shadow: 0 0 38px var(--accent-glow); } 50% { transform: scale(1.06); box-shadow: 0 0 56px var(--accent-glow); } }
.ar-title { font-family: var(--display); font-size: 20px; font-weight: 600; }
.ar-sub { color: var(--muted); font-size: 12px; font-family: var(--mono); margin-top: 3px; }
.ar-wave { display: flex; align-items: center; gap: 3px; height: 44px; margin: 18px 0; }
.ar-wave i { flex: 1; background: var(--accent-deep); border-radius: 2px; height: 18%; transition: height .15s ease, background .2s; }
.ar-wave.playing i { background: var(--accent); }
.ar-ctrl { display: flex; align-items: center; gap: 16px; }
.ar-play { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .2s var(--ease-spring, cubic-bezier(.34,1.4,.64,1)); flex: none; }
.ar-play:hover { transform: scale(1.08); }
.ar-play svg { width: 22px; height: 22px; }
.ar-meta { font-family: var(--mono); font-size: 11.5px; color: var(--bone-dim); letter-spacing: .03em; }
