/* ══════════════════════════════════════════════════════
   IAA — Design System v3  (2026 Premium Redesign)
══════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:         #1A237E;
  --blue-mid:     #283593;
  --blue-pale:    #E8EAF6;
  --gold:         #FFB300;
  --gold-dark:    #F57F17;
  --parchment:    #F0F2FB;
  --surface:      #FFFFFF;
  --text:         #0F1340;
  --muted:        #546E7A;
  --border:       rgba(26,35,126,.09);
  --r:            16px;
  --shadow:       0 2px 20px rgba(26,35,126,.08);
  --shadow-md:    0 10px 40px rgba(26,35,126,.16);
  --shadow-gold:  0 4px 22px rgba(255,179,0,.52);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Heebo', sans-serif;
  background: var(--parchment);
  color: var(--text);
  direction: rtl;
  overflow-x: hidden;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 0 0 1px rgba(26,35,126,.06), 0 4px 60px rgba(26,35,126,.1);
}
@media (min-width: 600px) { body { max-width: 100%; box-shadow: none; } }

.container { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 18px; }
@media (min-width: 600px) { .container { padding: 0 32px; } }
@media (min-width: 900px) { .container { max-width: 1100px; } }

/* ── Typography ────────────────────────────────────── */
.section-eyebrow {
  display: block; font-size: .68rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px;
}
.section-eyebrow--light { color: rgba(255,255,255,.5); }
.section-title {
  font-size: clamp(1.3rem, 4vw, 1.85rem);
  font-weight: 900; line-height: 1.15; color: var(--text);
  margin-bottom: 8px; letter-spacing: -.025em;
}
.section-title--light { color: #fff; }

/* ── Banner ────────────────────────────────────────── */
.banner {
  position: sticky; top: 0; z-index: 200;
  background: var(--gold); color: var(--blue);
  text-align: center; padding: 9px 16px;
  font-size: .72rem; font-weight: 900; letter-spacing: .05em;
}

/* ══════════════════════════════════════════════════════
   HERO — Aurora dark background with animated waveform
══════════════════════════════════════════════════════ */
.hero {
  background: #06091F;
  position: relative;
  text-align: center;
  padding: 60px 20px 76px;
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 600px) { .hero { padding: 96px 24px 112px; } }

/* Aurora blob 1 — blue/indigo */
.hero::before {
  content: '';
  position: absolute; z-index: 0;
  width: 80%; padding-top: 80%;
  top: -30%; right: -25%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63,81,181,.65) 0%, transparent 68%);
  filter: blur(72px);
  animation: aurora-a 10s ease-in-out infinite alternate;
}

/* Aurora blob 2 — gold/amber */
.hero::after {
  content: '';
  position: absolute; z-index: 0;
  width: 65%; padding-top: 65%;
  bottom: -25%; left: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,152,0,.22) 0%, transparent 70%);
  filter: blur(64px);
  animation: aurora-b 13s ease-in-out infinite alternate;
}

@keyframes aurora-a {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(8%, -5%) scale(1.1); }
  100% { transform: translate(-4%, 7%) scale(.93); }
}
@keyframes aurora-b {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-6%, 4%) scale(1.08); }
  100% { transform: translate(5%, -6%) scale(.96); }
}

.hero__inner {
  max-width: 560px; margin: 0 auto;
  position: relative; z-index: 1;
}

/* ── Waveform logo ─────────────────────────────────── */
.hero__logo { display: flex; justify-content: center; margin-bottom: 32px; }

.hero__wave {
  display: inline-flex; align-items: center; gap: 5px;
  height: 54px; padding: 4px 2px;
}
.hero__wave span {
  display: block; width: 5px; border-radius: 99px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(255,179,0,.75), 0 0 4px rgba(255,179,0,.5);
  animation: wave-bar 1.5s ease-in-out infinite;
  transform-origin: center;
}
.hero__wave span:nth-child(1) { height: 18px; animation-delay:  .0s; }
.hero__wave span:nth-child(2) { height: 36px; animation-delay: .15s; }
.hero__wave span:nth-child(3) { height: 48px; animation-delay: .30s; }
.hero__wave span:nth-child(4) { height: 28px; animation-delay: .45s; }
.hero__wave span:nth-child(5) { height: 42px; animation-delay: .60s; }
.hero__wave span:nth-child(6) { height: 32px; animation-delay: .18s; }
.hero__wave span:nth-child(7) { height: 20px; animation-delay: .36s; }

