* {
  box-sizing: border-box;
}

:root {
  --navy: #0b1f3a;
  --navy-light: #17365f;
  --orange: #d97706;
  --orange-hover: #b86105;
  --text: #172033;
  --muted: #667085;
  --border: #dfe3e8;
  --background: #f5f7fa;
  --white: #ffffff;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

/* HEADER */

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  min-height: 82px;
  padding: 15px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}

.brand-name {
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.7px;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.topbar-note {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

/* MAIN */

.creator-wrap {
  width: min(1050px, 92%);
  margin: 0 auto;
  padding: 65px 0 80px;
}

.intro {
  max-width: 760px;
  margin: 0 auto 38px;
  text-align: center;
}

.eyebrow {
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.8px;
  margin-bottom: 12px;
}

.intro h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -1.5px;
}

.intro p {
  max-width: 680px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

/* CREATOR CARD */

.creator-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 42px;
  box-shadow: 0 12px 35px rgba(11, 31, 58, 0.07);
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
}

.step-number {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.step-heading h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 23px;
}

.step-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* FORM */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.field label span {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid #cfd5dd;
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: 0.2s ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 31, 58, 0.08);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 38px 0;
}

/* CHOICES */

.choice-grid {
  display: grid;
  gap: 12px;
}

.style-grid {
  grid-template-columns: repeat(4, 1fr);
}

.color-grid {
  grid-template-columns: repeat(4, 1fr);
}

.choice {
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid #cfd5dd;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  transition: 0.2s ease;
}

.choice:hover {
  border-color: var(--navy);
  transform: translateY(-1px);
}

.choice.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* BUTTONS */

.primary-button {
  width: 100%;
  min-height: 58px;
  margin-top: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--orange);
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  transition: 0.2s ease;
}

.primary-button:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.secondary-button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--navy);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-weight: 800;
}

.secondary-button:hover {
  background: #f1f4f8;
}

.fine-print {
  margin: 15px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}

/* RESULTS */

.result-section {
  margin-top: 42px;
}

.result-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.result-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 30px;
}

.logo-preview-card {
  min-height: 540px;
  background:
    linear-gradient(45deg, #f1f1f1 25%, transparent 25%),
    linear-gradient(-45deg, #f1f1f1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f1f1f1 75%),
    linear-gradient(-45deg, transparent 75%, #f1f1f1 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
}

.finished-logo {
  width: 100%;
  max-width: 760px;
  min-height: 420px;
  padding: 35px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.finished-logo.horizontal {
  flex-direction: row;
  text-align: left;
}

.logo-image {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text-area {
  width: 100%;
  text-align: center;
}

.finished-logo.horizontal .logo-text-area {
  text-align: left;
}

.preview-business-name {
  color: var(--navy);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1px;
  word-break: break-word;
}

.preview-tagline {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.35;
  word-break: break-word;
}

.customize-panel {
  margin-top: 18px;
  padding: 25px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.customize-title {
  margin-bottom: 18px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.customize-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.customize-grid input[type="color"] {
  width: 100%;
  min-height: 52px;
  padding: 5px;
  border: 1px solid #cfd5dd;
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.result-actions .primary-button {
  margin-top: 0;
}

.result-actions .secondary-button {
  min-height: 58px;
}

/* LOADING */

.loading {
  text-align: center;
  color: var(--navy);
}

.loading h3 {
  margin: 18px 0 5px;
}

.loading p {
  margin: 0;
  color: var(--muted);
}

.spinner {
  width: 45px;
  height: 45px;
  margin: auto;
  border: 4px solid #dce2e8;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-box {
  max-width: 500px;
  padding: 20px;
  border-radius: 8px;
  background: #fff3f3;
  color: #a32222;
  text-align: center;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

@media (max-width: 850px) {
  .customize-grid {
    grid-template-columns: 1fr 1fr;
  }

  .finished-logo.horizontal {
    flex-direction: column;
    text-align: center;
  }

  .finished-logo.horizontal .logo-text-area {
    text-align: center;
  }
}

@media (max-width: 560px) {
  .customize-grid {
    grid-template-columns: 1fr;
  }

  .finished-logo {
    padding: 22px;
  }

  .logo-image {
    max-width: 240px;
  }
}

/* FOOTER */

footer {
  background: var(--navy);
  color: var(--white);
  min-height: 90px;
  padding: 25px 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  font-size: 13px;
}

footer strong {
  font-size: 15px;
}

footer span {
  opacity: 0.75;
}

/* MOBILE */

@media (max-width: 760px) {
  .topbar {
    padding: 14px 20px;
  }

  .topbar-note {
    display: none;
  }

  .creator-wrap {
    padding-top: 42px;
  }

  .creator-card {
    padding: 25px 20px;
  }

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

  .field.full {
    grid-column: auto;
  }

  .style-grid,
  .color-grid {
    grid-template-columns: 1fr 1fr;
  }

  .result-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .logo-preview-card {
    min-height: 350px;
    padding: 20px;
  }

  footer {
    flex-direction: column;
    gap: 5px;
  }
}
