/* ================================================================
   DEVISE DESIGN — contact.css  (v2 — fixed layout)
   Save to:  css/contact.css
   Load after style.css in <head>
================================================================ */

/* ── Page header ── */
.contact-page-header {
  padding: 160px 0 72px;
  border-bottom: 1px solid var(--line);
}
.contact-page-header h1 {
  font-size: clamp(52px, 9vw, 116px);
  font-weight: 300;
  letter-spacing: -.03em;
  line-height: 1.0;
  margin-top: 18px;
}
.contact-page-header h1 em { font-style: italic; color: var(--ash); }
.contact-page-header .intro {
  margin-top: 28px;
  max-width: 560px;
  color: var(--ash-2);
  font-size: 16px;
  line-height: 1.7;
}

/* ================================================================
   SPLIT LAYOUT
   contact-split-grid: 2 columns
     col-1  →  .csp-info         (dark left panel)
     col-2  →  .csp-right-col    (right wrapper)
================================================================ */
.contact-split-section { width: 100%; }

.contact-split-grid {
  display: grid;
  grid-template-columns: 1fr 1.65fr;   /* dark | form */
  align-items: stretch;
}

/* ================================================================
   LEFT — dark info panel
================================================================ */
.csp-info {
  background: var(--ink);
  color: var(--bone);
  position: relative;
  overflow: hidden;
  min-height: 640px;
}

/* Blueprint grid texture */
.csp-blueprint-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(243,239,231,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243,239,231,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}

.csp-info-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 56px 48px;
  box-sizing: border-box;
}

/* Eyebrow */
.csp-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: .44em;
  text-transform: uppercase;
  color: rgba(243,239,231,.38);
  font-weight: 500;
  margin-bottom: 36px;
}
.csp-eyebrow-line {
  display: block;
  width: 22px;
  height: 1px;
  background: rgba(243,239,231,.28);
  flex-shrink: 0;
}

/* Headline */
.csp-headline {
  font-family: var(--display);
  font-size: clamp(36px, 3.8vw, 62px);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -.025em;
  color: var(--bone);
  margin-bottom: 44px;
}
.csp-headline em { font-style: italic; color: rgba(243,239,231,.42); }

/* Info blocks */
.csp-infoblock { margin-bottom: 28px; }
.csp-infoblock-label {
  font-size: 9.5px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: rgba(243,239,231,.32);
  font-weight: 500;
  margin-bottom: 9px;
}
.csp-infoblock-value {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 300;
  color: rgba(243,239,231,.82);
  line-height: 1.58;
}
.csp-infoblock-value a { color: inherit; text-decoration: none; transition: color .25s; }
.csp-infoblock-value a:hover { color: var(--bone); text-decoration: underline; }

/* Bottom / hours */
.csp-info-bottom {
  border-top: 1px solid rgba(243,239,231,.1);
  padding-top: 28px;
  margin-top: 8px;
}
.csp-hours-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.csp-hours-value {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 300;
  color: rgba(243,239,231,.7);
  margin-top: 6px;
}

/* Open-now pill */
.csp-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .14em;
  color: rgba(243,239,231,.42);
  padding-bottom: 4px;
}
.csp-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf70;
  box-shadow: 0 0 8px rgba(76,175,112,.55);
  animation: cspPulse 2.4s ease infinite;
  flex-shrink: 0;
}
@keyframes cspPulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ================================================================
   RIGHT COLUMN WRAPPER
   This is the KEY fix: both .csp-form-panel and .csp-success
   live here. We use position:relative on the wrapper and
   position:absolute on .csp-success so it overlays the form
   in the same grid cell without pushing content below.
================================================================ */
.csp-right-col {
  position: relative;
  background: var(--bone);
  /* min-height matches info panel so grid rows align */
  min-height: 640px;
  display: flex;
  flex-direction: column;
}

/* ── FORM PANEL ── */
.csp-form-panel {
  width: 100%;
  padding: 56px 56px 56px 60px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  /* fade transition when hiding */
  opacity: 1;
  transition: opacity .32s ease;
  flex: 1;
}

/* Hide form panel when JS adds .is-hidden */
.csp-form-panel.is-hidden {
  opacity: 0;
  pointer-events: none;
  /* keep it in flow so the right col keeps its height */
  visibility: hidden;
}

/* ── Form header ── */
.csp-form-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.csp-form-eyebrow {
  font-size: 10px;
  letter-spacing: .44em;
  text-transform: uppercase;
  color: var(--ash);
  font-weight: 500;
  margin-bottom: 12px;
}
.csp-form-title {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.08;
  color: var(--ink);
}
.csp-form-title em { font-style: italic; color: var(--ash); }

