/* ==========================================================================
   L'AERIO · /contact · Asal-style premium form
   Glass container, decorative ornament, pill checkboxes, gradient submit
   Recolored to wine + bronze + vellum + cream
   ========================================================================== */

.ct-section {
  background: var(--vellum);
  padding-block: clamp(96px, 12vw, 160px) clamp(64px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}
.ct-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/assets/images/mark/feather-wine-transparent.png');
  background-repeat: no-repeat;
  background-position: right -120px center;
  background-size: auto 95%;
  opacity: 0.04;
  pointer-events: none;
}

.ct-hero {
  text-align: center;
  max-width: var(--max-content);
  margin: 0 auto clamp(48px, 6vw, 80px);
  padding-inline: var(--gutter-d);
  position: relative;
}
@media (max-width: 768px) { .ct-hero { padding-inline: var(--gutter-m); } }
.ct-hero__eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bronze-text);
  margin-bottom: var(--sp-16);
}
.ct-hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 4vw, 6rem);
  line-height: 1;
  color: var(--wine);
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-24);
}
.ct-hero__dek {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(18px, 1rem + 0.6vw, 22px);
  color: var(--bronze-text);
  max-width: 52ch;
  margin: 0 auto;
}

/* ── Tab bar (audience) ─────────────────────────────────────────── */

.ct-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 900px;
  margin: 0 auto clamp(32px, 4vw, 48px);
  padding-inline: var(--gutter-d);
  position: relative;
}
@media (max-width: 768px) { .ct-tabs { padding-inline: var(--gutter-m); } }
.ct-tab {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze-text);
  background: transparent;
  border: 1px solid var(--wine-12);
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 200ms ease-out, color 200ms ease-out, border-color 200ms ease-out;
}
.ct-tab:hover { border-color: var(--bronze); color: var(--wine); }
.ct-tab[aria-selected="true"] {
  background: var(--wine);
  color: var(--cream);
  border-color: var(--wine);
}

/* ── Glass form container ───────────────────────────────────────── */

.ct-form-section {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: var(--gutter-d);
}
@media (max-width: 768px) { .ct-form-section { padding-inline: var(--gutter-m); } }

.ct-form-container {
  position: relative;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--wine-12);
  border-radius: 24px;
  padding: clamp(32px, 4vw, 56px);
  box-shadow:
    0 16px 60px color-mix(in srgb, var(--wine) 10%, transparent),
    0 4px 18px rgba(24, 16, 22, 0.06);
  overflow: clip;
}
@media (max-width: 600px) { .ct-form-container { border-radius: 16px; } }
.ct-form-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wine) 0%, var(--bronze) 50%, transparent 100%);
  opacity: 0.85;
  z-index: 2;
}
.ct-form-container::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.ct-form-header {
  margin-bottom: var(--sp-32);
  position: relative;
  z-index: 1;
}
.ct-form-header::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, var(--bronze) 0%, var(--wine-12) 40%, transparent 100%);
  margin-top: var(--sp-24);
  opacity: 0.55;
}
.ct-form-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bronze-text);
  margin-bottom: var(--sp-12);
}
.ct-form-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1rem + 2.4vw, 2.75rem);
  line-height: 1.1;
  color: var(--wine);
  margin: 0;
}
.ct-form-intro {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--black-soft);
  line-height: 1.55;
  margin-top: var(--sp-16);
  max-width: 60ch;
}

/* ── Fields ────────────────────────────────────────────────────── */

.ct-fields {
  display: grid;
  gap: var(--sp-20, 18px);
  position: relative;
  z-index: 1;
}
.ct-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 768px) {
  .ct-row--2 { grid-template-columns: 1fr 1fr; }
  .ct-row--3 { grid-template-columns: 1fr 1fr 1fr; }
}

.ct-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ct-field label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bronze-text);
  transition: color 180ms ease-out;
}
.ct-field:focus-within label { color: var(--wine); }
.ct-required { color: var(--wine); }

