:root {
  color-scheme: light;
  --bg: #f6f1e7;
  --bg-deep: #efe6d6;
  --ink: #1d1a17;
  --muted: #6e655c;
  --accent: #e46f3d;
  --accent-dark: #ba4f25;
  --card: #fffaf2;
  --stroke: #d9cbb6;
  --shadow: 0 20px 50px rgba(45, 28, 18, 0.12);
  --radius: 24px;
  --font-title: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(circle at 20% 10%, #fff6e8 0%, transparent 55%),
    radial-gradient(circle at 80% 0%, #f4ddc6 0%, transparent 40%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero {
  position: relative;
  padding: 32px 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff7eb 0%, #ffe0c6 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.hero-orb {
  position: absolute;
  right: -40px;
  top: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(228, 111, 61, 0.35), transparent 70%);
  filter: blur(2px);
}

.eyebrow {
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

h1 {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3rem);
}

.headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.headline-part {
  display: inline-flex;
}

.format-select {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid rgba(228, 111, 61, 0.35);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 4px),
    calc(100% - 13px) calc(1em + 4px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
  cursor: pointer;
}

.format-select:focus {
  outline: 2px solid rgba(228, 111, 61, 0.35);
  outline-offset: 2px;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.dropzone {
  position: relative;
  border-radius: var(--radius);
  border: 2px dashed var(--stroke);
  background: rgba(255, 250, 242, 0.8);
  padding: 36px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.dropzone.dragover {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(228, 111, 61, 0.15);
  transform: translateY(-2px);
}

.drop-content {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  text-align: center;
}

.drop-icon {
  font-size: 2.5rem;
  font-family: var(--font-title);
  color: var(--accent);
}

.drop-title {
  margin: 0;
  font-weight: 600;
  font-size: 1.2rem;
}

.drop-sub {
  margin: 6px 0 0;
  color: var(--muted);
}

#file-input {
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status {
  font-size: 0.95rem;
  color: var(--muted);
}

.buttons {
  display: flex;
  gap: 12px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

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

.dropzone:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(228, 111, 61, 0.15);
}

.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 20px rgba(228, 111, 61, 0.3);
}

.primary:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.ghost {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--ink);
}

.ghost:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.support {
  background: rgba(255, 250, 242, 0.7);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.support h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--ink);
}

.support p {
  margin: 6px 0 0;
}

.support-note {
  font-size: 0.85rem;
  opacity: 0.8;
}

.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.file-card {
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
  border: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 20px rgba(30, 20, 10, 0.05);
  min-height: 160px;
}

.file-card h3 {
  margin: 0;
  font-size: 1rem;
  word-break: break-all;
}

.file-meta {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.file-actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(228, 111, 61, 0.12);
  color: var(--accent-dark);
}

.download-btn {
  background: #1d1a17;
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.download-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 26px;
  }

  .headline {
    gap: 6px;
  }

  .format-select {
    font-size: 1.6rem;
  }

  .drop-content {
    flex-direction: column;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .buttons {
    width: 100%;
    justify-content: space-between;
  }
}
