/* =========================
   RESET
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: transparent; /* IMPORTANT */
  height: 100%;
  width: 100%;
}

/* =========================
   BASE TYPOGRAPHY
========================= */
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #3d2b1f;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================
   WRAPPER (CENTER IN EMBEDS)
========================= */
.page-wrap{
  width: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  container-type: inline-size;          /* prevents edge-clipping in tight containers */
}

/* =========================
   FORM CARD (ONLY VISIBLE SURFACE)
========================= */
.form-card {
  width: 100%;
  max-width: 520px; /* fallback */

  background: #fdfbf7;
  border-radius: 24px;
  padding: 32px 28px 28px;

  /* Modern, soft elevation */
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.04);
}
/* Make the card scale with the EMBED/parent container (not just viewport) */
@supports (width: 1cqi) {
  .form-card{
    /* 78% of parent width, but never beyond 760px, and never beyond the available space */
    width: min(100%, 78cqi);
    max-width: 760px;
  }
}

/* If the parent container is narrow, stack the half-fields */
@container (max-width: 520px){
  .field-row{
    flex-direction: column;
  }
}


/* =========================
   HEADINGS
========================= */
.form-title {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 32.3px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 6px;
  color: #3d2b1f;
}

.form-subtitle {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 24px;
}

/* =========================
   FORM FIELDS
========================= */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  appearance: none;

  background-color: #fdfbf7;
  border: 1px solid #f3f4f6;
  border-radius: 14px;

  padding: 13px 15px;
  font-size: 15px;
  line-height: 1.45;
  color: #3d2b1f;

  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a8a29e;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

/* =========================
   TEXTAREA
========================= */
.field textarea {
  resize: none;
}

/* =========================
   SELECT ARROW
========================= */
.field select {
  background-image:
    linear-gradient(45deg, transparent 50%, #3d2b1f 50%),
    linear-gradient(135deg, #3d2b1f 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

/* =========================
   PHONE + EMAIL ROW (HARD FIX)
========================= */
.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.field-row > .field{
  flex: 1 1 240px;
  min-width: 0;
}

.field-row .field {
  flex: 1 1 0;
  min-width: 0;            /* CRITICAL */
}

.field-row input {
  min-width: 0;            /* CRITICAL */
}

/* Stack ONLY on phones */
@media (max-width: 480px) {
  .field-row {
    flex-direction: column;
  }
}

/* =========================
   SUBMIT BUTTON
========================= */
.submit-btn {
  width: 100%;
  margin-top: 12px;
  padding: 16px 22px;

  border-radius: 16px;
  border: none;
  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #ffffff;

  background: linear-gradient(
    135deg,
    #c5a059 0%,
    #d4af37 50%,
    #b8860b 100%
  );

  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.15),
    0 4px 8px rgba(0, 0, 0, 0.12);

  transition:
    transform 0.15s ease,
    filter 0.15s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.submit-btn:active {
  transform: translateY(0);
}

/* =========================
   PRIVACY TEXT
========================= */
.privacy {
  margin-top: 8px;
  font-size: 10.5px;
  font-style: italic;
  color: #9ca3af;
  text-align: center;
}

/* =========================
   MOBILE TUNING
========================= */
@media (max-width: 480px) {
  .form-card {
    padding: 26px 22px 24px;
    box-shadow:
      0 6px 18px rgba(0, 0, 0, 0.06),
      0 2px 4px rgba(0, 0, 0, 0.04);
  }

  .form-title {
    font-size: 30px;
    line-height: 1.1;
  }

  .form-subtitle {
    margin-bottom: 20px;
  }
}

/* =========================
   HONEYPOT
========================= */
.honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
}

/* =========================
   MOBILE WIDTH OVERRIDE
   - Reduce outer padding
   - Let card fill ~95% of parent/container
========================= */
@media (max-width: 480px){
  .page-wrap{
    padding: 8px;   /* was 16px */
  }
  .form-card{
    width: 95%;
    max-width: 95%;
  }

  .form-title{
    font-size: clamp(20px, 6.2vw, 25.5px); /* shrinks on small phones */
    line-height: 1.05;
    white-space: nowrap;                  /* keep it on one line */
  }
}