/* ============================================================
   Contact page — a mad-lib style intro form (name + company +
   need + project, then reach-me-at), on our own navy/gold
   surface instead of a conventional field-stack form. Header
   and footer are the shared partials; this page owns only the
   full-bleed dark section between them.
   ============================================================ */

.contact-hero-form {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100svh - 76px);
  padding: 160px 0 96px;
  background: linear-gradient(135deg, #0a2136 0%, #123b5d 52%, #0b2740 100%);
  color: #fff;
  display: flex;
  align-items: center;
}

.contact-hero-form::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(7, 23, 39, 0.62) 0%, rgba(8, 29, 48, 0.84) 100%),
    url("/images/factory-floor-2.webp") center/cover no-repeat;
  opacity: 0.1;
  filter: saturate(0.72) blur(4px);
  transform: scale(1.06);
  pointer-events: none;
}

@media (min-width: 1024px) {
  .contact-hero-form {
    min-height: calc(100svh - 88px);
    padding: 190px 0 110px;
  }
}

/* Faint gold dot matrix — scattered data points rather than a ruled
   grid, so the texture reads quiet instead of technical/rigid. */
.contact-hero-form::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(
    rgba(204, 191, 147, 0.22) 1.5px,
    transparent 1.5px
  );
  background-size: 34px 34px;
  mask-image: radial-gradient(
    120% 90% at 78% 12%,
    #000 0%,
    rgba(0, 0, 0, 0.25) 55%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    120% 90% at 78% 12%,
    #000 0%,
    rgba(0, 0, 0, 0.25) 55%,
    transparent 100%
  );
}

.contact-hero-form > .site_shell {
  position: relative;
  z-index: 1;
}

.cf-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-1);
}

.cf-eyebrow span {
  width: 32px;
  height: 1px;
  background: var(--accent-1);
}

/* --- The mad-lib sentence --- */
.cf-sentence {
  margin: 0;
  max-width: 46ch;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #fff;
}

.cf-sentence--secondary {
  margin-top: 22px;
}

.cf-inline-clause {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  vertical-align: baseline;
}

.cf-inline-field {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
  margin: 0 2px;
}

.cf-inline-field::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(204, 191, 147, 0), rgba(204, 191, 147, 0.72), rgba(204, 191, 147, 0));
  opacity: 0;
  transform: scaleX(0.78);
  transform-origin: center;
  transition:
    opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.cf-inline-field input {
  field-sizing: content;
  min-width: 7ch;
  max-width: 100%;
  padding: 0 2px 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--accent-1);
  font: inherit;
  font-weight: 600;
  transition: border-color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-inline-field--muted input {
  color: #fff;
}

.cf-inline-field input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.cf-inline-field input:hover {
  border-color: rgba(255, 255, 255, 0.55);
}

.cf-inline-field input:focus {
  outline: none;
  border-color: var(--accent-1);
}

.cf-inline-field.is-guided::after {
  opacity: 0.56;
  animation: cf-guided-line 2.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.cf-inline-field:focus-within::after,
.cf-inline-field.is-guided:hover::after {
  opacity: 0.82;
  transform: scaleX(1);
  animation: none;
}

/* Browser autofill (name/email/phone) paints its own opaque background
   and dark text by default — this keeps it on-brand instead. The huge
   transition-delay is the standard trick to stop Chrome's paint flash. */
.cf-inline-field input:-webkit-autofill,
.cf-inline-field input:-webkit-autofill:hover,
.cf-inline-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--accent-1);
  caret-color: #fff;
  box-shadow: 0 0 0px 1000px transparent inset;
  transition: background-color 9999s ease-in-out 0s;
}

.cf-inline-field--muted input:-webkit-autofill,
.cf-inline-field--muted input:-webkit-autofill:hover,
.cf-inline-field--muted input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
}

/* --- Blocks below the sentence: need + description --- */
.cf-block {
  margin-top: 44px;
}

.cf-label {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.cf-required {
  color: var(--accent-1);
}

.cf-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  max-width: 720px;
}

.cf-options.is-guided .cf-option {
  animation: cf-guided-surface 3.2s ease-in-out infinite;
}

