:root {
  color-scheme: light;
  --ink: #203127;
  --muted: #68736b;
  --cream: #f7f0df;
  --paper: #fffdf7;
  --green: #244b35;
  --green-bright: #dff064;
  --potato: #c9893b;
  --line: rgba(32, 49, 39, 0.14);
  --shadow: 0 24px 70px rgba(40, 55, 37, 0.14);
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(circle at 13% 7%, rgba(223, 240, 100, 0.34), transparent 24rem),
    radial-gradient(circle at 94% 88%, rgba(201, 137, 59, 0.16), transparent 26rem),
    var(--cream);
}

button, input { font: inherit; }
button { color: inherit; }

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 840;
  letter-spacing: -0.04em;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgba(80, 50, 14, 0.2));
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.55);
  font-size: 12px;
  font-weight: 700;
}

.privacy-pill span { color: #6c932c; font-size: 10px; }

main {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(460px, 1.18fr);
  gap: clamp(48px, 7vw, 108px);
  align-items: center;
  padding-block: clamp(62px, 9vw, 118px);
}

.eyebrow,
.card-kicker {
  margin: 0 0 18px;
  color: #67822c;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 6.4vw, 96px);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.91;
}

h1 em { color: var(--potato); font-weight: 500; }

.lede {
  max-width: 520px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.steps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.steps span:not(.step-line) { display: inline-flex; align-items: center; gap: 7px; }
.steps b {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--green-bright);
  font-size: 10px;
}
.step-line { width: 22px; height: 1px; background: var(--line); }

.editor-card {
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(32, 49, 39, 0.11);
  border-radius: 30px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.editor-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.card-kicker { margin-bottom: 6px; }
h2 { margin: 0; font-size: 25px; letter-spacing: -0.04em; }
.file-meta { color: var(--muted); font-size: 11px; white-space: nowrap; }

.drop-zone {
  position: relative;
  display: grid;
  min-height: 390px;
  overflow: hidden;
  place-items: center;
  border: 1.5px dashed rgba(36, 75, 53, 0.3);
  border-radius: 21px;
  outline: 0;
  background:
    linear-gradient(45deg, rgba(36, 75, 53, .035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(36, 75, 53, .035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(36, 75, 53, .035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(36, 75, 53, .035) 75%),
    #faf7ec;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  background-size: 18px 18px;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background-color 160ms ease;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.is-dragging {
  border-color: var(--green);
  background-color: #f4f6df;
  transform: translateY(-1px);
}

.empty-state {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 34px;
  text-align: center;
}

.upload-icon {
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 22px;
  background: var(--green);
  color: var(--green-bright);
  box-shadow: 0 12px 24px rgba(36, 75, 53, 0.2);
}

.upload-icon svg,
.download-button svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state strong { font-size: 19px; letter-spacing: -0.02em; }
.empty-state span { margin: 7px 0 20px; color: var(--muted); font-size: 12px; }

.choose-button,
.secondary-button,
.download-button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.choose-button {
  padding: 11px 16px;
  background: var(--green-bright);
  color: var(--green);
}

.demo-button {
  margin-top: 12px;
  padding: 3px 6px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

canvas {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
}

.corner-label {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(32, 49, 39, 0.84);
  color: white;
  font-size: 10px;
  font-weight: 800;
  backdrop-filter: blur(7px);
}

.error-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f9e0d3;
  color: #823a24;
  font-size: 12px;
}

.controls { margin-top: 22px; }
.range-control { display: flex; justify-content: space-between; font-size: 12px; font-weight: 760; }
.range-control output { color: var(--muted); font-variant-numeric: tabular-nums; }

input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 15px 0 24px;
  border-radius: 999px;
  appearance: none;
  background: #d7d9c5;
  accent-color: var(--green);
}
input[type="range"]::-webkit-slider-thumb {
  width: 19px;
  height: 19px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  appearance: none;
  background: var(--green);
  box-shadow: 0 2px 8px rgba(32, 49, 39, 0.25);
}

.actions { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 12px; }
.secondary-button { padding: 14px; border: 1px solid var(--line); background: transparent; }
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px;
  background: var(--green);
  color: white;
  box-shadow: 0 10px 20px rgba(36, 75, 53, 0.18);
}
.download-button svg { width: 18px; }
button:hover { transform: translateY(-1px); }
.download-button:hover { box-shadow: 0 13px 25px rgba(36, 75, 53, 0.25); }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(111, 145, 49, .42); outline-offset: 3px; }

.privacy-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.privacy-note span { color: #78962e; }

footer {
  display: flex;
  justify-content: space-between;
  padding-block: 25px 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

[hidden] { display: none !important; }

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; max-width: 680px; gap: 48px; }
  .intro { text-align: center; }
  .lede { margin-inline: auto; }
  .steps { justify-content: center; }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 28px, 680px); }
  .site-header { min-height: 75px; }
  .privacy-pill { display: none; }
  main { padding-block: 48px 60px; }
  h1 { font-size: clamp(48px, 17vw, 72px); }
  .lede { font-size: 16px; }
  .steps { gap: 7px; }
  .steps span { font-size: 10px; }
  .step-line { width: 10px; }
  .editor-card { border-radius: 22px; }
  .drop-zone { min-height: 315px; }
  .actions { grid-template-columns: 1fr; }
  footer { align-items: center; flex-direction: column; gap: 7px; text-align: center; }
}

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