/* ==========================================================================
   CropDesk — Site-wide Workflow & Premium Upgrade
   Inspired by: iLovePDF / Smallpdf (tool tiles + clear steps),
   TinyPNG (drop-first clarity), Apple (spacing/type), Vercel (precision)
   ========================================================================== */

:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #f8fafc;
  --sheet: #ffffff;
  --accent: #0f172a;
  --accent-soft: #f1f5f9;
  --trust: #059669;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.05);
  --shadow-hover: 0 8px 28px rgba(15,23,42,.1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", system-ui, sans-serif;
  --transition: .18s cubic-bezier(.2,.8,.2,1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header — precise glass ---------- */
.site-head {
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,.9);
  box-shadow: none;
}
.site-head .wrap { min-height: 62px; }
.brand-name { font-weight: 650; letter-spacing: -.02em; }
.nav a {
  font-weight: 500;
  font-size: .9rem;
  padding: 6px 11px;
  border-radius: 8px;
  color: #334155;
  transition: background var(--transition), color var(--transition);
}
.nav a:hover, .nav a[aria-current=page] {
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
}
.nav .btn {
  background: #0f172a;
  color: #fff !important;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: none;
  transition: transform var(--transition), box-shadow var(--transition);
}
.nav .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15,23,42,.2);
}

/* ---------- Trust badges (workflow clarity) ---------- */
.trust-row, .home-intro .eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}
.trust-pill, .home-intro .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #475569;
  background: #f1f5f9;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

/* ---------- Hero — large type + clear job ---------- */
.home-intro {
  padding: 64px 0 48px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}
.home-intro h1 {
  font-size: clamp(2.2rem, 5.8vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.08;
  margin: 0 0 14px;
  color: #0f172a;
}
.home-intro .lead {
  font-size: 1.08rem;
  color: #475569;
  max-width: 40em;
  margin: 0 auto 22px;
  line-height: 1.55;
}

/* Search — prominent drop-style field */
.hsearch {
  max-width: 540px;
  margin: 0 auto 20px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hsearch:focus-within {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15,23,42,.08);
}
.hsearch input {
  border: none;
  background: transparent;
  font-size: 1rem;
  padding: 15px 15px 15px 46px;
  width: 100%;
  border-radius: 14px;
  outline: none;
}

/* Chips — quick workflow entry */
.hchips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.hchips a {
  padding: 7px 13px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  transition: all var(--transition);
}
.hchips a:hover {
  border-color: #0f172a;
  color: #0f172a;
  background: #f8fafc;
}

/* ---------- Tool cards — iLovePDF-style clear tiles ---------- */
.ccard, .us-focus-card, .card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: inherit;
}
.ccard:hover, .us-focus-card:hover, .card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}
.ccard .ct b, .us-focus-card strong {
  font-weight: 650;
  letter-spacing: -.015em;
  font-size: 1rem;
  color: #0f172a;
}
.ccard .ct small, .us-focus-card span span {
  color: #64748b;
  font-size: .86rem;
  line-height: 1.4;
}
.ci, .us-focus-icon {
  background: #f1f5f9;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Grids */
.cgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.us-focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}

/* ---------- Section rhythm ---------- */
.pop, .us-focus, .cats, .feat, .why, .faq, section {
  padding: 56px 0;
}
.section-title, .cat-h, .pop h2, .us-focus-heading h2, .why h2, .faq h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #0f172a;
  margin: 0 0 8px;
}
.pop > .wrap > .lead, .us-focus-heading p {
  color: #64748b;
  margin-bottom: 24px;
}

/* ---------- Tool page chrome improvements ---------- */
.tool-wrap, .app, main .wrap {
  max-width: 1120px;
}
/* Drop zones feel more inviting */
.drop, .dropzone, [class*="drop"], .upload-area {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  transition: border-color var(--transition), background var(--transition);
}
.drop:hover, .dropzone:hover, [class*="drop"]:hover, .upload-area:hover {
  border-color: #0f172a;
  background: #f1f5f9;
}

