/* ==========================================================================
   home.css — homepage only (hero, downloader, homepage sections).
   Tokens and shared blocks come from base.css / layout.css.
   ========================================================================== */

/* ---------- Hero ---------- */
.hero-bg { background: var(--hero-gradient); }
.hero { max-width: 820px; margin: 0 auto; padding: calc(var(--nav-h) + 72px) var(--gutter) 88px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 7px 16px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  background: #fff; border-radius: 100px; box-shadow: var(--shadow-soft);
}
.hero h1 {
  margin-bottom: 18px;
  font-size: clamp(36px, 5.4vw, 66px); font-weight: 800;
  line-height: 1.06; letter-spacing: -.04em;
  text-wrap: balance;
}
.hero h1 strong { color: var(--blue); font-weight: 800; }
.hero-sub {
  max-width: 500px; margin: 0 auto 30px;
  font-size: clamp(16px, 1.7vw, 19px); line-height: 1.55; color: var(--text2);
  text-wrap: pretty;
}
.legal-note { max-width: 560px; margin: 18px auto 0; font-size: 12.5px; line-height: 1.55; color: var(--text3); }
.legal-note a { color: var(--text2); }
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.hero-tag {
  padding: 7px 13px; font-size: 13px; font-weight: 600; color: var(--ink);
  background: rgba(255, 255, 255, .8); border-radius: 100px; box-shadow: 0 2px 8px rgba(30, 64, 175, .06);
}

/* ---------- Downloader ---------- */
.dl-form {
  display: flex; gap: 8px; padding: 8px;
  background: #fff; border: 2px solid transparent; border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px -15px rgba(37, 99, 235, .3);
  transition: border-color .2s;
}
.dl-form:focus-within { border-color: var(--blue-soft); }
.dl-field { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 4px 0 12px; color: var(--text3); }
.url-input {
  flex: 1; min-width: 0; height: 50px;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 16px; color: var(--ink);
}
.url-input::placeholder { color: #a3aec2; }
.btn-paste {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 9px 14px;
  border: 0; border-radius: 12px; background: var(--surface2);
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: background .15s;
}
.btn-paste:hover { background: var(--border); }
.btn-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 28px; white-space: nowrap;
  border: 0; border-radius: var(--radius); background: var(--blue);
  font: inherit; font-size: 16px; font-weight: 700; color: #fff; cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .6);
  transition: background .15s, transform .1s;
}
.btn-download:hover { background: var(--blue-dark); }
.btn-download:active { transform: scale(.97); }
.btn-download:disabled { opacity: .7; cursor: progress; }
.btn-download .spin {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn-download.busy .spin { display: block; }
.input-note { margin-top: 12px; font-size: 13px; color: var(--text3); }

.error-msg {
  display: none; margin-top: 12px; padding: 12px 16px; text-align: left;
  font-size: 14px; color: var(--red); background: var(--red-soft); border-radius: var(--radius);
}
.error-msg.show { display: block; animation: rise .2s ease-out; }

/* ---------- Download result ---------- */
.result-area {
  display: none; margin-top: 16px; padding: 16px; text-align: left;
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-card);
}
.result-area.show { display: block; animation: rise .25s ease-out; }
.result-title { margin-bottom: 12px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.dl-item { display: flex; flex-direction: column; overflow: hidden; background: var(--surface2); border-radius: 16px; }
.dl-thumb { position: relative; aspect-ratio: 1; background: var(--border); }
.dl-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dl-kind {
  position: absolute; top: 8px; left: 8px; padding: 3px 8px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(15, 23, 42, .65); border-radius: 100px;
}
.dl-item a {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin: 8px; padding: 9px;
  font-size: 14px; font-weight: 600; color: #fff; text-decoration: none;
  background: var(--blue); border-radius: 12px;
}
.dl-item a:hover { background: var(--blue-dark); }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; overflow: hidden; padding-bottom: 26px; transition: transform .2s, box-shadow .2s; }
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.step-img { margin: 8px 8px 22px; overflow: hidden; background: linear-gradient(160deg, #eef4ff, #f5f0ff); border-radius: 18px; }
.step-img img { display: block; width: 100%; height: auto; max-height: 230px; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; }
.step h3, .step p { padding: 0 24px; }
.step h3 { margin-bottom: 8px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.step p { font-size: 15px; color: var(--text2); }
.step::after {
  counter-increment: s; content: counter(s);
  position: absolute; top: 18px; left: 18px; width: 32px; height: 32px;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800; color: #fff;
  background: var(--blue); border-radius: 10px; box-shadow: 0 6px 14px -4px rgba(37, 99, 235, .6);
}

/* ---------- Formats table ---------- */
.formats { overflow: hidden; }
.formats table { width: 100%; border-collapse: collapse; font-size: 15px; }
.formats th {
  padding: 16px 22px; text-align: left; background: #f8fafc;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text2);
}
.formats td { padding: 18px 22px; border-top: 1px solid var(--border); color: var(--text2); }
.formats td:first-child { font-weight: 600; color: var(--ink); }
.fmt-badge {
  display: inline-block; padding: 4px 11px; white-space: nowrap;
  font-size: 13px; font-weight: 700; color: var(--blue-dark); background: var(--blue-soft); border-radius: 100px;
}

.fmt-unsupported {
  margin-top: 16px; padding: 12px 16px; font-size: 14px; color: var(--text2);
  background: #fff; border: 1px dashed var(--border2); border-radius: var(--radius);
}
.fmt-unsupported strong { color: var(--ink); }

/* ---------- Where to find the link ---------- */
.copy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.copy-col { padding: 28px; }
.copy-col h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 18px; font-weight: 700; }
.copy-col h3 .ico { width: 40px; height: 40px; margin: 0; }
.copy-step { display: flex; gap: 14px; padding: 13px 0; border-top: 1px dashed var(--border); }
.copy-step:first-of-type { border-top: 0; }
.copy-step-num {
  flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--blue); background: var(--blue-soft); border-radius: 8px;
}
.copy-step p { font-size: 15px; color: var(--text2); }
.copy-step strong { color: var(--ink); }

/* ---------- Use cases ---------- */
.uc-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; margin-bottom: 40px; }
.uc-head .section-head { margin: 0; }
.uc-img { justify-self: center; width: 100%; max-width: 280px; height: auto; border-radius: 28px; mix-blend-mode: multiply; }
.uc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.uc { display: flex; flex-direction: column; padding: 26px; transition: transform .2s, box-shadow .2s; }
.uc:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.uc h3 { margin-bottom: 8px; font-size: 17px; font-weight: 700; }
.uc p { flex: 1; font-size: 15px; color: var(--text2); }
.uc-who {
  align-self: flex-start; margin-top: 18px; padding: 4px 10px;
  font-size: 12px; font-weight: 700; color: var(--blue-dark); background: var(--blue-soft); border-radius: 100px;
}