@keyframes wave-bar {
  0%, 100% { transform: scaleY(1);    opacity: 1; }
  50%       { transform: scaleY(.25); opacity: .5; }
}

/* ── Brand name ────────────────────────────────────── */
.hero__brand {
  font-size: clamp(2.2rem, 8vw, 3.8rem);
  font-weight: 900; color: var(--gold);
  letter-spacing: -.03em; line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 40px rgba(255,179,0,.4);
}

/* ── Hero heading ──────────────────────────────────── */
.hero__he {
  font-size: clamp(1.4rem, 5.5vw, 2.3rem);
  font-weight: 900; color: #fff; line-height: 1.2;
  letter-spacing: -.025em; margin-bottom: 36px;
  text-shadow: 0 2px 32px rgba(0,0,0,.45);
}

/* ── CTA button ────────────────────────────────────── */
.btn {
  display: inline-block; border-radius: 99px;
  font-family: 'Heebo', sans-serif; font-weight: 900; font-size: .94rem;
  padding: 14px 34px; text-decoration: none;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
  cursor: pointer; border: none;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: .01em;
}
.btn:active { transform: scale(.95) !important; }
.btn--gold {
  background: var(--gold); color: var(--blue);
  box-shadow: var(--shadow-gold);
}
.btn--gold:hover {
  box-shadow: 0 8px 32px rgba(255,179,0,.7);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════
   APP DOWNLOAD SECTION
══════════════════════════════════════════════════════ */
.app-section {
  background: linear-gradient(160deg, #06091F 0%, #0D1B6E 60%, #1A237E 100%);
  padding: 52px 20px 0;
  position: relative; overflow: hidden;
}
.app-section::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 70% 60% at 80% 20%, rgba(255,179,0,.12) 0%, transparent 65%),
              radial-gradient(ellipse 50% 50% at 10% 80%, rgba(63,81,181,.4) 0%, transparent 65%);
}
.app-section__inner {
  position: relative; z-index: 1;
  max-width: 680px; margin: 0 auto; text-align: center;
}

.app-section__eyebrow {
  font-size: .68rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 10px;
}
.app-section__title {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 900; color: #fff; line-height: 1.15;
  letter-spacing: -.025em; margin-bottom: 28px;
}
.app-section__img {
  display: block;
  width: min(480px, 90%);
  margin: 36px auto 0;
  filter: drop-shadow(0 -12px 40px rgba(0,0,0,.4));
}

/* Store buttons */
.app-section__btns {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

.store-btn {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px; padding: 12px 20px;
  text-decoration: none; color: #fff;
  transition: background .18s, transform .15s, border-color .18s;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(8px);
}
.store-btn:hover {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.3);
  transform: translateY(-1px);
}
.store-btn:active { transform: scale(.96); }
.store-btn--primary { background: var(--gold); border-color: var(--gold); color: var(--blue); box-shadow: 0 4px 20px rgba(255,179,0,.4); }
.store-btn--primary:hover { background: #FFC107; }
.store-btn__icon  { width: 24px; height: 24px; flex-shrink: 0; }
.store-btn__name  { font-size: 1rem; font-weight: 800; line-height: 1; }
.store-btn__label { display: block; font-size: .6rem; font-weight: 700; letter-spacing: .08em; opacity: .6; margin-bottom: 1px; }
.store-btn--coming { opacity: .65; cursor: default; pointer-events: none; }


/* ══════════════════════════════════════════════════════
   CATEGORY FILTER BAR
══════════════════════════════════════════════════════ */
.cat-bar {
  gap: 8px; overflow-x: auto; padding-bottom: 8px;
  margin-bottom: 28px; scrollbar-width: none;
}
.cat-bar::-webkit-scrollbar { display: none; }

.cat-btn {
  flex-shrink: 0;
  border: 1.5px solid rgba(26,35,126,.12); border-radius: 99px;
  padding: 7px 18px; font-family: 'Heebo', sans-serif;
  font-size: .78rem; font-weight: 700; cursor: pointer;
  background: var(--surface); color: var(--blue-mid);
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  box-shadow: 0 1px 6px rgba(26,35,126,.07);
}
.cat-btn.active {
  background: var(--blue); color: #fff; border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(26,35,126,.32);
  transform: scale(1.04);
}
.cat-btn:hover:not(.active) { background: var(--blue-pale); border-color: rgba(26,35,126,.22); }

/* ══════════════════════════════════════════════════════
   FEED
══════════════════════════════════════════════════════ */
.feed { padding: 40px 0 68px; }
.feed__header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.feed__header .section-title { margin-bottom: 2px; }
.feed__date { font-size: .8rem; color: var(--muted); }
.feed__status {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--muted); white-space: nowrap; padding-top: 6px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot--loading { background: var(--gold); animation: pulse 1.2s infinite; }
.dot--ok      { background: #2E7D32; }
.dot--error   { background: #c62828; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ══════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════ */
.cards {
  background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
}
@media (min-width: 600px) {
  .cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    background: none; box-shadow: none; overflow: visible;
  }
}
@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 420px;
    grid-auto-flow: dense;
    gap: 16px;
  }

  /* ── Bento: Hero card (2 cols × 2 rows) ─────────── */
  .card:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  /* ── Bento: Wide card (2 cols × 1 row) ──────────── */
  .card:nth-child(4) {
    grid-column: span 2;
  }

  /* Hero thumb fills the extra height */
  .card:nth-child(1) .card__thumb {
    flex: 1;
    height: auto;
    min-height: 220px;
  }

  /* Hero headline: bigger type, more lines */
  .card:nth-child(1) .card__headline {
    font-size: 1.2rem;
    -webkit-line-clamp: 4;
  }

  .card:nth-child(1) .card__desc {
    -webkit-line-clamp: 2;
  }

  /* Wide card thumb */
  .card:nth-child(4) .card__thumb {
    height: 210px;
  }
}

