/* Megaphone PHX — Studio Application Form */


/* ==================== PAGE LAYOUT ==================== */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh !important;
}

#apply {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 3rem 0;
  padding: 0 3rem;
}

@media (max-width: 720px) {
  #apply {
    margin-top: 1rem;
    padding: 0 1rem;
  }
}


/* ==================== CONTENT GRID ==================== */

#apply h1 {
  font-size: clamp(10vw, 6vw, 6rem);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.075rem;
  margin-bottom: .75rem;
  color: var(--agedBlack);
}

#apply .aux > * {
  padding: 2rem;
}

.apply-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 560px) minmax(0, 560px) 1fr;
  gap: 0.5px;
  background-color: var(--agedBlack);
  border: 0.5px solid var(--agedBlack);
  margin-bottom: -0.5px;
}

.apply-grid > * {
  background-color: var(--bgTone);
  justify-self: stretch;
  min-width: 0;
}

.apply-grid > div:first-child,
.apply-grid > div:last-child {
  min-width: 0;
}

.apply-intro {
  padding: 5%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.apply-intro p {
  max-width: 45ch;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(50, 43, 37, 0.75);
}

.apply-intro .olde {
  max-width: 20ch;
}


/* ==================== FORM CONTAINER ==================== */

.apply-form-wrap {
  padding: 0;
}

.apply-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}


/* ==================== FORM FIELDS — CELL AESTHETIC ==================== */

.form-cell {
  position: relative;
  background-color: var(--bgTone);
  border-bottom: 0.5px solid var(--agedBlack);
  padding: 1.75rem 1rem 0.75rem;
}

.form-cell:last-child {
  border-bottom: none;
}

.form-cell label {
  position: absolute;
  top: 0;
  left: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bgTone);
  background-color: var(--agedBlack);
  padding: 0.15rem 0.3rem;
  pointer-events: none;
  line-height: 1;
}

.form-cell input,
.form-cell textarea {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--agedBlack);
  line-height: 1.4;
  padding: 0;
  resize: none;
}

.form-cell input::placeholder,
.form-cell textarea::placeholder {
  color: rgba(50, 43, 37, 0.3);
}

/* Focus ring — tangerine inset */
.form-cell:focus-within {
  box-shadow: inset 0 0 0 1px var(--tangerine);
}

.form-cell:focus-within label {
  color: var(--agedBlack);
  background-color: var(--tangerine);
}


/* ==================== LONG FORM LABELS ==================== */

.form-cell.longform {
  padding-top: 0.75rem;
}

.form-cell.longform label {
  position: relative;
  display: block;
  background: none;
  color: var(--agedBlack);
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  padding: 0 0 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 0.5px solid var(--agedBlack);
  line-height: 1.4;
}

.form-cell.longform:focus-within label {
  background: none;
  font-weight: bold;
  color: var(--agedBlack);
}


/* ==================== TEXTAREA ==================== */

.form-cell textarea {
  min-height: 6rem;
  field-sizing: content;
}

.form-cell .word-count {
  position: absolute;
  bottom: 0.4rem;
  right: 0.65rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(50, 43, 37, 0.3);
  pointer-events: none;
}

.form-cell .word-count.warning {
  color: var(--tangerine);
}

.form-cell .word-count.over {
  color: orangered;
}


/* ==================== FILE UPLOAD ==================== */

.form-cell.upload-cell {
  padding: 1.75rem 1rem 1rem;
}

.upload-zone {
  border: 1px dashed rgba(50, 43, 37, 0.2);
  border-radius: 2px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.upload-zone:hover {
  border-color: var(--agedBlack);
  background-color: rgba(255, 255, 255, 0.248);

  & .upload-prompt i {
    color: var(--agedBlack);
  }
}

.upload-zone.dragover {
  border-color: var(--tangerine);
  background-color: rgba(255, 166, 0, 0.04);
}

.upload-zone .upload-prompt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  color: rgba(50, 43, 37, 0.45);
  line-height: 1.6;
}

.upload-zone .upload-prompt i {
  display: block;
  font-size: 1.25rem;
  margin: 0 auto 0.5rem;
  color: rgba(50, 43, 37, 0.25);
}

.upload-zone .upload-prompt a {
  text-decoration: underline;
  font-weight: bold;
}

.upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

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

.upload-thumb {
  position: relative;
  width: 4rem;
  height: 4rem;
  border: 0.5px solid rgba(50, 43, 37, 0.15);
  overflow: hidden;
}

.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-thumb .remove-file {
  position: absolute;
  top: 0;
  right: 0;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--agedBlack);
  color: white;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.upload-thumb:hover .remove-file {
  opacity: 1;
}


/* ==================== SUBMIT ==================== */

.apply-submit {
  padding: 1rem;
  background-color: var(--bgTone);
}

.apply-submit .button {
  width: 100%;
}

.apply-form .form-message {
  padding: 1rem;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: bold;
  color: white;
  margin-bottom: 1rem;
}

.apply-form .form-message.success {
  background-color: #31b55f;
}

.apply-form .form-message.error {
  background-color: #d1242f;
}

/* Turnstile widget */
.turnstile-wrap {
  padding: 0.75rem 1rem;
  background-color: #4b4b4b;
  border-bottom: 0.5px solid var(--agedBlack);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.turnstile-wrap .caption {
  color: rgba(255, 255, 255, 0.4);
}


/* ==================== FOOTER ==================== */

.apply-footer {
  padding: 1.5rem;
  text-align: center;
}

.apply-footer .caption {
  color: rgba(50, 43, 37, 0.4);
}


/* ==================== RESPONSIVE ==================== */

/* .cuttable replaced by .cut-720 utility in aux.css */

@media (max-width: 960px) {
  #apply h1 {
    margin-bottom: 0;
  }

  .apply-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
    overflow: hidden;
  }

  /* Hide empty gutter columns when stacked */
  .apply-grid > div:first-child,
  .apply-grid > div:last-child {
    display: none;
  }

  .apply-intro {
    padding: 2rem;
  }

  .apply-intro .olde {
    font-size: 2rem;
  }

  .apply-intro p {
    max-width: 100%;
  }

  .apply-form-wrap {
    /*border-top: 0.5px solid var(--agedBlack);*/
  }

}

@media (max-width: 512px) {
  #apply .aux > *,
  .apply-intro {
    padding: 1rem;
  }
}
