:root {
  --bg: #080b0f;
  --bg-soft: #0f161f;
  --card: #121c29;
  --card-2: #0f2230;
  --text: #f5f8fb;
  --muted: #9ba8b8;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #f59e0b;
  --accent-2: #22d3ee;
  --accent-3: #84cc16;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 5% -20%, rgba(245, 158, 11, 0.23), transparent 50%),
    radial-gradient(1200px 700px at 100% 10%, rgba(34, 211, 238, 0.2), transparent 48%),
    linear-gradient(170deg, var(--bg), var(--bg-soft));
  min-height: 100vh;
}

.backdrop-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 90%);
}

.shell {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.hero {
  border-bottom: 1px solid var(--line);
  padding: 26px 0 74px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 52px;
  position: relative;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.2px;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: #d5e3f2;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

.mobile-menu-link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: #e6edf6;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  font-weight: 700;
  text-align: center;
}

.mobile-menu-link[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.45;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  padding: 7px 12px;
  margin-bottom: 14px;
}

.hero-content h1 {
  margin: 0;
  max-width: 900px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.04;
}

.hero-copy {
  margin: 18px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 2.1vw, 1.17rem);
  line-height: 1.55;
}

.hero-cta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-trust {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-trust span {
  font-size: 0.84rem;
  color: #d3dde8;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 15px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-solid {
  color: #1f1402;
  background: linear-gradient(135deg, var(--accent), #fcd34d);
}

.btn-soft {
  color: #cce9ef;
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.1);
}

.btn-outline {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.btn-link {
  color: #c0ccda;
  border-color: transparent;
}

.btn-nav-secondary {
  color: #c7d5e7;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.01);
}

main { padding-top: 46px; padding-bottom: 64px; }

.section { margin-bottom: 44px; }

.section-head h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.pipeline-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.step-card,
.card,
.stat {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.2);
}

.step-card {
  padding: 16px;
}

.step-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #13100a;
  font-weight: 800;
  background: linear-gradient(135deg, #fcd34d, var(--accent));
}

.step-card h3 {
  margin: 14px 0 8px;
  font-size: 1rem;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.feature-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.card {
  padding: 20px;
}

.feature-card h3 {
  margin: 0 0 12px;
  font-size: 1.14rem;
}

.clean-list {
  margin: 0;
  padding-left: 18px;
}

.clean-list li {
  margin: 10px 0;
  color: var(--muted);
}

.feature-card.accent {
  background:
    radial-gradient(600px 260px at 90% 0%, rgba(132, 204, 22, 0.18), transparent 50%),
    linear-gradient(170deg, rgba(34, 211, 238, 0.06), rgba(245, 158, 11, 0.04));
}

.feature-card.accent p {
  color: #c9d8e8;
  margin: 0;
  line-height: 1.55;
}

.text-link {
  display: inline-block;
  margin-top: 12px;
  color: #f7d58f;
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 213, 143, 0.4);
  padding-bottom: 2px;
}

.api-config {
  margin-top: 16px;
  margin-bottom: 14px;
}

.api-config label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  color: #ced8e5;
}

