/* main.css — ai-file-fixer web pages
   Design: dark #0f0f0f, off-white #f0f0f0, teal accent #00c896
   No external fonts, no CDN dependencies. Mobile-first. */

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #0f0f0f;
  color: #f0f0f0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #00c896;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.25rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.375rem); }

p {
  color: #c0c0c0;
  max-width: 65ch;
}

/* ─── Layout helpers ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 4rem 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #1e1e1e;
  padding: 0 1.25rem;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  height: 56px;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: #f0f0f0;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav-logo span {
  color: #00c896;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.875rem;
  color: #a0a0a0;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: #f0f0f0;
  text-decoration: none;
}

.nav-links .nav-cta {
  background: #00c896;
  color: #0f0f0f;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.nav-links .nav-cta:hover {
  background: #00b589;
  text-decoration: none;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 5rem 1.25rem 3.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  color: #f0f0f0;
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: normal;
  color: #00c896;
}

.hero .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: #888;
  max-width: 55ch;
  margin: 0 auto 2rem;
}

/* ─── CTA button ─────────────────────────────────────────────────────────── */
.cta-btn {
  display: inline-block;
  background: #00c896;
  color: #0f0f0f;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8125rem 2rem;
  border-radius: 8px;
  border: none;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 0 0 rgba(0, 200, 150, 0);
  cursor: pointer;
}

.cta-btn:hover {
  background: #00b589;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 200, 150, 0.25);
}

.cta-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.cta-sub {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #555;
}

/* ─── Converter widget ───────────────────────────────────────────────────── */
.converter-widget {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 2rem;
  margin: 2.5rem auto;
  max-width: 600px;
  text-align: center;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed #2e2e2e;
  border-radius: 8px;
  padding: 3rem 2rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
}

.drop-zone:hover {
  border-color: #00c896;
  background: rgba(0, 200, 150, 0.03);
}

.drop-zone:focus-visible {
  outline: 2px solid #00c896;
  outline-offset: 2px;
}

.drop-zone.drag-over {
  border-color: #00c896;
  background: rgba(0, 200, 150, 0.07);
  box-shadow: 0 0 0 4px rgba(0, 200, 150, 0.12);
}

.drop-zone-text {
  font-size: 0.9375rem;
  color: #666;
  max-width: none;
}

.drop-zone-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.5;
}