.ct-field input,
.ct-field select,
.ct-field textarea {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--black-soft);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--wine-12);
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgba(24, 16, 22, 0.04);
  transition: border-color 180ms, box-shadow 180ms, background 180ms;
}
.ct-field input::placeholder,
.ct-field textarea::placeholder {
  color: var(--bronze-text);
  opacity: 0.45;
  font-style: italic;
}
.ct-field input:hover:not(:focus),
.ct-field select:hover:not(:focus),
.ct-field textarea:hover:not(:focus) {
  border-color: color-mix(in srgb, var(--wine) 40%, var(--wine-12));
}
.ct-field input:focus,
.ct-field select:focus,
.ct-field textarea:focus {
  outline: none;
  border-color: var(--wine);
  background: #fff;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--wine) 14%, transparent),
    inset 0 1px 3px rgba(24,16,22,0.04);
}
.ct-field textarea {
  height: auto;
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
}
.ct-field select {
  appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B4F2C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.ct-help {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 13px;
  color: var(--bronze-text);
  margin-top: 4px;
}
.ct-error {
  font-family: var(--font-body);
  font-size: 13px;
  color: #B5403A;
  margin-top: 4px;
}

.ct-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* ── Safety banner (modeling tab) ──────────────────────────────── */

.ct-safety {
  border-left: 3px solid var(--bronze);
  padding: 16px 20px;
  background: color-mix(in srgb, var(--bronze) 7%, transparent);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--black-soft);
  border-radius: 4px;
  margin-bottom: var(--sp-16);
}
.ct-safety strong { color: var(--wine); font-weight: 500; }

/* ── Submit button (gradient + shimmer, recolored to wine/bronze) ─ */

.ct-submit {
  margin-top: var(--sp-16);
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}
.ct-submit-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--wine) 0%, var(--bronze) 100%);
  color: var(--cream);
  border: none;
  border-radius: 12px;
  min-height: 56px;
  padding: 0 32px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--wine) 30%, transparent);
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 240ms ease-out;
}
.ct-submit-btn:hover {
  transform: scale(1.01) translateY(-2px);
  box-shadow: 0 10px 36px color-mix(in srgb, var(--wine) 42%, transparent);
}
.ct-submit-btn:active { transform: scale(0.99) translateY(0); }
.ct-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.ct-submit-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: ct-shimmer 3s ease-in-out infinite;
  animation-delay: 1.2s;
  pointer-events: none;
}
@keyframes ct-shimmer {
  0%   { left: -100%; }
  40%  { left: 200%; }
  100% { left: 200%; }
}
@media (prefers-reduced-motion: reduce) {
  .ct-submit-btn::after { animation: none; }
  .ct-submit-btn:hover { transform: none; }
}

.ct-submit-note {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 13px;
  color: var(--bronze-text);
  text-align: center;
}

/* ── Success state ─────────────────────────────────────────────── */

.ct-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-16);
  padding: clamp(48px, 6vw, 80px) var(--sp-32);
  position: relative;
  z-index: 1;
}
.ct-success.is-shown { display: flex; }
.ct-success__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1rem + 2vw, 2.5rem);
  color: var(--wine);
  margin: 0;
}
.ct-success__body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--black-soft);
  max-width: 46ch;
  line-height: 1.6;
}

/* ── Field stagger reveal ───────────────────────────────────────── */

.ct-form-container.is-revealed .ct-field {
  animation: ct-field-in 0.4s ease-out both;
}
.ct-form-container.is-revealed .ct-fields > :nth-child(1) .ct-field { animation-delay: 0.05s; }
.ct-form-container.is-revealed .ct-fields > :nth-child(2) .ct-field { animation-delay: 0.10s; }
.ct-form-container.is-revealed .ct-fields > :nth-child(3) .ct-field { animation-delay: 0.15s; }
.ct-form-container.is-revealed .ct-fields > :nth-child(4) .ct-field { animation-delay: 0.20s; }
.ct-form-container.is-revealed .ct-fields > :nth-child(5) .ct-field { animation-delay: 0.25s; }
.ct-form-container.is-revealed .ct-fields > :nth-child(6) .ct-field { animation-delay: 0.30s; }
.ct-form-container.is-revealed .ct-fields > :nth-child(7) .ct-field { animation-delay: 0.35s; }
@keyframes ct-field-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ct-form-container.is-revealed .ct-field { animation: none; }
}
