/* ========================================
   Nicole — Intake Form
   Luxury editorial aesthetic
   ======================================== */

:root {
  --black: #111111;
  --charcoal: #333333;
  --mid-gray: #999999;
  --light-gray: #E5E5E5;
  --error: #C4453C;
  --white: #FFFFFF;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---- Reset ---- */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---- Base ---- */

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--charcoal);
  background-color: var(--white);
  line-height: 1.6;
}

/* ---- Page Layout ---- */

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

/* ---- Form Container ---- */

.form-container {
  width: 100%;
  max-width: 480px;
  animation: fadeInUp 0.8s ease both;
}

.form-container.is-hidden {
  animation: fadeOut 0.4s ease both;
}

/* ---- Header ---- */

.header {
  text-align: center;
  margin-bottom: 36px;
  animation: fadeInUp 0.8s ease both;
  animation-delay: 0.1s;
}

.brand {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 24px;
}

.heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 32px;
  color: var(--black);
  line-height: 1.2;
  margin-bottom: 16px;
}

.subtext {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 15px;
  color: var(--mid-gray);
  line-height: 1.7;
}

/* ---- Form Sections ---- */

.form-section {
  margin-bottom: 36px;
  animation: fadeInUp 0.8s ease both;
}

.form-section:nth-child(1) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.4s; }
.form-section:nth-child(4) { animation-delay: 0.5s; }
.form-section:nth-child(5) { animation-delay: 0.6s; }

/* ---- Divider ---- */

.divider {
  display: flex;
  justify-content: center;
  margin: 48px 0;
  color: var(--charcoal);
  animation: fadeInUp 0.8s ease both;
  animation-delay: 0.3s;
}

.flourish {
  width: 160px;
  height: 22px;
}

/* ---- Form Groups ---- */

.form-group {
  margin-bottom: 24px;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* ---- Labels ---- */

label {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.optional {
  font-weight: 300;
  color: var(--mid-gray);
  letter-spacing: 0.04em;
}

/* ---- Inputs & Textareas ---- */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  color: var(--black);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--light-gray);
  padding: 8px 0;
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
}

textarea {
  resize: none;
  overflow: hidden;
  line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
  color: var(--mid-gray);
  opacity: 1;
}

input:focus,
textarea:focus {
  border-bottom-color: var(--black);
}

/* ---- Select ---- */

select {
  width: 100%;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  color: var(--black);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--light-gray);
  padding: 8px 0;
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  padding-right: 24px;
  cursor: pointer;
}

select:focus {
  border-bottom-color: var(--black);
}

select:invalid {
  color: var(--mid-gray);
}

/* ---- Number Input ---- */

input[type="number"] {
  width: 100%;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  color: var(--black);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--light-gray);
  padding: 8px 0;
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

input[type="number"]:focus {
  border-bottom-color: var(--black);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---- Field Hints ---- */

.field-hint {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 13px;
  color: var(--mid-gray);
  line-height: 1.6;
  margin-bottom: 8px;
}

/* ---- Section Heading ---- */

.section-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  color: var(--black);
  margin-bottom: 28px;
}

/* ---- Testimonial ---- */

.testimonial {
  margin-bottom: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--light-gray);
  border-bottom: 1px solid var(--light-gray);
  animation: fadeInUp 0.8s ease both;
  animation-delay: 0.15s;
}

.testimonial-label {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 20px;
}

.testimonial-quote {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 16px;
  color: var(--charcoal);
  line-height: 1.8;
  font-style: italic;
}

.testimonial-quote p {
  margin-bottom: 12px;
}

.testimonial-quote p:last-child {
  margin-bottom: 0;
}

.testimonial-attribution {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 13px;
  color: var(--mid-gray);
  margin-top: 20px;
}

/* ---- Radio Group ---- */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.radio-option {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--light-gray);
  cursor: pointer;
  margin-bottom: 0;
  letter-spacing: 0;
  font-weight: 300;
  font-size: 16px;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-label {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 15px;
  color: var(--mid-gray);
  transition: color 0.3s ease, font-weight 0.3s ease;
}