/* Step indicators */
.csp-steps { display: flex; gap: 6px; align-items: center; flex-shrink: 0; padding-bottom: 4px; }
.csp-step  { display: block; width: 22px; height: 1.5px; background: rgba(21,23,28,.14); transition: background .3s; }
.csp-step.active { background: var(--ink); }

/* ── Form fields ── */
.csp-form { display: flex; flex-direction: column; flex: 1; }

/* Two-column row */
.csp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.csp-row .csp-field:first-child {
  padding-right: 28px;
  border-right: 1px solid rgba(21,23,28,.08);
}
.csp-row .csp-field:last-child { padding-left: 28px; }

/* Individual field */
.csp-field {
  padding: 22px 0;
  border-bottom: 1px solid rgba(21,23,28,.08);
  position: relative;
}
.csp-field:last-of-type { border-bottom: none; }

/* Label */
.csp-label {
  display: block;
  font-size: 9.5px;
  letter-spacing: .44em;
  text-transform: uppercase;
  color: var(--ash);
  font-weight: 500;
  margin-bottom: 10px;
  transition: color .25s;
  cursor: pointer;
}
.csp-req { color: #b3261e; font-size: 13px; letter-spacing: 0; vertical-align: middle; line-height: 1; }

/* Inputs / textarea */
.csp-field input,
.csp-field textarea {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  outline: none;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1.3;
  -webkit-appearance: none;
  appearance: none;
  transition: color .25s;
}
.csp-field input::placeholder,
.csp-field textarea::placeholder {
  color: rgba(21,23,28,.2);
  font-style: italic;
  font-size: 19px;
}
.csp-field textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
}

/* Animated underline */
.csp-field-line {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 1.5px;
  background: var(--ink);
  width: 0;
  transition: width .42s cubic-bezier(.4,0,.2,1);
}
.csp-field:focus-within .csp-field-line { width: 100%; }
.csp-field:focus-within .csp-label      { color: var(--ink); }

