/* ===========================================================================
   PicGrab — Image Downloader · marketing site
   Restrained, editorial look: light canvas, one coral accent, flat UI,
   generous whitespace. No gradients, minimal motion.
   =========================================================================== */

:root {
  /* Brand — sampled from the logo gradient (teal → blue → violet) */
  --teal:   #35D6C9;
  --blue:   #3B82F6;
  --violet: #8B5CF6;
  --grad:   linear-gradient(120deg, var(--teal) 0%, var(--blue) 52%, var(--violet) 100%);

  /* Solid accent for small elements (links, checks, step numbers) */
  --accent:      #3B82F6;
  --accent-dark: #2f6fe0;
  --accent-tint: #e9f1fe;

  /* Ink + surfaces */
  --ink:     #16161d;
  --ink-2:   #43464f;
  --muted:   #797d88;
  --line:    #e7e7ea;
  --bg:      #fafafa;
  --bg-2:    #f2f2f4;
  --card:    #ffffff;

  /* Shape + depth */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --shadow-img: 0 40px 80px -34px rgba(20,20,30,.32), 0 14px 32px -16px rgba(20,20,30,.14);
  --shadow-card: 0 1px 2px rgba(20,20,30,.05);
  --maxw: 1340px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--bg-2); padding: .1em .35em; border-radius: 5px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, white); outline-offset: 3px; border-radius: 6px; }

