/* Backwards-compatible wrapper. Global theme values now live in settings.css. */
@import './settings.css';

.c1-fonts-page {
  width: min(100%, 1680px);
  max-width: none;
}

.c1-fonts-shell {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 460px);
}

.c1-font-family-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.c1-font-family-card {
  border: 1px solid var(--c1-border);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.c1-font-family-card:hover,
.c1-font-family-card:focus-within,
.c1-font-family-card.is-active {
  border-color: rgb(2 118 191 / 0.34);
  box-shadow: 0 18px 30px rgb(2 118 191 / 0.12);
  transform: translateY(-1px);
}

.c1-font-family-card.is-active {
  background:
    linear-gradient(180deg, rgb(2 118 191 / 0.06), #ffffff 34%),
    #ffffff;
}

.c1-font-family-card__button {
  display: grid;
  gap: 28px;
  width: 100%;
  min-height: 210px;
  padding: 22px;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.c1-font-family-card__button:focus-visible {
  outline: 3px solid rgb(2 118 191 / 0.22);
  outline-offset: -3px;
  border-radius: 22px;
}

.c1-font-family-card__name {
  color: var(--c1-secondary);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.c1-font-family-card__sample {
  align-self: end;
  color: var(--c1-text);
  font-size: clamp(2rem, 3vw, 3.4rem);
  font-weight: 600;
  line-height: 1;
}

.c1-font-family-card__sample--inter {
  font-family: var(--c1-font-family-inter);
}

.c1-font-family-card__sample--poppins {
  font-family: var(--c1-font-family-poppins);
}

.c1-font-family-card__sample--roboto {
  font-family: var(--c1-font-family-roboto);
}

.c1-font-preview {
  display: grid;
  gap: 16px;
  min-height: 220px;
  margin: 24px 0 0;
  padding: 24px;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 22px;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.11), rgb(255 255 255 / 0.04));
}

.c1-font-preview__eyebrow {
  margin: 0;
  color: rgb(188 207 226 / 0.84);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.c1-font-preview__sample {
  align-self: center;
  margin: 0;
  line-height: 1.16;
  overflow-wrap: anywhere;
  transition:
    color 160ms ease,
    font-size 160ms ease;
}

.c1-font-editor {
  display: grid;
  gap: 14px;
}

.c1-font-editor__field {
  display: grid;
  gap: 8px;
}

.c1-font-editor__field > span:first-child {
  color: rgb(188 207 226 / 0.84);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.c1-font-editor__field select,
.c1-font-editor__field input[type='number'] {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgb(255 255 255 / 0.93);
  color: #081f31;
  outline: none;
}

.c1-font-editor__field select:focus,
.c1-font-editor__field input:focus {
  border-color: rgb(255 255 255 / 0.72);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.12);
}

@media (max-width: 1120px) {
  .c1-fonts-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .c1-font-family-grid {
    grid-template-columns: 1fr;
  }

  .c1-font-family-card__button {
    min-height: 170px;
  }
}

@media (max-width: 560px) {
  .c1-font-family-card,
  .c1-font-family-card__button,
  .c1-font-preview {
    border-radius: 18px;
  }

  .c1-font-family-card__button,
  .c1-font-preview {
    padding: 18px;
  }

  .c1-font-preview__sample {
    line-height: 1.22;
  }
}
