:root {
  --ink: #20201f;
  --muted: #6d6b66;
  --line: #dedbd2;
  --paper: #f8f7f2;
  --white: #ffffff;
  --accent: #ff5a36;
  --accent-dark: #e74827;
  --blue: #335cff;
  --shadow: 0 24px 70px rgba(44, 39, 30, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 224, 150, .33), transparent 23rem),
    radial-gradient(circle at 92% 28%, rgba(142, 197, 255, .24), transparent 26rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; }
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.04em;
}
.brand-mark {
  width: 30px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -7px -4px 0 var(--accent);
}
.nav-links, .language-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.nav-links a, .language-links a {
  color: #55534f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.nav-links a:hover, .language-links a:hover { color: var(--accent); }
.nav-cta {
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}
.hero { padding: 54px 0 74px; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--accent-dark);
  background: #fff3ed;
  border: 1px solid #ffd4c7;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}
h1 {
  max-width: 920px;
  margin: 18px auto 16px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: .94;
  letter-spacing: -.075em;
}
.hero-copy, .section-lead {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}
.tool-shell {
  max-width: 980px;
  margin: 34px auto 0;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.upload-card {
  min-height: 330px;
  display: grid;
  place-items: center;
  border: 2px dashed #d4d0c7;
  border-radius: 24px;
  background: var(--white);
  cursor: pointer;
  transition: .2s ease;
}
.upload-card:hover, .upload-card.is-dragging {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.upload-inner { text-align: center; padding: 24px; }
.upload-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  color: white;
  border-radius: 50%;
  background: var(--blue);
}
.upload-card h2, .controls h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -.04em;
}
.upload-card p, .controls p, .privacy-line, .file-note {
  color: var(--muted);
  line-height: 1.6;
}
.file-note { display: block; margin-top: 16px; font-size: 13px; }
.primary-btn, .replace-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 850;
  cursor: pointer;
}
.primary-btn {
  color: white;
  background: var(--accent);
}
.primary-btn:hover { background: var(--accent-dark); }
.replace-btn { color: var(--ink); background: #efede6; }
.editor {
  display: none;
  grid-template-columns: 1.05fr .95fr;
  gap: 24px;
  align-items: stretch;
}
.editor.is-active { display: grid; }
.stage-panel, .controls {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
}
.stage-panel { display: grid; place-items: center; min-height: 500px; padding: 24px; }
.crop-stage {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(45deg, #e9e6dd 25%, transparent 25%),
    linear-gradient(-45deg, #e9e6dd 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e9e6dd 75%),
    linear-gradient(-45deg, transparent 75%, #e9e6dd 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.crop-stage.is-moving { cursor: grabbing; }
canvas { display: block; width: 100%; height: 100%; }
.stage-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  color: white;
  background: rgba(32,32,31,.78);
  border-radius: 999px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
.controls { padding: 24px; text-align: left; }
.controls-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  cursor: pointer;
}
.control-group { margin-top: 18px; }
.control-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 850;
}
input[type="range"] { width: 100%; accent-color: var(--accent); }
select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.download-btn, .replace-btn { width: 100%; margin-top: 18px; }
.privacy-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  font-size: 13px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}
.trust-row span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.section { padding: 74px 0; border-top: 1px solid rgba(222,219,210,.7); }
.section-tag {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-align: center;
}
.section h2 {
  max-width: 820px;
  margin: 0 auto 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1;
  letter-spacing: -.06em;
  text-align: center;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}
.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.04em; }
.card p, .faq p { margin: 0; color: var(--muted); line-height: 1.7; }
.steps {
  max-width: 850px;
  margin: 32px auto 0;
  display: grid;
  gap: 14px;
}
.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}
.step b {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
}
.step h3 { margin: 0 0 5px; }
.step p { margin: 0; color: var(--muted); line-height: 1.65; }
.faq {
  max-width: 860px;
  margin: 30px auto 0;
}
details {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  padding: 18px 20px;
  margin-top: 12px;
}
summary {
  cursor: pointer;
  font-weight: 850;
  font-size: 17px;
}
details p { margin-top: 10px; }
.language-block {
  padding: 34px;
  border-radius: 26px;
  background: white;
  border: 1px solid var(--line);
  text-align: center;
  box-shadow: var(--shadow);
}
.language-block p { color: var(--muted); line-height: 1.7; }
footer {
  padding: 34px 0;
  color: #d8d6d0;
  background: var(--ink);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
}
footer a { color: #d8d6d0; text-decoration: none; }
footer a:hover { color: white; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  padding: 12px 16px;
  color: white;
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 16px 38px rgba(0,0,0,.18);
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 860px) {
  nav { align-items: flex-start; flex-direction: column; padding: 18px 0; }
  .nav-links, .language-links { justify-content: flex-start; }
  .editor, .card-grid { grid-template-columns: 1fr; }
  .stage-panel { min-height: auto; }
}
@media (max-width: 520px) {
  .wrap { width: min(100% - 24px, 1120px); }
  .hero { padding-top: 34px; }
  .nav-links a:not(.nav-cta) { display: none; }
  h1 { font-size: 42px; }
  .tool-shell { padding: 10px; border-radius: 22px; }
  .upload-card { min-height: 300px; }
  .crop-stage { width: min(100%, 310px); }
  .controls { padding: 18px; }
  .section { padding: 52px 0; }
  .language-block { padding: 24px 18px; }
}
