/* ============================================================
   OmniGrab — styles
   Light + dark, theme via [data-theme] on <html>
   ============================================================ */
:root {
  --bg:            #ffffff;
  --bg-alt:        #f5f6fb;
  --surface:       #ffffff;
  --surface-2:     #f0f1f8;
  --border:        #e6e7f0;
  --text:          #14151f;
  --text-soft:     #565a72;
  --text-faint:    #8b8fa8;
  --brand:         #6d5efc;
  --brand-2:       #22d3ee;
  --brand-ink:     #ffffff;
  --ok:            #16a34a;
  --danger:        #e11d48;
  --shadow:        0 10px 30px rgba(20, 21, 40, .08);
  --shadow-lg:     0 30px 60px rgba(20, 21, 40, .14);
  --radius:        16px;
  --radius-sm:     11px;
  --maxw:          1120px;
}
:root[data-theme="dark"] {
  --bg:            #0b0c14;
  --bg-alt:        #0f1120;
  --surface:       #14162a;
  --surface-2:     #1b1e36;
  --border:        #262a47;
  --text:          #f2f3fb;
  --text-soft:     #b3b7d4;
  --text-faint:    #7b80a6;
  --brand:         #8b7cff;
  --brand-2:       #34e0f0;
  --brand-ink:     #0b0c14;
  --shadow:        0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg:     0 30px 70px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .brand__name { font-family: "Sora", "Inter", sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; }

.grad {
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Sora", sans-serif; font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  color: var(--brand-ink);
  box-shadow: 0 8px 22px -6px color-mix(in srgb, var(--brand) 70%, transparent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -6px color-mix(in srgb, var(--brand) 75%, transparent); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 16px 30px; font-size: 17px; }
.icon-btn {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  width: 40px; height: 40px; border-radius: 999px; cursor: pointer; font-size: 17px;
  display: grid; place-items: center; transition: background .2s;
}
.icon-btn:hover { background: var(--border); }
.linklike {
  background: none; border: none; color: var(--brand); cursor: pointer;
  font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 2px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 9px; display: block;
  object-fit: cover; background: #fff; box-shadow: var(--shadow);
}
.brand__name { font-size: 19px; letter-spacing: -.02em; }
.brand__name span { color: var(--brand); }
.nav__links { display: flex; gap: 26px; margin-left: auto; font-size: 15px; font-weight: 500; color: var(--text-soft); }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Auth ---------- */
.auth { display: flex; align-items: center; }
.auth__user { display: inline-flex; align-items: center; gap: 8px; }
.auth__avatar { width: 30px; height: 30px; border-radius: 999px; object-fit: cover; background: var(--surface-2); }
.auth__avatar--fallback { display: grid; place-items: center; font-weight: 700; color: var(--brand-ink); background: linear-gradient(135deg, var(--brand), var(--brand-2)); font-size: 14px; }
.auth__name { font-size: 14px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth__signout { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft); font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.auth__signout:hover { background: var(--border); color: var(--text); }
.btn--ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }

/* ---------- Ad slots ---------- */
.ad { margin: 28px auto; text-align: center; }
.ad__label { display: block; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.ad__box {
  display: grid; place-items: center; min-height: 90px; padding: 18px;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  background: var(--bg-alt); color: var(--text-faint); font-size: 13.5px;
}
.ad--leaderboard .ad__box { max-width: 728px; margin: 0 auto; }
.ad--rect .ad__box { min-height: 160px; }
/* Hidden when ads are disabled or the user is signed in. */
body.ads-off .ad,
body.is-signed-in .ad { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero__glow {
  position: absolute; inset: -40% 0 auto 0; height: 620px; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 30% 20%, color-mix(in srgb, var(--brand) 40%, transparent), transparent 70%),
    radial-gradient(500px 300px at 75% 10%, color-mix(in srgb, var(--brand-2) 35%, transparent), transparent 70%);
  filter: blur(10px); opacity: .8;
}
.hero__inner { position: relative; z-index: 1; text-align: center; }
.hero__logo {
  display: block; width: 220px; max-width: 62vw; height: auto; margin: 0 auto 22px;
  border-radius: 26px; box-shadow: var(--shadow-lg);
}
.pill {
  display: inline-block; padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-soft); box-shadow: var(--shadow);
}
.hero__title { font-size: clamp(38px, 6.4vw, 68px); line-height: 1.04; letter-spacing: -.03em; margin: 22px 0 0; font-weight: 800; }
.hero__sub { max-width: 640px; margin: 20px auto 0; color: var(--text-soft); font-size: clamp(16px, 2.2vw, 19px); }
.hero__stats { display: flex; justify-content: center; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats strong { font-family: "Sora"; font-size: 30px; }
.hero__stats span { color: var(--text-faint); font-size: 13.5px; }

/* ---------- Grabber tool ---------- */
.grabber {
  max-width: 720px; margin: 36px auto 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-lg);
}
.grabber__form { display: flex; align-items: center; gap: 10px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 999px; padding: 6px 6px 6px 16px; }
.grabber__form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.grabber__icon { font-size: 17px; opacity: .7; }
.grabber__input { flex: 1; min-width: 0; border: none; background: none; color: var(--text); font-size: 15.5px; padding: 10px 0; outline: none; }
.grabber__input::placeholder { color: var(--text-faint); }
.grabber__hint { text-align: center; color: var(--text-faint); font-size: 13.5px; margin-top: 12px; }
.grabber__hint.is-error { color: var(--danger); }

/* spinner */
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--brand-ink) 40%, transparent); border-top-color: var(--brand-ink); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading .btn__label { opacity: .55; }

