:root {
  --ink: #162019;
  --ink-soft: #3d4a42;
  --paper: #f3f6f2;
  --mist: #d7e4dc;
  --leaf: #1f6b4f;
  --leaf-deep: #134836;
  --sand: #e8dcc8;
  --line: rgba(22, 32, 25, 0.12);
  --shadow: 0 24px 60px rgba(22, 32, 25, 0.12);
  --radius: 18px;
  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 55% at 12% -10%, rgba(31, 107, 79, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(232, 220, 200, 0.7), transparent 50%),
    linear-gradient(165deg, #eef3ee 0%, #f7f4ee 45%, #e7eee8 100%);
  animation: drift 18s ease-in-out infinite alternate;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: multiply;
}

@keyframes drift {
  from {
    transform: scale(1) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.04) translate3d(-1.5%, 1%, 0);
  }
}

.site-header {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
}

.local-badge {
  display: inline-block;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--leaf-deep);
  opacity: 0;
  animation: rise 0.7s ease forwards 0.1s;
}

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  display: grid;
  gap: 1.75rem;
}

.hero-copy {
  max-width: 34rem;
}

.brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--ink);
  opacity: 0;
  animation: rise 0.8s ease forwards 0.15s;
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
  opacity: 0;
  animation: rise 0.8s ease forwards 0.28s;
}

.lede {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 34ch;
  opacity: 0;
  animation: rise 0.8s ease forwards 0.4s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropzone {
  min-height: min(42vh, 360px);
  border: 1.5px dashed rgba(22, 32, 25, 0.28);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(215, 228, 220, 0.35));
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  transition: border-color 0.25s ease, transform 0.35s ease, background 0.25s ease;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.5s, pulse-border 3.5s ease-in-out infinite 1.4s;
}

.dropzone.is-dragover {
  border-color: var(--leaf);
  background: linear-gradient(145deg, rgba(31, 107, 79, 0.12), rgba(255, 255, 255, 0.55));
  transform: scale(1.01);
}

@keyframes pulse-border {
  0%,
  100% {
    border-color: rgba(22, 32, 25, 0.28);
  }
  50% {
    border-color: rgba(31, 107, 79, 0.55);
  }
}

.dropzone-inner {
  text-align: center;
  padding: 2rem;
}

.drop-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.drop-sub {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  background: var(--leaf);
  color: #f7fbf8;
}

.btn-primary:hover {
  background: var(--leaf-deep);
}

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

.modes {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  opacity: 0;
  animation: rise 0.8s ease forwards 0.65s;
}

.modes legend {
  padding: 0;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.mode {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.mode:has(input:checked) {
  border-color: rgba(31, 107, 79, 0.45);
  background: rgba(255, 255, 255, 0.7);
}

.mode input {
  margin-top: 0.3rem;
  accent-color: var(--leaf);
}

.mode strong {
  display: block;
  font-weight: 700;
}

.mode span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.bulk-rename {
  display: grid;
  gap: 0.45rem;
  opacity: 0;
  animation: rise 0.8s ease forwards 0.75s;
}

.bulk-rename label {
  display: grid;
  gap: 0.4rem;
}

.bulk-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.bulk-rename input {
  width: 100%;
  max-width: 22rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bulk-rename input:focus {
  outline: none;
  border-color: rgba(31, 107, 79, 0.55);
  background: rgba(255, 255, 255, 0.92);
}

.bulk-rename input::placeholder {
  color: rgba(61, 74, 66, 0.55);
}

.bulk-hint {
  margin: 0;
  max-width: 42ch;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.bulk-hint code {
  font-size: 0.84em;
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: rgba(31, 107, 79, 0.08);
}

.results,
.notes {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem 2.5rem;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.results-head h2,
.notes h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.results-list {
  display: grid;
  gap: 0.75rem;
}

.result-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  animation: rise 0.45s ease;
}

.result-main h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.result-main p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.findings {
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
  color: var(--leaf-deep);
  font-size: 0.88rem;
}

.status-error .result-main p {
  color: #8a2f2f;
}

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid rgba(31, 107, 79, 0.2);
  border-top-color: var(--leaf);
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

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

.notes p {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
  max-width: 62ch;
}

.caveat {
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .hero {
    padding-top: 1.5rem;
  }

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

  .result-actions {
    display: flex;
  }

  .result-actions .btn {
    width: 100%;
  }
}

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

  .local-badge,
  .brand,
  .hero-copy h1,
  .lede,
  .dropzone,
  .modes,
  .bulk-rename {
    opacity: 1;
  }
}
