/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }

.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.3rem 0.9rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 30%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, var(--accent) 0%, transparent 70%);
  opacity: 0.06;
  pointer-events: none;
  border-radius: 50%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.3rem 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s var(--ease) both;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 720px;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.6s 0.1s var(--ease) both;
}
h1 em { font-style: italic; color: var(--accent); }

.subhead {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--muted);
  max-width: 420px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  font-style: italic;
  animation: fadeUp 0.6s 0.2s var(--ease) both;
}

/* ── UPLOAD ZONE ── */
.upload-wrap {
  width: 100%;
  max-width: 500px;
  animation: fadeUp 0.6s 0.3s var(--ease) both;
}

.drop-zone {
  background: var(--bg2);
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  padding: 3rem 2rem;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: center;
}
.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--bg3);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.drop-zone.drag-over { border-style: solid; }

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.9rem;
  transition: transform 0.3s var(--ease);
}
.drop-zone:hover .drop-icon { transform: translateY(-4px); }

.drop-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.drop-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── FILE SELECTED ── */
.file-selected {
  display: none;
  align-items: center;
  gap: 0.9rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
  text-align: left;
}
.file-selected.show { display: flex; }

.file-icon { font-size: 1.6rem; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size {
  font-family: 'DM Mono', monospace;
  font-size: 0.66rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.file-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.2s;
}
.file-remove:hover { color: var(--red); }

/* ── ERROR ── */
.error-msg {
  display: none;
  align-items: flex-start;
  gap: 0.5rem;
  background: rgba(200,112,112,0.07);
  border: 1px solid rgba(200,112,112,0.25);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.73rem;
  color: var(--red);
  line-height: 1.5;
  text-align: left;
}
.error-msg.show { display: flex; }
.error-msg::before { content: '⚠'; flex-shrink: 0; }

/* ── GENERATE BUTTON ── */
.generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.75rem;
  background: var(--cta);
  color: var(--cta-text);
  font-family: 'DM Mono', monospace;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.95rem 2rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.generate-btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-2px); }
.generate-btn:active:not(:disabled) { transform: translateY(0); }
.generate-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.generate-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.upload-note {
  margin-top: 0.75rem;
  font-size: 0.73rem;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  text-align: center;
}

/* ── LOADING OVERLAY ── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,22,16,0.93);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.25rem;
}
.loading-overlay.show { display: flex; }

.loading-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
}
.loading-msg {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  min-height: 18px;
}
.loading-bar-wrap {
  width: 260px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 2px;
  transition: width 0.5s var(--ease);
  width: 0%;
}
.loading-pct {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

/* ── HOW IT WORKS ── */
.features {
  padding: 4rem 1.5rem 3rem;
  max-width: 860px;
  margin: 0 auto;
}
.features-label {
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-step {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}
.feature-icon { font-size: 1.4rem; margin-bottom: 0.6rem; display: block; }
.feature-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.feature-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
footer span { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 500px) {
  nav { padding: 1rem 1.25rem; }
  .hero { padding: 7rem 1.25rem 3rem; }
}

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

.nav-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

.nav-link-highlight {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.3rem 0.9rem;
}
.nav-link-highlight:hover { border-color: var(--accent); color: var(--accent); }
