:root {
  --ink: #171717;
  --muted: #626262;
  --line: #ded9cf;
  --paper: #fffdf8;
  --panel: #ffffff;
  --accent: #0e7c66;
  --accent-strong: #0a5d4f;
  --gold: #f0b84a;
  --rose: #d45a74;
  --shadow: 0 18px 50px rgba(30, 26, 18, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(255, 253, 248, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.language-toggle {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 720;
}

.is-hidden {
  display: none !important;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 66px);
  padding: clamp(42px, 7vw, 92px) clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.hero-text {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions,
.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 720;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

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

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.hero-preview {
  position: relative;
  min-height: 420px;
}

.sample-card {
  position: absolute;
  width: min(78%, 360px);
  aspect-ratio: 0.78;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sample-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  text-transform: uppercase;
}

.sample-card.original {
  top: 0;
  left: 0;
  background: linear-gradient(150deg, #f9ead8, #e6f1ed 52%, #f7f7f7);
}

.sample-card.line-art {
  right: 0;
  bottom: 0;
}

.sample-shape {
  position: absolute;
  inset: 62px 38px 34px;
  border-radius: 48% 52% 42% 58%;
}

.photo-shape {
  background:
    radial-gradient(circle at 52% 24%, #34302c 0 12%, transparent 13%),
    radial-gradient(circle at 47% 42%, #e2a77c 0 28%, transparent 29%),
    radial-gradient(circle at 52% 72%, #2f6d61 0 32%, transparent 33%);
}

.line-shape {
  background:
    radial-gradient(circle at 52% 24%, transparent 0 11%, #151515 12% 13%, transparent 14%),
    radial-gradient(circle at 47% 42%, transparent 0 27%, #151515 28% 30%, transparent 31%),
    radial-gradient(circle at 52% 72%, transparent 0 31%, #151515 32% 34%, transparent 35%);
}

.tool-band {
  padding: clamp(28px, 5vw, 72px) clamp(14px, 3vw, 40px);
  background: #f2eee5;
  border-bottom: 1px solid var(--line);
}

.tool-shell {
  max-width: 1240px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tool-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.tool-topbar h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.privacy-note {
  padding: 8px 12px;
  border-radius: 999px;
  background: #e4f2ed;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 620px;
}

.controls {
  padding: 22px;
  border-right: 1px solid var(--line);
  background: #fbfaf6;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 178px;
  padding: 20px;
  border: 1px dashed #aaa394;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.upload-box small {
  color: var(--muted);
}

.control-group {
  margin-top: 22px;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
}

select,
input[type="range"] {
  width: 100%;
}

select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input[type="range"] {
  accent-color: var(--accent);
}

.control-row {
  margin-top: 24px;
}

.ai-cta {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-cta-title {
  margin-bottom: 6px;
  font-weight: 800;
}

.ai-cta p:not(.ai-cta-title) {
  color: var(--muted);
  font-size: 14px;
}

.ai-cta .button {
  width: 100%;
  margin-top: 10px;
}

.canvas-area {
  min-width: 0;
  padding: 22px;
}

.canvas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  height: 100%;
}

.canvas-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f6f4ef 25%, transparent 25%),
    linear-gradient(-45deg, #f6f4ef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f6f4ef 75%),
    linear-gradient(-45deg, transparent 75%, #f6f4ef 75%);
  background-color: #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.panel-label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

canvas {
  display: none;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

canvas.is-visible {
  display: block;
}

.empty-state {
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 90px) clamp(18px, 4vw, 32px);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feature-card p,
.faq p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1fr);
  gap: 36px;
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.check-list li {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check-list li::before {
  content: "OK";
  margin-right: 10px;
  color: var(--accent-strong);
  font-weight: 900;
}

.faq details {
  border-top: 1px solid var(--line);
  background: #fffdf8;
}

.ai-section {
  border-top: 1px solid var(--line);
}

.ai-section p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 760;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .hero,
  .workspace,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-preview {
    min-height: 360px;
  }

  .controls {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header,
  .nav,
  .tool-topbar,
  .canvas-grid,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header {
    position: static;
  }

  .canvas-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .canvas-panel {
    min-height: 330px;
  }

  .privacy-note {
    white-space: normal;
  }

  h1 {
    font-size: 42px;
  }
}
