/* InFetch — Instagram Downloader styles (v1.0) */
:root {
  --grad: linear-gradient(135deg, #feda75 0%, #fa7e1e 22%, #d62976 52%, #962fbf 78%, #4f5bd5 100%);
  --pink: #d62976;
  --purple: #962fbf;
  --ink: #191423;
  --muted: #6d6a7c;
  --line: #ece9f2;
  --bg: #faf9fc;
  --card: #ffffff;
  --dark: #14101d;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(150, 47, 191, 0.10);
  --shadow-lg: 0 18px 50px rgba(214, 41, 118, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1120px, 92%); margin: 0 auto; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px; background: var(--grad);
  display: grid; place-items: center; flex: none;
  box-shadow: 0 6px 16px rgba(214,41,118,.35);
}
.logo-mark svg { width: 22px; height: 22px; }
.main-nav { display: flex; gap: 4px; margin-left: 12px; }
.main-nav a {
  color: var(--ink); font-weight: 600; font-size: 14.5px;
  padding: 9px 13px; border-radius: 10px; white-space: nowrap;
}
.main-nav a:hover { background: #f4f1f8; text-decoration: none; }
.main-nav a.active { background: #fbeef4; color: var(--pink); }
.nav-cta {
  margin-left: auto; background: var(--grad); color: #fff !important;
  font-weight: 700; padding: 10px 18px !important; border-radius: 999px !important;
  box-shadow: 0 8px 20px rgba(214,41,118,.30);
}
.nav-cta:hover { filter: brightness(1.06); }
.hamburger { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburger svg { width: 26px; height: 26px; stroke: var(--ink); }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; padding: 10px 4%; }
.mobile-nav.open { display: grid; gap: 2px; }
.mobile-nav a { padding: 11px 8px; font-weight: 600; color: var(--ink); border-radius: 8px; }
.mobile-nav a:hover, .mobile-nav a.active { background: #fbeef4; color: var(--pink); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { background: var(--grad); padding: 64px 0 84px; color: #fff; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 20% 0%, rgba(255,255,255,.25), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-badge {
  display: inline-block; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
  padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .4px;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.15; font-weight: 800; margin-bottom: 12px; }
.hero p.sub { font-size: clamp(15px, 2.4vw, 19px); opacity: .94; max-width: 640px; margin: 0 auto 30px; }

.tool-card {
  background: #fff; border-radius: 20px; padding: 26px;
  max-width: 720px; margin: 0 auto; box-shadow: var(--shadow-lg); color: var(--ink); text-align: left;
}
.tool-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tool-tabs a {
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
}
.tool-tabs a:hover { text-decoration: none; border-color: var(--pink); color: var(--pink); }
.tool-tabs a.active { background: var(--grad); color: #fff; border-color: transparent; }

.link-form { display: flex; gap: 10px; }
.link-form input {
  flex: 1; border: 2px solid var(--line); border-radius: 14px;
  padding: 15px 18px; font-size: 16px; font-family: inherit; outline: none; min-width: 0;
}
.link-form input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(214,41,118,.12); }
.btn {
  border: 0; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 16px;
  padding: 15px 30px; border-radius: 14px; color: #fff; background: var(--grad);
  box-shadow: 0 10px 24px rgba(214,41,118,.35); transition: transform .12s, filter .12s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-ghost {
  background: #fff; color: var(--pink); border: 2px solid var(--pink); box-shadow: none;
}
.btn-ghost:hover { background: #fdf0f6; }
.btn-sm { padding: 10px 18px; font-size: 14px; border-radius: 10px; }
.form-hint { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.form-hint code { background: #f4f1f8; padding: 2px 8px; border-radius: 6px; font-size: 12.5px; }

.hero-points { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 30px; font-size: 14.5px; font-weight: 600; }
.hero-points span { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; }

/* ---------- Result area ---------- */
.result-zone { margin-top: 22px; display: none; }
.result-zone.show { display: block; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.spinner { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 26px; color: var(--muted); font-weight: 600; }
.spinner::before {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--pink); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.result-error {
  background: #fef2f2; border: 1.5px solid #fecaca; color: #b91c1c;
  padding: 16px 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px;
}
.demo-note {
  background: #fffbeb; border: 1.5px dashed #f59e0b; color: #92400e;
  padding: 12px 16px; border-radius: 12px; font-size: 13.5px; margin-bottom: 16px;
}
.demo-note b { font-weight: 800; }
.info-note {
  background: #eff6ff; border: 1.5px solid #bfdbfe; color: #1e40af;
  padding: 12px 16px; border-radius: 12px; font-size: 13.5px; margin-bottom: 16px;
}

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 6px 0 8px; }
.media-card { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.media-card .preview { aspect-ratio: 4/5; background: #111; display: grid; place-items: center; overflow: hidden; }
.media-card video, .media-card img { width: 100%; height: 100%; object-fit: cover; }
.media-card .meta { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.media-card .meta .kind { font-size: 12.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

.profile-card { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; background: #fff; }
.profile-card img.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid transparent; background: var(--grad); padding: 2px; flex: none; }
.profile-card .who { flex: 1; min-width: 0; }
.profile-card .who .uname { font-weight: 800; font-size: 15px; }
.profile-card .who .fname { color: var(--muted); font-size: 13px; }
.profile-card .who .stats { font-size: 13px; color: var(--muted); margin-top: 4px; }

.text-block { border: 1.5px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 16px; background: #fff; }
.text-block h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.text-block .body { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; max-height: 220px; overflow: auto; background: var(--bg); padding: 14px; border-radius: 10px; }
.hashtag-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hashtag-pills span { background: #fbeef4; color: var(--pink); font-weight: 700; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; }

.comment { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment .c-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; font-size: 15px; }
.comment .c-body { font-size: 14px; }
.comment .c-body .c-user { font-weight: 800; margin-right: 6px; }
.comment .c-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(24px, 3.6vw, 34px); font-weight: 800; margin-bottom: 10px; text-align: center; }
.section .lede { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 36px; font-size: 16px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 28px 24px; text-align: center; box-shadow: var(--shadow); }
.step .num {
  width: 52px; height: 52px; border-radius: 50%; background: var(--grad); color: #fff;
  font-size: 22px; font-weight: 800; display: grid; place-items: center; margin: 0 auto 16px;
  box-shadow: 0 8px 18px rgba(214,41,118,.3);
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--muted); }

.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool-tile {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s;
  display: block;
}
.tool-tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #f3c6da; }
.tool-tile .icon {
  width: 48px; height: 48px; border-radius: 14px; background: var(--grad);
  display: grid; place-items: center; margin-bottom: 14px;
}
.tool-tile .icon svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; }
.tool-tile h3 { font-size: 17px; margin-bottom: 6px; }
.tool-tile p { font-size: 14px; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 20px; }
.feature .f-icon { width: 42px; height: 42px; border-radius: 12px; background: #fdf0f6; display: grid; place-items: center; flex: none; }
.feature .f-icon svg { width: 22px; height: 22px; stroke: var(--pink); fill: none; stroke-width: 2; }
.feature h3 { font-size: 15.5px; margin-bottom: 4px; }
.feature p { font-size: 13.5px; color: var(--muted); }

/* Article / SEO content */
.article { max-width: 780px; margin: 0 auto; font-size: 16px; }
.article h2 { text-align: left; font-size: 26px; margin: 34px 0 12px; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 19px; margin: 24px 0 8px; }
.article p { margin-bottom: 14px; color: #3d3a4b; }
.article ul, .article ol { margin: 0 0 16px 22px; color: #3d3a4b; }
.article li { margin-bottom: 8px; }
.article .toc { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 26px; }
.article .toc b { display: block; margin-bottom: 8px; }
.article .toc a { font-size: 14.5px; }

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq-item { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit; font-size: 16px; font-weight: 700; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink); }
.faq-q .chev { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #fbeef4; display: grid; place-items: center; transition: transform .2s; }
.faq-q .chev svg { width: 13px; height: 13px; stroke: var(--pink); stroke-width: 2.5; fill: none; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { padding: 0 20px 18px; font-size: 14.5px; color: var(--muted); }

/* CTA band */
.cta-band { background: var(--grad); border-radius: 24px; padding: 48px 32px; text-align: center; color: #fff; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { opacity: .93; margin-bottom: 24px; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-band .btn { background: #fff; color: var(--pink); box-shadow: 0 10px 24px rgba(0,0,0,.18); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #b9b4c7; padding: 56px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-grid a { color: #b9b4c7; font-size: 14px; display: block; padding: 4px 0; }
.footer-grid a:hover { color: #fff; }
.footer-brand p { font-size: 14px; margin-top: 12px; max-width: 300px; }
.footer-bottom { border-top: 1px solid #2a2438; padding: 20px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }

/* Toast */
.toast-zone { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; width: min(420px, 90%); }
.toast {
  background: var(--dark); color: #fff; padding: 14px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(0,0,0,.3);
  animation: fadeUp .25s ease; display: flex; gap: 10px; align-items: center;
}
.toast.ok { border-left: 4px solid #22c55e; }
.toast.err { border-left: 4px solid #ef4444; }

/* Page hero (inner pages) */
.page-hero { background: var(--grad); color: #fff; padding: 52px 0 64px; text-align: center; }
.page-hero h1 { font-size: clamp(28px, 4.6vw, 44px); font-weight: 800; margin-bottom: 10px; }
.page-hero p { opacity: .93; max-width: 620px; margin: 0 auto; font-size: 16.5px; }
.page-tool { margin-top: -34px; position: relative; z-index: 2; }

/* Legal pages */
.legal { max-width: 780px; margin: 0 auto; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 40px; }
.legal h1 { font-size: 30px; margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.legal h2 { font-size: 20px; margin: 26px 0 10px; text-align: left; }
.legal p, .legal li { font-size: 15px; color: #3d3a4b; margin-bottom: 12px; }
.legal ul { margin-left: 22px; }

/* Responsive */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .hamburger { display: block; }
  .nav-cta { display: none; }
  .steps, .tool-grid, .features { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .link-form { flex-direction: column; }
  .link-form .btn { width: 100%; }
  .steps, .tool-grid, .features { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 64px; }
  .tool-card { padding: 20px 16px; }
  .legal { padding: 26px 20px; }
  .profile-card { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
}