.api-config-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.api-config input {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(7, 14, 22, 0.8);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

.api-config input:focus {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.api-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.snapshot-cta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat {
  padding: 16px;
  min-height: 104px;
  justify-content: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.k {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
}

.l {
  color: var(--muted);
  font-size: 0.84rem;
}

.note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ── Instagram profile banner ──────────────────────── */
.ig-profile-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 22px 24px;
  background:
    radial-gradient(600px 240px at 85% 0%, rgba(221, 42, 123, 0.22), transparent 55%),
    radial-gradient(400px 200px at 0% 100%, rgba(245, 133, 41, 0.18), transparent 50%),
    linear-gradient(170deg, rgba(131, 58, 180, 0.14), rgba(253, 29, 29, 0.05));
}

.ig-profile-left { flex: 1; min-width: 200px; }

.ig-dot-lg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-ig {
  color: #fff;
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
  border-color: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-ig:hover { opacity: 0.88; }

.btn-yt {
  color: #fff;
  background: linear-gradient(135deg, #ff0033, #cc0000);
  border-color: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-yt:hover { opacity: 0.88; }

/* ── Embedded reels section ──────────────────────── */
.ig-embeds-wrap { margin-top: 30px; }

.yt-embeds-wrap { margin-top: 24px; }

.yt-profile-banner {
  margin-top: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 24px;
  background:
    radial-gradient(600px 240px at 90% 0%, rgba(255, 0, 51, 0.2), transparent 55%),
    radial-gradient(400px 200px at 0% 100%, rgba(255, 255, 255, 0.08), transparent 50%),
    linear-gradient(170deg, rgba(180, 28, 48, 0.25), rgba(151, 16, 16, 0.12));
}

.yt-dot {
  background: linear-gradient(135deg, #ff4d4d, #cc0000);
  box-shadow: 0 0 0 6px rgba(255, 77, 77, 0.16);
}

.ig-quick-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ig-embeds-title {
  margin: 0 0 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
}

.ig-embeds-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.yt-embeds-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.ig-embed-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.ig-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #0c121a;
  overflow: hidden;
}

.ig-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ig-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b8c7d8;
  font-size: 0.9rem;
}

.ig-card-body {
  padding: 10px;
}

.ig-card-caption {
  margin: 0;
  color: #d9e4ef;
  font-size: 0.84rem;
  line-height: 1.35;
  min-height: 2.7em;
}

.ig-card-meta {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  color: #adc1d6;
  font-size: 0.78rem;
}

.ig-card-link {
  display: inline-block;
  margin-top: 8px;
  color: #ffd99e;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}

.yt-embed-item {
  border-color: rgba(255, 77, 77, 0.28);
}

.wall-view-all-wrap {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.wall-view-all[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* ── iframe fix: aspect-ratio parent needs relative positioning
   so height:100% on child resolves correctly ──────────────── */
.yt-frame-wrap {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #080b0f;
  position: relative;
  overflow: hidden;
}

.yt-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Wall tabs ─────────────────────────────────────────────── */
.wall-tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 0;
}

.wall-tab {
  appearance: none;
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.wall-tab:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.wall-tab.active {
  background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(34,211,238,0.14));
  border-color: rgba(245, 158, 11, 0.55);
  color: var(--text);
}

/* YouTube tab active state gets a red accent */
.wall-tab.active[data-wall="youtube"] {
  background: linear-gradient(135deg, rgba(255,0,51,0.2), rgba(204,0,0,0.12));
  border-color: rgba(255, 51, 51, 0.55);
}

/* ── Wall panels ───────────────────────────────────────────── */
.wall-panel { margin-top: 18px; }

.wall-panel--hidden { display: none; }

.ig-badge-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.ig-badge-head p {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd9a4;
}

.ig-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f58529, #dd2a7b);
  box-shadow: 0 0 0 6px rgba(245, 133, 41, 0.15);
}

.ig-page-copy {
  margin: 0 0 14px;
  color: #d8e4ef;
}

#ig-page-link[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

#yt-channel-link[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 20px;
  color: #9fb0c2;
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal 700ms ease forwards;
}

.reveal:nth-of-type(2) { animation-delay: 70ms; }
.reveal:nth-of-type(3) { animation-delay: 140ms; }

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .pipeline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig-embeds-grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .yt-embeds-grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .ig-embed-item {
    min-width: min(78vw, 360px);
    max-width: min(78vw, 360px);
    scroll-snap-align: start;
    flex-shrink: 0;
  }
  .yt-embed-item {
    min-width: min(78vw, 360px);
    max-width: min(78vw, 360px);
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .hero { padding-bottom: 54px; }
  .nav { align-items: center; }
  .menu-toggle { display: inline-flex; }
  .actions { display: none; }

  .mobile-menu {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 45;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(11, 17, 24, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    gap: 8px;
    flex-direction: column;
  }

  .mobile-menu.open {
    display: flex;
  }

  .hero-cta,
  .snapshot-cta,
  .ig-quick-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero-cta .btn,
  .snapshot-cta .btn,
  .ig-quick-actions .btn {
    width: 100%;
    text-align: center;
  }
  .wall-view-all-wrap {
    justify-content: stretch;
  }
  .wall-view-all-wrap .btn {
    width: 100%;
    text-align: center;
  }
  .actions .btn {
    width: 100%;
    text-align: center;
  }
  .pipeline-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .api-config-row { grid-template-columns: 1fr; }
  .ig-embeds-grid { padding-bottom: 4px; }
  .ig-embed-item {
    min-width: min(86vw, 360px);
    max-width: min(86vw, 360px);
    scroll-snap-align: start;
    flex-shrink: 0;
  }
  .ig-profile-banner { flex-direction: column; align-items: flex-start; }
}
