/* ============================================================
   ClipNest — stylesheet
   Light theme, mobile-first. Single file, no framework.
   ============================================================ */

:root {
  --ink: #0f1117;
  --ink-2: #2b3240;
  --muted: #616b7d;
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --bg-sunk: #eef0f4;
  --line: #e3e7ee;
  --line-strong: #cfd6e2;

  --accent: #ff3b5c;
  --accent-ink: #d81e42;
  --accent-soft: #fff1f4;
  --violet: #7c5cff;
  --amber: #b26a00;
  --amber-soft: #fff8ec;
  --amber-line: #f3dcb0;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 17, 23, .06), 0 1px 3px rgba(15, 17, 23, .04);
  --shadow: 0 4px 14px rgba(15, 17, 23, .07), 0 1px 3px rgba(15, 17, 23, .05);
  --shadow-lg: 0 18px 48px rgba(15, 17, 23, .11);
  --wrap: 1120px;
  --wrap-narrow: 780px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.22; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.018em; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.9rem); }
h3 { font-size: 1.075rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: .875em; background: var(--bg-sunk); padding: .12em .42em; border-radius: 5px; color: var(--ink); }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .35rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: var(--wrap-narrow); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------------- header ---------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 18px; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; color: var(--ink); font-size: 1.08rem; letter-spacing: -.02em; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo svg { color: var(--accent); }

.site-nav { display: none; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-2); font-size: .875rem; font-weight: 550; padding: 6px 10px;
  border-radius: 8px; white-space: nowrap;
}
.site-nav a:hover { background: var(--bg-alt); text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }

.site-header__actions { display: none; gap: 8px; margin-left: auto; }
.site-nav + .site-header__actions { margin-left: 12px; }

.nav-toggle {
  margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line);
  background: #fff; border-radius: 10px; display: grid; place-content: center; gap: 4px; cursor: pointer;
}
.nav-toggle span { display: block; width: 17px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------------- network nav ---------------- */
/* Sister-site bar. Small on purpose: it should be discoverable, not noisy. */

.netnav {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.netnav__inner { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.netnav__label {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); flex-shrink: 0;
}
.netnav__list {
  display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; margin: 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.netnav__list::-webkit-scrollbar { display: none; }
.netnav__list li { margin: 0; flex-shrink: 0; }
.netnav__list a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 600; color: var(--ink-2);
  padding: 5px 11px; border-radius: 999px; white-space: nowrap; transition: .14s;
}
.netnav__list a:hover { background: #fff; text-decoration: none; box-shadow: var(--shadow-sm); }
.netnav__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--plat, var(--accent)); flex-shrink: 0;
}
.netnav__soon {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 600; color: #a3abb9;
  padding: 5px 11px; border-radius: 999px; white-space: nowrap; cursor: default;
}
.netnav__soon .netnav__dot { opacity: .4; }

/* unlaunched sister cards render as disabled cards, never as links */
.platcard--soon { opacity: .62; cursor: default; }
.platcard--soon:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--line); }
.platcard--soon .platcard__more { color: var(--muted); font-weight: 600; }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 650; font-size: .92rem;
  padding: 10px 17px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: .16s ease; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #000; box-shadow: var(--shadow); }
.btn--ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--lg { padding: 14px 28px; font-size: 1rem; border-radius: 12px; }

/* ---------------- hero ---------------- */