/* Error state */
.csp-field.invalid .csp-field-line { background: #b3261e; width: 100%; }
.csp-field.invalid .csp-label      { color: #b3261e; }
.csp-field.invalid input,
.csp-field.invalid textarea         { color: #b3261e; }
.csp-field.invalid input::placeholder,
.csp-field.invalid textarea::placeholder { color: rgba(179,38,30,.28); }
.csp-err { display: none; font-size: 11.5px; color: #b3261e; letter-spacing: .04em; margin-top: 6px; line-height: 1.5; }
.csp-field.invalid .csp-err { display: block; }

/* Submit row */
.csp-submit-row {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* Button */
.csp-btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: var(--ink);
  color: var(--bone);
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .38em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 17px 34px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.csp-btn-fill {
  position: absolute;
  inset: 0;
  background: var(--ash-2);
  transform: translateX(-101%);
  transition: transform .45s cubic-bezier(.4,0,.2,1);
  z-index: 0;
}
.csp-btn:hover .csp-btn-fill { transform: translateX(0); }
.csp-btn-label, .csp-btn-arrow { position: relative; z-index: 1; }
.csp-btn-arrow { font-size: 16px; transition: transform .35s cubic-bezier(.4,0,.2,1); }
.csp-btn:hover .csp-btn-arrow { transform: translateX(7px); }
.csp-btn:disabled { opacity: .55; cursor: not-allowed; }
.csp-btn:disabled .csp-btn-fill { display: none; }

.csp-submit-note {
  font-size: 12px;
  color: var(--ash);
  letter-spacing: .04em;
  line-height: 1.65;
  max-width: 180px;
}

/* Global error */
.csp-global-err {
  margin-top: 14px;
  font-size: 13px;
  color: #b3261e;
  letter-spacing: .04em;
  min-height: 18px;
}

/* ================================================================
   SUCCESS PANEL
   Positioned absolute so it sits in the same right column
   as the form, replacing it without affecting the grid height.
================================================================ */
.csp-success {
  /* hidden by default */
  position: absolute;
  inset: 0;
  background: var(--bone);
  padding: 56px 56px 56px 60px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;

  /* invisible + non-interactive until JS adds .is-visible */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s ease, visibility 0s linear .45s;
}

/* Show success */
.csp-success.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .45s ease, visibility 0s linear 0s;
}

/* Check circle */
.csp-success-circle {
  width: 62px;
  height: 62px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  color: var(--ink);
}
.csp-success-circle svg { width: 24px; height: 24px; }

.csp-success-title {
  font-family: var(--display);
  font-size: clamp(64px, 8vw, 104px);
  font-weight: 300;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 24px;
}

.csp-success-msg {
  font-size: 16px;
  color: var(--ash-2);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 40px;
}

/* Back link */
.csp-success-back {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .38em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  padding: 0;
  transition: color .25s;
}
.csp-back-line {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--ink);
  flex-shrink: 0;
  transition: width .35s cubic-bezier(.4,0,.2,1);
}
.csp-success-back:hover .csp-back-line { width: 52px; }

/* ================================================================
   MAP
================================================================ */
.contact-map-section { padding: 80px 0; }
.contact-map-section .map-wrap { border: 1px solid var(--line); overflow: hidden; }
.contact-map-section .map-wrap iframe {
  width: 100%;
  height: 460px;
  display: block;
  filter: grayscale(100%) contrast(1.1);
}

/* ================================================================
   RESPONSIVE — Tablet (≤ 1100px)
================================================================ */
@media (max-width: 1100px) {
  .contact-split-grid { grid-template-columns: 1fr 1.45fr; }
  .csp-info-content   { padding: 48px 36px; }
  .csp-form-panel,
  .csp-success        { padding: 48px 40px; }
  .csp-headline       { font-size: clamp(30px, 3.4vw, 52px); margin-bottom: 36px; }
}

/* ================================================================
   RESPONSIVE — Mobile (≤ 860px)  — stack panels vertically
================================================================ */
@media (max-width: 860px) {

  /* Stack: info on top, form below */
  .contact-split-grid {
    grid-template-columns: 1fr;
  }

  .csp-info    { min-height: auto; }
  .csp-info-content { padding: 44px 28px; }
  .csp-headline { font-size: clamp(34px, 7.5vw, 54px); margin-bottom: 32px; }

  /* Right col no longer needs absolute positioning — stack normally */
  .csp-right-col { min-height: 0; }

  /* Success reverts to normal flow on mobile (not absolute) */
  .csp-success {
    position: static;
    display: none;      /* hidden via display:none on mobile */
    opacity: 1;
    visibility: visible;
  }
  .csp-success.is-visible { display: flex; }

  /* When form hides, collapse it fully on mobile */
  .csp-form-panel.is-hidden { display: none; }

  .csp-form-panel,
  .csp-success {
    padding: 44px 28px;
  }

  /* Collapse 2-col form rows */
  .csp-row { grid-template-columns: 1fr; }
  .csp-row .csp-field:first-child { padding-right: 0; border-right: none; }
  .csp-row .csp-field:last-child  { padding-left: 0; }

  .csp-form-title  { font-size: clamp(24px, 5.5vw, 36px); }
  .csp-form-header { flex-direction: column; align-items: flex-start; gap: 18px; }

  .csp-submit-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .csp-submit-note { max-width: 100%; }

  .csp-success-title { font-size: clamp(56px, 14vw, 88px); }

  .contact-map-section { padding: 48px 0; }
  .contact-map-section .map-wrap iframe { height: 320px; }
  .contact-page-header { padding: 140px 0 56px; }
  .csp-hours-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ================================================================
   RESPONSIVE — Small phone (≤ 560px)
================================================================ */
@media (max-width: 560px) {
  .contact-page-header { padding: 120px 0 44px; }
  .contact-page-header h1 { font-size: clamp(44px, 12vw, 68px); }

  .csp-info-content { padding: 36px 20px; }
  .csp-headline     { font-size: clamp(30px, 8.5vw, 44px); margin-bottom: 24px; }
  .csp-infoblock-value { font-size: 17px; }

  .csp-form-panel,
  .csp-success { padding: 36px 20px 44px; }

  .csp-form-title { font-size: clamp(22px, 6.5vw, 30px); }

  .csp-field input,
  .csp-field textarea { font-size: 18px; }
  .csp-field input::placeholder,
  .csp-field textarea::placeholder { font-size: 16px; }

  /* Full-width button on small screens */
  .csp-btn { width: 100%; justify-content: space-between; padding: 18px 24px; }

  .csp-success-title  { font-size: clamp(52px, 15vw, 80px); }
  .contact-map-section .map-wrap iframe { height: 260px; }
}

/* ================================================================
   RESPONSIVE — Very small (≤ 375px)
================================================================ */
@media (max-width: 375px) {
  .csp-info-content { padding: 28px 16px; }
  .csp-form-panel,
  .csp-success { padding: 28px 16px 36px; }
  .csp-headline    { font-size: 28px; }
  .csp-form-title  { font-size: 21px; }
  .csp-field input,
  .csp-field textarea { font-size: 17px; }
}