.browse-btn {
  background: none;
  border: none;
  color: #00c896;
  font-size: inherit;
  font-family: inherit;
  text-decoration: underline;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.browse-btn:hover {
  color: #00b589;
}

.file-input {
  display: none;
}

/* Converting state */
.converting {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.converting-text {
  font-size: 0.9375rem;
  color: #888;
  max-width: none;
}

/* Spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #2a2a2a;
  border-top-color: #00c896;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

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

/* Results state */
.results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  text-align: left;
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.result-filename {
  font-size: 0.875rem;
  color: #f0f0f0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-size {
  font-size: 0.75rem;
  color: #555;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #00c896;
  color: #0f0f0f;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.4rem 0.875rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease;
  text-decoration: none;
}

.download-link:hover {
  background: #00b589;
  text-decoration: none;
}

.results-actions {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.convert-another-btn {
  background: none;
  border: 1px solid #2e2e2e;
  color: #888;
  font-size: 0.8125rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.convert-another-btn:hover {
  border-color: #555;
  color: #c0c0c0;
}

/* Error state */
.error-msg {
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.25);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  color: #f08090;
  font-size: 0.9rem;
  text-align: left;
}

.error-msg p {
  color: inherit;
  max-width: none;
}

.error-retry-btn {
  display: inline-block;
  margin-top: 0.875rem;
  background: none;
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #f08090;
  font-size: 0.8125rem;
  padding: 0.35rem 0.875rem;
  border-radius: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.error-retry-btn:hover {
  border-color: rgba(220, 53, 69, 0.6);
  background: rgba(220, 53, 69, 0.06);
}

/* ─── Why section ────────────────────────────────────────────────────────── */
.why {
  border-top: 1px solid #1e1e1e;
}

.why h2 {
  color: #f0f0f0;
  margin-bottom: 1rem;
}

.why p + p {
  margin-top: 0.75rem;
}

/* ─── Two ways section ───────────────────────────────────────────────────── */
.two-ways {
  border-top: 1px solid #1e1e1e;
}

.two-ways h2 {
  color: #f0f0f0;
  margin-bottom: 1.75rem;
  text-align: center;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: #383838;
}

.card.highlighted {
  border-color: #00c896;
  box-shadow: 0 0 0 1px rgba(0, 200, 150, 0.15), inset 0 0 30px rgba(0, 200, 150, 0.03);
}

.card h3 {
  color: #f0f0f0;
  margin-bottom: 0.625rem;
}

.card .card-tag {
  display: inline-block;
  background: rgba(0, 200, 150, 0.12);
  color: #00c896;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.9rem;
  max-width: none;
}

.card ul {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card ul li {
  font-size: 0.875rem;
  color: #888;
  padding-left: 1.25rem;
  position: relative;
}

.card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #00c896;
  font-size: 0.75rem;
  line-height: 1.6;
}

/* ─── How it works ───────────────────────────────────────────────────────── */
.how-it-works {
  border-top: 1px solid #1e1e1e;
}

.how-it-works h2 {
  color: #f0f0f0;
  margin-bottom: 2rem;
  text-align: center;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 200, 150, 0.12);
  border: 1px solid rgba(0, 200, 150, 0.3);
  color: #00c896;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.step-body h3 {
  color: #f0f0f0;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.step-body p {
  font-size: 0.9rem;
  max-width: none;
}

/* ─── FAQ ────────────────────────────────────────────────────────────────── */
.faq {
  border-top: 1px solid #1e1e1e;
}

.faq h2 {
  color: #f0f0f0;
  margin-bottom: 1.75rem;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid #1e1e1e;
}

.faq-item:first-child {
  border-top: 1px solid #1e1e1e;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: #f0f0f0;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  padding: 1.1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.faq-question:hover {
  color: #00c896;
}

.faq-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-bottom: 3px;
}

.faq-item.open .faq-chevron {
  transform: rotate(-135deg);
  margin-bottom: -3px;
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.faq-item.open .faq-answer {
  max-height: 800px;
  padding-bottom: 1rem;
}

.faq-answer p {
  font-size: 0.9rem;
  max-width: none;
  line-height: 1.7;
}

.faq-answer p + p {
  margin-top: 0.6rem;
}

/* ─── Related pages ──────────────────────────────────────────────────────── */
.related {
  border-top: 1px solid #1e1e1e;
}

.related h2 {
  color: #f0f0f0;
  margin-bottom: 1.5rem;
  text-align: center;
}

.related-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

@media (min-width: 500px) {
  .related-links {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.related-link {
  display: block;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  color: #c0c0c0;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}

.related-link:hover {
  border-color: #00c896;
  color: #f0f0f0;
  text-decoration: none;
}

.related-link strong {
  display: block;
  color: #f0f0f0;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid #1e1e1e;
  padding: 2rem 1.25rem;
  text-align: center;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #f0f0f0;
  letter-spacing: -0.02em;
}

.footer-logo span {
  color: #00c896;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
}

.footer-links a {
  font-size: 0.8125rem;
  color: #555;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #888;
  text-decoration: none;
}

.footer-copy {
  font-size: 0.75rem;
  color: #3a3a3a;
  max-width: none;
}

/* ─── Privacy badge ──────────────────────────────────────────────────────── */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 200, 150, 0.07);
  border: 1px solid rgba(0, 200, 150, 0.2);
  border-radius: 20px;
  padding: 0.3rem 0.875rem;
  font-size: 0.75rem;
  color: #00c896;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

/* ─── Utility ────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.muted { color: #666; }
.accent { color: #00c896; }

/* ─── Responsive tweaks ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero {
    padding: 3rem 1rem 2.5rem;
  }

  section {
    padding: 3rem 1rem;
  }

  .converter-widget {
    padding: 1.25rem;
    border-radius: 8px;
  }

  .drop-zone {
    padding: 2rem 1rem;
  }

  .result-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .download-link {
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }
}