.radio-option:has(input:checked) .radio-label {
  color: var(--black);
  font-weight: 500;
}

.radio-option:has(input:checked) {
  border-bottom-color: var(--black);
}

.radio-group.has-error .radio-option {
  border-bottom-color: var(--error);
}

/* ---- Final Note ---- */

.final-note {
  margin-bottom: 36px;
  padding: 32px 0;
  border-top: 1px solid var(--light-gray);
  animation: fadeInUp 0.8s ease both;
  animation-delay: 0.7s;
}

.final-note-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 24px;
  color: var(--black);
  margin-bottom: 16px;
}

.final-note-text {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.7;
  margin-bottom: 12px;
}

.final-note-list {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.7;
  margin-bottom: 12px;
  padding-left: 20px;
}

.final-note-list li {
  margin-bottom: 4px;
}

/* ---- Readonly (loading state) ---- */

input[readonly],
textarea[readonly],
select[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/* ---- Package Picker ---- */

.section-label {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.section-subtitle {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 15px;
  color: var(--mid-gray);
  margin-bottom: 20px;
}

.package-group {
  display: flex;
  flex-direction: column;
}

.package-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--light-gray);
  cursor: pointer;
  transition: border-color 0.3s ease;
  margin-bottom: 0;
  letter-spacing: 0;
  font-weight: 300;
  font-size: 16px;
}

.package-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.package-name,
.package-price {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 15px;
  color: var(--mid-gray);
  transition: color 0.3s ease, font-weight 0.3s ease;
}

.package-option:has(input:checked) .package-name,
.package-option:has(input:checked) .package-price {
  color: var(--black);
  font-weight: 500;
}

.package-option:has(input:checked) {
  border-bottom-color: var(--black);
}

.package-group.has-error .package-option {
  border-bottom-color: var(--error);
}

.package-group > .error-text {
  display: none;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 12px;
  color: var(--error);
  margin-top: 6px;
}

.package-group.has-error > .error-text {
  display: block;
}

/* ---- Validation Errors ---- */

.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
  border-bottom-color: var(--error);
}

.error-text {
  display: none;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 12px;
  color: var(--error);
  margin-top: 6px;
}

.form-group.has-error .error-text {
  display: block;
}

/* ---- Error Banner ---- */

.error-banner {
  border: 1px solid var(--light-gray);
  padding: 16px 20px;
  margin-bottom: 24px;
  text-align: center;
}

.error-banner p {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  color: var(--error);
  line-height: 1.5;
}

/* ---- Submit Button ---- */

.submit-btn {
  display: block;
  width: 100%;
  padding: 16px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  background-color: var(--black);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
}

.submit-btn:hover {
  background-color: var(--charcoal);
}

.submit-btn:active {
  transform: scale(0.985);
}

.submit-btn:disabled {
  cursor: not-allowed;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ---- Success ---- */

.success-container {
  width: 100%;
  max-width: 480px;
  text-align: center;
}

.success-container:not([hidden]) {
  animation: fadeInUp 0.6s ease both;
}

.success-content {
  padding: 0 24px;
}

.em-dash {
  display: block;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 32px;
  color: var(--light-gray);
  margin-bottom: 24px;
}

.success-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 36px;
  color: var(--black);
  line-height: 1.2;
  margin-bottom: 16px;
}

.success-text {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 15px;
  color: var(--mid-gray);
  line-height: 1.8;
}

/* ---- Animations ---- */

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ---- Desktop (640px+) ---- */

@media (min-width: 640px) {
  .page {
    padding: 64px 48px;
  }

  .header {
    margin-bottom: 48px;
  }

  .heading {
    font-size: 40px;
  }

  .form-section {
    margin-bottom: 48px;
  }

  .form-group {
    margin-bottom: 32px;
  }

  .divider {
    margin: 56px 0;
  }
}
