*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  overflow-x: clip;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  max-width: 100%;
  display: block;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
h1,
h2,
h3 {
  overflow-wrap: anywhere;
  min-width: 0;
}

/* top bar */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.pill {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--accent);
  color: var(--accent-text);
  padding: 6px 10px;
  border-radius: var(--radius-s);
  white-space: nowrap;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4) var(--space-8);
}

/* hero */
.hero {
  padding: var(--space-4) 0 var(--space-5);
}
h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 8vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
  max-width: 18ch;
}
.sub {
  margin: 0;
  font-size: 17px;
  color: var(--muted);
  max-width: 44ch;
}

/* maker form */
.maker {
  max-width: 560px;
  display: grid;
  gap: var(--space-4);
}
.picker {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.picker legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: var(--space-2);
}
.picker input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.picker label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1.5px solid var(--support);
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--dur-fast) var(--ease-in-out),
    color var(--dur-fast) var(--ease-in-out),
    border-color var(--dur-fast) var(--ease-in-out);
}
.picker label small {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.picker input:checked + label {
  background: var(--text);
  color: var(--ground);
  border-color: var(--text);
}
.picker input:checked + label small {
  color: inherit;
  opacity: 0.7;
}
.picker input:focus-visible + label {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.fields {
  display: grid;
  gap: var(--space-4);
}
.field {
  display: grid;
  gap: 6px;
}
.field > label {
  font-weight: 600;
}
.field .help {
  font-size: 13.5px;
  color: var(--muted);
}
.field input:not([type="file"]),
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--field);
  font-size: 16px;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237C8A85' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}
.field [aria-invalid="true"] {
  border-color: var(--error);
}
.field .err {
  font-size: 13.5px;
  color: var(--error);
}
.field .err[hidden] {
  display: none;
}

.naira {
  display: grid;
  grid-template-columns: auto 1fr;
}
.naira span {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-right: 0;
  border-radius: var(--radius-s) 0 0 var(--radius-s);
  background: var(--field);
  font-family: var(--font-mono);
}
.naira input {
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}

.photo {
  position: relative;
}
.photo input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.photo .drop {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 72px;
  padding: 12px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-s);
  background: var(--field);
  cursor: pointer;
}
.photo:focus-within .drop {
  outline: 2px solid var(--text);
  outline-offset: 1px;
}
.photo .thumb {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--line);
  flex: none;
}
.photo .thumb[hidden] {
  display: none;
}
.photo .drop-text {
  font-weight: 500;
}

/* buttons */
.btn {
  min-height: 48px;
  padding: 12px 18px;
  border: 1.5px solid var(--text);
  border-radius: var(--radius-s);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    opacity var(--dur-fast) var(--ease-in-out);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}
.btn[data-loading="true"] {
  cursor: progress;
}
.btn-primary {
  width: 100%;
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-size: 17px;
}
.btn-small {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
}
.fine {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

/* result */
.result {
  max-width: 560px;
  margin-top: var(--space-6);
  display: grid;
  gap: var(--space-4);
}
.result[hidden] {
  display: none;
}
.preview {
  margin: 0;
  display: grid;
  gap: var(--space-2);
}
.preview-img {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--field);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}
.preview-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-img.watermarked::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='180'%3E%3Ctext x='10' y='100' font-family='Arial,sans-serif' font-size='24' font-weight='700' fill='%23777777' transform='rotate(-22 130 90)'%3Eadmotive.co%3C/text%3E%3C/svg%3E");
}
.preview figcaption {
  font-size: 14px;
  color: var(--muted);
}
.result-actions {
  display: grid;
  gap: var(--space-2);
}

/* stage (desktop preview panel) */
.stage {
  display: none;
}
.stage-example {
  margin: 0;
  display: grid;
  gap: var(--space-2);
}
.stage-example img {
  width: 100%;
  max-height: calc(100dvh - 200px);
  object-fit: contain;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--field);
}
.stage-example figcaption {
  font-size: 14px;
  color: var(--muted);
}
.stage .result {
  max-width: none;
  margin-top: 0;
}
.stage .preview-img {
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 200px);
  margin: 0 auto;
}
.stage:has(.result:not([hidden])) .stage-example,
.stage:has(.result:not([hidden])) #stage-blurb {
  display: none;
}

/* examples */
.examples {
  margin-top: var(--space-8);
}
.examples .fine {
  margin: 0 0 var(--space-2);
}
h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 5vw, 34px);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: var(--space-4);
}
.ex {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  padding: var(--space-3);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--field);
}
.ex-img {
  width: 100%;
  background: var(--line);
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 0;
  overflow: hidden;
}
.ex-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.ex-img[data-ratio="3:4"] {
  aspect-ratio: 3 / 4;
}
.ex-img[data-ratio="1:1"] {
  aspect-ratio: 1;
}
.ex-img[data-ratio="16:9"] {
  aspect-ratio: 16 / 9;
}
.ex-img[data-ratio="9:16"] {
  aspect-ratio: 9 / 16;
  height: 320px;
  width: auto;
  justify-self: center;
}
.ex h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.ex p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.ex dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  font-size: 13px;
}
.ex dt {
  color: var(--muted);
}
.ex dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

/* prices */
.prices {
  margin-top: var(--space-8);
  max-width: 560px;
}
.prices ul {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
}
.prices li {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: var(--space-1) var(--space-3);
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.prices li:last-child {
  border-bottom: 1px solid var(--line);
}
.price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.credits {
  font-weight: 600;
}
.note {
  color: var(--muted);
  font-size: 14px;
}

/* faq */
.faq {
  margin-top: var(--space-8);
  max-width: 560px;
}
.faq details {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  font-weight: 600;
  cursor: pointer;
}
.faq details p {
  margin: var(--space-2) 0 0;
  color: var(--muted);
}

/* footer */
.foot {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.foot a {
  color: var(--text);
}

@media (max-width: 420px) {
  .prices li {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .note {
    grid-column: 1 / -1;
  }
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .top,
  main,
  .foot {
    padding-inline: var(--space-5);
  }
  .prices {
    max-width: none;
  }
  .prices ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-3);
  }
  .prices li {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding: var(--space-3) 0 0;
    border-top: 2px solid var(--border);
    border-radius: 0;
  }
  .prices li:last-child {
    border-bottom: 0;
  }
  .price {
    font-family: var(--font-mono);
    font-size: 24px;
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .work {
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
    grid-template-areas:
      "hero stage"
      "form stage"
      "result stage";
    column-gap: var(--space-7);
    align-items: start;
  }
  .hero {
    grid-area: hero;
  }
  .maker {
    grid-area: form;
  }
  #result {
    grid-area: result;
  }
  .stage {
    display: block;
    grid-area: stage;
    position: sticky;
    top: var(--space-5);
    align-self: start;
    min-width: 0;
  }
  .faq {
    max-width: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-7);
    align-items: start;
  }
  .faq h2 {
    grid-column: 1 / -1;
  }
  .faq details {
    min-width: 0;
  }
  .faq details:last-child {
    border-bottom: 0;
  }
}

@media (min-width: 1200px) {
  .top,
  main,
  .foot {
    padding-inline: 40px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover:not(:disabled) {
    opacity: 0.92;
  }
  .picker label:hover {
    border-color: var(--text);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
