/* ============================================================
   CLOUVI STUDIOS — create.css
   Studio intake form page styles
   ============================================================ */


/* ------------------------------------------------------------
   WRAPPER — overrides page-wrapper for scrollable layout
   ------------------------------------------------------------ */
.create-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 2;
  background: transparent;
}

/* Header fades in immediately — no preloader on this page */
.create-wrapper header {
  opacity: 0;
  animation: fadeIn 0.8s ease 0.2s forwards;
  position: sticky;
  top: 0;
  z-index: 500;
  background: #f5f4f0;
  border-bottom: 1px solid rgba(180,140,20,0.15);
}

.create-wrapper footer {
  opacity: 0;
  animation: fadeIn 0.8s ease 0.3s forwards;
}


/* ------------------------------------------------------------
   MAIN CONTENT AREA
   ------------------------------------------------------------ */
.create-main {
  flex: 1;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 80px;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.5s forwards;
}


/* ------------------------------------------------------------
   PAGE HEADER
   ------------------------------------------------------------ */
.create-header {
  text-align: center;
  margin-bottom: 40px;
}

.create-headline {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 400;
  letter-spacing: 6px;
  color: #0a0a0a;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.create-sub {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(140,100,10,0.75);
  font-style: italic;
}


/* ------------------------------------------------------------
   REFERENCE LINE — single minimal text line
   ------------------------------------------------------------ */
.ref-line {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(140,100,10,0.75);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 48px;
}


/* ------------------------------------------------------------
   FORM
   ------------------------------------------------------------ */
.create-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: #0a0a0a;
  text-transform: uppercase;
}

.required-mark {
  color: var(--gold);
}

.optional-mark {
  color: #7a7a75;
  font-size: 10px;
}

.field-input,
.field-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(10,10,10,0.15);
  color: #0a0a0a;
  font-family: 'Space Mono', monospace;
  font-size: 16px; /* Minimum 16px prevents iOS auto-zoom on focus */
  letter-spacing: 1px;
  padding: 12px 0;
  outline: none;
  transition: border-color 0.3s ease;
  resize: none;
  -webkit-appearance: none;
  border-radius: 0; /* Prevents iOS rounding */
}

.field-input:focus,
.field-textarea:focus {
  border-color: var(--gold);
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: rgba(10,10,10,0.3);
  font-size: 12px;
}

.field-hint {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(140,100,10,0.7);
  font-style: italic;
  line-height: 1.8;
}

.field-error {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: #b3261e;
  line-height: 1.8;
  margin-top: 6px;
}

.field-input[aria-invalid="true"] {
  border-color: #b3261e;
}

/* ------------------------------------------------------------
   TIME PREFERENCE TOGGLES
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   FORM FOOTER — submit + contact fallback
   ------------------------------------------------------------ */
.form-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-top: 8px;
}

.btn-submit {
  display: inline-block;
  background: transparent;
  color: #0a0a0a;
  border: 1px solid rgba(10,10,10,0.25);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  padding: 18px 64px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  width: 100%;
}

.btn-submit:hover {
  background: #0a0a0a;
  color: #ece7de;
  border-color: #0a0a0a;
}

.btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.contact-fallback {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(140,100,10,0.75);
  font-style: italic;
  text-align: center;
}

.contact-link {
  color: rgba(212,175,55,0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--gold);
}


/* ------------------------------------------------------------
   ATELIER ROW — note + size guide trigger
   ------------------------------------------------------------ */
.atelier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
  flex-wrap: wrap;
}

.atelier-note {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(140,100,10,0.75);
  font-style: italic;
}

.size-guide-btn {
  background: transparent;
  border: none;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(212,175,55,0.7);
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.25s ease;
  flex-shrink: 0;
}

.size-guide-btn:hover {
  color: var(--gold);
}


/* ------------------------------------------------------------
   SIZE GUIDE MODAL
   ------------------------------------------------------------ */
.size-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  align-items: center;
  justify-content: center;
}

.size-modal.open {
  display: flex;
}

.size-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2,2,2,0.85);
  cursor: pointer;
}