/* --------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 32px; }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--soft { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.center { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
h1, h2, h3 { line-height: 1.08; letter-spacing: -.025em; font-weight: 700; color: var(--ink); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); font-weight: 400; }
.muted { color: var(--muted); }
.accent, .grad-text { color: var(--accent); }
.section-head { max-width: 640px; margin-inline: auto; margin-bottom: 56px; }
.section-head .lede { margin-top: 18px; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 15px 30px; border-radius: var(--r-sm); border: 1.5px solid transparent;
  background-origin: border-box;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { color: #fff; background: var(--grad); border: 0; }
.btn--primary:hover { filter: brightness(.94); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--lg { padding: 18px 34px; font-size: .95rem; }
.btn--block { width: 100%; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-stuck { border-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; color: var(--ink); }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 38px; margin-left: auto; }
.nav-links > a:not(.nav-cta) { color: var(--ink-2); font-weight: 500; font-size: 1rem; transition: color .15s; }
.nav-links > a:not(.nav-cta):hover { color: var(--accent); }
.nav-cta { margin-left: 4px; padding: 13px 26px; }
/* language switcher */
.lang-switch { position: relative; }
.lang-switch > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; color: var(--ink-2); font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: var(--r-sm); transition: background .15s, color .15s; }
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { color: var(--ink); background: var(--bg-2); }
.lang-switch > summary svg { width: 17px; height: 17px; }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-img); padding: 6px; z-index: 60; max-height: 70vh; overflow: auto; }
.lang-menu a { display: block; padding: 9px 14px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.lang-menu a:hover { background: var(--bg-2); color: var(--ink); }
.lang-menu a[aria-current="true"] { color: var(--accent); font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top:  6px; }

/* ------------------------------------------------------------------ hero */
.hero { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); letter-spacing: -.03em; white-space: nowrap; }
.hero p.lede { margin-top: 22px; max-width: 42ch; font-size: clamp(1rem, 1.3vw, 1.12rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.hero-cta .btn--primary { flex: 0 0 auto; }
.trust-line { margin-top: 26px; font-size: .9rem; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trust-line .dot { width: 3px; height: 3px; border-radius: 50%; background: #c4c4c9; }

/* The hero illustration is an SVG that carries its own shadow + rounded
   window, so the <img> box itself must stay flat (no extra shadow/radius). */
.hero-shot img { width: 100%; height: auto; }

/* ----------------------------------------------------------------- logos */
.logos { padding-block: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.logos p { text-align: center; color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.marquee {
  position: relative; margin-top: 34px; overflow: hidden;
  pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee-scroll 60s linear infinite; }
.marquee-group { display: flex; align-items: center; gap: 70px; padding-right: 70px; flex: 0 0 auto; }
.m-logo { height: 42px; width: auto; flex: 0 0 auto; opacity: .62; -webkit-user-drag: none; }
.m-logo[alt="AliExpress"] { height: 60px; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* -------------------------------------------------------------- features */
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.feature + .feature { margin-top: clamp(72px, 10vw, 128px); }
.feature--rev .feature-media { order: 2; }
/* Lead feature: larger animated illustration column. */
/* Match the hero illustration's column width/gap so both images are the same size. */
.feature--lead { grid-template-columns: 1.45fr 1fr; gap: clamp(36px, 5vw, 72px); }
.feature--lead-rev { grid-template-columns: 1fr 1.45fr; gap: clamp(36px, 5vw, 72px); }
.feature-media img { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-img); }
/* SVG UI illustrations carry their own frame — no extra shadow/radius, keep aspect. */
.feature-media img.feat-ui { height: auto; border-radius: 0; box-shadow: none; }
.feature h2 { margin-bottom: 18px; font-size: clamp(1.7rem, 3.4vw, 2.7rem); letter-spacing: -.03em; }
.feature .lede { margin-bottom: 28px; font-size: clamp(1rem, 1.3vw, 1.12rem); }
.checks { list-style: none; padding: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 13px; align-items: flex-start; color: var(--ink-2); font-weight: 400; }
.checks .ic { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-tint); display: grid; place-items: center; margin-top: 3px; }
.checks .ic svg { width: 12px; height: 12px; stroke: var(--accent); fill: none; }

/* ------------------------------------------------------------ capability */
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.cap {
  --c: #3B82F6;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 30px 28px;
}
.cap .ic { width: 46px; height: 46px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--c) 14%, #fff); display: grid; place-items: center; margin-bottom: 20px; }
.cap .ic svg { width: 23px; height: 23px; stroke: var(--c); fill: none; }
/* a distinct colour per capability for a vivid grid */
.cap:nth-child(1) { --c: #3B82F6; }
.cap:nth-child(2) { --c: #8B5CF6; }
.cap:nth-child(3) { --c: #06B6D4; }
.cap:nth-child(4) { --c: #EC4899; }
.cap:nth-child(5) { --c: #6366F1; }
.cap:nth-child(6) { --c: #10B981; }
.cap:nth-child(7) { --c: #F59E0B; }
.cap:nth-child(8) { --c: #F43F5E; }
.cap h3 { font-size: 1.05rem; margin-bottom: 8px; }
.cap p { font-size: .94rem; color: var(--muted); line-height: 1.6; }

/* ------------------------------------------------------------------ steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { padding: 0; text-align: center; }
.step .num {
  width: 52px; height: 52px; border-radius: var(--r); display: grid; place-items: center;
  font-weight: 700; font-size: 1.3rem; color: #fff; background: var(--accent); margin: 0 auto 22px;
}
.step p { max-width: 34ch; margin-inline: auto; }
/* colourful gradient step badges (teal -> blue -> violet -> pink) */
.step:nth-child(1) .num { background: linear-gradient(135deg, #35D6C9, #3B82F6); box-shadow: 0 12px 24px -10px rgba(53,160,235,.6); }
.step:nth-child(2) .num { background: linear-gradient(135deg, #3B82F6, #8B5CF6); box-shadow: 0 12px 24px -10px rgba(99,102,241,.6); }
.step:nth-child(3) .num { background: linear-gradient(135deg, #8B5CF6, #EC4899); box-shadow: 0 12px 24px -10px rgba(236,72,153,.55); }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .98rem; }

/* ----------------------------------------------------------- privacy band */
.privacy-band { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.privacy-band p { color: var(--ink-2); margin-top: 18px; }
.privacy-points { list-style: none; padding: 0; display: grid; gap: 16px; }
.privacy-points li { display: flex; gap: 13px; align-items: flex-start; }
.privacy-points .ic { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-tint); display: grid; place-items: center; margin-top: 3px; }
.privacy-points .ic svg { width: 12px; height: 12px; stroke: var(--accent); }
.privacy-points span { color: var(--ink-2); }

/* -------------------------------------------------------------------- FAQ */
.faq-list { max-width: 780px; margin-inline: auto; display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); background: transparent; overflow: hidden; }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 26px 4px; font-weight: 600; font-size: 1.1rem; letter-spacing: -.01em; background: none; border: 0; color: var(--ink); }
.faq-q .chev { flex: 0 0 auto; transition: transform .25s var(--ease); color: var(--muted); }
.faq-item[open] .faq-q { color: var(--accent); }
.faq-item[open] .faq-q .chev { transform: rotate(180deg); color: var(--accent); }
.faq-a { padding: 0 4px 26px; color: var(--ink-2); max-width: 64ch; }
.faq-a p + p { margin-top: 14px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* --------------------------------------------------------------- final CTA */
.cta-final { text-align: center; color: #fff; border-radius: var(--r-lg); padding: clamp(56px, 8vw, 96px) 24px; background: var(--grad); }
.cta-final h2 { color: #fff; }
.cta-final p { color: rgba(255,255,255,.92); margin-top: 16px; font-size: 1.12rem; }
.cta-final .btn { margin-top: 36px; }
.cta-final .btn--primary { background: #fff; color: var(--accent); }
.cta-final .btn--primary:hover { background: #fff; filter: none; color: var(--accent-dark); }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px; background: var(--bg); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-grid .brand { display: inline-flex; margin-bottom: 14px; }
.footer-about { max-width: 320px; color: var(--muted); font-size: .94rem; }
.footer-links { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 16px; font-weight: 600; }
.footer-col a { display: block; color: var(--ink-2); font-weight: 500; padding: 5px 0; font-size: .96rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .88rem; }
.footer-bottom a:hover { color: var(--accent); }

/* ------------------------------------------------------------ doc pages */
.doc { padding-block: clamp(56px, 8vw, 96px); }
.doc-wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); letter-spacing: -.03em; }
.doc .updated { color: var(--muted); margin-top: 12px; margin-bottom: 40px; }
.doc h2 { font-size: 1.4rem; margin-top: 44px; margin-bottom: 16px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin-top: 16px; }
.doc ul { margin-top: 16px; padding-left: 22px; display: grid; gap: 10px; }
/* Only style inline text links — never buttons, back-links or cards. */
.doc p a:not(.btn), .doc li a:not(.btn) { color: var(--accent); font-weight: 500; }
.doc p a:not(.btn):hover, .doc li a:not(.btn):hover { text-decoration: underline; }
.back-link {
  display: flex; width: fit-content; align-items: center; gap: 6px;
  padding: 8px 16px 8px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink-2); font-weight: 500; font-size: .9rem;
  margin-bottom: 36px; transition: border-color .15s var(--ease), color .15s var(--ease);
}
.back-link svg { color: var(--muted); }
.back-link:hover { border-color: #cdd5e3; color: var(--ink); }

/* ------------------------------------------------------------------- blog */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 26px 24px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease); }
.post-card:hover { border-color: #cdd5e3; box-shadow: 0 14px 30px -18px rgba(20,20,40,.25); transform: translateY(-3px); }
.post-tag { align-self: flex-start; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: var(--accent-tint); padding: 5px 11px; border-radius: 999px; margin-bottom: 16px; }
.post-card h3 { font-size: 1.16rem; line-height: 1.25; letter-spacing: -.01em; margin-bottom: 10px; color: var(--ink); }
.post-card p { font-size: .94rem; color: var(--muted); line-height: 1.6; flex: 1; }
.post-more { display: inline-flex; align-items: center; gap: 5px; margin-top: 18px; font-weight: 600; font-size: .9rem; color: var(--accent); }
.post-cta { margin-top: 48px; padding: clamp(26px, 4vw, 36px); border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); }
.post-cta p { margin-top: 10px; margin-bottom: 24px; color: var(--ink-2); }
.doc ol { margin-top: 16px; padding-left: 22px; display: grid; gap: 8px; color: var(--ink-2); }
.doc h3 { font-size: 1.12rem; letter-spacing: -.01em; margin-top: 30px; margin-bottom: 8px; color: var(--ink); }
.doc .lead { font-size: 1.12rem; color: var(--ink-2); }

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 24px);
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: var(--r-sm);
  font-weight: 500; font-size: .94rem; box-shadow: var(--shadow-img);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero p.lede { max-width: none; }
  .hero-cta .btn--primary { flex: 1 1 auto; }
  .feature, .feature--rev .feature-media { grid-template-columns: 1fr; order: initial; }
  .feature-media { order: -1 !important; }
  .privacy-band { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
  .wrap { padding-inline: 22px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 80px; left: 0; right: 0;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 16px 22px 24px;
    box-shadow: var(--shadow-img);
  }
  .nav.open .nav-links > a:not(.nav-cta) { padding: 14px 0; font-size: 1.08rem; }
  .nav.open .nav-cta { margin: 12px 0 0; }
  .footer-links { gap: 40px; }
}