/* ---------- Result card ---------- */
.result { margin-top: 18px; text-align: left; animation: rise .35s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.vcard { display: flex; gap: 16px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.vcard__thumb { position: relative; width: 168px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); aspect-ratio: 16/9; }
.vcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.vcard__dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.78); color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 6px; }
.vcard__body { min-width: 0; flex: 1; }
.vcard__plat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-soft); text-transform: capitalize; }
.vcard__title { font-size: 16.5px; font-weight: 600; margin: 6px 0 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.formats { display: flex; flex-direction: column; gap: 8px; }
.format {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.format__q { font-weight: 600; font-size: 14.5px; }
.format__meta { color: var(--text-faint); font-size: 13px; margin-left: 2px; }
.format__size { margin-left: auto; color: var(--text-soft); font-size: 13px; }
.format .btn { padding: 8px 16px; font-size: 13.5px; }
.format .btn.is-downloading { opacity: .8; pointer-events: none; }
.result__note { margin-top: 14px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); color: var(--text); }
.formats__note { margin-top: 12px; color: var(--text-faint); font-size: 12.5px; text-align: center; }
.result__error { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--text); padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14.5px; }
.result__error b { color: var(--danger); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__title { text-align: center; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; margin: 0; }
.section__lead { text-align: center; color: var(--text-soft); margin: 12px auto 48px; max-width: 560px; font-size: 17px; }

.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--text-soft); font-size: 15px; }

/* platforms */
.platforms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 860px; margin: 0 auto; }
.platform { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.platform h3 { margin: 0 0 3px; font-size: 17px; }
.platform p { margin: 0; color: var(--text-soft); font-size: 14px; }
.platform--soon { opacity: .62; }
.platform__logo { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 700; }
.platform__logo.yt { background: #ff0033; }
.platform__logo.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.platform__logo.fb { background: #1877f2; font-family: Georgia, serif; }
.platform__logo.tk { background: #010101; }
.badge { margin-left: auto; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border); }
.badge--ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }

/* steps */
.steps { display: flex; align-items: stretch; justify-content: center; gap: 8px; flex-wrap: wrap; }
.step { flex: 1; min-width: 220px; max-width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; text-align: center; box-shadow: var(--shadow); }
.step__num { width: 42px; height: 42px; margin: 0 auto 14px; border-radius: 999px; display: grid; place-items: center; font-family: "Sora"; font-weight: 700; color: var(--brand-ink); background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--text-soft); font-size: 15px; }
.step__arrow { display: grid; place-items: center; font-size: 24px; color: var(--text-faint); }

/* faq */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 20px; box-shadow: var(--shadow); }
.faq__item summary { cursor: pointer; font-weight: 600; font-family: "Sora"; font-size: 16.5px; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 22px; color: var(--brand); font-weight: 400; transition: transform .2s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin: 0 0 18px; color: var(--text-soft); font-size: 15px; }

/* cta */
.cta { padding: 90px 0; text-align: center; }
.cta__inner {
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 18%, var(--surface)), color-mix(in srgb, var(--brand-2) 16%, var(--surface)));
  border: 1px solid var(--border); border-radius: 26px; padding: 56px 24px; box-shadow: var(--shadow-lg);
}
.cta h2 { font-size: clamp(26px, 4vw, 38px); margin: 0; letter-spacing: -.02em; }
.cta p { color: var(--text-soft); margin: 10px 0 26px; font-size: 17px; }

/* footer */
.footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 56px 0 28px; }
.footer__inner { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
.footer__brand { max-width: 260px; }
.footer__brandrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.footer__brand .brand__mark { width: 34px; height: 34px; }
.footer__brand p { color: var(--text-soft); font-size: 14.5px; margin: 12px 0 0; }
.footer__cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer__cols h4 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.footer__cols a { display: block; color: var(--text-soft); font-size: 15px; padding: 4px 0; }
.footer__cols a:hover { color: var(--text); }
.footer__bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 13.5px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .step__arrow { display: none; }
}
@media (max-width: 620px) {
  .grid--3 { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: 1fr; }
  .vcard { flex-direction: column; }
  .vcard__thumb { width: 100%; }
  .hero__stats { gap: 28px; }
  .btn__label--full { display: none; }
}
