/* ============================================================
   EasySlidesDownloader — style.css
   Pengganti file Next.js `/_next/static/css/c1cda90...css`
   yang hilang (penyebab tampilan berantakan).
   Tanpa framework / CDN — murni CSS lokal.
   ============================================================ */

/* ---------- Tokens & reset ---------- */
:root {
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --yellow-500: #eab308;
  --purple-500: #a855f7;
  --red-600: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --white: #fff;
  --radius: 0.5rem;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  --container: 80rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  line-height: 1.5;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
ul { list-style: none; padding: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.container { max-width: var(--container); margin-inline: auto; width: 100%; }
.section { padding: 4rem 1rem; }
.section--alt { background: var(--gray-50); }
.section__head { text-align: center; margin-bottom: 3rem; }
.section__head h2 { font-size: clamp(1.875rem, 4vw, 2.25rem); font-weight: 700; margin-bottom: 1rem; }
.section__head p { font-size: 1.125rem; color: var(--gray-600); }

@media (min-width: 640px) { .section { padding-inline: 2rem; } }
@media (min-width: 1024px) { .section { padding-inline: 4rem; } }

/* ---------- Navbar ---------- */
.nav { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 50; }
.nav__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; max-width: var(--container); margin-inline: auto;
}
.logo { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.05rem; color: var(--blue-700); }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo--footer { color: var(--white); font-size: 1.25rem; }

.nav__toggle {
  display: inline-flex; padding: .5rem; border: 0; background: none; color: var(--gray-700);
}
.nav__toggle svg { width: 1.5rem; height: 1.5rem; }
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-open { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile menu: tertutup default, dibuka JS via .is-open */
.nav__menu {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .5s ease, opacity .5s ease;
}
.nav__menu.is-open { max-height: 20rem; opacity: 1; }
.nav__links { display: flex; flex-direction: column; align-items: center; padding-bottom: 1rem; }
.nav__links a { padding: .5rem 1rem; color: var(--gray-700); transition: color .3s; }
.nav__links a:hover { color: var(--gray-800); font-weight: 600; }

@media (min-width: 768px) {
  .nav__toggle { display: none; }
  .nav__menu { max-height: none; opacity: 1; overflow: visible; }
  .nav__links { flex-direction: row; padding: 0; gap: .5rem; }
  /* Di desktop menu ikut di dalam bar */
  .nav { display: flex; align-items: center; justify-content: center; }
  .nav__bar { flex: 1; }
}

/* ---------- Hero / downloader ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 5rem 1rem; color: var(--white);
  background: linear-gradient(to right, var(--blue-500), var(--blue-700));
}
.hero h1 { font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 700; line-height: 1.1; margin-bottom: 1rem; }
.hero__lead { font-size: 1.25rem; max-width: 42rem; margin-bottom: 2rem; }

.downloader { width: 100%; max-width: 28rem; text-align: left; }
.downloader__input-wrap { position: relative; }
.downloader input[type="url"] {
  width: 100%; padding: 1rem 6.5rem 1rem 1rem; margin-bottom: .25rem;
  border: 0; border-radius: var(--radius); color: var(--gray-800); background: var(--white);
}
.downloader input[type="url"]:focus { outline: 3px solid rgb(255 255 255 / .55); outline-offset: 2px; }
.downloader input.is-invalid { outline: 3px solid #fca5a5; }
.paste-btn {
  position: absolute; top: 50%; right: .5rem; transform: translateY(-50%);
  border: 0; border-radius: .375rem; padding: .45rem .8rem;
  background: var(--gray-100); color: var(--gray-700); font-size: .85rem; font-weight: 600;
}
.paste-btn:hover { background: var(--gray-200); }

.quality { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; font-size: .875rem; }
.quality label { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.quality input[type="radio"] {
  appearance: none; width: .85rem; height: .85rem; margin: 0;
  border: 1px solid var(--white); border-radius: 50%; background: transparent; cursor: pointer;
}
.quality input[type="radio"]:checked { background: var(--white); }
.quality input[type="radio"]:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

.btn-download {
  width: 100%; padding: 1rem; border: 0; border-radius: var(--radius);
  background: var(--green-600); color: var(--white); font-weight: 700;
  transition: background .3s;
}
.btn-download:hover:not(:disabled) { background: var(--green-700); }
.btn-download:disabled { opacity: .65; cursor: wait; }

.form-msg { min-height: 1.5rem; margin-top: .75rem; font-size: .9rem; text-align: center; }
.form-msg--error { color: #fecaca; }
.form-msg--ok { color: #bbf7d0; }

/* Hasil setelah URL valid (diisi JS) */
.result {
  margin-top: 1.25rem; padding: 1rem; border-radius: var(--radius);
  background: var(--white); color: var(--gray-800); text-align: left; box-shadow: var(--shadow-lg);
}
.result[hidden] { display: none; }
.result__title { font-weight: 700; margin-bottom: .25rem; overflow-wrap: anywhere; }
.result__meta { font-size: .85rem; color: var(--gray-500); margin-bottom: 1rem; }
.result__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.result__actions button {
  flex: 1; padding: .7rem 1rem; border: 0; border-radius: .375rem;
  background: var(--blue-600); color: var(--white); font-weight: 600; white-space: nowrap;
}
.result__actions button:hover { background: var(--blue-700); }
.result__note { margin-top: .75rem; font-size: .78rem; color: var(--gray-500); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 3rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-illustration { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; height: auto; }
.about h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem; }
.about p { color: var(--gray-600); }
.about .lead { font-size: 1.125rem; text-align: justify; margin-bottom: 1.5rem; }
.check-list { display: grid; gap: 1rem; }
.check-list li { display: flex; gap: .75rem; align-items: flex-start; }
.check-list svg { width: 1.25rem; height: 1.25rem; flex: none; margin-top: .25rem; color: var(--blue-500); }
.check-list h4 { font-size: 1.125rem; font-weight: 600; }

.center-block { margin-top: 4rem; text-align: center; }
.center-block h3 { font-size: 1.875rem; font-weight: 700; margin-bottom: 1rem; }
.center-block p { font-size: 1.125rem; color: var(--gray-600); }

/* Pros & cons */
.pros-cons { margin-top: 4rem; }
.pros-cons > h3 { font-size: 1.875rem; font-weight: 700; text-align: center; margin-bottom: 2rem; }
.pros-cons__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pros-cons__grid { grid-template-columns: 1fr 1fr; } }
.card {
  padding: 1.5rem; border: 1px solid var(--gray-200); border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow); text-align: center;
}
.card h4 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; }
.card--pros h4 { color: var(--green-600); }
.card--cons h4 { color: var(--red-600); }
.card li { color: var(--gray-600); padding: .15rem 0; }

