/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg: #040b1a;
  --bg-alt: #0c1427;
  --card: #101b33;
  --accent: #6c5ee6;
  --accent-strong: #9c7cff;
  --text: #f4f6ff;
  --text-muted: #c6cbe0;
  --success: #30d158;
  --warning: #ffb347;
  font-family: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.is-hidden {
  display: none !important;
}

.landing {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 3rem clamp(1rem, 4vw, 5rem);
}

.flash {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 500;
  background: rgba(156, 124, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.flash--alert {
  background: rgba(255, 105, 97, 0.15);
  border-color: rgba(255, 105, 97, 0.4);
}

.flash--notice {
  background: rgba(48, 209, 88, 0.12);
  border-color: rgba(48, 209, 88, 0.35);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero__eyebrow,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero__lead {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero__benefits li::before {
  content: "•";
  color: var(--accent-strong);
  margin-right: 0.4rem;
}

.hero__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero__metrics dt {
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.hero__metrics dd {
  margin: 0;
  color: var(--text-muted);
}

.hero__panel {
  background: linear-gradient(160deg, var(--card), #182243);
  border-radius: 1.5rem;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

#uploader-panel {
  scroll-margin-top: 80px;
}

.panel__tabs {
  display: flex;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 0.35rem;
  margin-bottom: 1.5rem;
}

.panel__tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.panel__tab.is-active {
  background: rgba(108, 94, 230, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.panel__tab:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.panel__pane {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel__title {
  margin: 0;
}

.panel__subtitle {
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.upload-form__dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.upload-form__dropzone:hover {
  border-color: var(--accent-strong);
  transform: translateY(-2px);
}

.upload-form__dropzone .icon {
  font-size: 2rem;
}

.upload-form__filename {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.upload-form__actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.upload-form__hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(108, 94, 230, 0.35);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--secondary {
  background: #ffffff;
  color: #090e21;
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--text);
}

.btn.is-disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

.btn--full {
  width: 100%;
}

.section {
  background: var(--bg-alt);
  padding: 2.5rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.section--sponsored {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
}

.adsense-slot {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(4, 11, 26, 0.8);
}

.adsense-slot ins {
  margin: 0 auto;
  width: 100%;
}

.section--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.feature-list h3 {
  margin-bottom: 0.3rem;
}

.section--steps {
  background: linear-gradient(120deg, rgba(108, 94, 230, 0.2), rgba(9, 14, 33, 0.9));
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.steps-grid article {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.steps-grid .steps {
  margin-top: 0;
}

.steps {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.5rem;
}

.steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.steps h4 {
  margin: 0 0 0.25rem;
}

.steps__index {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.section--testimonial {
  text-align: center;
  background: radial-gradient(circle at top, rgba(108, 94, 230, 0.2), transparent),
    var(--bg-alt);
}

.section--testimonial blockquote {
  font-size: 1.3rem;
  font-weight: 500;
  margin: 0;
}

.testimonial__author {
  margin-top: 1rem;
  color: var(--text-muted);
}

.section--faq .faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.section--faq article {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1rem;
  padding: 1rem;
}

.article {
  max-width: 860px;
  margin: 0 auto 4rem;
  padding: clamp(2.5rem, 4vw, 3.5rem);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.article__hero {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: linear-gradient(135deg, rgba(108, 94, 230, 0.35), rgba(15, 24, 48, 0.95));
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article__hero p {
  color: var(--text-muted);
  max-width: 42ch;
}

.article-section {
  display: grid;
  grid-template-columns: minmax(44px, 56px) 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.article-section__index {
  display: flex;
  height: 44px;
  width: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(108, 94, 230, 0.25);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 1.1rem;
}

.article-section h2 {
  margin: 0 0 0.5rem;
}

.article-section p,
.article-section ul {
  margin: 0;
  color: var(--text-muted);
}

.article-section ul {
  padding-left: 1rem;
  display: grid;
  gap: 0.35rem;
}

.article-card {
  border-radius: 1.25rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.article-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.article__grid {
  display: grid;
  gap: 1.5rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tool-form {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

.tool-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tool-form__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tool-form__row input,
.tool-form__row select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  color: var(--text);
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  outline: none;
}

.tool-form__row input:focus,
.tool-form__row select:focus {
  border-color: rgba(156, 124, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(156, 124, 255, 0.25);
}

.tool-form__row select {
  cursor: pointer;
}

.tool-form__suffix {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tool-result {
  background: rgba(108, 94, 230, 0.12);
  border: 1px solid rgba(108, 94, 230, 0.35);
  border-radius: 1rem;
  padding: 1.25rem;
  display: grid;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.tool-result strong {
  color: #fff;
}

.article--legal {
  gap: 2rem;
}

.article__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article--legal h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.article--legal ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.5rem;
}

.article--legal p {
  color: var(--text-muted);
}

.section--cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(108, 94, 230, 0.5), rgba(9, 14, 33, 0.95));
}

.consent-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, calc(100% - 2rem));
  background: rgba(12, 14, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
}

.consent-banner[hidden] {
  display: none !important;
}

.consent-banner__content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--text-muted);
}

.consent-banner__content strong {
  color: #fff;
  font-size: 1rem;
}

.consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.consent-banner__btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.consent-banner__btn--primary {
  background: var(--accent);
  color: #fff;
}

.consent-banner__btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.consent-banner__link {
  text-decoration: underline;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.download-ready {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(48, 209, 88, 0.1);
  border: 1px solid rgba(48, 209, 88, 0.4);
}

.download-ready.is-hidden {
  display: none;
}

.extraction-ready {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(108, 94, 230, 0.12);
  border: 1px solid rgba(156, 124, 255, 0.4);
}

.extraction-ready__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.extraction-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.extraction-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.extraction-list__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: min(100%, 520px);
}

.extraction-list__info strong {
  font-weight: 600;
  word-break: break-word;
}

.extraction-list__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section--progress {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.section--progress[hidden] {
  display: none !important;
}

.progress-info h2 {
  margin: 0;
}

.progress-info p {
  margin: 0;
  color: var(--text-muted);
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.3s ease;
}

.progress-bar__status {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .landing {
    padding: 2rem 1rem;
  }

  .panel__tabs {
    flex-direction: column;
  }

  .panel__tab {
    width: 100%;
  }

  .hero__metrics {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .section {
    padding: 1.75rem;
  }

  .article {
    padding: 2rem 1.25rem;
    border-radius: 1.5rem;
  }

  .article--legal {
    padding: 2rem 1.25rem;
  }

  .article-section {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: left;
  }

  .article-section__index {
    justify-self: flex-start;
  }

  .extraction-list li {
    flex-direction: column;
    align-items: stretch;
  }

  .extraction-list li .btn {
    width: 100%;
  }
}
