:root {
  --ink: #090922;
  --deep: #151452;
  --deep-2: #24206f;
  --muted: #6d7191;
  --line: #dfe1fb;
  --paper: #ffffff;
  --soft: #f6f7ff;
  --blue: #6f75ff;
  --violet: #9aa3ff;
  --aqua: #74d9ff;
  --success: #22c55e;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(21, 20, 82, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(223, 225, 251, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.brand-logo { display: block; width: min(210px, 48vw); max-height: 72px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--deep); }

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

.header-cta, .account-link, .primary-button, .secondary-button, .prompt-row button, .auth-card button, .panel-head button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 850;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}
.header-cta, .primary-button, .prompt-row button, .auth-card button {
  color: #fff;
  background: linear-gradient(135deg, var(--deep), var(--blue));
  box-shadow: 0 12px 30px rgba(111, 117, 255, 0.28);
}
.account-link, .secondary-button, .panel-head button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--deep);
}
.header-cta:hover, .account-link:hover, .primary-button:hover, .secondary-button:hover, .prompt-row button:hover, .auth-card button:hover, .panel-head button:hover { transform: translateY(-2px); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 560px);
  gap: clamp(32px, 6vw, 82px);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: clamp(44px, 7vw, 86px) clamp(18px, 5vw, 76px) 54px;
  background:
    radial-gradient(circle at 82% 18%, rgba(154, 163, 255, 0.34), transparent 32%),
    radial-gradient(circle at 8% 90%, rgba(116, 217, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f6f7ff 100%);
}

.hero-home {
  min-height: calc(92vh - 74px);
}

.showcase {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
}

.showcase-clean {
  min-height: 420px;
  border-left: 1px solid var(--line);
}

.showcase-pair {
  width: min(100%, 540px);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.showcase-note {
  position: absolute;
  right: 0;
  bottom: 28px;
  display: grid;
  gap: 4px;
  max-width: 260px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 36px rgba(21, 20, 82, .12);
}

.showcase-note span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
}
h2 { margin-bottom: 14px; font-size: clamp(30px, 4vw, 50px); line-height: 1.06; letter-spacing: 0; }
h3 { margin-bottom: 10px; font-size: 20px; line-height: 1.2; }
.lead { max-width: 640px; color: var(--muted); font-size: clamp(18px, 2vw, 22px); line-height: 1.56; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 30px; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 650px; }
.metrics div, .auth-card, .user-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 24px rgba(21, 20, 82, 0.05);
}
.metrics div { min-height: 92px; padding: 16px; }
.metrics strong { display: block; margin-bottom: 4px; color: var(--deep); font-size: 24px; }
.metrics span { color: var(--muted); font-size: 14px; line-height: 1.35; }

.creator-card {
  overflow: hidden;
  border: 1px solid rgba(223, 225, 251, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}
.creator-topbar { display: flex; gap: 8px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.creator-topbar span { width: 10px; height: 10px; border-radius: 999px; background: #ff6b6b; }
.creator-topbar span:nth-child(2) { background: #ffc44d; }
.creator-topbar span:nth-child(3) { background: var(--success); }
.shirt-canvas {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 440px;
  background: linear-gradient(145deg, #ededff 0%, #ffffff 58%, #f0f2ff 100%);
}
.shirt-canvas img { width: min(78%, 390px); filter: drop-shadow(0 28px 34px rgba(21, 20, 82, 0.24)); }
.ai-print {
  position: absolute;
  top: 42%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 126px;
  min-height: 138px;
  padding: 14px;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--deep), var(--blue));
  box-shadow: 0 18px 42px rgba(111, 117, 255, 0.30);
}

.print-safe-area {
  position: absolute;
  z-index: 3;
  top: 42%;
  left: 50%;
  width: min(220px, 42%);
  height: 220px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(111, 117, 255, .55);
  border-radius: 8px;
  pointer-events: none;
}

.preview-watermark {
  position: absolute;
  z-index: 5;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  color: rgba(21, 20, 82, .16);
  font-size: clamp(42px, 8vw, 86px);
  font-weight: 950;
  pointer-events: none;
  user-select: none;
}
.ai-print span { font-size: 12px; font-weight: 950; opacity: 0.88; }
.ai-print strong { font-size: 22px; line-height: 1.04; }
.creator-controls { padding: 18px; background: #fff; }
.creator-controls label, .control-label, .auth-card label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 13px; font-weight: 850; }
.creator-controls textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  color: var(--ink);
  background: #fff;
}
.prompt-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.prompt-row input, .control-grid select, .auth-card input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
}
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.swatches { display: flex; gap: 10px; }
.swatch { width: 46px; height: 46px; border: 2px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; }
.swatch-dark { background: #111827; }
.swatch.is-active { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(111, 117, 255, 0.16); }
.form-status { min-height: 22px; margin: 12px 0 0; color: var(--muted); line-height: 1.45; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--success); }

.generator-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(360px, 1fr) minmax(280px, 380px);
  gap: clamp(22px, 4vw, 42px);
  align-items: start;
  padding: 0 clamp(18px, 5vw, 76px) clamp(58px, 8vw, 96px);
}