/* Skeleton loader */
.card--skeleton {
  height: 86px; flex-shrink: 0;
  background: linear-gradient(90deg, #E8EAF6 25%, #F1F3FC 50%, #E8EAF6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-bottom: 1px solid var(--border);
}
.card--skeleton:last-child { border-bottom: none; }
@media (min-width: 600px) {
  .card--skeleton { height: 100px; border-radius: var(--r); border-bottom: none; }
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Card enter */
@keyframes card-enter {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Card base */
.card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  cursor: pointer; border: none; border-bottom: 1px solid var(--border);
  background: transparent; direction: rtl;
  -webkit-tap-highlight-color: transparent;
  min-height: 84px; width: 100%;
  animation: card-enter .35s cubic-bezier(.34,1.56,.64,1) both;
  transition: background .15s;
}
.card:nth-child(1)  { animation-delay:   0ms }
.card:nth-child(2)  { animation-delay:  55ms }
.card:nth-child(3)  { animation-delay: 110ms }
.card:nth-child(4)  { animation-delay: 165ms }
.card:nth-child(5)  { animation-delay: 220ms }
.card:nth-child(6)  { animation-delay: 275ms }
.card:nth-child(7)  { animation-delay: 330ms }
.card:nth-child(8)  { animation-delay: 385ms }
.card:nth-child(9)  { animation-delay: 440ms }
.card:nth-child(10) { animation-delay: 495ms }
.card:last-child { border-bottom: none; }
.card:active { background: var(--blue-pale); }
.card--playing { background: var(--blue-pale); }

@keyframes loading-pulse {
  0%,100% { background: #eef0fb; }
  50%      { background: #e0e4f6; }
}
.card--loading { animation: loading-pulse 1s ease-in-out infinite !important; }

/* Desktop — glassmorphism vertical card (magazine grid) */
@media (min-width: 600px) {
  .card {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-bottom: none;
    min-height: auto;
    border-radius: var(--r);
    overflow: hidden;
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255,255,255,.65);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.9);
    transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .15s;
  }
  .card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,1);
  }
  .card:active { transform: scale(.99) !important; }
  .card--playing {
    border-color: rgba(26,35,126,.28);
    background: rgba(232,234,246,.9);
  }
  .card--loading { border-color: rgba(255,179,0,.45) !important; animation: none !important; }
}

/* ── Thumbnail ─────────────────────────────────────── */
.card__thumb {
  flex-shrink: 0;
  width: 80px; height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--blue-pale);
}
.card__thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.card__thumb--err { display: none; }

@media (min-width: 600px) {
  .card__thumb {
    width: 100%;
    height: 200px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }
  .card:hover .card__thumb img { transform: scale(1.04); }
}