.size-modal-inner {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  animation: modalIn 0.3s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.size-modal-close {
  background: transparent;
  border: 1px solid rgba(244,244,240,0.2);
  color: #0a0a0a;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.size-modal-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.size-modal-img {
  max-width: 100%;
  max-height: calc(90vh - 60px);
  object-fit: contain;
  display: block;
}


/* ------------------------------------------------------------
   SUCCESS STATE — animated reveal matching brand aesthetic
   ------------------------------------------------------------ */
.success-state {
  display: none;
  min-height: 60vh;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.success-state.visible {
  display: flex;
}

.success-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Title — two lines animate in separately */
.success-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.success-word1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 400;
  letter-spacing: 8px;
  color: #1a1a1a;
  text-transform: uppercase;
  opacity: 0;
}

.success-state.animate .success-word1 {
  animation: successWordIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.2s forwards;
}

/* Gold gradient — matches hero "THE STANDARD." */
.success-word2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 400;
  letter-spacing: 8px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #C8960C 0%, #FFE066 35%, #FFD700 50%, #E8B800 65%, #C8960C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
}

.success-state.animate .success-word2 {
  animation: successWordIn 0.7s cubic-bezier(0.16,1,0.3,1) 0.55s forwards;
}

@keyframes successWordIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Gold underline — draws left to right */
.success-underline {
  width: 0%;
  height: 1px;
  background: linear-gradient(90deg, #C8960C, #FFE066, #D4AF37, #E8B800, #C8960C);
  box-shadow: 0 0 6px 1px rgba(212,175,55,0.6), 0 0 14px 3px rgba(212,175,55,0.3);
  opacity: 0;
}

.success-state.animate .success-underline {
  animation: successUnderline 0.8s cubic-bezier(0.16,1,0.3,1) 1.0s forwards;
}

@keyframes successUnderline {
  from { width: 0; opacity: 0; }
  to   { width: 80px; opacity: 1; }
}

.success-sub {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: #3a3228;
  font-style: italic;
  line-height: 1.9;
  max-width: 380px;
  opacity: 0;
}

.success-state.animate .success-sub {
  animation: successFadeUp 0.6s ease 1.5s forwards;
}

.success-btns {
  opacity: 0;
  margin-top: 8px;
}

.success-state.animate .success-btns {
  animation: successFadeUp 0.6s ease 1.8s forwards;
}

@keyframes successFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ------------------------------------------------------------
   FAQ ACCORDION
   ------------------------------------------------------------ */
.faq-section {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
}

.faq-divider {
  height: 1px;
  background: rgba(10,10,10,0.03);
  margin-bottom: 0;
}

.faq-item {
  border-bottom: 1px solid rgba(180,140,20,0.15);
}

.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  color: #0a0a0a;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 20px 0;
  cursor: pointer;
  display: block;
  text-align: left;
  transition: color 0.3s ease;
}

.faq-q-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
}

.faq-q:hover {
  color: var(--gold);
}

.faq-icon {
  font-size: 18px;
  font-weight: 300;
  color: var(--gold);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-q[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-a {
  display: none;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #3a3228;
  line-height: 1.9;
  padding: 0 0 20px;
  font-style: italic;
}

.faq-a.open {
  display: block;
}


/* ------------------------------------------------------------
   FOOTER OVERRIDE — no animation delay
   ------------------------------------------------------------ */
.create-footer {
  animation-delay: 0.3s !important;
  opacity: 0;
  border-top: 1px solid rgba(244,244,240,0.06);
  margin-top: auto;
}


/* ------------------------------------------------------------
   MEDIA QUERIES
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .create-main {
    padding: 32px 32px max(80px, calc(64px + env(safe-area-inset-bottom)));
  }

  .create-form {
    gap: 28px;
  }

  .ref-strip {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .ref-divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  /* Time buttons — full width on mobile for easy tapping */
      /* Success state — ensure button not hidden by chat bubble */
  .success-state {
    padding: 60px 28px max(80px, calc(64px + env(safe-area-inset-bottom)));
  }

  .success-btns {
    flex-direction: column;
    width: 100%;
  }

  .success-btns .btn-cta {
    width: 100%;
    text-align: center;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