/* ---------- Trust (row under the use cases) ---------- */
.trust { margin-top: 56px; }
.trust-title { margin-bottom: 20px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.trust-title strong { color: var(--blue); font-weight: 800; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trust-item { display: flex; gap: 14px; padding: 22px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.trust-check {
  flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center;
  color: var(--green); background: var(--green-soft); border-radius: 10px;
}
.trust-check svg { width: 15px; height: 15px; }
.trust-item h3 { margin-bottom: 4px; font-size: 16px; font-weight: 700; }
.trust-item p { font-size: 14px; color: var(--text2); }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
.faq-wrap .section-head { position: sticky; top: 32px; margin: 0; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid transparent; border-radius: 18px;
  box-shadow: 0 6px 20px -12px rgba(30, 64, 175, .2); transition: border-color .2s;
}
.faq-item[open] { border-color: var(--blue-soft); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; list-style: none; cursor: pointer; font-size: 16px; font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex-shrink: 0; width: 28px; height: 28px; display: grid; place-items: center;
  font-size: 18px; background: var(--surface2); border-radius: 9px;
  transition: transform .2s, background .2s, color .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); color: #fff; background: var(--blue); }
.faq-a { padding: 0 20px 18px; font-size: 15px; line-height: 1.7; color: var(--text2); }

/* ---------- Blog teasers ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card { display: flex; flex-direction: column; padding: 26px; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.blog-tag {
  align-self: flex-start; margin-bottom: 16px; padding: 4px 10px;
  font-size: 12px; font-weight: 700; color: var(--blue-dark); background: var(--blue-soft); border-radius: 100px;
}
.blog-card h3 { margin-bottom: 8px; font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
.blog-card p { flex: 1; font-size: 14px; color: var(--text2); }
.blog-more {
  width: 36px; height: 36px; margin-top: 18px; display: grid; place-items: center;
  font-weight: 800; background: var(--surface2); border-radius: 12px; transition: background .2s, color .2s;
}
.blog-card:hover .blog-more { color: #fff; background: var(--blue); }

/* ---------- Closing CTA ---------- */
.cta-section { padding-top: 0; }
.cta {
  position: relative; overflow: hidden; padding: 64px 28px; text-align: center; color: #fff;
  background: var(--brand-gradient); border-radius: 32px; box-shadow: 0 30px 60px -25px rgba(37, 99, 235, .6);
}
.cta::before {
  content: ""; position: absolute; inset: -50% auto auto -10%; width: 420px; height: 420px;
  border-radius: 50%; background: rgba(255, 255, 255, .1);
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; letter-spacing: -.035em; }
.cta p { margin: 12px 0 28px; font-size: 17px; color: rgba(255, 255, 255, .8); }
.cta a {
  display: inline-flex; align-items: center; gap: 8px; padding: 15px 30px;
  font-weight: 800; color: var(--blue); text-decoration: none;
  background: #fff; border-radius: var(--radius); transition: transform .15s;
}
.cta a:hover { transform: translateY(-2px); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .steps, .uc-grid, .blog-grid, .trust-grid { grid-template-columns: 1fr 1fr; }
  .faq-wrap { grid-template-columns: 1fr; gap: 28px; }
  .faq-wrap .section-head { position: static; }
  .uc-head { grid-template-columns: 1fr; }
  .uc-img { max-width: 200px; }
}
@media (max-width: 640px) {
  .hero { padding: calc(var(--nav-h) + 28px) var(--gutter) 40px; }
  .dl-form { flex-direction: column; }
  .btn-download { width: 100%; }
  .btn-paste span { display: none; }
  .steps, .uc-grid, .blog-grid, .copy-grid, .trust-grid { grid-template-columns: 1fr; }
  .formats th:nth-child(4), .formats td:nth-child(4) { display: none; }
  .formats th, .formats td { padding: 14px; }
  .cta { padding: 48px 20px; border-radius: var(--radius-xl); }
}
