@font-face {
  font-family: "Ashgabat";
  src: url("assets/ashgabat.otf") format("opentype");
  font-display: swap;
}

:root {
  --paper: #0e0c0a;
  --ink: #e7d6b1;
  --accent: #a8895a;
  --panel: #17130e;
  --line: rgba(231, 214, 177, .24);
  --muted: rgba(231, 214, 177, .68);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.model-page {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  min-height: 100svh;
  padding: clamp(28px, 5vw, 72px);
}

.model-intro {
  position: sticky;
  top: clamp(28px, 5vw, 72px);
  align-self: start;
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0 0 14px;
}

.brand-meta p,
.brand-meta a,
.model-contact-links a {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .38em;
  text-transform: uppercase;
}

.brand-meta p {
  margin: 0;
}

.brand-meta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-meta svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.model-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0 0 clamp(34px, 7vw, 88px);
}

.model-contact-links a {
  letter-spacing: .16em;
  text-decoration: none;
}

.model-contact-links a:hover {
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .38em;
  text-transform: uppercase;
}

h1 {
  max-width: 560px;
  margin: 0 0 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(54px, 7vw, 112px);
  font-style: italic;
  font-weight: 300;
  line-height: .92;
}

.intro-copy {
  max-width: 450px;
  margin: 0;
  color: var(--muted);
  font-family: "Tenor Sans", sans-serif;
  font-size: clamp(14px, 1.3vw, 17px);
  line-height: 1.7;
}

.model-form {
  display: grid;
  gap: 18px;
  align-self: start;
}

.model-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.model-progress li {
  min-height: 34px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .20em;
  text-transform: uppercase;
}

.model-progress li.is-active {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
}

.form-section {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}

.form-step {
  animation: formStepIn .38s ease both;
}

.form-step[hidden] {
  display: none;
}

@keyframes formStepIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 12px;
  padding: clamp(16px, 2vw, 24px);
}

label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

label span,
.media-upload small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: .16em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 1px;
  outline: none;
  font-size: 13px;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 4.4 6 8.1l3.8-3.7' fill='none' stroke='%23e7d6b1' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 10% center;
  background-repeat: no-repeat;
  background-size: 12px 12px;
  padding-right: 44px;
}

textarea {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--ink) 70%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

input[type="file"] {
  height: auto;
  padding: 14px;
}

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

.style-group {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
  padding: clamp(16px, 2vw, 24px);
  border-right: 1px solid var(--line);
}

.style-group:last-child {
  border-right: 0;
}

.style-group label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.style-choice {
  color: var(--ink) !important;
}

.style-choice span {
  color: inherit;
  font-family: "Antic Didone", serif;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.style-group p {
  margin: 0;
  color: var(--muted);
  font-family: "Cormorant Garamond", serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.45;
}

input[type="checkbox"] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: .05em 0 0;
  accent-color: var(--accent);
}

.media-upload,
.sample-guide,
.upload-list,
.upload-notice,
.form-grid label:has(textarea),
.form-grid label:has(input[type="file"]) {
  grid-column: 1 / -1;
}

.sample-guide {
  display: grid;
  gap: 14px;
}

.sample-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.sample-sentence-carousel,
.sample-carousel {
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(231, 214, 177, .035);
}

.sample-sentence-carousel {
  padding: 12px 0;
}

.sample-sentence-track {
  display: flex;
  width: max-content;
  animation: sampleTextLeftToRight 20s linear infinite;
}

.sample-sentence-track span {
  padding-inline: 22px;
  color: var(--ink);
  font-family: "Tenor Sans", sans-serif;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}

.sample-carousel {
  padding: 10px 0;
}

.sample-carousel-track {
  display: flex;
  width: max-content;
  gap: 10px;
  padding-inline: 10px;
  animation: sampleImagesLeftToRight 30.667s linear infinite;
}

.sample-thumb {
  position: relative;
  flex: 0 0 clamp(132px, 18vw, 190px);
  aspect-ratio: 4 / 5.2;
  overflow: hidden;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 80%, var(--accent) 20%);
}

.sample-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 12, 10, .08), rgba(14, 12, 10, .02));
}

.sample-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes sampleImagesLeftToRight {
  from {
    transform: translateX(calc(-1 * var(--sample-loop-distance, 50%)));
  }

  to {
    transform: translateX(0);
  }
}

