:root {
  --background: #1c1c1e;
  --surface: #252528;
  --surface-raised: #2e2e32;
  --text: #f5f0e8;
  --muted: #bbb5ac;
  --accent: #e85d4e;
  --accent-readable: #eb6255;
  --accent-dark: #b83d32;
  --warm: #f5f0e8;
  --warm-ink: #252326;
  --line: rgba(245, 240, 232, 0.14);
  --success: #82c7a5;
  --warning: #f0b66d;
  --danger: #ff8d82;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 78% 4%, rgba(232, 93, 78, 0.12), transparent 27rem),
    radial-gradient(circle at 12% 44%, rgba(245, 240, 232, 0.05), transparent 24rem);
  content: '';
  pointer-events: none;
}

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

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  outline-offset: 4px;
}

:focus-visible {
  outline: 2px solid var(--accent);
}

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

h1,
h2,
h3,
.brand,
.price {
  margin-top: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 600;
  line-height: 0.98;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 4vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  line-height: 1.2;
}

p {
  margin-top: 0;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 8px 16px;
  transform: translateY(-160%);
  border-radius: var(--radius);
  background: var(--warm);
  color: var(--warm-ink);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(28, 28, 30, 0.86);
  backdrop-filter: blur(20px);
}

.nav {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 600;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--warm-ink);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
}

.nav-links a:hover,
.text-link:hover,
.site-footer a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-primary {
  background: var(--accent);
  color: var(--warm-ink);
}

.button-primary:hover:not(:disabled) {
  background: #f06a5b;
}

.button-secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  border-color: rgba(245, 240, 232, 0.36);
  background: rgba(245, 240, 232, 0.06);
}

.button-small {
  min-height: 40px;
  padding: 8px 16px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  min-height: 760px;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  align-items: center;
  gap: 72px;
  padding-block: 104px 112px;
}

.hero-intro {
  max-width: 720px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-actions,
.action-row,
.export-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.text-link {
  padding: 12px 0;
  color: var(--muted);
  font-weight: 600;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 32px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.86rem;
  list-style: none;
}

.trust-list li::before {
  margin-right: 8px;
  color: var(--success);
  content: '✓';
}

.hero-visual {
  position: relative;
  display: grid;
  min-height: 520px;
  grid-template: repeat(12, 1fr) / repeat(10, 1fr);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(245, 240, 232, 0.08), rgba(232, 93, 78, 0.08));
  box-shadow: var(--shadow);
}

