:root {
  --bg: #ffffff;
  --bg-alt: #f6f5f2;
  --surface: #ffffff;
  --text: #1a1a1f;
  --muted: #6b6b76;
  --line: #e6e4df;
  --brand: #e2553f;
  --brand-dark: #c23f2b;
  --brand-soft: #fdecea;
  --ok: #1f9d6b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 8px 24px rgba(20, 20, 30, .06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 1em; }
code { background: var(--bg-alt); padding: .1em .35em; border-radius: 6px; font-size: .9em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.center { text-align: center; }
.muted { color: var(--muted); }
.fine { font-size: .85rem; color: var(--muted); margin-top: .75rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-dark); margin-bottom: .75rem; }
.pill { display: inline-block; font-size: .8rem; font-weight: 600; background: var(--brand-soft); color: var(--brand-dark); padding: .25em .75em; border-radius: 999px; margin-bottom: .75rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .75em 1.35em; border-radius: 999px; font-weight: 600; font-size: 1rem; border: 1px solid transparent; cursor: pointer; transition: background .15s, transform .05s; font-family: inherit; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: #d9a49b; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-sm { padding: .45em 1em; font-size: .9rem; }
.btn-lg { padding: .9em 1.75em; font-size: 1.05rem; }
.btn.full { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .9); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; color: var(--text); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a:not(.btn) { color: var(--muted); font-weight: 500; }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-toggle, .nav-burger { display: none; }
@media (max-width: 720px) {
  .nav-burger { display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
  .nav-burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav-links a:not(.btn) { padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* Sections */
.section { padding: 72px 0; }
.section.tight { padding: 32px 0 72px; }
.section.alt { background: var(--bg-alt); }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.page-head { padding: 72px 0 24px; }
.page-head.compact { padding: 56px 0 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }

/* Hero */
.hero { padding: 64px 0 56px; background: radial-gradient(1200px 500px at 85% -10%, var(--brand-soft), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Before/after compare */
.compare { position: relative; margin: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 5; background: #eee; max-width: 480px; width: 100%; justify-self: center; user-select: none; }
.compare-img { width: 100%; height: 100%; object-fit: cover; }
.compare > .compare-img { position: absolute; inset: 0; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 3; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; transform: translateX(-1px); pointer-events: none; z-index: 2; }
.compare-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); font-size: 18px; color: var(--text); }
.compare-tag { position: absolute; top: 14px; z-index: 2; font-size: .75rem; font-weight: 600; background: rgba(0, 0, 0, .55); color: #fff; padding: .25em .7em; border-radius: 999px; }
.compare-tag.left { left: 14px; }
.compare-tag.right { right: 14px; }
.compare figcaption { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: .75rem; color: rgba(0, 0, 0, .55); z-index: 2; pointer-events: none; }

/* Steps & features */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { padding: 8px 4px; }
.step-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; margin-bottom: .75rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.feature-card .icon { font-size: 2rem; margin-bottom: .5rem; }
@media (max-width: 800px) { .steps, .two-col { grid-template-columns: 1fr; } }

.feature-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.feature-row.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; gap: 32px; } .feature-row.reverse > :first-child { order: 0; } }

.checks { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checks li { position: relative; padding-left: 1.75em; margin-bottom: .6em; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.mock-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 1rem; font-size: 1.5rem; color: var(--muted); }
.mock-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 1rem; }
.mock-thumb { aspect-ratio: 3 / 4; border-radius: 12px; flex: 1; background-size: cover; background-position: center; border: 1px solid var(--line); }
.mock-thumb.person { background-image: url("/static/img/example-before.svg"); }
.mock-thumb.garment { background: #fff url("/static/img/garment.svg") center / 80% no-repeat; }
.mock-thumb.result { background-image: url("/static/img/example-after.svg"); }
.mock-thumb.result.alt1 { filter: hue-rotate(160deg); }
.mock-thumb.result.alt2 { filter: hue-rotate(250deg) saturate(.8); }

.trust { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 800px) { .trust { grid-template-columns: 1fr; gap: 16px; } }
.cta-band { background: var(--text); color: #fff; }
.cta-band .lead { color: rgba(255, 255, 255, .7); }

/* Technology */
.arch { display: flex; align-items: stretch; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 1rem; }
.arch-node { flex: 1 1 200px; max-width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .35rem; }
.arch-node span { color: var(--muted); font-size: .9rem; }
.arch-node.aws { border-color: #ff9900; box-shadow: 0 0 0 3px rgba(255, 153, 0, .12); }
.arch-arrow { display: grid; place-items: center; font-size: 1.5rem; color: var(--muted); }
@media (max-width: 720px) { .arch { flex-direction: column; align-items: center; } .arch-node { max-width: none; width: 100%; } .arch-arrow { transform: rotate(90deg); } }
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stack-grid .card p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .stack-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .stack-grid { grid-template-columns: 1fr; } }

/* About / legal */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; font-size: 1.35rem; }
.prose h3 { margin-top: 1.25rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .4em; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-grid p { margin: 0 0 .25em; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

/* Studio */
.tabs { display: inline-flex; background: var(--bg-alt); border-radius: 999px; padding: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.tab { border: 0; background: transparent; padding: .6em 1.2em; border-radius: 999px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .studio-grid { grid-template-columns: 1fr; } }
.upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.upload-row.single { grid-template-columns: 1fr; }
.drop { position: relative; aspect-ratio: 3 / 4; border: 2px dashed var(--line); border-radius: 14px; display: grid; place-items: center; text-align: center; cursor: pointer; overflow: hidden; background: var(--bg-alt); transition: border-color .15s, background .15s; }
.upload-row.single .drop { aspect-ratio: 4 / 3; }
.drop:hover, .drop.dragover { border-color: var(--brand); background: var(--brand-soft); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.drop-hint { font-size: .9rem; color: var(--muted); padding: 12px; }
.drop-hint strong { color: var(--text); font-size: 1rem; }
.label { display: block; font-weight: 600; margin-bottom: .4rem; }
select { width: 100%; padding: .7em .9em; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface); margin-bottom: 18px; }
.consent { display: flex; gap: .6em; align-items: flex-start; font-size: .88rem; color: var(--muted); margin-bottom: 18px; cursor: pointer; }
.consent input { margin-top: .25em; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.studio-output { min-height: 420px; display: grid; place-items: center; }
.output-empty, .output-loading { text-align: center; color: var(--muted); }
.output-empty .icon { font-size: 2.5rem; }
.output-result { margin: 0; width: 100%; }
.output-result img { width: 100%; border-radius: 12px; }
.output-result figcaption { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: .9rem; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { background: #fff7e6; border: 1px solid #f5d9a0; color: #7a5300; padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; }
.notice.error { background: #fdecea; border-color: #f3b8ae; color: #8a2a1b; margin: 0; width: 100%; }
.notice.success { background: #eaf7ee; border-color: #a9dfb8; color: #1b5e30; }
.credit-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; margin-bottom: 20px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.price-card h3 { margin: .5rem 0 .25rem; font-size: 1.3rem; }
.price { margin: .4rem 0 .75rem; }
.price strong { font-size: 2.2rem; letter-spacing: -.02em; }
.price span { color: var(--muted); font-size: .95rem; }
.price-card .checks { margin: .5rem 0 1.5rem; flex: 1; }
.enterprise-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; }
.enterprise-banner h3 { margin: 0 0 .3rem; }
.enterprise-banner p { margin: 0; max-width: 680px; }
.card-sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0 16px; }
.redeem-row { display: flex; gap: 8px; }
.redeem-row .input { flex: 1; }
.tips { margin-top: 40px; max-width: 760px; }
.tips ul { padding-left: 1.25rem; color: var(--muted); }
[hidden] { display: none !important; }

/* Auth */
.auth-section { padding: 56px 0 80px; }
.auth-card { max-width: 440px; margin: 0 auto; }
.auth-card h1 { font-size: 1.75rem; }
.auth-form .label { margin-top: 14px; }
.input { width: 100%; padding: .7em .9em; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface); }
.input:focus, select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.auth-form .btn { margin-top: 18px; }
.auth-form .consent { margin: 16px 0 0; }
.field-hint { margin-top: .35rem; }
.auth-error { margin-bottom: 16px !important; }
.btn-google { gap: .6em; margin-top: 8px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0 4px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-gate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.gate-actions { display: inline-flex; gap: 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0 0 1.25rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.usage { font-size: 1.15rem; }
.usage strong { font-size: 1.6rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { margin: 0 0 .75rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer-grid a:not(.brand) { display: block; color: var(--text); margin-bottom: .4rem; }
.footer-grid .brand { margin-bottom: .5rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; font-size: .85rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* Prevent grid children from forcing horizontal overflow on small screens */
.hero-grid > *, .feature-row > *, .studio-grid > *, .trust > *, .two-col > * { min-width: 0; }
body { overflow-x: clip; }
