@font-face {
  font-family: Manrope;
  src: url("./assets/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fcfaf6;
  --white: #fffefa;
  --ink: #222025;
  --muted: #625c67;
  --purple: #6037d4;
  --purple-dark: #4c28b2;
  --border: #eae3dc;
  --lavender: #efe8ff;
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 280px; }
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.shell { width: min(1120px, calc(100% - 68px)); margin-inline: auto; }
.icon-library, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.icon { width: 1.2em; height: 1.2em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.header { border-bottom: 1px solid #eae4db; background: var(--paper); }
.header-inner { min-height: 71px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.55rem; line-height: 1; font-weight: 800; letter-spacing: -.075em; }
.brand img { display: block; }
.brand-dot { color: var(--purple); }
.nav { display: flex; align-items: center; gap: 32px; font-weight: 750; font-size: .91rem; }
.nav a, .help-link { transition: color .18s ease, background .18s ease; }
.nav a:hover, .help-link:hover { color: var(--purple); }
.help-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid #e4dcd2; border-radius: 9px; font-weight: 750; font-size: .875rem; white-space: nowrap; }
.help-link:hover { background: white; }

main { overflow: clip; }
.hero { position: relative; isolation: isolate; text-align: center; padding: 47px 0 34px; }
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -8% -45px;
  background:
    radial-gradient(ellipse at 34% 38%, #f8e1c16e, transparent 49%),
    radial-gradient(ellipse at 67% 42%, #eee2fcac, transparent 46%);
  mask-image: radial-gradient(ellipse 56% 56% at 50% 45%, black 21%, transparent 100%);
  pointer-events: none;
}
.hero h1 { font-size: clamp(3.25rem, 7vw, 6rem); font-weight: 800; line-height: .98; letter-spacing: -.091em; }
.hero h1 em { color: var(--purple); font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 1.055em; letter-spacing: -.097em; line-height: .94; }
.hero p { margin-top: 20px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.125rem); font-weight: 650; }
.hero-stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-stars span { position: absolute; width: 36px; aspect-ratio: 1; background: #e6a46a; clip-path: polygon(50% 0, 62% 36%, 100% 50%, 62% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%); }
.hero-stars span:nth-child(1) { top: 36%; left: 23%; }
.hero-stars span:nth-child(2) { top: 22%; right: 22%; width: 46px; background: #ad94f1; transform: rotate(10deg); }
.hero-stars span:nth-child(3) { top: 36%; right: 18%; width: 17px; background: #e5a66f; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px 18px; align-items: stretch; scroll-margin-block: 20px; }
.editor-card, .preview-card { border-radius: 22px; border: 1px solid var(--border); }
.editor-card { box-shadow: 0 11px 38px #4630270a; background: var(--white); display: flex; flex-direction: column; }
.tool-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; margin: 18px 19px 0; border-radius: 13px; background: #f2eee8; }
.tool-button { border: 1px solid transparent; background: transparent; border-radius: 9px; min-height: 45px; padding: 7px 8px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .92rem; font-weight: 800; line-height: 1.25; transition: background .18s ease, color .18s ease; }
.tool-button:hover { color: var(--purple); }
.tool-button.is-selected { color: var(--purple-dark); background: #fffdfa; border-color: #e8dfec; box-shadow: 0 2px 5px #3f2c3210; }
.tool-button .icon { width: 19px; height: 19px; }
.editor-content { padding: 19px 23px 19px; display: flex; flex-direction: column; flex: 1; }
.tool-intro h2, .preview-heading h2 { font-size: 1.22rem; font-weight: 800; letter-spacing: -.045em; line-height: 1.25; }
.tool-intro p { margin-top: 5px; color: var(--muted); font-size: .94rem; }
.scale-picker { margin: 12px 0 0; padding: 0; border: 0; display: flex; align-items: center; gap: 10px; }
.scale-picker legend { float: left; padding: 0; color: var(--muted); font-weight: 750; font-size: .875rem; }
.scale-picker > div { display: flex; gap: 5px; }
.scale-picker label { position: relative; cursor: pointer; }
.scale-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; margin: 0; }
.scale-picker label span { display: block; border: 1px solid #e8dff6; color: var(--purple-dark); border-radius: 7px; padding: 3px 11px; font-size: .875rem; font-weight: 800; }
.scale-picker input:checked + span { background: var(--lavender); border-color: #c7b5ed; }
.scale-picker input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }
.drop-area { display: grid; place-items: center; text-align: center; flex: 1; margin-top: 15px; min-height: 202px; border: 1.5px dashed #c9b6ef; border-radius: 15px; background: #faf7ff; transition: background .18s ease, border-color .18s ease; }
.drop-area.is-dragging { background: #eee4ff; border-color: var(--purple); }
.drop-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px 9px; }
.drop-state strong { font-weight: 800; font-size: .95rem; }
.upload-icon, .step-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 11px; color: var(--purple-dark); background: #eee5ff; }
.upload-icon .icon { width: 21px; height: 21px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 9px 17px; border-radius: 9px; border: 1px solid transparent; background: var(--purple); color: white; box-shadow: 0 3px 0 #4825a9; font-size: .94rem; font-weight: 800; transition: transform .15s ease, background .15s ease; }
.primary-button:hover { background: var(--purple-dark); }
.primary-button:active { transform: translateY(2px); }
.file-hint { font-size: .8125rem; color: var(--muted); margin-top: 3px; }
.text-button { border: 0; background: transparent; padding: 4px 2px; color: var(--purple-dark); font-weight: 800; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--purple); }
.drop-state .text-button { font-size: .875rem; }
.editor-footer { text-align: center; margin-top: 10px; color: var(--muted); font-size: .875rem; }
.error-message { color: #8d2738; padding: 9px 10px; margin-top: 9px; border-radius: 7px; background: #ffe9eb; font-size: .875rem; }
.spinner { border-radius: 50%; width: 35px; height: 35px; border: 3px solid #e2d5fb; border-top-color: var(--purple-dark); margin-bottom: 4px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.preview-card { padding: 19px 19px 13px; display: flex; flex-direction: column; background: #f4edfc; border-color: #e9dcf6; }
.preview-heading { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin: 0 1px 14px; }
.preview-heading span { display: flex; gap: 5px; align-items: center; color: #613d9b; background: #ebe0fb; border-radius: 8px; padding: 4px 8px; font-weight: 800; font-size: .8125rem; white-space: nowrap; }
.comparison { --split: 50%; position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; flex: 1; min-height: 283px; border: 1px solid #e4d5ee; border-radius: 14px; background-color: #fffdfd; }
.checker {
  background-color: #fbf7ff;
  background-image: conic-gradient(#eee5f5 25%, transparent 0 50%, #eee5f5 0 75%, transparent 0);
  background-size: 22px 22px;
}
.photo-stage, .before-layer { position: absolute; inset: 0; }
.before-layer { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; user-select: none; }
.comparison.is-user .photo { object-fit: contain; }
.photo-label { position: absolute; z-index: 1; top: 11px; border-radius: 7px; background: #fffdfa; color: #39323c; padding: 4px 9px; font-size: .75rem; font-weight: 800; box-shadow: 0 1px 5px #33214313; pointer-events: none; }
.before-label { left: 11px; }
.after-label { right: 11px; }
.divider { position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--split); width: 2px; background: white; transform: translateX(-50%); pointer-events: none; }
.divider span { display: grid; place-items: center; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 35px; width: 35px; border-radius: 50%; box-shadow: 0 2px 10px #3524412b; background: white; color: #4d356c; }
.divider .icon { width: 19px; height: 19px; }
.comparison input { position: absolute; z-index: 3; inset: 0; margin: 0; width: 100%; height: 100%; cursor: ew-resize; opacity: 0; appearance: none; }
.comparison input::-webkit-slider-thumb { appearance: none; width: 1px; height: 100%; }
.comparison input::-moz-range-thumb { width: 1px; height: 100%; }
.comparison:focus-within { outline: 2px solid var(--purple); outline-offset: 3px; }
.preview-hint { margin-top: 9px; text-align: center; color: #645471; font-weight: 700; font-size: .8125rem; }
.privacy-note { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .875rem; font-weight: 700; color: var(--muted); }
.privacy-note .icon { color: var(--purple); width: 16px; height: 16px; }

.how { padding-block: 32px 37px; margin-top: 29px; border-top: 1px solid var(--border); scroll-margin-block: 18px; }
.how h2 { font-size: 1.65rem; font-weight: 800; letter-spacing: -.06em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 17px; }
.step { display: flex; gap: 12px; align-items: flex-start; background: #fffdf9; border: 1px solid var(--border); border-radius: 13px; padding: 15px; }
.step-icon { width: 37px; height: 37px; flex: none; }
.step:nth-child(2) .step-icon { background: #ffecd9; color: #a44627; }
.step:nth-child(3) .step-icon { background: #e5ece3; color: #3b664a; }
.step h3 { font-size: .95rem; font-weight: 800; }
.step p { margin-top: 3px; color: var(--muted); font-size: .875rem; }
.footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; font-weight: 700; }
.footer .shell { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer .brand { color: var(--ink); font-size: 1.17rem; }

@media (max-width: 850px) {
  .shell { width: min(100% - 40px, 1120px); }
  .workspace { gap: 13px; }
  .tool-switch { margin-inline: 13px; }
  .editor-content, .preview-card { padding-inline: 14px; }
  .hero-stars span:nth-child(1) { left: 17%; }
  .hero-stars span:nth-child(2) { right: 15%; }
  .hero-stars span:nth-child(3) { right: 10%; }
  .step { padding: 11px; }
}

@media (max-width: 660px) {
  .shell { width: min(100% - 32px, 480px); }
  .header-inner { min-height: 61px; }
  .header .brand { font-size: 1.4rem; }
  .header .brand img { width: 32px; height: 32px; }
  .nav { display: none; }
  .hero { padding: 38px 0 26px; }
  .hero h1 { font-size: clamp(3.2rem, 12vw, 4.9rem); }
  .hero p { margin-top: 14px; padding-inline: 11px; }
  .hero-stars span:nth-child(1) { left: 3%; top: 42%; width: 21px; }
  .hero-stars span:nth-child(2) { right: 2%; top: 22%; width: 24px; }
  .hero-stars span:nth-child(3) { right: 3%; top: 38%; width: 10px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .editor-card, .preview-card { border-radius: 17px; }
  .tool-switch { margin-top: 13px; }
  .editor-content { padding-top: 15px; padding-bottom: 13px; }
  .preview-card { padding-top: 14px; }
  .preview-heading { margin-bottom: 10px; }
  .comparison { min-height: 0; aspect-ratio: 1.24; }
  .how { margin-top: 21px; padding-block: 24px; }
  .steps { grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
}

@media (max-width: 335px) {
  .tool-button { font-size: .8rem; gap: 4px; padding-inline: 3px; }
  .tool-button .icon { width: 16px; height: 16px; }
  .preview-heading h2 { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
