/* ─── PromoFinder — Shared Stylesheet ───────────────────────────────────── */

/* Typography — Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ─── Base ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.025em;
  line-height: 1.2;
}

/* ─── Scrollbar hide ─────────────────────────────────────────────────────── */
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ─── Glass effect (enhanced) ───────────────────────────────────────────── */
.glass-effect {
  background: rgba(13, 19, 36, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ─── Site navigation ───────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 13, 24, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.45);
}

.site-nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
}

.site-logo-text {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: white;
}

.site-logo-text span {
  color: #10b981;
}

.site-nav-external {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav-external:hover { color: #e2e8f0; }

.tool-strip {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  padding-right: 96px;
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.75) transparent;
}

.tool-strip::-webkit-scrollbar {
  height: 6px;
}

.tool-strip::-webkit-scrollbar-track {
  background: transparent;
}

.tool-strip::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.75);
  border-radius: 999px;
}

.tool-strip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 10px;
  width: 20px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(8, 13, 24, 0.9), rgba(8, 13, 24, 0));
}

.tool-strip::after {
  content: "Scroll tools ->";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px 0 28px;
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  color: #94a3b8;
  pointer-events: none;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(8, 13, 24, 0), rgba(8, 13, 24, 0.95) 34%);
  animation: scroll-hint-pulse 1.8s ease-in-out infinite;
}

.tool-strip:hover::after,
.tool-strip:focus-within::after {
  opacity: 0.38;
  animation: none;
}

@keyframes scroll-hint-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@media (min-width: 1280px) {
  .tool-strip {
    padding-right: 74px;
  }

  .tool-strip::after {
    content: "More ->";
    font-size: 0.6rem;
  }
}

.tool-chip {
  flex-shrink: 0;
  display: inline-block;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  border: 1px solid transparent;
}

.tool-chip:hover {
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.45);
}