.hero {
  padding: 52px 0 40px;
  background:
    radial-gradient(900px 380px at 12% -8%, #fff0f3 0%, rgba(255,255,255,0) 62%),
    radial-gradient(760px 340px at 88% 0%, #f0edff 0%, rgba(255,255,255,0) 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero--compact { padding: 34px 0 30px; }
.hero__inner { max-width: 860px; margin: 0 auto; text-align: center; }
.hero h1 { margin-bottom: .35em; }
.grad {
  background: linear-gradient(96deg, var(--accent) 0%, var(--violet) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--accent);
}
.hero__sub { font-size: 1.06rem; color: var(--muted); max-width: 640px; margin: 0 auto 26px; }
.hero--compact .hero__sub { margin-bottom: 22px; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent-soft); border: 1px solid #ffd9e0;
  padding: 5px 12px; border-radius: 999px; margin: 0 0 18px;
}

/* ---------------- downloader widget ---------------- */

.dl { max-width: 700px; margin: 0 auto; text-align: left; }
.dl__row {
  display: flex; gap: 8px; background: #fff; padding: 8px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); transition: border-color .16s, box-shadow .16s;
}
.dl__row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 59, 92, .12), var(--shadow); }
.dl__input {
  flex: 1; min-width: 0; border: 0; background: transparent; font: inherit;
  padding: 12px 14px; color: var(--ink); outline: none;
}
.dl__input::placeholder { color: #99a2b3; }
.dl__submit {
  border: 0; background: var(--ink); color: #fff; font: inherit; font-weight: 650;
  padding: 12px 24px; border-radius: 999px; cursor: pointer; transition: .16s; white-space: nowrap;
}
.dl__submit:hover { background: #000; }
.dl__submit:disabled { opacity: .55; cursor: progress; }
.dl__meta { display: flex; justify-content: space-between; gap: 12px; padding: 10px 6px 0; font-size: .82rem; color: var(--muted); }
.dl__spinner { color: var(--accent-ink); font-weight: 600; }
.dl__result { margin-top: 14px; display: grid; gap: 8px; }
.dl__error {
  margin-top: 14px; padding: 13px 15px; border-radius: var(--radius-sm);
  background: #fff5f5; border: 1px solid #ffd3d3; color: #9c1c1c; font-size: .9rem;
}

.res {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; box-shadow: var(--shadow-sm);
}
.res__label { font-weight: 650; color: var(--ink); font-size: .93rem; }
.res__detail { color: var(--muted); font-size: .84rem; }
.res__size { margin-left: auto; font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.res__btn {
  border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 650;
  font-size: .85rem; padding: 8px 16px; border-radius: 999px; cursor: pointer;
}
.res__btn:hover { background: var(--accent-ink); text-decoration: none; }
.res__note {
  font-size: .68rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 7px; cursor: help;
}
.res__alt {
  font-size: .78rem; font-weight: 600; color: var(--muted); padding: 4px 2px;
  border-bottom: 1px dashed var(--line-strong);
}
.res__alt:hover { color: var(--accent-ink); border-color: var(--accent); text-decoration: none; }
.res__tip { margin: 4px 0 0; font-size: .82rem; color: var(--muted); }

/* ---------------- chips / trust ---------------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .85rem; font-weight: 600; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; box-shadow: var(--shadow-sm); transition: .16s;
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--plat, var(--accent)); }
.chip:hover { border-color: var(--plat, var(--accent)); text-decoration: none; transform: translateY(-1px); }

.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; list-style: none; padding: 0; margin: 26px 0 0; font-size: .84rem; color: var(--muted); }
.trust li { display: flex; align-items: center; gap: 7px; margin: 0; }
.trust li::before { content: "✓"; color: #16a34a; font-weight: 800; }

/* ---------------- sections ---------------- */

.section { padding: 56px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section__head h2 { margin-bottom: .15em; }
.section__head p { margin: 0; }

/* ---------------- filters + feed ---------------- */

.filters { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 20px; }
.filter {
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px; cursor: pointer; transition: .14s;
}
.filter:hover { border-color: var(--line-strong); }
.filter.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 18px; align-items: start; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: .18s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card[hidden] { display: none; }
.card__thumb { position: relative; background: var(--bg-sunk); aspect-ratio: 16 / 9; }
.card__thumb.is-vertical { aspect-ratio: 9 / 13; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__plat {
  position: absolute; top: 9px; left: 9px; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: #fff;
  background: color-mix(in srgb, var(--plat) 82%, #000); padding: 3px 9px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.card__dur {
  position: absolute; bottom: 9px; right: 9px; font-size: .72rem; font-weight: 650;
  color: #fff; background: rgba(0, 0, 0, .62); padding: 2px 7px; border-radius: 5px;
  font-variant-numeric: tabular-nums;
}
.card__body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title { font-size: .95rem; margin: 0; line-height: 1.38; }
.card__meta { margin: 0; font-size: .78rem; color: var(--muted); }
.card__foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; }
.tag {
  font-size: .72rem; font-weight: 650; color: var(--muted);
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px;
}
.card__grab {
  margin-left: auto; font: inherit; font-size: .8rem; font-weight: 650;
  color: var(--accent-ink); background: var(--accent-soft); border: 1px solid #ffd9e0;
  padding: 5px 12px; border-radius: 999px; cursor: pointer; transition: .14s;
}
.card__grab:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------------- steps / features ---------------- */

.steps { list-style: none; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0; box-shadow: var(--shadow-sm); }
.steps__n {
  display: grid; place-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: .88rem; margin-bottom: 12px;
}
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; color: var(--muted); font-size: .92rem; }
.steps--inline { grid-template-columns: 1fr; gap: 12px; }
.steps--inline li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.steps--inline .steps__n { margin: 0; flex-shrink: 0; }
.steps--inline p { color: var(--ink-2); }

.features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); margin-top: 28px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.feature h3 { margin-bottom: .35em; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------------- platform grid ---------------- */

.platgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); margin-top: 26px; }
.platcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); transition: .18s ease; color: inherit; display: block;
}
.platcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; border-color: var(--plat); }
.platcard__dot { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--plat); margin-bottom: 12px; }
.platcard h3 { margin-bottom: .3em; font-size: 1rem; }
.platcard p { margin: 0 0 10px; font-size: .875rem; color: var(--muted); }
.platcard__more { font-size: .82rem; font-weight: 650; color: var(--accent-ink); }