/* Buttons — clear primary action */
.btn, button.btn, .primary-btn {
  border-radius: 11px;
  font-weight: 600;
  transition: all var(--transition);
}
.btn:hover, button.btn:hover {
  transform: translateY(-1px);
}

/* ---------- FAQ ---------- */
.faq details {
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 0;
}
.faq summary {
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: #475569; margin: 8px 0 0; line-height: 1.55; }

/* ---------- Footer ---------- */
.site-foot {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 0 28px;
  border-top: none;
}
.site-foot h2 { color: #fff; font-size: .95rem; font-weight: 600; margin-bottom: 12px; }
.site-foot a { color: #cbd5e1; font-size: .9rem; }
.site-foot a:hover { color: #fff; }
.site-foot .small { color: #64748b; font-size: .82rem; }

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f5f9;
    --muted: #94a3b8;
    --line: #334155;
    --paper: #0f172a;
    --sheet: #1e293b;
    --accent: #f1f5f9;
  }
  body { background: #0f172a; color: #f1f5f9; }
  .site-head {
    background: rgba(15,23,42,.8);
    border-bottom-color: #334155;
  }
  .nav a { color: #cbd5e1; }
  .nav a:hover, .nav a[aria-current=page] { background: #1e293b; color: #fff; }
  .nav .btn { background: #fff; color: #0f172a !important; }
  .home-intro {
    background: linear-gradient(180deg, #0f172a, #1e293b);
    border-bottom-color: #334155;
  }
  .home-intro h1 { color: #fff; }
  .home-intro .lead { color: #94a3b8; }
  .hsearch { background: #1e293b; border-color: #334155; }
  .hsearch:focus-within { border-color: #fff; }
  .hsearch input { color: #fff; }
  .hchips a { background: #1e293b; border-color: #334155; color: #cbd5e1; }
  .ccard, .us-focus-card, .card {
    background: #1e293b;
    border-color: #334155;
  }
  .ccard:hover, .us-focus-card:hover, .card:hover { border-color: #475569; }
  .ci, .us-focus-icon { background: #334155; }
  .section-title, .cat-h, .ccard .ct b, .us-focus-card strong { color: #f1f5f9; }
  .site-foot { background: #020617; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .home-intro { padding: 44px 0 32px; }
  .home-intro h1 { font-size: 1.95rem; }
  .pop, .us-focus, .why, .faq { padding: 36px 0; }
  .cgrid, .us-focus-grid { grid-template-columns: 1fr; }
  .hsearch input { padding: 14px 14px 14px 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .ccard, .us-focus-card, .card, .btn, .nav a { transition: none; transform: none !important; }
}

@media (min-width: 1161px) { .site-head .wrap { gap: 6px; } .site-head .nav a { padding-left: 5px; padding-right: 5px; font-size: .86rem; } body.home .site-head .nav a { padding-left: 5px; padding-right: 5px; font-size: .86rem; } }
@media (min-width: 861px) and (max-width: 960px) {
  .site-head .wrap { position:relative; flex-wrap:nowrap; min-height:58px; gap:10px; }
  .site-head .brand-tag { display:none; }
  .site-head .nav-toggle { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border:1px solid var(--line); border-radius:10px; background:#fff; cursor:pointer; padding:0; }
  .site-head .nav-toggle span, .site-head .nav-toggle span::before, .site-head .nav-toggle span::after { display:block; width:18px; height:2px; background:var(--ink); border-radius:2px; position:relative; content:""; }
  .site-head .nav-toggle span::before { position:absolute; top:-6px; }
  .site-head .nav-toggle span::after { position:absolute; top:6px; }
  .site-head .nav { display:none; position:absolute; left:0; right:0; top:100%; background:#fff; border-bottom:1px solid var(--line); box-shadow:var(--shadow); flex-direction:column; align-items:stretch; padding:8px 14px 14px; width:auto; z-index:1300; max-height:calc(100vh - 68px); overflow:auto; }
  .site-head .nav.open { display:flex; }
  .site-head .nav a { padding:11px 10px; }
  .site-head .nav .btn { margin:6px 0 0; }
}
