:root {
  --ink: #13231e;
  --muted: #61706a;
  --paper: #f5f3ec;
  --surface: #fffef9;
  --line: #d8ddd7;
  --accent: #ccff3d;
  --accent-dark: #1f431f;
  --danger: #b52c31;
  --shadow: 0 24px 70px rgba(25, 46, 38, 0.12);
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, rgba(204, 255, 61, 0.14), transparent 27rem),
    linear-gradient(rgba(19, 35, 30, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 35, 30, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 44px 44px, 44px 44px, auto;
}

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

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  background: var(--accent);
  border-radius: 11px;
  transform: rotate(-4deg);
}

.brand-mark svg,
.privacy-pill svg,
.upload-icon svg,
.download-button svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.brand-mark svg { width: 27px; }

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  color: #42524c;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 254, 249, 0.75);
  border: 1px solid var(--line);
  border-radius: 99px;
}

.privacy-pill svg { width: 15px; }

main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 172px);
  padding: 55px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(470px, 1.1fr);
  align-items: center;
  gap: clamp(50px, 9vw, 120px);
}

.hero-copy { padding-bottom: 20px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: #50605a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 6.6vw, 5.75rem);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 0.96;
}

h1 span { position: relative; z-index: 0; }
h1 span::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.02em;
  right: -0.05em;
  bottom: 0.05em;
  height: 0.2em;
  background: var(--accent);
  transform: rotate(-1deg);
}

.intro {
  max-width: 530px;
  margin: 30px 0 35px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.benefits {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
  list-style: none;
}

.benefits li {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 0.9rem;
  font-weight: 600;
}

.benefits span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  font-size: 0.63rem;
  font-weight: 700;
  background: rgba(204, 255, 61, 0.34);
  border-radius: 50%;
}

.tool-card {
  position: relative;
  min-height: 470px;
  padding: 20px;
  background: rgba(255, 254, 249, 0.96);
  border: 1px solid rgba(19, 35, 30, 0.11);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.tool-card::before,
.tool-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 70px;
  height: 70px;
  background: var(--accent);
}
.tool-card::before { top: -9px; right: -9px; border-radius: 8px 26px 8px 8px; }
.tool-card::after { bottom: -10px; left: -10px; border-radius: 8px 8px 8px 26px; }

.dropzone {
  min-height: 428px;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1.5px dashed #abb8af;
  border-radius: 18px;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragging {
  background: rgba(204, 255, 61, 0.1);
  border-color: #67811d;
  outline: none;
  transform: translateY(-2px);
}

.upload-icon {
  width: 74px;
  height: 74px;
  margin-bottom: 23px;
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  background: var(--accent);
  border-radius: 23px;
  box-shadow: 0 9px 24px rgba(119, 154, 20, 0.22);
}
.upload-icon svg { width: 35px; }
.dropzone h2 { margin: 0 0 8px; font-size: 1.35rem; letter-spacing: -0.03em; }
.dropzone p { margin: 0 0 45px; color: var(--muted); font-size: 0.93rem; }
.dropzone p span {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}
.dropzone small { color: #87928e; font-size: 0.72rem; }

.editor { min-height: 428px; display: flex; flex-direction: column; }
.editor-head {
  padding: 5px 4px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.editor-label, .file-name { margin: 0; }
.editor-label { color: var(--muted); font-size: 0.72rem; }
.file-name {
  max-width: 320px;
  overflow: hidden;
  font-size: 0.87rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-button {
  padding: 7px 10px;
  color: #41524b;
  font-size: 0.78rem;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.text-button:hover { background: #eef0eb; }

.preview-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.preview-grid figure { min-width: 0; margin: 0; }
.image-frame {
  height: 255px;
  padding: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #eef0eb;
  border: 1px solid #e1e5df;
  border-radius: 14px;
}
.image-frame img { width: 100%; height: 100%; object-fit: contain; }
.checkerboard {
  background-color: #f8f8f4;
  background-image:
    linear-gradient(45deg, #dde2dc 25%, transparent 25%),
    linear-gradient(-45deg, #dde2dc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dde2dc 75%),
    linear-gradient(-45deg, transparent 75%, #dde2dc 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}
figcaption {
  padding: 7px 3px 12px;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.primary-button,
.download-button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 700;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.primary-button {
  color: #f9fff6;
  background: var(--ink);
  box-shadow: 0 9px 20px rgba(19, 35, 30, 0.16);
}
.primary-button:hover:not(:disabled), .download-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 22px rgba(19, 35, 30, 0.2);
}
.primary-button:disabled { cursor: wait; opacity: 0.78; }
.download-button { margin-top: 9px; color: var(--accent-dark); background: var(--accent); }
.download-button svg { width: 20px; }
.spinner {
  width: 18px;
  height: 18px;
  display: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
.primary-button.is-loading .spinner { display: block; }
.status-message {
  min-height: 20px;
  margin: 10px 5px -5px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}
.status-message.is-error { color: var(--danger); font-weight: 600; }

footer {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #77827e;
  font-size: 0.72rem;
  border-top: 1px solid rgba(19, 35, 30, 0.1);
}
footer p { margin: 0; }
[hidden] { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 35px; }
  .hero-copy { text-align: center; }
  .eyebrow, .benefits li { justify-content: center; }
  .intro { margin-right: auto; margin-left: auto; }
  .tool-card { width: min(100%, 640px); margin: 0 auto; }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { height: 76px; }
  .privacy-pill { padding: 7px 9px; font-size: 0.7rem; }
  .hero { min-height: auto; padding: 38px 0 58px; gap: 45px; }
  h1 { font-size: clamp(2.65rem, 14vw, 4rem); }
  .intro { font-size: 0.98rem; }
  .tool-card { padding: 12px; border-radius: 21px; }
  .dropzone { min-height: 400px; }
  .preview-grid { grid-template-columns: 1fr; }
  footer { padding: 22px 0; flex-direction: column; align-items: flex-start; }
}

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