.cf-option {
  position: relative;
  display: block;
  padding: 18px 44px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-option:hover {
  border-color: rgba(204, 191, 147, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

.cf-option[aria-checked="true"] {
  border-color: var(--accent-1);
  background: rgba(204, 191, 147, 0.14);
  box-shadow: 0 0 0 1px rgba(204, 191, 147, 0.45);
}

/* Check badge — hidden pill that pops in on selection so the chosen
   card reads at a glance instead of relying on border/tint alone. A
   real element rather than a pseudo-element, so it's simple to toggle
   and inspect. */
.cf-option-check {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-1);
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 200ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-option-check svg {
  width: 12px;
  height: 12px;
  color: var(--accent-2);
}

.cf-option[aria-checked="true"] .cf-option-check {
  opacity: 1;
  transform: scale(1);
}

.cf-option-title {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  transition: color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-option[aria-checked="true"] .cf-option-title {
  color: var(--accent-1);
}

.cf-option-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.cf-option:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
}

/* --- Project description (borderless, auto-growing) --- */
.cf-textarea {
  display: block;
  width: 100%;
  max-width: 720px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fff;
  font: inherit;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  resize: none;
  overflow: hidden;
  transition: border-color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.cf-textarea:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.cf-textarea:focus {
  outline: none;
  border-color: var(--accent-1);
}

.cf-textarea.is-guided {
  animation: cf-guided-line-soft 2.8s ease-in-out infinite;
}

/* --- Step controls --- */
.cf-step-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
}

.cf-next,
.cf-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
  padding: 15px 26px;
  border: 0;
  border-radius: 0.75rem;
  background: #fff;
  color: var(--accent-2);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-step-actions .cf-submit,
.cf-step-actions .cf-back {
  margin-top: 0;
}

.cf-next:hover,
.cf-submit:hover {
  background: var(--accent-1);
  transform: translateY(-2px);
}

.cf-next svg,
.cf-submit svg {
  width: 16px;
  height: 16px;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-next:hover svg,
.cf-submit:hover svg {
  transform: translateX(3px);
}

.cf-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  padding: 15px 6px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-back:hover {
  color: #fff;
}

.cf-back svg {
  width: 15px;
  height: 15px;
}

.cf-next:focus-visible,
.cf-submit:focus-visible,
.cf-back:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
}

/* Field left empty on advancing to the next step */
.cf-inline-field input.cf-invalid {
  border-color: #e2896b;
}

.cf-label.cf-invalid {
  color: #e2896b;
}

.cf-options.cf-invalid {
  outline: 1px solid #e2896b;
  outline-offset: 6px;
  border-radius: 14px;
}

/* --- Steps --- */
.cf-step[hidden] {
  display: none;
}

.cf-step {
  animation: cf-step-in 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

@keyframes cf-guided-line {
  0%,
  100% {
    opacity: 0.34;
    transform: scaleX(0.8);
  }
  50% {
    opacity: 0.68;
    transform: scaleX(1);
  }
}

@keyframes cf-guided-line-soft {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 10px 24px -24px rgba(204, 191, 147, 0);
  }
  50% {
    border-color: rgba(204, 191, 147, 0.58);
    box-shadow: 0 12px 24px -20px rgba(204, 191, 147, 0.24);
  }
}

@keyframes cf-guided-surface {
  0%,
  100% {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
  }
  50% {
    border-color: rgba(204, 191, 147, 0.24);
    background: rgba(255, 255, 255, 0.045);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cf-inline-field.is-guided::after,
  .cf-options.is-guided .cf-option,
  .cf-textarea.is-guided {
    animation: none;
  }

  .cf-inline-field.is-guided::after {
    opacity: 0.42;
    transform: scaleX(0.92);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cf-step {
    animation: none;
  }
}

/* --- Direct-contact fallback line --- */
.cf-direct {
  margin: 56px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.cf-direct a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(204, 191, 147, 0.5);
  text-underline-offset: 4px;
  transition: color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-direct a:hover {
  color: var(--accent-1);
}

/* --- Office + booking strip --- */
.cf-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: 720px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cf-meta-office {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
}

.cf-meta-office strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.cf-meta-office-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.cf-meta-office-icon svg {
  width: 15px;
  height: 15px;
  color: var(--accent-1);
}

.cf-meta-book {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  white-space: nowrap;
}

.cf-meta-book span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(204, 191, 147, 0.5);
  text-underline-offset: 4px;
  transition: color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-meta-book svg {
  width: 14px;
  height: 14px;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cf-meta-book:hover span {
  color: var(--accent-1);
}

.cf-meta-book:hover svg {
  transform: translateX(3px);
}

.cf-meta-book:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
}

@media (max-width: 639px) {
  .cf-block {
    margin-top: 36px;
  }

  .cf-options {
    grid-template-columns: 1fr;
  }

  .cf-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
