:root {
  --ink: #16131c;
  --ink-2: #4a4554;
  --muted: #8a8494;
  --paper: #f7f4ee;
  --card: #ffffff;
  --line: #e6e0d6;
  --accent: #ff5b2e;
  --accent-ink: #ffffff;
  --accent-soft: #ffe7de;
  --ok: #1f8a5b;
  --err: #c0362c;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(22, 19, 28, .05), 0 12px 32px -12px rgba(22, 19, 28, .18);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; line-height: 1.08; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* Header */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(247, 244, 238, .86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.35rem; text-decoration: none; font-weight: 600; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); display: grid; place-items: center; }
.brand-mark span { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font: 600 .95rem var(--sans); cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -8px rgba(255, 91, 46, .7); }
.btn-primary:hover { background: #f04a1d; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field .hint { font-weight: 400; color: var(--muted); }
input, textarea, select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--ink-2); }
.check input { width: auto; margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 500; font-size: .88rem; cursor: pointer; }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.alert { padding: 12px 16px; border-radius: 12px; font-size: .92rem; margin-bottom: 16px; }
.alert-err { background: #fdecea; color: var(--err); }
.alert-ok { background: #e6f5ee; color: var(--ok); }

/* Landing */
.hero { padding: 80px 0 64px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; background: var(--accent-soft); color: #b8381a; font-weight: 600; font-size: .82rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-art { position: relative; aspect-ratio: 1; }
.tile { position: absolute; background: #fff; border-radius: 22px; box-shadow: var(--shadow); display: grid; place-items: center; border: 1px solid var(--line); }
.tile svg { width: 78%; height: auto; }
.tile.t1 { inset: 0 34% 38% 0; transform: rotate(-4deg); }
.tile.t2 { inset: 12% 0 46% 58%; background: var(--ink); transform: rotate(5deg); }
.tile.t3 { inset: 58% 30% 0 8%; transform: rotate(3deg); }
.tile.t4 { inset: 48% 0 6% 64%; background: var(--accent); transform: rotate(-6deg); }

.section { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step .num { font-family: var(--serif); font-size: 2.6rem; color: var(--accent); line-height: 1; margin-bottom: 12px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.feature b { display: block; margin-bottom: 6px; }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.highlight { border: 2px solid var(--ink); }
.price-card .badge { position: absolute; top: -12px; left: 24px; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.price { font-family: var(--serif); font-size: 2.8rem; margin: 8px 0 2px; }
.price-card ul { padding-left: 18px; color: var(--ink-2); margin: 16px 0 24px; flex: 1; }
.no-sub { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.no-sub span { background: #fff; border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font-size: .88rem; }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

.footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: .9rem; }
.footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer nav { margin-left: auto; display: flex; gap: 18px; }

/* Auth */
.auth { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 16px; }
.auth .card { width: min(440px, 100%); }
.tabs { display: flex; background: #efe9df; border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 999px; font: 600 .92rem var(--sans); cursor: pointer; color: var(--ink-2); }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* App */
.app { display: grid; grid-template-columns: 230px 1fr; gap: 32px; padding: 32px 0 64px; }
.side { position: sticky; top: 100px; align-self: start; }
.side a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-weight: 500; margin-bottom: 2px; }
.side a:hover { background: #fff; }
.side a.active { background: var(--ink); color: #fff; }
.credit-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 14px; font-weight: 600; font-size: .9rem; }
.credit-pill b { background: var(--accent); color: #fff; padding: 3px 10px; border-radius: 999px; }
.panel h2 { font-size: 2rem; }
.panel-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }

.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.logo-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.logo-card .preview { aspect-ratio: 4 / 3; display: grid; place-items: center; background:
  conic-gradient(#f3efe8 25%, #fff 0 50%, #f3efe8 0 75%, #fff 0) 0 0 / 20px 20px; }
.logo-card .preview.dark { background: var(--ink); }
.logo-card .preview img { width: 92%; height: 92%; object-fit: contain; }
.logo-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.logo-card .body p { font-size: .88rem; color: var(--ink-2); flex: 1; }
.logo-card .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.fav { border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.fav.on { color: var(--accent); }
.project { margin-bottom: 40px; }
.project-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 16px; }

.loader { display: grid; place-items: center; text-align: center; padding: 56px 16px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 1s linear infinite; margin-bottom: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.plus { color: var(--ok); font-weight: 600; }
.minus { color: var(--err); font-weight: 600; }

dialog { border: 0; border-radius: var(--radius); padding: 28px; width: min(520px, 100% - 32px); box-shadow: var(--shadow); }
dialog.wide { width: min(980px, 100% - 32px); }
.tag { display: inline-block; font: 600 .72rem var(--sans); background: var(--accent-soft); color: #b8381a; padding: 3px 8px; border-radius: 999px; vertical-align: middle; margin-bottom: 8px; }
.edit-preview { background: #f6f3ee; border-radius: 12px; margin-bottom: 16px; height: 170px; padding: 12px; display: grid; place-items: center; }
.edit-preview img { max-height: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; align-items: center; gap: 6px; font: 500 .8rem var(--sans); margin: 0; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px 4px 4px; }
.swatch input { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }

.mockups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mock { margin: 0; background: #ece7de; border-radius: 14px; aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; overflow: hidden; }
.mock figcaption { position: absolute; bottom: 8px; left: 12px; font-size: .75rem; color: var(--ink-2); }
.mock.card-front img, .mock.card-back img { width: 62%; aspect-ratio: 1.75; object-fit: contain; padding: 4%; background: #fff; border-radius: 6px; box-shadow: 0 14px 28px -10px rgba(0,0,0,.35); transform: rotate(-5deg); }
.mock.card-back img { background: var(--ink); transform: rotate(4deg); }
.mock.sign { background: linear-gradient(#cfc6b8, #b8ad9c); }
.sign-board { width: 78%; aspect-ratio: 3.2; background: #1d1b22; border-radius: 6px; display: grid; place-items: center; box-shadow: 0 18px 30px -12px rgba(0,0,0,.6); }
.sign-board img { height: 86%; }
.phone-screen { width: 84px; height: 168px; background: linear-gradient(160deg, #5b6cff, #b46cff); border-radius: 22px; border: 6px solid #111; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; font-size: .7rem; }
.app-icon { width: 48%; aspect-ratio: 1; background: #fff; border-radius: 22%; display: grid; place-items: center; overflow: hidden; }
.app-icon img { width: 82%; }
.mock.social { background: #fff; display: flex; align-items: center; justify-content: center; gap: 14px; }
.lines { width: 45%; }
.avatar { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 78%; }
.lines b, .lines i { display: block; height: 10px; border-radius: 6px; background: #ddd; width: 90%; margin-bottom: 8px; }
.lines i { width: 60%; background: #eee; }
.mock.browser { background: #dedad3; align-items: start; padding-top: 22%; }
.tab { display: flex; align-items: center; gap: 8px; background: #fff; padding: 10px 16px; border-radius: 10px 10px 0 0; font-size: .8rem; min-width: 60%; }
.tab img { width: 16px; height: 16px; }

dialog::backdrop { background: rgba(22, 19, 28, .45); }

.legal { padding: 56px 0; max-width: 760px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-art { max-width: 420px; }
  .steps, .pricing { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; }
  .side { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .side a { white-space: nowrap; }
  .nav-links a.hide-sm { display: none; }
  .mockups { grid-template-columns: 1fr 1fr; }
  .compare { font-size: .85rem; }
}
@media (max-width: 560px) {
  .features, .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .footer nav { margin-left: 0; }
}