@keyframes sampleTextLeftToRight {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

.upload-list {
  display: grid;
  gap: 10px;
}

.upload-list:empty {
  display: none;
}

.upload-notice {
  margin: -2px 0 0;
  padding: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(231, 214, 177, .035);
  font-size: 12px;
  line-height: 1.45;
}

.upload-notice[hidden] {
  display: none;
}

.upload-notice.is-error {
  color: #f0b29d;
  border-color: rgba(240, 178, 157, .55);
  background: rgba(120, 38, 24, .20);
}

.upload-notice.is-critical {
  color: #ffd7cc;
  border-color: rgba(255, 82, 52, .88);
  background:
    linear-gradient(135deg, rgba(255, 82, 52, .22), rgba(120, 20, 12, .34)),
    rgba(18, 8, 5, .92);
  box-shadow:
    0 0 0 1px rgba(255, 82, 52, .28) inset,
    0 0 24px rgba(255, 82, 52, .42),
    0 0 52px rgba(255, 82, 52, .16);
  animation: requiredMediaPulse 1.25s ease-in-out infinite alternate;
}

@keyframes requiredMediaPulse {
  from {
    border-color: rgba(255, 82, 52, .66);
    box-shadow:
      0 0 0 1px rgba(255, 82, 52, .22) inset,
      0 0 14px rgba(255, 82, 52, .26),
      0 0 34px rgba(255, 82, 52, .12);
  }

  to {
    border-color: rgba(255, 112, 82, 1);
    box-shadow:
      0 0 0 1px rgba(255, 112, 82, .42) inset,
      0 0 30px rgba(255, 82, 52, .52),
      0 0 64px rgba(255, 82, 52, .20);
  }
}

.upload-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(231, 214, 177, .035);
}

.upload-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.upload-item__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item__bar {
  height: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(14, 12, 10, .6);
}

.upload-item__bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width .18s ease;
}

.upload-item.is-complete .upload-item__status {
  color: var(--ink);
}

.upload-item.is-error .upload-item__status {
  color: #d8a38f;
}

.review-copy {
  margin: 0;
  color: var(--muted);
  font-family: "Tenor Sans", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.model-step-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.model-step-actions button[data-model-submit] {
  grid-column: 1 / -1;
}

.model-step-actions button[hidden] {
  display: none;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  color: var(--paper);
  background: var(--accent);
  border: 1px solid var(--accent);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .24em;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 22%, transparent);
}

button:disabled {
  cursor: wait;
  opacity: .72;
}

.button-spinner {
  width: 14px;
  height: 14px;
  border: 1px solid color-mix(in srgb, var(--paper) 36%, transparent);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: spinButton .78s linear infinite;
}

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

.form-note {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.hidden {
  display: none;
}

.model-credit {
  position: fixed;
  left: clamp(18px, 3vw, 34px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 80;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  pointer-events: none;
}

.style-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 4, 3, .72);
  backdrop-filter: blur(8px);
}

.style-modal[hidden] {
  display: none;
}

.style-modal__panel {
  width: min(100%, 520px);
  padding: clamp(22px, 4vw, 34px);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
}

.style-modal__panel h2 {
  margin: 0 0 14px;
  font-family: "Antic Didone", serif;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 400;
  line-height: 1;
}

.style-modal__panel p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-family: "Tenor Sans", sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

.style-modal__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.success-modal .style-modal__actions {
  grid-template-columns: 1fr;
}

.secondary-button {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

@media (max-width: 1100px) {
  .model-page {
    grid-template-columns: 1fr;
  }

  .model-intro {
    position: static;
  }

  .brand-meta {
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 12px;
    margin-bottom: 14px;
  }

  .model-contact-links {
    justify-content: center;
    margin-bottom: clamp(32px, 8vw, 68px);
  }
}

@media (max-width: 760px) {
  .model-page {
    padding: 18px;
    gap: 28px;
  }

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

  .form-grid {
    padding: 14px;
    gap: 14px;
  }

  .model-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sample-guide {
    gap: 10px;
  }

  .sample-note,
  label span,
  .media-upload small {
    line-height: 1.5;
  }

  input[type="file"] {
    padding: 12px;
  }

  .upload-notice,
  .upload-item {
    padding: 10px;
  }

  .upload-item__meta {
    display: grid;
    gap: 6px;
  }

  .upload-item__name {
    white-space: normal;
  }

  .sample-thumb {
    flex-basis: min(42vw, 150px);
  }

  .style-group {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .style-group:last-child {
    border-bottom: 0;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  .sample-carousel-track,
  .sample-sentence-track,
  .upload-notice.is-critical,
  .button-spinner {
    animation: none;
    transform: none;
  }
}