/* ── Card internals ────────────────────────────────── */
.card__body { flex: 1; min-width: 0; overflow: hidden; }
@media (min-width: 600px) {
  .card__body { flex: 1; padding: 12px 14px 6px; overflow: hidden; }
}
.card__row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 5px;
}
.card__meta { display: flex; align-items: center; gap: 6px; }
.card__source {
  font-size: .6rem; font-weight: 900; color: var(--blue);
  text-transform: uppercase; letter-spacing: .1em;
}
.card__cat {
  font-size: .56rem; font-weight: 800; letter-spacing: .03em;
  background: var(--blue-pale); color: var(--blue-mid);
  padding: 2px 7px; border-radius: 5px;
  border: 1px solid rgba(26,35,126,.1);
}
.card__time {
  font-size: .6rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card__headline {
  font-size: .95rem; font-weight: 700; line-height: 1.45; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; letter-spacing: -.01em;
}
.card__desc {
  font-size: .76rem; color: var(--muted); line-height: 1.4; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card--playing .card__headline { color: var(--blue-mid); }
@media (min-width: 600px) { .card__headline { font-size: 1rem; } }

/* ── Play button ───────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

.card__play {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  background: var(--blue); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
  box-shadow: 0 3px 14px rgba(26,35,126,.38);
}
.card:hover .card__play {
  box-shadow: 0 6px 22px rgba(26,35,126,.5);
  transform: scale(1.08);
}
.card__play:active { transform: scale(.88) !important; }
@media (min-width: 600px) {
  .card__play {
    margin: 0 14px 12px;
    align-self: flex-end;
  }
}
.card--playing .card__play {
  background: var(--gold); color: var(--blue);
  box-shadow: var(--shadow-gold);
}
.card--loading .card__play {
  background: transparent !important;
  border: 2.5px solid var(--gold);
  border-top-color: transparent;
  box-shadow: none;
  animation: spin .65s linear infinite;
  transform: none !important;
}
@media (min-width: 600px) { .card__play { width: 46px; height: 46px; } }

.feed__empty {
  text-align: center; color: var(--muted);
  padding: 60px 0; font-size: .9rem;
}

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.footer {
  background: #040712; color: rgba(255,255,255,.28);
  text-align: center; padding: 24px 16px;
  font-size: .73rem; letter-spacing: .05em;
}

/* ══════════════════════════════════════════════════════
   PLAYER — Floating glassmorphism bar
══════════════════════════════════════════════════════ */
.player {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  background: rgba(6,9,31,.86);
  backdrop-filter: blur(44px) saturate(200%);
  -webkit-backdrop-filter: blur(44px) saturate(200%);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 -8px 48px rgba(0,0,0,.4), 0 -1px 0 rgba(255,255,255,.06);
  transform: translateY(100%);
  transition: transform .34s cubic-bezier(.4,0,.2,1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.player.visible { transform: translateY(0); }

.player__progress {
  height: 3px; background: rgba(255,255,255,.08);
  border-radius: 2px 2px 0 0; overflow: hidden;
}
.player__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  transition: width .5s linear; border-radius: 2px;
  box-shadow: 0 0 8px rgba(255,179,0,.5);
}
.player__row {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px 16px;
}
.player__info { flex: 1; min-width: 0; }
.player__source {
  display: block; font-size: .57rem; font-weight: 900;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 2px;
}
.player__title {
  font-size: .83rem; font-weight: 500; color: rgba(255,255,255,.9);
  line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player__controls { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.player__btn {
  background: rgba(255,255,255,.1); border: none; border-radius: 99px;
  color: rgba(255,255,255,.88); font-size: .72rem; padding: 6px 10px;
  cursor: pointer; font-family: inherit;
  transition: background .15s, transform .1s;
  white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.player__btn:hover  { background: rgba(255,255,255,.18); }
.player__btn:active { background: rgba(255,255,255,.26); transform: scale(.92); }
.player__btn--speed { min-width: 34px; text-align: center; font-weight: 800; }
.player__btn--x     { padding: 6px 8px; }
.player__main {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--gold); color: var(--blue);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 16px rgba(255,179,0,.55);
  transition: transform .16s cubic-bezier(.34,1.56,.64,1), box-shadow .16s;
  -webkit-tap-highlight-color: transparent;
  font-weight: 900;
}
.player__main:hover  { box-shadow: 0 5px 22px rgba(255,179,0,.7); }
.player__main:active { transform: scale(.9); }

/* ── Utils ─────────────────────────────────────────── */
.hidden { display: none !important; }