.creator-card-wide .shirt-canvas {
  min-height: 620px;
}

.tool-panel {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(21, 20, 82, 0.05);
}

.prompt-panel, .placement-panel {
  align-self: start;
}

.generation-progress {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(111, 117, 255, .26);
  border-radius: 8px;
  background: var(--soft);
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--deep);
}

.progress-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #dfe1fb;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--deep), var(--blue));
  transition: width 300ms ease;
}

.generation-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.placement-controls {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.placement-controls label {
  display: grid;
  gap: 8px;
  margin: 0;
}

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

.continue-button {
  width: 100%;
}

.continue-button.is-disabled {
  opacity: .48;
  pointer-events: none;
}

.account, .workflow, .pricing, .rules { padding: clamp(58px, 8vw, 96px) clamp(18px, 5vw, 76px); }
.section-heading { max-width: 760px; margin-bottom: 30px; }
.section-heading p { color: var(--muted); line-height: 1.62; }

.subpage-hero {
  padding: clamp(54px, 8vw, 92px) clamp(18px, 5vw, 76px) clamp(28px, 5vw, 54px);
  background:
    radial-gradient(circle at 82% 18%, rgba(154, 163, 255, 0.28), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f6f7ff 100%);
}
.subpage-hero h1 {
  max-width: 860px;
  margin-bottom: 18px;
}

.account { background: #fff; }
.account-grid { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(240px, .7fr) minmax(320px, 1.1fr); gap: 18px; align-items: stretch; }
.auth-card { display: grid; align-content: start; gap: 12px; padding: 22px; }
.auth-card h3 { color: var(--deep); }
.user-panel { padding: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-head strong { display: block; color: var(--deep); overflow-wrap: anywhere; }
.project-list { display: grid; gap: 10px; margin-top: 16px; }
.project-item { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.project-item strong { display: block; color: var(--deep); }
.project-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.project-item button { margin-top: 10px; min-height: 38px; border: 0; border-radius: 8px; padding: 0 12px; color: #fff; background: var(--deep); cursor: pointer; }

.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.step-card {
  min-height: 420px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(21, 20, 82, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.step-card:hover { transform: translateY(-6px); border-color: rgba(111, 117, 255, 0.42); box-shadow: var(--shadow); }
.step-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; margin-bottom: 18px; background: var(--deep); }
.step-card span { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; border-radius: 8px; color: #fff; background: var(--deep); font-weight: 950; }
.step-card p { color: var(--muted); line-height: 1.58; }

.pricing { background: #ffffff; }
.pricing-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr) auto;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(154, 163, 255, 0.42);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--deep) 0%, var(--deep-2) 56%, var(--blue) 100%);
  color: #ffffff;
  box-shadow: var(--shadow);
}
.price-label { margin-bottom: 8px; color: rgba(255, 255, 255, .72); font-weight: 800; }
.price { display: block; margin-bottom: 10px; font-size: clamp(42px, 6vw, 66px); line-height: 1; }
.pricing-card p { max-width: 620px; margin-bottom: 0; color: rgba(255, 255, 255, .76); line-height: 1.6; }
.price-details { display: grid; gap: 10px; }
.price-details span { padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .86); }
.pricing-card .primary-button { background: #ffffff; color: var(--deep); box-shadow: none; white-space: nowrap; }

.rules { background: linear-gradient(180deg, #ffffff 0%, #f6f7ff 100%); }
.rules-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.rules-grid article { padding: 22px; border: 1px solid rgba(154, 163, 255, 0.42); border-radius: 8px; background: #ffffff; box-shadow: 0 8px 24px rgba(21, 20, 82, 0.05); }
.rules-grid p { color: var(--muted); line-height: 1.58; }
.rules-grid a { color: var(--deep); font-weight: 800; overflow-wrap: anywhere; }

.site-footer { display: flex; justify-content: center; gap: 28px; padding: 30px 18px 42px; color: var(--muted); border-top: 1px solid var(--line); }
.site-footer a:hover { color: var(--deep); }

.generated-image {
  position: absolute;
  z-index: 4;
  top: 42%;
  left: 50%;
  width: min(132px, 32%);
  max-height: 160px;
  object-fit: contain;
  transform: translate(calc(-50% + var(--print-x, 0px)), calc(-50% + var(--print-y, 0px))) scale(var(--print-scale, 1));
  transform-origin: center;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .2));
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: start;
  padding: 0 clamp(18px, 5vw, 76px) clamp(58px, 8vw, 96px);
}

.order-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(21, 20, 82, 0.05);
}

.order-canvas {
  min-height: 500px;
}

.order-meta {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.order-meta span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.order-meta strong {
  color: var(--deep);
  line-height: 1.4;
}

.order-form {
  grid-template-columns: 1fr;
}

.checkbox-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: rgba(255, 255, 255, .88);
  line-height: 1.4;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.status-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(280px, 1fr);
  gap: 22px;
  padding: 0 clamp(18px, 5vw, 76px) clamp(58px, 8vw, 96px);
}

.checkout-card label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.checkout-card input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  background: rgba(255, 255, 255, .95);
  color: var(--deep);
  font: inherit;
}

.checkout-card button:disabled {
  opacity: .65;
  cursor: wait;
}

@media (max-width: 1120px) {
  .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-panel { grid-column: 1 / -1; }
}

@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; }
  .shirt-canvas { min-height: 420px; }
  .steps-grid, .rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-card { grid-template-columns: 1fr; align-items: flex-start; }
  .generator-workspace, .order-layout, .status-layout { grid-template-columns: 1fr; }
  .tool-panel { position: static; }
}

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; align-items: center; }
  .brand-logo { width: min(178px, 54vw); max-height: 58px; }
  .nav-links { order: 3; width: 100%; justify-content: space-between; gap: 12px; overflow-x: auto; font-size: 14px; }
  .header-actions { margin-left: auto; }
  .header-cta { display: none; }
  h1 { font-size: 42px; }
  .hero { padding-top: 34px; }
  .hero-actions a { width: 100%; }
  .metrics, .steps-grid, .control-grid, .rules-grid, .account-grid { grid-template-columns: 1fr; }
  .prompt-row { grid-template-columns: 1fr; }
  .shirt-canvas { min-height: 350px; }
  .creator-card-wide .shirt-canvas, .order-canvas { min-height: 420px; }
  .showcase { min-height: auto; }
  .showcase-note { position: static; max-width: none; margin-top: 12px; }
  .ai-print { width: 96px; min-height: 110px; }
  .ai-print strong { font-size: 18px; }
  .step-card { min-height: auto; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .site-footer { flex-direction: column; align-items: center; gap: 14px; }
}