/* ---------- Steps & features ---------- */
.grid-3, .grid-4 { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 2rem; } }

.step, .feature {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 1.5rem; border: 1px solid var(--gray-200); border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow); transition: box-shadow .3s;
}
.step:hover, .feature:hover { box-shadow: var(--shadow-lg); }
.step__icon {
  display: flex; align-items: center; justify-content: center;
  width: 4rem; height: 4rem; border-radius: 50%; color: var(--white); margin-bottom: 1rem;
}
.step__icon svg, .feature > svg { width: 1em; height: 1em; }
.step__icon svg { font-size: 1.875rem; }
.step__icon--blue { background: var(--blue-500); }
.step__icon--green { background: var(--green-500); }
.step__icon--yellow { background: var(--yellow-500); }
.step h3, .feature h3 { font-weight: 600; color: var(--gray-800); margin-bottom: .5rem; }
.step h3 { font-size: 1.5rem; }
.feature h3 { font-size: 1.25rem; }
.step p, .feature p { color: var(--gray-600); }
.feature > svg { font-size: 3.75rem; margin-bottom: 1rem; }
.icon-blue { color: var(--blue-500); } .icon-green { color: var(--green-500); }
.icon-yellow { color: var(--yellow-500); } .icon-purple { color: var(--purple-500); }

/* ---------- Testimonials ---------- */
.testimonials { display: grid; gap: 3rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .testimonials { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .testimonials { grid-template-columns: repeat(3, 1fr); } }
.testimonial {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 2rem; border: 1px solid var(--gray-200); border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow);
}
.testimonial > svg { font-size: 1.875rem; margin-bottom: 1rem; }
.testimonial blockquote { color: var(--gray-700); margin-bottom: 1.5rem; }
.avatar {
  display: flex; align-items: center; justify-content: center;
  width: 100px; height: 100px; border-radius: 50%; margin-bottom: 1rem;
  color: var(--white); font-size: 1.75rem; font-weight: 700; letter-spacing: .02em;
}
.avatar--blue { background: var(--blue-500); } .avatar--green { background: var(--green-500); }
.avatar--yellow { background: var(--yellow-500); }
.testimonial h4 { font-size: 1.125rem; font-weight: 600; }
.testimonial span { color: var(--gray-500); font-size: .875rem; }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 64rem; margin-inline: auto; }
.faq h2 { font-size: clamp(1.875rem, 4vw, 2.25rem); font-weight: 700; text-align: center; margin-bottom: 2rem; }
.faq__item { border-bottom: 1px solid var(--gray-200); }
.faq__q {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 1rem 0; border: 0; background: none; text-align: left;
  font-size: 1.125rem; font-weight: 500; color: var(--gray-700); transition: color .2s;
}
.faq__q:hover, .faq__q[aria-expanded="true"] { color: var(--blue-600); }
.faq__chevron { margin-left: .5rem; color: var(--blue-600); transition: transform .25s; flex: none; }
.faq__q[aria-expanded="true"] .faq__chevron { transform: rotate(180deg); }
/* Panel ditutup default; JS mengatur max-height saat dibuka */
.faq__a { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .3s ease, opacity .3s ease; }
.faq__a p { color: var(--gray-600); line-height: 1.625; padding-bottom: 1rem; }

/* ---------- Footer ---------- */
.footer { background: var(--gray-800); color: var(--white); padding: 2rem 1rem; }
.footer__inner { max-width: var(--container); margin-inline: auto; }
@media (min-width: 768px) {
  .footer__top { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
  .footer__brand { width: 50%; }
  .footer__navwrap { width: 50%; display: flex; justify-content: flex-end; }
}
.footer__brand-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.footer__brand p { color: var(--gray-400); }
.footer nav { display: flex; flex-direction: column; align-items: center; gap: .25rem; margin-top: 1.5rem; }
@media (min-width: 768px) { .footer nav { flex-direction: row; gap: 1.5rem; margin-top: 0; } }
.footer nav a { color: var(--gray-400); }
.footer nav a:hover { color: var(--white); }
.footer__bottom {
  border-top: 1px solid var(--gray-700); margin-top: 1.5rem; padding-top: 1.5rem;
  text-align: center; color: var(--gray-500);
}
.footer__disclaimer { font-size: .75rem; padding-inline: 1rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem);
  max-width: min(92vw, 32rem); padding: .8rem 1.2rem; border-radius: var(--radius);
  background: var(--gray-800); color: var(--white); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 100; text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.spinner {
  display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em;
  border: 2px solid rgb(255 255 255 / .4); border-top-color: var(--white);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
