:root {
  color-scheme: light;
  --ink: #16171a;
  --muted: #667085;
  --line: #d8dde7;
  --panel: #ffffff;
  --panel-alt: #f7f9fb;
  --accent: #1667ff;
  --accent-dark: #0d4ec7;
  --mint: #25c481;
  --coral: #ff7648;
  --yellow: #ffd84f;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

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

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 76px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(216, 221, 231, 0.76);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
}

.brand-dot {
  color: var(--accent);
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, #1667ff 0 48%, #25c481 49% 100%);
}

.brand-mark span {
  position: absolute;
  inset: 9px 8px 7px 10px;
  border-radius: 50% 48% 42% 54%;
  background: #fff;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.main-nav a,
.ghost-button,
.compact-button,
.primary-button,
.secondary-button,
.icon-button,
.segment,
.swatch {
  min-height: 40px;
  border-radius: var(--radius);
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #303744;
  font-weight: 700;
  font-size: 0.92rem;
}

.main-nav a:hover,
.ghost-button:hover {
  background: var(--panel-alt);
}

.header-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-button,
.compact-button,
.primary-button,
.secondary-button,
.icon-button,
.segment,
.swatch {
  border: 0;
  cursor: pointer;
}

.ghost-button {
  padding: 0 14px;
  background: transparent;
  color: #303744;
  font-weight: 800;
}

.compact-button {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 156px;
  padding: 0 20px;
  font-weight: 850;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(22, 103, 255, 0.22);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-dark);
}

.secondary-button {
  background: #eef3ff;
  color: var(--accent-dark);
}

.primary-button svg,
.download-button svg,
.icon-button svg,
.upload-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(390px, 1.07fr);
  align-items: center;
  gap: 42px;
  min-height: 760px;
  padding: 68px 40px 42px;
  background:
    linear-gradient(90deg, rgba(37, 196, 129, 0.09), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fbff 76%, #ffffff);
}

.hero-copy {
  max-width: 660px;
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 22px;
  font-size: 4.4rem;
  line-height: 1;
  letter-spacing: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

h2 {
  margin-bottom: 14px;
  font-size: 2.45rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 570px;
  margin-bottom: 28px;
  color: #4c5566;
  font-size: 1.2rem;
  line-height: 1.65;
}

.demo-stage {
  display: grid;
  place-items: center;
  min-height: 520px;
}

.comparison-card {
  position: relative;
  width: min(100%, 620px);
  aspect-ratio: 1.08;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #dff7ec;
  box-shadow: var(--shadow);
}

.comparison-after,
.checkerboard {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #dfe4ec 25%, transparent 25%),
    linear-gradient(-45deg, #dfe4ec 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe4ec 75%),
    linear-gradient(-45deg, transparent 75%, #dfe4ec 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.comparison-image,
.comparison-after,
.comparison-after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.comparison-image,
.comparison-after img {
  object-fit: cover;
}

.comparison-after {
  clip-path: inset(0 0 0 var(--reveal));
  overflow: hidden;
  width: 100%;
}

.comparison-after img {
  object-fit: cover;
}

.comparison-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(22, 103, 255, 0.4);
}

.comparison-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(22, 103, 255, 0.28);
  transform: translate(-50%, -50%);
}

.comparison-chip {
  position: absolute;
  top: 18px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 850;
}

.chip-before {
  left: 18px;
}

.chip-after {
  right: 18px;
}

.tool-section,
.solutions-section,
.pricing-section {
  padding: 86px 40px;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 32px;
  text-align: center;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1.38fr);
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: stretch;
}

.upload-zone {
  min-height: 520px;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.upload-label {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  height: 100%;
  min-height: 520px;
  padding: 28px;
  border: 2px dashed #b9c4d5;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(22, 103, 255, 0.05), transparent),
    #fff;
  text-align: center;
  cursor: pointer;
}

.upload-zone.drag-over .upload-label,
.upload-label:hover {
  border-color: var(--accent);
  background: #f2f7ff;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.upload-title {
  font-size: 1.35rem;
  font-weight: 900;
}

.upload-copy,
.empty-state p {
  color: #4c5566;
  line-height: 1.65;
}

.upload-note {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.editor-shell {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  min-height: 520px;
  padding: 32px;
  text-align: center;
}

.empty-preview {
  width: min(70%, 320px);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 18px;
  border-radius: var(--radius);
  background-image:
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-color: #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.editor {
  display: grid;
  grid-template-rows: auto minmax(320px, 1fr) auto;
  min-height: 520px;
}

.canvas-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(84px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f4f6fa;
}

.segment {
  padding: 0 12px;
  background: transparent;
  color: #4c5566;
  font-size: 0.88rem;
  font-weight: 850;
}

.segment.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.09);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  background: #f4f6fa;
  color: var(--ink);
}

.canvas-wrap {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 350px;
}

#previewCanvas {
  max-height: 510px;
  width: auto;
  height: auto;
}

