/* ═══════════════════════════════════════════════════════
   contact.css  —  Agua Instruments
   Uses font tokens from homepage-new.css
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500&family=DM+Mono:wght@300;400&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

/* ── TOKENS ── */
:root {
  --navy:       #0b1f3a;
  --navy-mid:   #132d4f;
  --blue:       #1a6fc4;
  --blue-light: #2e8de8;
  --blue-pale:  #e8f2fb;
  --orange:     #f97316;
  --white:      #ffffff;
  --off:        #f4f6f9;
  --text:       #1e293b;
  --muted:      #64748b;
  --border:     #e2e8f0;

  --font-head:  'Cormorant Garamond', Georgia, serif;
  --font-body:  'DM Sans', 'Segoe UI', sans-serif;
  --font-mono:  'DM Mono', monospace;

  --max:        1160px;
  --r:          14px;
}

/* ── BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--off);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

section.justify {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

/* ── CONTACT HEADER ── */
.contact-header {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}

.contact-header .animated-text {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: auto;
  overflow: visible;
  gap: 0.4em;
  padding: 0.2em 0;
}

.fixed-text {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.changing-text-container {
  display: inline-block;
  position: relative;
  height: 3.5em;
  width: 480px;
  overflow: hidden;
  line-height: 1;
}

.changing-text {
  display: flex;
  flex-direction: column;
  animation: slide 12s linear infinite;
  font-family: var(--font-head);
  font-weight: 600;
  font-style: italic;
  color: var(--blue);
  text-align: start;
}

.changing-text span {
  font-size: clamp(2.2rem, 5vw, 4rem);
  height: 1.15em;
  line-height: 1.15em;
  white-space: nowrap;
  margin-left: 12px;
  letter-spacing: -0.01em;
  display: block;
}

@keyframes slide {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-11.5em); }
}

/* ── MAIN LAYOUT ── */
.main-contact-container {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 2rem 2rem;
  max-width: var(--max);
  margin: 0 auto;
  align-items: flex-start;
  justify-content: center;
}

/* ── INFO CARDS ── */
.contact-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  width: 100%;
  max-width: 420px;
  flex-shrink: 0;
}

.contact-card {
  background: var(--white);
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(11, 31, 58, 0.06);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(11, 31, 58, 0.12);
}

.contact-card i {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  color: var(--blue);
}

.contact-card h5 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.contact-card p {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0.25rem 0;
}

.contact-card a {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-card a:hover {
  color: var(--navy);
  text-decoration: underline;
}

/* Gas meter image card */
.contact-gas-image {
  grid-column: 1 / -1;
  border-radius: var(--r);
  overflow: hidden;
  line-height: 0;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(11, 31, 58, 0.06);
}

.gas_meter {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--r);
  display: block;
}

/* ── FORM SIDE ── */
.contact-form-container {
  display: flex;
  align-items: stretch;
  flex: 1;
  gap: 1.25rem;
}

.progress-bar-container {
  position: relative;
  width: 8px;
  border-radius: 99px;
  background: var(--border);
  flex-shrink: 0;
  align-self: stretch;
  min-height: 400px;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(180deg, var(--blue) 0%, var(--navy) 100%);
  border-radius: 99px;
  transition: height 0.3s;
}

.contact-form {
  background: var(--white);
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(11, 31, 58, 0.06);
  padding: 2.25rem 2rem;
  flex: 1;
}

.contact-form h2 {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 1.25rem 0 0.4rem;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75em 1em;
  width: 100%;
  background: var(--off);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26, 111, 196, 0.12);
}

.contact-form textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-snd {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1.5rem;
  padding: 0.9em 2em;
  width: 100%;
  letter-spacing: 0.03em;
  transition: background 0.25s, transform 0.2s;
}

.contact-snd:hover {
  background: var(--blue);
  transform: translateY(-1px);
}

/* ── FORM RESPONSE ── */
.form_response,
.status {
  font-family: var(--font-body);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .main-contact-container {
    flex-direction: column;
    padding: 1rem;
  }

  .contact-card-container {
    max-width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .contact-form-container {
    width: 100%;
  }

  .progress-bar-container {
    min-height: unset;
    height: 8px;
    width: 100%;
    flex-shrink: unset;
  }

  .progress-bar {
    height: 100%;
    width: 40%;
  }

  .contact-form-container {
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .contact-header .animated-text {
    display: none;
  }

  .main-contact-container {
    padding: 0.75rem;
  }

  .contact-card-container {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 1.5rem 1.25rem;
  }

  .contact-form h2 {
    font-size: 1.6rem;
  }

  .gas_meter {
    display: none;
  }

  .contact-gas-image {
    display: none;
  }
}