/* ══════════════════════════════════════
   LORA — Self-hosted, no Google dependency
   v37 — woff2 only (all modern browsers + apps)
══════════════════════════════════════ */
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-v37-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-v37-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-v37-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-v37-latin-500italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-v37-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-v37-latin-600italic.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-v37-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-v37-latin-700italic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/*
  MARGO — style.css v6.8
  v6.8 — card-lyric font-size 1.28rem, line-height 1.45, padding-left 10px,
          height 86px. Composer inputs explicit font fix.
          All other rules identical to v6.7.
*/

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

:root {
  --gold:         #E8C547;
  --gold-2:       #D4A832;
  --gold-warm:    #F5D46A;
  --gold-deep:    #B8901A;
  --gold-dim:     rgba(232,197,71,0.5);
  --gold-faint:   rgba(232,197,71,0.08);
  --gold-border:  rgba(232,197,71,0.28);
  --gold-glow:    rgba(232,197,71,0.12);

  /* Resonate — the emotional reaction color */
  --resonate:       #E8C547;
  --resonate-faint: rgba(232,197,71,0.08);

  /* Status colors */
  --success:        #4ade80;
  --success-faint:  rgba(74,222,128,0.08);
  --success-border: rgba(74,222,128,0.28);
  --partial:        var(--gold);
  --partial-faint:  var(--gold-faint);
  --partial-border: var(--gold-border);

  --bg:           #07060A;
  --surface:      #0F0E13;
  --surface-2:    #161420;
  --surface-3:    #1E1B2A;
  --border:       rgba(255,255,255,0.07);
  --border-hi:    rgba(255,255,255,0.12);
  --border-hover: rgba(255,255,255,0.16);
  --text:         #F4F1ED;
  --text-2:       #9A98A4;
  --text-3:       #555360;

  --font-display: 'Lora', serif;
  --font-lyric:   'Lora', serif;
  --font-mono:    'Lora', serif;
  --font-ui:      'Lora', serif;

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 20px;

  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  --sticky-total: 186px;
}

html { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Lora', serif;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.022;
  pointer-events: none; z-index: 0;
}

.ambient { position: fixed; border-radius: 50%; filter: blur(100px); pointer-events: none; z-index: 0; }
.ambient-1 {
  width: 600px; height: 280px;
  background: radial-gradient(ellipse, rgba(232,197,71,0.06) 0%, transparent 70%);
  top: -80px; left: 50%; transform: translateX(-50%);
}
.ambient-2 {
  width: 280px; height: 280px;
  background: radial-gradient(ellipse, rgba(107,140,255,0.03) 0%, transparent 70%);
  bottom: 15%; right: -60px;
}


/* Freeze landing content when modal is open - prevents flash */
body.modal-open .lyric-stream,
body.modal-open .lyric-track,
body.modal-open .ticker-label,
body.modal-open .stats-bar-wrap,
body.modal-open .headline,
body.modal-open .tagline,
body.modal-open .cta-group{
  visibility: hidden;
  animation-play-state: paused !important;
}

/* ── Mobile tap delay fix ── */
button, a, [role="tab"], [role="button"], input, textarea, select,
.room-tab, .emotion-btn, .feed-card, .echo-action-btn,
.echo-vibe-opt, .composer-btn, .btn-primary, .btn-ghost,
.echo-compose-trigger, .echo-submit-btn, .echo-cancel-btn {
  touch-action: manipulation;
}

/* ── Disable grain on mobile to reduce compositor load ── */
@media (max-width: 768px) {
  body::before { display: none; }
}

/* ── Disable ambient blurs on mobile ── */
@media (max-width: 768px) {
  .ambient { display: none; }
}

/* ── Scroll performance ── */
html {
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}
.echo-list-wrap, .feed-search-wrap, .room-tabs {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

  #echoSheet {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
  }
}

/* ── Composer page fixes ── */
body.composer-page-open {
  overflow: hidden;
}

#composer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: #0f0e14;
  overflow-y: auto;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

#composer:not(.hidden) {
  display: block;
}

@media (min-width: 768px) {
  #composer.hidden { display: none !important; }
  #composer {
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #composer .modal-sheet {
    max-width: 500px;
    width: 90%;
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
  }
}

    overflow: hidden;
    max-height: 88dvh;
  }
}