.hero-visual::after {
  position: absolute;
  inset: 40% 28%;
  border-radius: 999px 999px 40% 40%;
  background: linear-gradient(145deg, var(--warm), #c9c0b4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  content: '';
}

.visual-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(245, 240, 232, 0.24);
  border-radius: var(--radius);
  background: rgba(28, 28, 30, 0.78);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.visual-card::before {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  content: '';
}

.visual-card span {
  color: var(--muted);
  font-size: 0.72rem;
}

.visual-card b {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.visual-square {
  grid-area: 1 / 1 / 6 / 6;
  transform: rotate(-3deg);
}

.visual-portrait {
  grid-area: 2 / 6 / 8 / 10;
  transform: rotate(2deg);
}

.visual-story {
  grid-area: 6 / 2 / 12 / 5;
  transform: rotate(2deg);
}

.visual-wide {
  grid-area: 8 / 5 / 12 / 11;
  transform: rotate(-2deg);
}

.section {
  padding-block: 112px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 56px;
}

.section-heading > p:not(.eyebrow) {
  color: var(--muted);
}

.section-heading.compact {
  margin-bottom: 32px;
}

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

.feature-card,
.price-card {
  min-height: 300px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.feature-number {
  display: inline-block;
  margin-bottom: 56px;
  color: var(--accent-readable);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.8rem;
}

.section-warm {
  background: var(--warm);
  color: var(--warm-ink);
}

.section-heading.dark .eyebrow {
  color: var(--accent-dark);
}

.steps {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(37, 35, 38, 0.16);
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 24px;
  padding-block: 32px;
  border-bottom: 1px solid rgba(37, 35, 38, 0.16);
}

.steps li > span {
  color: var(--accent-dark);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.25rem;
}

.steps h3,
.steps p {
  max-width: 820px;
}

.steps p {
  margin-bottom: 0;
  color: rgba(37, 35, 38, 0.72);
}

.tool-shell {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.generator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.upload-column,
.brief-column {
  padding: 32px;
}

.upload-column {
  border-right: 1px solid var(--line);
}

.upload-zone {
  display: grid;
  min-height: 340px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 32px;
  border: 1px dashed rgba(245, 240, 232, 0.3);
  border-radius: var(--radius);
  background: rgba(245, 240, 232, 0.025);
  text-align: center;
  cursor: pointer;
}

.upload-zone.dragging {
  border-color: var(--accent);
  background: rgba(232, 93, 78, 0.08);
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.upload-zone span:not(.upload-icon),
.form-note,
.source-preview span,
.license-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.upload-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--warm-ink);
  font-size: 1.6rem;
}

.source-preview {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.source-preview img {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
}

.source-preview strong,
.source-preview span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rights-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.rights-check input {
  margin-top: 5px;
  accent-color: var(--accent);
}

.brief-column label:not(.rights-check) {
  display: block;
  margin: 0 0 8px;
  font-size: 0.84rem;
  font-weight: 600;
}

.brief-column input:not([type='color']),
.brief-column select {
  width: 100%;
  height: 48px;
  margin-bottom: 24px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--text);
}

.brief-column input[type='color'] {
  width: 100%;
  height: 48px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--background);
}

.field-row {
  display: grid;
  grid-template-columns: 144px 1fr;
  gap: 16px;
}

.field-row.batch-color-row {
  grid-template-columns: minmax(144px, 240px);
}

.job-status {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.job-status.error {
  border-color: var(--danger);
  color: var(--danger);
}

.preview-review,
.output-review,
.batch-review {
  padding-top: 80px;
}

.batch-queue {
  display: grid;
  gap: 12px;
}

.batch-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.batch-item > div:first-child {
  min-width: 0;
}

.batch-item > div:first-child strong,
.batch-item > div:first-child span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-item > div:first-child span,
.batch-status {
  color: var(--muted);
  font-size: 0.8rem;
}

.batch-status {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-transform: capitalize;
}

.batch-ready .batch-status {
  border-color: var(--success);
  color: var(--success);
}

.batch-failed .batch-status,
.batch-error {
  color: var(--danger);
}

.batch-item-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
}

.batch-error {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.86rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.preview-option {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.preview-option img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.preview-option div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.canvas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

.canvas-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.canvas-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.canvas-card canvas {
  width: 100%;
  max-height: 680px;
  border-radius: 4px;
  background: #111;
  object-fit: contain;
}

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

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

.price-card {
  display: flex;
  min-height: 340px;
  flex-direction: column;
}

.price-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(232, 93, 78, 0.12), var(--surface));
}

.price-card .button {
  width: 100%;
  margin-top: auto;
}

.price {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 2.2rem;
  font-weight: 600;
}

.faq-list {
  border-top: 1px solid var(--line);
}

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

.faq-list summary {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::after {
  color: var(--accent);
  content: '+';
  font-size: 1.5rem;
}

.faq-list details[open] summary::after {
  content: '−';
}

.faq-list p {
  max-width: 820px;
  padding-bottom: 32px;
  color: var(--muted);
}

.cta-section {
  margin-bottom: 112px;
  padding: 72px;
  border: 1px solid rgba(232, 93, 78, 0.4);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(232, 93, 78, 0.17), rgba(245, 240, 232, 0.035));
}

.cta-section p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #171719;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  padding-block: 72px;
}

.footer-grid > div:first-child p {
  max-width: 320px;
  margin-top: 24px;
  color: var(--muted);
}

.footer-grid h2 {
  margin-bottom: 16px;
  color: var(--muted);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-grid a:not(.brand) {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.account-dialog {
  width: min(calc(100% - 32px), 480px);
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.account-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.dialog-status {
  min-height: 24px;
  margin-top: 16px;
  color: var(--muted);
}

.account-identity {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--background);
}

.account-identity span {
  color: var(--muted);
  font-size: 0.86rem;
}

.email-auth-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.email-auth-form p {
  color: var(--muted);
}

.email-auth-form input {
  width: 100%;
}

.error-text {
  color: var(--danger);
}

.checkout-recovery {
  width: 100%;
  margin-top: 16px;
}

.consent-banner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  width: min(calc(100% - 48px), 520px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.consent-banner p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.consent-banner > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.not-found {
  display: grid;
  min-height: 100vh;
  place-content: center;
  padding: 32px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 80px;
  }

  .hero-visual {
    min-height: 440px;
  }

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

  .generator-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 720px) {
  .container,
  .tool-shell {
    width: min(calc(100% - 32px), var(--container));
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.5rem);
  }

  .hero {
    gap: 40px;
  }

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

  .section {
    padding-block: 80px;
  }

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

  .feature-card,
  .price-card {
    min-height: auto;
  }

  .feature-number {
    margin-bottom: 32px;
  }

  .upload-column,
  .brief-column {
    padding: 20px;
  }

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

  .field-row {
    grid-template-columns: 1fr;
  }

  .cta-section {
    padding: 40px 24px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
