/* ==========================================================================
   Clone.it — Components
   Chip badge, wordmark logo, tagline, URL input, download button,
   status line, progress steps, post-rip block, footer.
   ========================================================================== */

/* ---------- CHIP (top badge) ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero > * {
  width: min(640px, 100%);
  text-align: center;
  margin-inline: auto;
}

.hero > * + * {
  margin-top: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  padding-block: 7px;
  padding-inline: 16px;
  font: 500 12.5px / 1 var(--font-sans);
  color: var(--color-fg);
  background: rgba(29, 31, 38, .72);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--radius-chip);
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    background var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.chip:hover {
  background: rgba(34, 36, 44, .8);
  border-color: rgba(255, 255, 255, .08);
  text-decoration: none;
}

.chip__icon {
  opacity: .92;
  flex: 0 0 auto;
}

/* ---------- LOGO (wordmark) ---------- */

.logo {
  margin: 0;
  width: min(374px, 80vw);
}

.logo__wordmark {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 10px 52px rgba(206, 219, 255, .12));
}

/* ---------- TAGLINE ---------- */

.tagline {
  max-width: 580px;
  margin-inline: auto;
  text-align: center;
  color: rgba(255, 255, 255, .58);
  font: 400 16px / 1.45 var(--font-sans);
  letter-spacing: -0.025em;
}

.target-url {
  color: var(--color-fg);
  font-weight: 500;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- RIP FORM ---------- */

.rip-form {
  display: grid;
  gap: 16px;
  width: min(620px, 100%);
  margin-inline: auto;
  justify-items: center;
}

/* ---------- URL INPUT ---------- */

.url-input {
  width: 100%;
  height: 62px;
  padding-inline: 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .06);
  background: rgba(12, 14, 22, .62);
  color: var(--color-fg);
  font: 400 17px / 1.2 var(--font-sans);
  letter-spacing: -0.03em;
  outline: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    0 10px 30px rgba(0, 0, 0, .34);
  transition:
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    background var(--dur-base) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}

.url-input::placeholder {
  color: rgba(255, 255, 255, .62);
}

.url-input:hover {
  border-color: rgba(255, 255, 255, .08);
}

.url-input:focus-visible {
  border-color: rgba(160, 190, 255, .22);
  background: rgba(18, 22, 34, .66);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 0 0 4px rgba(120, 160, 255, .06),
    0 14px 42px rgba(0, 0, 0, .38);
  outline: none;
}

/* ---------- DOWNLOAD BUTTON ---------- */

.download-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  min-width: 172px;
  padding-inline: 22px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(to bottom, #ffffff 0%, #eef0f4 100%);
  color: var(--color-btn-fg);
  font: 400 17px / 1 var(--font-serif);
  letter-spacing: -0.015em;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 -1px 0 rgba(0, 0, 0, .08) inset,
    0 0 0 1px rgba(255, 255, 255, .1),
    0 10px 30px rgba(255, 255, 255, .06),
    0 2px 6px rgba(0, 0, 0, .3);
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    opacity var(--dur-base) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}

.download-btn:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 -1px 0 rgba(0, 0, 0, .1) inset,
    0 0 0 1px rgba(255, 255, 255, .14),
    0 12px 32px rgba(255, 255, 255, .1),
    0 4px 10px rgba(0, 0, 0, .35);
  transform: translateY(-1px);
  text-decoration: none;
}

.download-btn:active {
  transform: translateY(0);
}

.download-btn[disabled],
.download-btn.is-loading {
  cursor: progress;
}

.download-btn[disabled] {
  opacity: .8;
}

.download-btn.is-loading .download-btn__label,
.download-btn.is-loading .download-btn__icon {
  visibility: hidden;
}

.download-btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, .22);
  border-top-color: var(--color-btn-fg);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.download-btn__icon {
  flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .download-btn.is-loading::after {
    animation: none;
  }
}

/* ---------- STATUS ---------- */

.status {
  margin: 0;
  min-height: 1.2em;
  color: rgba(255, 255, 255, .48);
  font: 400 12px / 1.4 var(--font-sans);
  text-align: center;
}

html.js[data-page="home"] [data-hero-appear="hero"] {
  opacity: .001;
  transform: translate3d(0, 24px, 0) scale(.984);
  will-change: opacity, transform;
  backface-visibility: hidden;
  transition:
    opacity 980ms cubic-bezier(.18, .86, .2, 1) 120ms,
    transform 1360ms cubic-bezier(.18, .86, .2, 1) 120ms;
}

html.js.is-loaded[data-page="home"] [data-hero-appear="hero"] {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.status[data-state="error"]   { color: var(--color-danger); }
.status[data-state="success"] { color: var(--color-success); }

/* ---------- PROGRESS (confirmation page) ---------- */

.progress {
  width: min(360px, 100%);
  margin-inline: auto;
}

.progress__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.progress__step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-fg-dim);
  font: 400 var(--fs-body) / 1.4 var(--font-sans);
  transition: color var(--dur-base) var(--ease-out);
  text-align: left;
}

.progress__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  flex: 0 0 auto;
  transition:
    background var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.progress__step[data-state="active"] {
  color: var(--color-fg);
}

.progress__step[data-state="active"] .progress__dot {
  background: rgba(120, 140, 255, .9);
  box-shadow: 0 0 14px rgba(120, 140, 255, .55);
  animation: pulse 1.2s var(--ease-out) infinite;
}

.progress__step[data-state="done"] {
  color: var(--color-fg-muted);
}

.progress__step[data-state="done"] .progress__dot {
  background: var(--color-success);
  box-shadow: 0 0 10px rgba(132, 247, 176, .35);
}

.progress__step[data-state="error"] {
  color: var(--color-danger);
}

.progress__step[data-state="error"] .progress__dot {
  background: var(--color-danger);
  box-shadow: 0 0 10px rgba(255, 107, 122, .35);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}

@media (prefers-reduced-motion: reduce) {
  .progress__step[data-state="active"] .progress__dot {
    animation: none;
  }
}

/* ---------- POST-RIP ---------- */

.post-rip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* ---------- FOOTER ---------- */

.foot {
  display: none;
}

/* ---------- MOBILE (≤480px) ---------- */

@media (max-width: 480px) {
  .logo {
    width: min(318px, 84vw);
  }

  .rip-form,
  .progress {
    width: 100%;
  }

  .url-input {
    height: 56px;
    padding-inline: 18px;
    border-radius: 16px;
    font-size: 16px;
  }

  .download-btn {
    min-width: 168px;
    height: 46px;
    padding-inline: 22px;
    font-size: 16px;
  }

  .chip {
    padding-inline: 13px;
    font-size: 12px;
  }

  .tagline {
    max-width: 92vw;
    font-size: 15px;
  }
}