/* ---------------- prose / tables / callouts ---------------- */

.prose > h2 { margin-top: 2em; padding-top: .2em; }
.prose > h2:first-child { margin-top: 0; }
.prose > p, .prose li { color: var(--ink-2); }

.table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--bg-alt); font-weight: 650; color: var(--ink); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.table td:last-child { white-space: nowrap; }

.urls { list-style: none; padding: 0; }
.urls li { margin-bottom: .5rem; }
.urls code { display: inline-block; word-break: break-all; }

.callout { background: var(--bg-alt); border: 1px solid var(--line); border-left: 3px solid var(--violet); border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 1.4rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout--warn { background: var(--amber-soft); border-color: var(--amber-line); border-left-color: var(--amber); }

/* ---------------- FAQ ---------------- */

.faq { margin-top: 24px; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-bottom: 9px; overflow: hidden; }
.faq__item[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq__item summary { cursor: pointer; padding: 15px 18px; list-style: none; display: flex; align-items: center; gap: 12px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; margin-left: auto; font-size: 1.3rem; color: var(--muted); line-height: 1; }
.faq__item[open] summary::after { content: "–"; }
.faq__item summary h3 { margin: 0; font-size: .97rem; font-weight: 650; }
.faq__body { padding: 0 18px 16px; color: var(--muted); font-size: .93rem; }
.faq__body p { margin: 0; }

/* ---------------- blog ---------------- */

.postgrid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 26px; }
.postcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); transition: .18s; color: inherit; display: block; }
.postcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; border-color: var(--line-strong); }
.postcard h2 { font-size: 1.15rem; margin: .5em 0 .4em; }
.postcard p { color: var(--muted); font-size: .92rem; margin-bottom: .7em; }
.postcard__tags { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- ads ---------------- */

.ad-slot {
  display: grid; place-items: center; gap: 4px;
  background: repeating-linear-gradient(45deg, #fafbfc 0 10px, #f4f6f8 10px 20px);
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  color: #9aa3b2; text-align: center; padding: 18px; overflow: hidden;
}
.ad-slot__label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.ad-slot--leaderboard { min-height: 96px; margin: 26px auto; max-width: 970px; }
.ad-slot--inline { min-height: 220px; }
@media (min-width: 900px) { .ad-slot--leaderboard { min-height: 112px; } }

/* ---------------- footer ---------------- */

.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 52px 0 26px; margin-top: 0; font-size: .9rem; }
.site-footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
.site-footer h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .9em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--accent-ink); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.site-footer__bottom p { margin: 0; }

/* ---------------- crumbs + cta ---------------- */

.crumbs { padding-top: 16px; font-size: .82rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 0; }
.crumbs li { margin: 0; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 7px; color: var(--line-strong); }

.cta { background: var(--ink); color: #fff; padding: 62px 0; text-align: center; }
.cta h2 { color: #fff; }
.cta .muted { color: #a8b0bf; margin-bottom: 24px; }
.cta .btn--primary { background: #fff; color: var(--ink); }
.cta .btn--primary:hover { background: #f0f2f5; }

/* ---------------- responsive ---------------- */

@media (min-width: 780px) {
  .site-footer__grid { grid-template-columns: 1.6fr 1fr 1.2fr 1fr; }
  .steps--inline { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1000px) {
  .site-nav { display: flex; }
  .site-header__actions { display: flex; }
  .nav-toggle { display: none; }
}

/* mobile nav drawer */
@media (max-width: 999px) {
  .site-header__inner { flex-wrap: wrap; height: auto; padding-block: 11px; }
  .nav-toggle { display: grid; }
  .site-header.is-open .site-nav,
  .site-header.is-open .site-header__actions { display: flex; width: 100%; margin: 8px 0 4px; }
  .site-header.is-open .site-nav { flex-direction: column; }
  .site-header.is-open .site-header__actions { margin-top: 0; }
}

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

@media print {
  .site-header, .site-footer, .ad-slot, .dl, .cta { display: none; }
}
