@font-face {
  font-family: "CM Template Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/template-fonts/bebas-neue/bebas-neue-400.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Belleza";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/template-fonts/belleza/belleza-400.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/template-fonts/inter/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/template-fonts/inter/inter-500.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/template-fonts/inter/inter-600.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/template-fonts/inter/inter-700.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/template-fonts/inter/inter-800.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Pinyon Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/template-fonts/pinyon-script/pinyon-script-400.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Playfair Display";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/template-fonts/playfair-display/playfair-display-500.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/template-fonts/playfair-display/playfair-display-600.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/template-fonts/poppins/poppins-600.woff2") format("woff2");
}

@font-face {
  font-family: "CM Template Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/template-fonts/poppins/poppins-700.woff2") format("woff2");
}

.brand-profile-page {
  --brand-deep-space: #14122e;
  --brand-cream: #fff7ec;
  --brand-mango: #ff9a2e;
  --brand-mango-deep: #f26b1d;
  --brand-nebula: #7a5cff;
  --brand-line: #ded7e8;
  --brand-muted: #625b70;
}

.brand-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.brand-back-link,
.brand-primary-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.brand-profile-main {
  width: min(100%, 920px);
  padding-inline: 12px;
}

.brand-state-card {
  min-height: 330px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  padding: 28px 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--brand-line);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(35, 17, 91, 0.13);
  text-align: center;
}

.brand-state-card h1,
.brand-page-heading h1 {
  margin: 0;
  color: var(--brand-deep-space);
  font-size: clamp(34px, 10vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.brand-state-card p:not(.studio-kicker),
.brand-page-heading > p:last-child {
  max-width: 650px;
  margin: 12px auto 0;
  color: var(--brand-muted);
  font-size: 16px;
  line-height: 1.55;
}

.brand-primary-link {
  margin-top: 10px;
  color: #fff;
  background: var(--brand-deep-space);
  border-color: var(--brand-deep-space);
}

.brand-page-heading {
  padding: 10px 4px 24px;
}

.brand-page-heading > p:last-child {
  margin-inline: 0;
}

.brand-profile-form,
.brand-template-section {
  display: grid;
  gap: 14px;
}

.brand-panel,
.brand-template-section {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--brand-line);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(35, 17, 91, 0.08);
}

.brand-panel-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.brand-panel-heading > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand-deep-space);
  border-radius: 13px;
  font-size: 15px;
  font-weight: 900;
}

