/* Quiet studio polish: forms, focus, and motion.
   Palette, type, and navigation stay as approved. */

@media (prefers-reduced-motion: no-preference) {
  @keyframes studio-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes qty-pulse {
    from { opacity: .35; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes photo-in {
    from { opacity: .45; }
    to { opacity: 1; }
  }
  @keyframes line-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
  header.hero h1,
  header.hero .sub,
  header.hero .btn,
  .apply > .lbl,
  .apply > h1,
  .apply > .lede,
  .page > .lbl,
  .page > h1,
  .page > .lede,
  .desk > .lbl,
  .desk > h1,
  .desk > .lede {
    animation: studio-rise .72s cubic-bezier(.22, .61, .36, 1) both;
  }
  header.hero .sub { animation-delay: .08s; }
  header.hero .btn { animation-delay: .16s; }
  html.motion-ready .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }
  html.motion-ready .reveal.is-in { opacity: 1; transform: none; }
  .stack img { transition: transform .65s cubic-bezier(.22, .61, .36, 1), box-shadow .65s ease; }
  .add:hover .stack img { box-shadow: 0 14px 30px rgba(20, 15, 10, .14); }
  .col-tile .cover img { transition: transform .7s cubic-bezier(.22, .61, .36, 1); }
  .btn,
  .ghost,
  .mail-action {
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease, transform .15s ease;
  }
  .btn:active:not(:disabled),
  .ghost:active:not(:disabled),
  .mail-action:active {
    transform: translateY(1px);
  }
  .product-modal {
    transition: opacity .42s cubic-bezier(.22, .61, .36, 1), transform .42s cubic-bezier(.22, .61, .36, 1), visibility 0s linear .42s;
  }
  .product-modal.show { transition: opacity .42s cubic-bezier(.22, .61, .36, 1), transform .42s cubic-bezier(.22, .61, .36, 1), visibility 0s; }
  .product-scrim,
  .scrim { transition: opacity .42s ease; }
  .drawer {
    transition: transform .48s cubic-bezier(.22, .61, .36, 1), visibility 0s linear .48s;
  }
  .drawer.show { transition: transform .48s cubic-bezier(.22, .61, .36, 1), visibility 0s; }
  .d-body .line { animation: line-in .32s cubic-bezier(.22, .61, .36, 1) both; }
  .qty-pulse { animation: qty-pulse .28s cubic-bezier(.22, .61, .36, 1); }
  #product-photo.is-swapping { animation: photo-in .35s ease; }
  .nav-collections-menu { transform-origin: top left; }
}

.btn.is-busy,
.btn.is-busy:disabled {
  opacity: 1;
  cursor: progress;
}

.apply form,
#apply-success,
#resend-confirmation form,
.page form,
.desk .panel {
  padding: 40px 42px 44px;
}
.apply .grid,
.page .grid { gap: 22px 20px; }
.apply .grid > *,
.page .grid > *,
.apply select,
.page form select,
.desk form select {
  min-width: 0;
  max-width: 100%;
}
.apply form fieldset,
.page form fieldset,
.desk form,
.desk form fieldset {
  border: 0;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
}
.apply form fieldset.form-section {
  margin: 8px 0 0;
  padding: 36px 0 4px;
  border-top: 1px solid var(--hair);
}
.apply form fieldset.form-section:first-of-type {
  margin-top: 0;
  padding-top: 4px;
  border-top: 0;
}
.apply legend {
  font-size: 34px;
  letter-spacing: .16em;
  margin: 0 0 22px;
  display: table;
  max-width: 100%;
  white-space: normal;
}

.apply form label:not(.check),
.page form label,
.desk form label,
.wholesale-gate form label {
  gap: 8px;
  margin: 0;
  font: 500 11px/1.45 Inter, system-ui, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.page form label { margin-bottom: 4px; }
.page form .grid label { margin-bottom: 0; }
.apply .opt,
.page .opt,
.desk .opt {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  color: var(--muted);
}

.apply input:not([type="checkbox"]):not([type="file"]),
.apply select,
.apply textarea,
.page form input:not([type="checkbox"]):not([type="file"]),
.page form select,
.page form textarea,
.desk form input:not([type="checkbox"]):not([type="file"]),
.desk form select,
.desk form textarea,
.wholesale-gate form input:not([type="checkbox"]):not([type="file"]),
.wholesale-gate form select,
.wholesale-gate form textarea {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.4 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.wholesale-gate form input:not([type="checkbox"]):not([type="file"]) { background: var(--paper, #fff); }
.apply textarea,
.page form textarea,
.desk form textarea {
  min-height: 148px;
  padding-top: 14px;
  resize: vertical;
}
.apply select,
.page form select,
.desk form select,
.wholesale-gate form select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-color: var(--cream);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.25 L6 6.25 L11 1.25' fill='none' stroke='%23060606' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}
.apply input:focus,
.apply select:focus,
.apply textarea:focus,
.page form input:focus,
.page form select:focus,
.page form textarea:focus,
.desk form input:focus,
.desk form select:focus,
.desk form textarea:focus,
.wholesale-gate form input:focus,
.wholesale-gate form select:focus,
.wholesale-gate form textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11, 28, 44, .08);
}
.apply input:focus-visible,
.apply select:focus-visible,
.apply textarea:focus-visible,
.page form input:focus-visible,
.page form select:focus-visible,
.page form textarea:focus-visible,
.desk form input:focus-visible,
.desk form select:focus-visible,
.desk form textarea:focus-visible,
.wholesale-gate form input:focus-visible,
.wholesale-gate form select:focus-visible,
.wholesale-gate form textarea:focus-visible {
  outline: none;
}
.apply .check input:focus-visible,
.dropzone:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.apply input[aria-invalid="true"],
.apply select[aria-invalid="true"],
.apply textarea[aria-invalid="true"],
.page form input[aria-invalid="true"],
.page form select[aria-invalid="true"],
.desk form input[aria-invalid="true"],
.wholesale-gate form input[aria-invalid="true"] {
  border-color: #9b3d2f;
  box-shadow: 0 0 0 3px rgba(155, 61, 47, .08);
}

.apply .check {
  align-items: flex-start;
  gap: 14px;
  margin: 26px 0 6px;
  padding: 2px 0;
  font: 400 15px/1.55 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.apply .check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  padding: 0;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  cursor: pointer;
  accent-color: auto;
}
.apply .check input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -2px;
  border-left: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
}
.apply .check input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }

.apply .dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 156px;
  margin-top: 4px;
  padding: 28px 22px;
  text-align: center;
  background: var(--cream);
  border: 1px dashed #cfc8bf;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.apply .dropzone:hover,
.apply .dropzone.is-dragover {
  border-color: var(--ink);
  background: #f7f4ef;
}
.apply .dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  background: transparent;
}
.apply .dropzone-mark {
  width: 36px;
  height: 36px;
  margin-bottom: 4px;
  border: 1px solid var(--hair);
  border-radius: 50%;
  position: relative;
}
.apply .dropzone-mark::before,
.apply .dropzone-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--muted);
  transform: translate(-50%, -50%);
}
.apply .dropzone-mark::before { width: 12px; height: 1px; }
.apply .dropzone-mark::after { width: 1px; height: 12px; }
.apply .dropzone-copy,
.apply .dropzone-name,
.field-error {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}
.apply .dropzone-copy {
  font: 400 15px/1.5 Inter, system-ui, sans-serif;
  color: var(--ink);
}
.apply .dropzone-name {
  font: 400 13px/1.5 Inter, system-ui, sans-serif;
  color: var(--muted);
}
.field-error {
  display: block;
  margin-top: 8px;
  font: 400 13px/1.45 Inter, system-ui, sans-serif;
  color: #9b3d2f;
}
.apply .actions { margin-top: 18px; }
.apply .actions .btn,
.page form .btn,
.desk form .btn,
.reset-form .btn,
#reset-form .btn,
#resend-form .btn { min-height: 52px; }