.processing {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent-dark);
  font-weight: 900;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.range-field {
  display: grid;
  gap: 10px;
}

.range-field span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #303744;
  font-size: 0.9rem;
}

.range-field output {
  color: var(--accent-dark);
  font-weight: 900;
}

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

.swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.mode-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.mode-field legend,
.swatches legend {
  width: 100%;
  margin-bottom: 8px;
  color: #303744;
  font-size: 0.9rem;
  font-weight: 800;
}

.brush-field {
  grid-column: span 1;
}

.brush-control {
  width: 100%;
}

.brush-control {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.clear-refine-button {
  width: 100%;
  min-width: 0;
  box-shadow: none;
}

#previewCanvas.brush-active {
  cursor: crosshair;
}

.swatch {
  width: 40px;
  height: 40px;
  border: 2px solid #d3dae7;
  background: var(--swatch);
}

.checker-swatch {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #cfd7e6 25%, transparent 25%),
    linear-gradient(-45deg, #cfd7e6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #cfd7e6 75%),
    linear-gradient(-45deg, transparent 75%, #cfd7e6 75%);
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
}

.swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 103, 255, 0.14);
}

.download-button {
  width: 100%;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.solution-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.solution-card img {
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.solution-card h3,
.solution-card p {
  padding-inline: 18px;
}

.solution-card h3 {
  padding-top: 18px;
}

.solution-card p {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.automation-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 34px;
  align-items: center;
  padding: 82px 40px;
  background: #121417;
  color: #fff;
}

.automation-section .eyebrow {
  color: #89f0c2;
}

.automation-section h2 {
  max-width: 560px;
}

.automation-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.automation-list div {
  min-height: 180px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.metric {
  display: block;
  margin-bottom: 18px;
  color: var(--yellow);
  font-size: 2.1rem;
  font-weight: 950;
}

.automation-list p {
  margin-bottom: 0;
  color: #d5d9e1;
  line-height: 1.55;
}

.pricing-section {
  background: linear-gradient(180deg, #fff, #f7fbff);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-dark);
  font-weight: 850;
}

:focus-visible {
  outline: 3px solid rgba(22, 103, 255, 0.34);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 18px;
    padding-inline: 22px;
  }

  .main-nav {
    display: none;
  }

  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 52px 22px 32px;
  }

  .hero-copy {
    margin-inline: 0;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2rem;
  }

  .demo-stage {
    min-height: auto;
  }

  .tool-section,
  .solutions-section,
  .pricing-section,
  .automation-section {
    padding: 64px 22px;
  }

  .tool-grid,
  .automation-section {
    grid-template-columns: 1fr;
  }

  .upload-zone,
  .upload-label,
  .editor-shell,
  .empty-state {
    min-height: 420px;
  }

  .solution-grid,
  .automation-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 1fr;
    min-height: 68px;
  }

  .header-actions {
    display: none;
  }

  .hero-section {
    padding-top: 38px;
  }

  .hero-copy,
  .hero-actions,
  .demo-stage {
    justify-self: start;
    width: 100%;
    max-width: 346px;
  }

  h1 {
    max-width: 340px;
    font-size: 2.2rem;
    line-height: 1.08;
  }

  h2 {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    max-width: 340px;
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .comparison-card {
    width: 100%;
    aspect-ratio: 0.94;
  }

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

  .brush-field {
    grid-column: 1;
  }

  .canvas-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .segment {
    padding-inline: 8px;
  }

  .icon-button {
    width: 100%;
  }

  .swatches {
    flex-wrap: wrap;
  }

  .site-footer {
    flex-direction: column;
    padding-inline: 22px;
  }
}