.brand-panel h2,
.brand-template-heading h2 {
  margin: 0;
  color: var(--brand-deep-space);
  font-size: clamp(22px, 7vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.brand-panel-heading p,
.brand-template-note {
  margin: 6px 0 0;
  color: var(--brand-muted);
  font-size: 15px;
  line-height: 1.5;
}

.brand-color-grid,
.brand-font-grid,
.brand-template-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.brand-color-field {
  min-width: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  color: var(--brand-deep-space);
  background: #faf8fc;
  border: 1px solid var(--brand-line);
  border-radius: 15px;
  font-size: 15px;
  font-weight: 800;
}

.brand-color-control {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-color-control input {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: 3px;
  background: #fff;
  border: 1px solid #cfc6d9;
  border-radius: 12px;
  cursor: pointer;
}

.brand-color-control output {
  max-width: 78px;
  overflow-wrap: anywhere;
  color: var(--brand-muted);
  font-size: 15px;
  font-weight: 700;
}

.brand-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.brand-font-option {
  position: relative;
  min-width: 0;
  display: block;
  cursor: pointer;
}

.brand-font-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.brand-font-card {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  color: var(--brand-deep-space);
  background: #faf8fc;
  border: 2px solid transparent;
  border-radius: 17px;
  box-shadow: inset 0 0 0 1px var(--brand-line);
}

.brand-font-option input:checked + .brand-font-card {
  border-color: var(--brand-nebula);
  background: #f1eeff;
  box-shadow: 0 0 0 3px rgba(122, 92, 255, 0.12);
}

.brand-font-option input:focus-visible + .brand-font-card,
.brand-choice input:focus-visible + span,
.brand-filter-button:focus-visible,
.brand-template-card:focus-visible,
.brand-primary-button:focus-visible,
.brand-secondary-button:focus-visible,
.brand-template-action:focus-visible,
.brand-back-link:focus-visible,
.brand-primary-link:focus-visible {
  outline: 3px solid var(--brand-mango);
  outline-offset: 3px;
}

.brand-font-display {
  min-width: 0;
  overflow: hidden;
  font-size: 28px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-font-body {
  min-width: 0;
  overflow: hidden;
  color: #51495c;
  font-size: 16px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-font-meta {
  color: #6b6374;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.brand-choice-row,
.brand-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.brand-choice {
  position: relative;
  cursor: pointer;
}

.brand-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.brand-choice span,
.brand-filter-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  color: #4d4262;
  background: #f5f2f8;
  border: 1px solid #d8d0df;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
}

.brand-choice input:checked + span,
.brand-filter-button[aria-pressed="true"] {
  color: #fff;
  background: var(--brand-deep-space);
  border-color: var(--brand-deep-space);
}

.brand-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  padding: 4px 0 0;
}

.brand-primary-button,
.brand-secondary-button,
.brand-template-action {
  min-height: 50px;
  padding: 10px 16px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

.brand-primary-button,
.brand-template-action {
  color: #fff;
  background: var(--brand-mango-deep);
  border: 1px solid var(--brand-mango-deep);
}

.brand-secondary-button {
  color: var(--brand-deep-space);
  background: #fff;
  border: 1px solid #b9aec7;
}

.brand-primary-button:disabled,
.brand-secondary-button:disabled,
.brand-template-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.brand-status {
  min-height: 24px;
  margin: 0;
  color: #4d32c7;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
}

.brand-template-section {
  margin-top: 22px;
}

.brand-template-heading {
  display: grid;
  gap: 2px;
}

.brand-filter-row {
  margin-top: 10px;
}

.brand-filter-button {
  cursor: pointer;
}

.brand-template-card {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 18px;
}

.brand-template-card.is-recommended {
  border-color: var(--brand-nebula);
  box-shadow: 0 0 0 3px rgba(122, 92, 255, 0.1);
}

.brand-template-preview {
  min-height: 178px;
  display: grid;
  align-content: end;
  gap: 5px;
  padding: 18px;
  color: var(--preview-text, #fff);
  background:
    linear-gradient(145deg, var(--preview-primary, #14122e), var(--preview-background, #2e2a58));
}

.brand-template-preview::before {
  content: "";
  width: 52px;
  height: 8px;
  margin-bottom: auto;
  background: var(--preview-accent, #ff9a2e);
  border-radius: 999px;
}

.brand-template-preview strong {
  min-width: 0;
  overflow: hidden;
  font-size: 29px;
  line-height: 1.02;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-template-preview span {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-template-card-body {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.brand-template-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.brand-template-card-heading h3 {
  margin: 0;
  color: var(--brand-deep-space);
  font-size: 20px;
  line-height: 1.15;
}

.brand-template-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #3b287f;
  background: #eee9ff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.brand-template-meta,
.brand-template-reason {
  margin: 0;
  color: var(--brand-muted);
  font-size: 15px;
  line-height: 1.45;
}

.brand-template-reason {
  padding: 11px 12px;
  color: #5b5265;
  background: #f5f2f7;
  border-radius: 12px;
}

.brand-template-action {
  width: 100%;
}

@media (min-width: 560px) {
  .brand-color-grid,
  .brand-font-grid,
  .brand-template-grid,
  .brand-form-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 800px) {
  .brand-profile-main {
    padding-inline: 16px;
  }

  .brand-panel,
  .brand-template-section {
    padding: 24px;
  }

  .brand-template-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 20px;
  }

  .brand-filter-row {
    justify-content: flex-end;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-profile-page *,
  .brand-profile-page *::before,
  .brand-profile-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
