:root {
  --paper: #eef2f6;
  --paper-deep: #e2e8ef;
  --ink: #121820;
  --ink-soft: #3a4553;
  --muted: #6b7785;
  --line: #c5ced8;
  --accent: #0b6e4f;
  --accent-hot: #c45c26;
  --danger: #b42318;
  --surface: #ffffff;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(18, 24, 32, 0.08);
  --font: "Figtree", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(11, 110, 79, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(196, 92, 38, 0.07), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-glow { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: rgba(238, 242, 246, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  background:
    linear-gradient(135deg, transparent 46%, var(--ink) 46%, var(--ink) 54%, transparent 54%),
    linear-gradient(45deg, var(--accent) 0 50%, var(--accent-hot) 50% 100%);
  box-shadow: inset 0 0 0 2px rgba(18, 24, 32, 0.08);
}

.topnav { display: flex; align-items: center; gap: 1rem; }
.topnav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.topnav-link.muted { color: var(--muted); }
.topnav-link.is-active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}
#credits-badge { font-size: 0.85rem; color: var(--muted); }

main {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 0 3rem;
  animation: rise 0.7s ease both;
}

.hero-copy { max-width: 34rem; }

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
  color: var(--ink-soft);
  max-width: 22ch;
}

.hero-lead {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  max-width: 38ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-visual {
  position: relative;
  min-height: 280px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise 0.85s ease 0.08s both;
}

.hero-demo {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
  object-fit: cover;
  object-position: center;
}

.hero-demo-labels {
  position: absolute;
  inset: 0.65rem auto auto 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  pointer-events: none;
  padding: 0 0.65rem;
}

.hero-demo-labels span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  width: fit-content;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(18, 24, 32, 0.45);
}

.hero-demo-labels span:last-child {
  justify-self: start;
  margin-left: 0.65rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  text-shadow: none;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
  min-height: 280px;
}

.hero-pane {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
}

.hero-pane.before {
  background:
    linear-gradient(160deg, #dfe7ef, #cfd9e4);
}

.hero-pane.after {
  background: #fff;
  border-left: 1px dashed var(--line);
}

.hero-pane span {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.photo-blob {
  width: 72%;
  aspect-ratio: 3/4;
  border-radius: 8px;
  background:
    radial-gradient(circle at 35% 30%, #f2c4a8 0 18%, transparent 19%),
    radial-gradient(circle at 65% 28%, #f2c4a8 0 10%, transparent 11%),
    linear-gradient(180deg, #8eb6d4 0 38%, #5f8fb3 38% 100%);
  box-shadow: 0 10px 24px rgba(18, 24, 32, 0.15);
  animation: floaty 5s ease-in-out infinite;
}

.line-art {
  width: 72%;
  aspect-ratio: 3/4;
  border-radius: 8px;
  background: #fff;
  border: 2px solid var(--ink);
  position: relative;
  animation: floaty 5s ease-in-out 0.4s infinite;
}

.line-art::before,
.line-art::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.line-art::before {
  top: 18%;
  width: 38%;
  aspect-ratio: 1;
}
.line-art::after {
  bottom: 14%;
  width: 58%;
  height: 42%;
  border-radius: 40% 40% 18% 18%;
  border-top: none;
}

.hero-bullets {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-bullets li::before {
  content: "—";
  color: var(--accent);
  margin-right: 0.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(11, 110, 79, 0.22);
}

.btn-primary:not(:disabled):hover {
  transform: translateY(-1px);
  background: #095c43;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-lg { padding: 0.95rem 1.55rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }

.wizard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  animation: rise 0.5s ease both;
}

.stepper {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.stepper-item span {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.stepper-item.active { color: var(--ink); }
.stepper-item.active span,
.stepper-item.done span {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.stepper-item.done { color: var(--accent); }

.panel h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.panel-hint {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.dropzone {
  display: block;
  border: 2px dashed #9aab9f;
  border-radius: var(--radius);
  background: #f7faf8;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.dropzone:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.15);
}

.dropzone.dragover {
  border-color: var(--accent);
  background: #eef7f2;
}

.dropzone-inner {
  padding: 3rem 1.5rem;
  text-align: center;
}

.dropzone-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: rgba(11, 110, 79, 0.1);
  color: var(--accent);
}

.dropzone-title { font-weight: 700; margin-bottom: 0.35rem; }
.dropzone-sub { color: var(--muted); font-size: 0.9rem; }

.dropzone-preview {
  padding: 1.25rem;
  text-align: center;
}

.dropzone-preview img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
}

.file-name {
  margin: 0.75rem 0;
  color: var(--muted);
  font-size: 0.85rem;
  word-break: break-all;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.quality-card {
  text-align: left;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, background 0.2s;
}

.quality-card:hover {
  background: #fff;
  transform: translateY(-2px);
}

.quality-card.selected {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 1px var(--accent);
}

.quality-card h3 { margin: 0.5rem 0 0.35rem; font-size: 1.15rem; font-family: var(--display); }
.quality-card p { color: var(--muted); font-size: 0.9rem; }

.quality-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(11, 110, 79, 0.12);
  color: var(--accent);
}

.quality-badge.premium {
  background: rgba(196, 92, 38, 0.12);
  color: var(--accent-hot);
}

.quality-time {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.compare-pane {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.compare-pane figcaption {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compare-pane img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.preview-wrap {
  position: relative;
  min-height: 200px;
  display: grid;
  place-items: center;
}

.preview-wrap > * { grid-area: 1 / 1; }

.preview-wrap .loader {
  display: none;
  z-index: 2;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
}

.preview-wrap.is-loading .loader { display: flex; }
.preview-wrap.is-loading img { opacity: 0.35; }

.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.sliders {
  display: grid;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.slider-row {
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.slider-row strong {
  color: var(--accent);
  font-weight: 800;
}
.remove-bg-row {
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.remove-bg-row small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.15rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.panel-actions.split { justify-content: space-between; }
.panel-actions.center { justify-content: center; flex-wrap: wrap; }

.done-card { text-align: center; }

.done-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
}

.final-preview {
  max-width: 420px;
  margin: 1.25rem auto;
}

.final-preview img {
  width: 100%;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.pricing {
  margin-top: 4rem;
  text-align: center;
}

.pricing h2 {
  font-family: var(--display);
  font-size: 1.85rem;
  margin-bottom: 0.5rem;
}

.section-lead {
  color: var(--muted);
  max-width: 50ch;
  margin: 0 auto 2rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.price-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}

.price-card.highlight {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.price-card h3 {
  margin-bottom: 0.35rem;
  font-family: var(--display);
}

.price {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.price span { font-size: 0.95rem; font-weight: 600; color: var(--muted); }

.price-card ul {
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.price-card li + li { margin-top: 0.35rem; }
.price-card .btn { margin-top: 0.75rem; }

.footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}
.footer a { color: var(--accent); }

.legal-page {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1rem 1.25rem 3rem;
}
.legal-page h1 {
  font-family: var(--display);
  margin-bottom: 1rem;
}
.legal-page p { margin-bottom: 0.65rem; color: var(--ink-soft); }
.legal-page a { color: var(--accent); }

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 24, 32, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.auth-modal[hidden] { display: none !important; }
.auth-card {
  position: relative;
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.auth-card h2 { font-family: var(--display); }
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}
.auth-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}
.check-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
.auth-switch { margin-top: 1rem; text-align: center; }

.photo-tips {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f7f3ea;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-align: left;
}
.photo-tips strong {
  display: block;
  color: var(--ink);
  margin: 0.35rem 0 0.25rem;
  font-size: 0.9rem;
}
.photo-tips strong:first-child { margin-top: 0; }
.photo-tips ul {
  margin: 0 0 0.35rem;
  padding-left: 1.1rem;
}
.photo-tips li { margin: 0.15rem 0; }
.photo-warn {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #c9b896;
  background: #fff8e8;
  color: var(--ink);
  font-size: 0.88rem;
  text-align: left;
}
.photo-warn-bad {
  border-color: #c9897a;
  background: #fff0ec;
}
.photo-warn-ok {
  border-color: #9bb89a;
  background: #f0f7ef;
}
.photo-warn ul { margin: 0; padding-left: 1.1rem; }
.photo-warn-note { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.82rem; }

.dash-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  position: relative;
  z-index: 1;
}
.dash-main h1 { font-family: var(--display); }
.field-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.field-label input,
.field-label textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  resize: vertical;
}
.field-hint { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; }
.profile-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 0.75rem;
}
.avatar-wrap { text-align: center; }
.avatar-img,
.avatar-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8e2d6;
  border: 1px solid var(--line);
}
.avatar-placeholder {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.75rem;
  color: var(--ink-soft);
}
.avatar-upload-label { margin-top: 0.5rem; cursor: pointer; display: inline-block; }
.profile-fields { flex: 1; min-width: 200px; }
.designs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.design-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
  text-align: left;
}
.design-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.design-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
.design-status { color: var(--accent); }
.design-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}
.gallery-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.publish-card { width: min(440px, 100%); }
.publish-share { margin-top: 1rem; }
.share-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.1rem;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 50;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy { max-width: none; }
  .hero h1 { margin-left: auto; margin-right: auto; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-bullets { justify-content: center; }
}

@media (max-width: 640px) {
  .stepper-item { font-size: 0; }
  .stepper-item span { font-size: 0.85rem; }
  .topnav { gap: 0.45rem; flex-wrap: wrap; justify-content: flex-end; max-width: 70%; }
  .topnav-link { font-size: 0.8rem; }
  .wizard { padding: 1rem; }
  .hero-visual { min-height: 220px; }
  .hero-split { min-height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