/* Active chip colours per tool */
.chip-active-emerald { background: rgba(16,185,129,0.12); color: #34d399 !important; border-color: rgba(16,185,129,0.25); font-weight: 600; }
.chip-active-orange  { background: rgba(249,115,22,0.12);  color: #fb923c !important; border-color: rgba(249,115,22,0.25);  font-weight: 600; }
.chip-active-purple  { background: rgba(168,85,247,0.12);  color: #c084fc !important; border-color: rgba(168,85,247,0.25);  font-weight: 600; }
.chip-active-blue    { background: rgba(59,130,246,0.12);   color: #60a5fa !important; border-color: rgba(59,130,246,0.25);   font-weight: 600; }
.chip-active-amber   { background: rgba(245,158,11,0.12);   color: #fbbf24 !important; border-color: rgba(245,158,11,0.25);   font-weight: 600; }
.chip-active-pink    { background: rgba(236,72,153,0.12);   color: #f472b6 !important; border-color: rgba(236,72,153,0.25);   font-weight: 600; }
.chip-active-teal    { background: rgba(20,184,166,0.12);   color: #2dd4bf !important; border-color: rgba(20,184,166,0.25);   font-weight: 600; }
.chip-active-rose    { background: rgba(244,63,94,0.12);    color: #fb7185 !important; border-color: rgba(244,63,94,0.25);    font-weight: 600; }
.chip-active-violet  { background: rgba(139,92,246,0.12);   color: #a78bfa !important; border-color: rgba(139,92,246,0.25);   font-weight: 600; }
.chip-active-lime    { background: rgba(132,204,22,0.12);   color: #a3e635 !important; border-color: rgba(132,204,22,0.25);   font-weight: 600; }
.chip-active-cyan    { background: rgba(6,182,212,0.12);    color: #22d3ee !important; border-color: rgba(6,182,212,0.25);    font-weight: 600; }
.chip-active-sky     { background: rgba(14,165,233,0.12);   color: #38bdf8 !important; border-color: rgba(14,165,233,0.25);   font-weight: 600; }

/* ─── Mesh / Orb backgrounds ────────────────────────────────────────────── */
.orb-1 {
  position: fixed; top: -15vh; right: -10vw;
  width: 55vw; height: 55vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,0.055) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}

.orb-2 {
  position: fixed; bottom: -20vh; left: -8vw;
  width: 45vw; height: 45vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.035) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}

/* ─── Card styles ────────────────────────────────────────────────────────── */
.pf-card {
  background: rgba(13, 19, 36, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.pf-card:hover {
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.06);
  transform: translateY(-1px);
}

/* ─── Badge pill ─────────────────────────────────────────────────────────── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(13, 19, 36, 0.65);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 0.78rem;
  font-weight: 500;
  color: #34d399;
  backdrop-filter: blur(12px);
}

/* ─── Gradient text ─────────────────────────────────────────────────────── */
.gradient-text-main {
  background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Hero section ──────────────────────────────────────────────────────── */
.hero-grid {
  background-image:
    linear-gradient(rgba(16,185,129,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,185,129,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ─── Animations ────────────────────────────────────────────────────────── */
.fade-in { animation: fadein 0.4s ease-out; }
@keyframes fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slide-in { animation: slidein 0.5s ease-out; }
@keyframes slidein {
  from { opacity: 0; transform: translateX(-10px);}
  to   { opacity: 1; transform: translateX(0); }
}

.spin { animation: spin 1s linear infinite; }
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
.float { animation: float 4s ease-in-out infinite; }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.25); }
  70%  { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.pulse-ring { animation: pulse-ring 2.5s ease-out infinite; }

/* ─── Form inputs ────────────────────────────────────────────────────────── */
input[type="text"], input[type="url"], input[type="search"] {
  transition: box-shadow 0.2s, border-color 0.2s;
}

input[type="text"]:focus, input[type="url"]:focus, input[type="search"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.pf-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(51, 65, 85, 0.35);
}

/* ─── Step cards ─────────────────────────────────────────────────────────── */
.step-number {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 800;
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
  border: 1px solid rgba(16,185,129,0.2);
  color: #10b981;
}

/* ─── Misc ───────────────────────────────────────────────────────────────── */
.mono { font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace; }
details[open] summary ~ * { animation: slidein 0.3s ease-out; }
.copy-btn { transition: all 0.2s ease; }
.copy-btn:active { transform: scale(0.92); }

section[id] {
  scroll-margin-top: 88px;
}

.mobile-quick-jump {
  display: none;
}

/* ─── Mobile usability improvements ─────────────────────────────────────── */
@media (max-width: 768px) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .site-nav-inner {
    padding: 0 0.75rem;
  }

  .site-nav-top {
    height: 52px;
  }

  .site-logo-mark {
    width: 30px;
    height: 30px;
  }

  .site-logo-text {
    font-size: 0.98rem;
  }

  .site-nav-external {
    display: none;
  }

  .tool-strip {
    gap: 8px;
    padding-right: 82px;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .tool-strip::before {
    width: 14px;
    bottom: 8px;
  }

  .tool-strip::after {
    right: 2px;
    height: 24px;
    padding: 0 8px 0 20px;
    font-size: 0.58rem;
    letter-spacing: 0.01em;
  }

  .tool-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.78rem;
    scroll-snap-align: start;
  }

  .pf-footer {
    margin-top: 3rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }

  .mobile-quick-jump {
    position: fixed;
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 65;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    background: rgba(8, 13, 24, 0.88);
    backdrop-filter: blur(10px);
    color: #d1fae5;
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.52);
  }

  .mobile-quick-jump:hover,
  .mobile-quick-jump:focus-visible {
    color: #ecfeff;
    border-color: rgba(34, 211, 238, 0.45);
    outline: none;
  }

  .mobile-dense-card {
    border-radius: 0.95rem !important;
  }

  .mobile-dense-card .mono {
    overflow-wrap: anywhere;
  }

  input[type="text"],
  input[type="url"],
  input[type="search"],
  select,
  textarea,
  button {
    font-size: 16px;
  }

  button {
    touch-action: manipulation;
  }
}

/* ─── Speakly affiliate announcement bar ──────────────────────────────────── */
.speakly-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 42px 6px 12px;
  background: linear-gradient(90deg, rgba(109,40,217,0.08) 0%, rgba(139,92,246,0.06) 50%, rgba(109,40,217,0.08) 100%);
  border-bottom: 1px solid rgba(139,92,246,0.18);
  font-size: 0.73rem;
  color: #c4b5fd;
  position: relative;
  min-height: 34px;
  overflow: hidden;
}

.speakly-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: inherit;
  flex-wrap: wrap;
  justify-content: center;
  line-height: 1.35;
}

.speakly-bar-link:hover { color: #e9d5ff; }

.speakly-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 100px;
  background: rgba(139,92,246,0.2);
  border: 1px solid rgba(139,92,246,0.35);
  color: #a78bfa;
  font-weight: 600;
  font-size: 0.68rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.speakly-dismiss {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #7c3aed;
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.speakly-dismiss:hover {
  color: #c4b5fd;
  background: rgba(139,92,246,0.15);
}

/* ─── Hamburger nav button (mobile only) ──────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(51,65,85,0.55);
  background: rgba(15,23,42,0.45);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}

.nav-hamburger:hover {
  border-color: rgba(100,116,139,0.65);
  background: rgba(30,41,59,0.55);
}

.nav-hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: #94a3b8;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ─── Mobile nav dropdown menu ────────────────────────────────────────────── */
.nav-mobile-menu {
  display: none;
  padding: 10px 0 14px;
  border-top: 1px solid rgba(51,65,85,0.3);
}

.nav-mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.nav-mobile-chip {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  background: rgba(15,23,42,0.4);
  border: 1px solid rgba(51,65,85,0.4);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-mobile-chip:hover {
  color: #cbd5e1;
  background: rgba(30,41,59,0.6);
  border-color: rgba(100,116,139,0.4);
}

.nav-mobile-chip.active-emerald { color: #34d399; background: rgba(16,185,129,0.1);  border-color: rgba(16,185,129,0.25); font-weight: 600; }
.nav-mobile-chip.active-orange  { color: #fb923c; background: rgba(249,115,22,0.1);  border-color: rgba(249,115,22,0.25);  font-weight: 600; }
.nav-mobile-chip.active-purple  { color: #c084fc; background: rgba(168,85,247,0.1);  border-color: rgba(168,85,247,0.25);  font-weight: 600; }
.nav-mobile-chip.active-blue    { color: #60a5fa; background: rgba(59,130,246,0.1);   border-color: rgba(59,130,246,0.25);  font-weight: 600; }
.nav-mobile-chip.active-amber   { color: #fbbf24; background: rgba(245,158,11,0.1);   border-color: rgba(245,158,11,0.25);  font-weight: 600; }
.nav-mobile-chip.active-pink    { color: #f472b6; background: rgba(236,72,153,0.1);   border-color: rgba(236,72,153,0.25);  font-weight: 600; }
.nav-mobile-chip.active-teal    { color: #2dd4bf; background: rgba(20,184,166,0.1);   border-color: rgba(20,184,166,0.25);  font-weight: 600; }
.nav-mobile-chip.active-rose    { color: #fb7185; background: rgba(244,63,94,0.1);    border-color: rgba(244,63,94,0.25);   font-weight: 600; }
.nav-mobile-chip.active-violet  { color: #a78bfa; background: rgba(139,92,246,0.1);   border-color: rgba(139,92,246,0.25);  font-weight: 600; }
.nav-mobile-chip.active-lime    { color: #a3e635; background: rgba(132,204,22,0.1);   border-color: rgba(132,204,22,0.25);  font-weight: 600; }
.nav-mobile-chip.active-cyan    { color: #22d3ee; background: rgba(6,182,212,0.1);    border-color: rgba(6,182,212,0.25);   font-weight: 600; }
.nav-mobile-chip.active-sky     { color: #38bdf8; background: rgba(14,165,233,0.1);   border-color: rgba(14,165,233,0.25);  font-weight: 600; }

/* Mobile: show hamburger & dropdown, hide scrollable strip */
@media (max-width: 767px) {
  .nav-hamburger { display: flex; }
  .tool-strip { display: none !important; }
  .nav-mobile-menu.open { display: block; animation: fadein 0.18s ease-out; }
}

/* Large desktop: wrap all chips so all tools are visible without scrolling */
@media (min-width: 1280px) {
  .tool-strip {
    flex-wrap: wrap;
    overflow: visible;
    padding-right: 0;
    scrollbar-width: none;
  }
  .tool-strip::after,
  .tool-strip::before { display: none; }
}
