:root {
  --ink: #13261f;
  --moss: #1f4d3a;
  --leaf: #2f6b4f;
  --sand: #e7efe8;
  --paper: #f4f7f4;
  --mist: #c5d6cb;
  --amber: #b86b2a;
  --line: rgba(19, 38, 31, 0.14);
  --shadow: 0 18px 50px rgba(19, 38, 31, 0.12);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--paper);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(47, 107, 79, 0.22), transparent 60%),
    radial-gradient(700px 420px at 90% 10%, rgba(184, 107, 42, 0.16), transparent 55%),
    linear-gradient(165deg, #eef4ef 0%, #f7faf7 45%, #e8f0ea 100%);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.04) translateY(-12px); }
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 6vw;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  gap: 1.25rem;
}

.nav a {
  color: var(--moss);
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover { color: var(--amber); }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: end;
  min-height: calc(100vh - 5rem);
  padding: 2rem 6vw 4rem;
}

.brand-hero {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 0.95;
  font-weight: 700;
  color: var(--moss);
  animation: rise 0.9s ease both;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.25;
  max-width: 18ch;
  animation: rise 1s ease 0.08s both;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 38ch;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(19, 38, 31, 0.82);
  animation: rise 1.05s ease 0.14s both;
}

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

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  padding: 0.75rem 1.15rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

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

.btn.primary {
  background: var(--moss);
  color: #f4faf6;
}

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

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

.hero-visual {
  min-height: 280px;
  position: relative;
}

.helix {
  position: absolute;
  inset: 8% 8% 0;
  border-radius: 40% 60% 55% 45%;
  background:
    repeating-linear-gradient(
      -28deg,
      transparent 0 10px,
      rgba(31, 77, 58, 0.12) 10px 12px
    ),
    linear-gradient(145deg, rgba(47, 107, 79, 0.35), rgba(184, 107, 42, 0.22));
  box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.workspace,
.about {
  padding: 3.5rem 6vw;
  border-top: 1px solid var(--line);
}

.workspace h2,
.about h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-lede {
  margin: 0 0 1.75rem;
  max-width: 52ch;
  color: rgba(19, 38, 31, 0.78);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 0.2rem;
  margin-right: 1rem;
  font: inherit;
  font-weight: 600;
  color: rgba(19, 38, 31, 0.55);
  cursor: pointer;
}

.tab.active {
  color: var(--moss);
  border-bottom-color: var(--amber);
}

.panel { display: none; }
.panel.active { display: block; }

.form {
  display: grid;
  gap: 1rem;
  max-width: 720px;
  padding: 1.25rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}

label span { font-weight: 500; }

input[type="file"],
input[type="number"],
input[type="password"],
input[type="text"],
select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 0.35rem;
  padding: 0.65rem 0.7rem;
  font: inherit;
}

.file-field,
.dropzone {
  padding: 1rem;
  border: 1px dashed rgba(31, 77, 58, 0.35);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.4);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  position: relative;
  cursor: pointer;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-title { font-weight: 600; }

.dropzone-hint {
  font-size: 0.9rem;
  color: rgba(19, 38, 31, 0.65);
}

.dropzone-file {
  font-size: 0.92rem;
  color: var(--moss);
  font-weight: 500;
}

.dropzone.dragover {
  border-color: var(--amber);
  background: rgba(184, 107, 42, 0.08);
  transform: translateY(-1px);
}

.dropzone.has-file {
  border-style: solid;
  border-color: rgba(31, 77, 58, 0.45);
}

.form.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

.btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.check input { width: auto; }

.status {
  margin-top: 1rem;
  color: var(--moss);
  font-weight: 500;
}

.status.busy::before {
  content: "";
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  border: 2px solid rgba(31, 77, 58, 0.25);
  border-top-color: var(--moss);
  animation: spin 0.7s linear infinite;
  vertical-align: -0.05rem;
}

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

.status.error { color: #8a2e1f; }

.result {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  overflow: auto;
  max-width: 720px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.steps {
  margin: 0;
  padding-left: 1.2rem;
  max-width: 48ch;
  line-height: 1.7;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 6vw 2rem;
  border-top: 1px solid var(--line);
  color: rgba(19, 38, 31, 0.65);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1rem;
  }

  .hero-visual { min-height: 180px; order: -1; }

  .grid-2 { grid-template-columns: 1fr; }

  .brand-hero { font-size: clamp(2.4rem, 12vw, 3.6rem); }
}
