/* Upflare Logo Maker. Tokens match the main site (src/index.css): light is the upflare.com
   palette, dark is its Graphite palette, and assets/theme.js picks the one set on upflare.com. */
:root {
  color-scheme: light dark;
  --page: #fff;
  --surface: #fff;
  --mist: #f6f7fa;
  --line: #e5e7eb;
  --ink: #0f1830;
  --ink-soft: #475068;
  --ink-muted: #5f667d;
  --navy: #001259;
  --navy-hover: #000f4a;
  --link: #001259;
  --accent: #001259;
  --tint: #eef0f6;
  --ok: #10b981;
  --bad: #be123c;
  --bad-bg: #ffe4e6;
  --focus: #001259;
  --halo: #fff;
  --on-navy: 0 0 0 0 transparent;
  --shadow: 0 1px 3px rgba(15, 23, 42, .07);
  --glow-a: rgb(59 110 246 / .18);
  --glow-b: rgb(0 18 89 / .10);
  --footer: #0f1830;
}
:root[data-uf-theme="dark"] {
  --page: #141416;
  --surface: #1c1c1f;
  --mist: #18181b;
  --line: #323238;
  --ink: #ececef;
  --ink-soft: #c8c8cd;
  --ink-muted: #a1a1aa;
  --navy-hover: #0a2474;
  --link: #7aa2f7;
  --accent: #7aa2f7;
  --tint: #1f2538;
  --bad: #fb7185;
  --bad-bg: #481c26;
  --focus: #7aa2f7;
  --halo: #141416;
  --on-navy: inset 0 0 0 1px rgb(255 255 255 / .14);
  --shadow: 0 1px 3px rgba(0, 0, 0, .4);
  --glow-a: rgb(59 110 246 / .22);
  --glow-b: rgb(120 150 255 / .10);
  --footer: #1c1c1f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-uf-theme]) {
    --page: #141416;
    --surface: #1c1c1f;
    --mist: #18181b;
    --line: #323238;
    --ink: #ececef;
    --ink-soft: #c8c8cd;
    --ink-muted: #a1a1aa;
    --navy-hover: #0a2474;
    --link: #7aa2f7;
    --accent: #7aa2f7;
    --tint: #1f2538;
    --bad: #fb7185;
    --bad-bg: #481c26;
    --focus: #7aa2f7;
    --halo: #141416;
    --on-navy: inset 0 0 0 1px rgb(255 255 255 / .14);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
    --glow-a: rgb(59 110 246 / .22);
    --glow-b: rgb(120 150 255 / .10);
    --footer: #1c1c1f;
  }
}

*, ::before, ::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 16px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
h1, h2, h3, p, ol, fieldset { margin: 0; padding: 0; border: 0; }
ol { list-style: none; }
a { color: var(--link); }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--navy); color: #fff; }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--halo);
}

.container { width: 100%; max-width: 90rem; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 14px; border-radius: 8px;
  background: var(--navy); color: #fff; font-weight: 600;
}
.skip:focus { top: 12px; outline: 2px solid var(--focus); outline-offset: 2px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: 8px;
  font: 600 15px/1.2 inherit; font-family: inherit;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn:disabled { cursor: not-allowed; opacity: .6; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--on-navy); }
.btn-primary:hover:not(:disabled) { background: var(--navy-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow); }
.btn-secondary:hover { background: var(--mist); }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; white-space: nowrap; }
.btn-lg { min-height: 50px; padding: 12px 24px; font-size: 16px; width: 100%; }

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

/* header */
.site-header { position: relative; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; color: var(--navy); padding: 4px 0; }
.logo { height: 34px; width: auto; fill: currentColor; }
.main-nav { display: none; gap: 24px; }
.main-nav a { color: var(--ink-soft); font-size: 15px; font-weight: 500; text-decoration: none; }
.main-nav a:hover { color: var(--accent); }
.header-inner .btn { margin-left: auto; }
:root[data-uf-theme="dark"] .brand { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-uf-theme]) .brand { color: var(--ink); } }

/* hero */
.hero { position: relative; overflow: hidden; padding: 32px 0 48px; }
.glow {
  position: absolute; inset: -20% -10% auto; height: 900px; pointer-events: none;
  background:
    radial-gradient(40% 35% at 75% 30%, var(--glow-a), transparent 70%),
    radial-gradient(30% 30% at 20% 10%, var(--glow-b), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-soft);
  font-size: 12px; font-weight: 600;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
h1 { margin-top: 20px; font-size: 2.5rem; font-weight: 800; line-height: 1.05; letter-spacing: -.025em; }
h1 span { color: var(--accent); }
.lead { margin-top: 20px; max-width: 32rem; color: var(--ink-soft); font-size: 18px; line-height: 1.6; }
.how { display: none; margin-top: 32px; gap: 14px; }
.how li { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); }
.how b {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--navy); color: #fff; font-size: 14px; box-shadow: var(--on-navy);
}

/* one column, centred */
.hero-grid { max-width: 680px; margin: 0 auto; grid-template-columns: minmax(0, 1fr) !important; text-align: center; }
.hero-copy .lead { margin-left: auto; margin-right: auto; }
.form-card { text-align: left; }
.step[hidden] { display: none; }
.step-count { color: var(--ink-muted); font-size: 13px; font-weight: 600; }
.step-bar { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: var(--mist); }
.step-bar span { display: block; width: 33.33%; height: 100%; border-radius: 999px; background: var(--navy); }
.step-title { margin-top: 20px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.step-nav .btn { min-width: 120px; }
.step-nav #nextBtn { margin-left: auto; }

.examples-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }

/* form */
.form-card { padding: 20px; min-width: 0; }
.field { margin-top: 22px; min-width: 0; }
.label { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.opt { margin-left: 4px; color: var(--ink-muted); font-weight: 400; }
.hint { margin-top: 6px; color: var(--ink-muted); font-size: 13px; }
input[type=text], textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.5; resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: 1; }
input[aria-invalid=true] { border-color: var(--bad); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  min-height: 38px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-soft);
  font: 500 14px/1.2 inherit; font-family: inherit; cursor: pointer;
  transition: background-color .15s;
}
.chip:hover { background: var(--mist); }
.chip.on { border-color: var(--accent); color: var(--ink); background: var(--tint); }

.styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.style:first-child { grid-column: 1 / -1; }
.style, .colour { position: relative; display: block; cursor: pointer; }
.style input, .colour input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.style-box {
  display: block; height: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  transition: background-color .15s;
}
.style-box b { display: block; font-size: 14px; font-weight: 600; }
.style-box small { display: block; color: var(--ink-muted); font-size: 12px; line-height: 1.35; }
.style:hover .style-box, .colour:hover .colour-box { background: var(--mist); }
.colours { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.colour-box {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 500;
}
.sw { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(128 128 128 / .35); }
.sw-auto { background: linear-gradient(135deg, #001259, #3b6ef6 50%, #f5b315); }
.sw-blue { background: #1d4ed8; }
.sw-green { background: #059669; }
.sw-red { background: #e11d48; }
.sw-amber { background: #f59e0b; }
.sw-purple { background: #7c3aed; }
.sw-mono { background: linear-gradient(135deg, #111 50%, #fff 50%); }
.style input:checked + .style-box, .colour input:checked + .colour-box {
  border-color: var(--accent); background: var(--tint); box-shadow: inset 0 0 0 1px var(--accent);
}
.style input:focus-visible + .style-box, .colour input:focus-visible + .colour-box {
  outline: 2px solid var(--focus); outline-offset: 2px;
}

.msg { margin-top: 20px; padding: 12px 14px; border-radius: 10px; background: var(--tint); font-size: 15px; }
.msg.err { background: var(--bad-bg); color: var(--ink); box-shadow: inset 3px 0 0 var(--bad); }
.msg:focus { outline: none; }
.submit-row { margin-top: 22px; }
.remaining { margin-top: 10px; color: var(--ink-soft); font-size: 14px; text-align: center; }
.fine { margin-top: 12px; color: var(--ink-muted); font-size: 12px; line-height: 1.5; text-align: center; }

/* results */
.results { padding-top: 16px; padding-bottom: 56px; scroll-margin-top: 16px; }
.results-head h2, .services h2 { font-size: 1.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.results-head h2:focus { outline: none; }
.results-head p { margin-top: 6px; }
.progress { margin-top: 20px; padding: 20px; }
.progress-title { font-size: 17px; font-weight: 700; }
.bar { position: relative; overflow: hidden; height: 6px; margin: 14px 0 10px; border-radius: 999px; background: var(--tint); }
.bar span {
  position: absolute; top: 0; bottom: 0; left: 0; width: 35%;
  border-radius: 999px; background: var(--accent);
  animation: slide 1.6s ease-in-out infinite;
}
@keyframes slide { from { translate: -100% 0; } to { translate: 300% 0; } }

.logo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 20px; }
.logo-grid:empty { display: none; }
.logo-card { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
/* Logos are drawn on white, so their tile stays white in dark mode too. */
.logo-img { aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: #fff; }
.logo-img img { width: 100%; height: 100%; object-fit: contain; }
.skeleton .logo-img { background: var(--tint); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.retry, .next { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; padding: 20px; }
.retry h3, .next h3 { font-size: 18px; font-weight: 700; line-height: 1.3; }
.retry p, .next p { margin-top: 4px; }
.next p { color: var(--ink-soft); }
.next { background: var(--tint); }
.next-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.next-actions .btn { flex: 1 1 200px; }

/* services */
.services { padding: 48px 0 56px; background: var(--mist); border-top: 1px solid var(--line); }
.services > .container > p:first-of-type { margin-top: 6px; }
.svc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 24px; }
.svc { display: block; padding: 16px 18px; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.svc:hover { border-color: var(--accent); }
.svc b { display: block; font-weight: 600; }
.svc small { display: block; color: var(--ink-soft); font-size: 14px; }
.note { margin-top: 20px; }

/* footer */
.site-footer { background: var(--footer); color: rgb(255 255 255 / .7); font-size: 14px; }
.site-footer { padding: 24px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.footer-inner nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.footer-inner a { color: inherit; }
.footer-inner a:hover { color: #fff; }
.site-footer a:focus-visible { outline-color: #fff; }

@media (max-width: 400px) {
  .header-inner { gap: 12px; }
  .logo { height: 30px; }
}
@media (min-width: 640px) {
  .container { padding: 0 24px; }
  h1 { font-size: 3.75rem; }
  .form-card { padding: 28px; }
  .styles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .style:first-child { grid-column: auto; }
  .logo-grid, .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .retry, .next { flex-direction: row; align-items: center; justify-content: space-between; }
  .next-actions { flex-wrap: nowrap; flex: none; }
  .next-actions .btn { flex: none; }
}
@media (min-width: 860px) {
  .main-nav { display: flex; }
}
@media (min-width: 1024px) {
  .container { padding: 0 32px; }
  .hero { padding: 64px 0 80px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
  .hero-copy { position: sticky; top: 32px; }
  .how { display: grid; }
  .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .svc-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after { transition-duration: .01ms !important; }
  .bar span { animation: none; width: 100%; opacity: .5; }
  .skeleton .logo-img { animation: none; }
}
@media (forced-colors: active) {
  .style input:checked + .style-box, .colour input:checked + .colour-box { outline: 2px solid Highlight; }
}