#apply-error:not(:empty),
#desk-status:not(:empty),
#owner-step-status:not(:empty),
.is-error:not(:empty) {
  display: block;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #e6d5cf;
  border-radius: 10px;
  background: #faf7f5;
  color: #9b3d2f;
  font: 400 14px/1.5 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}
#account-signin-status:not(:empty),
#account-forgot-status:not(:empty),
#shipping-status:not(:empty),
#password-status:not(:empty),
#reset-status:not(:empty),
#resend-status:not(:empty),
#apply-resend-status:not(:empty),
#wholesale-lookup-status:not(:empty),
#wholesale-forgot-status:not(:empty),
#wholesale-resend-status:not(:empty),
#review-decision-status:not(:empty) {
  display: block;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  font: 400 14px/1.5 Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}
#account-signin-status.is-error:not(:empty),
#shipping-status.is-error:not(:empty),
#password-status.is-error:not(:empty),
#reset-status.is-error:not(:empty),
#wholesale-lookup-status.is-error:not(:empty),
#wholesale-forgot-status.is-error:not(:empty),
#wholesale-resend-status.is-error:not(:empty) {
  border-color: #e6d5cf;
  background: #faf7f5;
  color: #9b3d2f;
}
.wholesale-gate form { gap: 14px; width: 100%; }
.wholesale-gate .btn,
.wholesale-gate .ghost { min-height: 48px; }
.page .panel { padding: 32px 36px; }
.page .detail-row { padding: 14px 0; }
.desk .review-row { transition: border-color .2s ease, transform .2s ease; }
@media (prefers-reduced-motion: no-preference) {
  .desk .review-row:hover { transform: translateY(-1px); }
}

@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html.motion-ready .reveal,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 700px) {
  .apply form,
  #apply-success,
  #resend-confirmation form,
  .page form,
  .desk .panel,
  .page .panel { padding: 24px 18px 28px; }
  .apply legend { font-size: 28px; }
  .apply .grid,
  .page .grid { gap: 18px; }
}
@media (max-width: 420px) {
  .apply legend { font-size: 22px; letter-spacing: .08em; line-height: 1.2; }
}
