/* About Us page responsive refinement (About us.html).
   Mobile + tablet only. Desktop (>=1025px) keeps the existing about.css rules.
   Uses the shared spacing tokens; no new spacing system. */

@media (max-width: 1024px) {
  .contact-hero {
    padding: var(--space-10) var(--space-4);
    margin-top: 0;
  }

  .contact-hero h1 {
    font-size: 2.25rem;
    line-height: var(--line-height-heading);
    margin: 0 0 var(--space-3);
  }

  .contact-hero p {
    font-size: var(--font-size-body);
    line-height: var(--line-height-base);
    max-width: 60ch;
  }

  .contact-section {
    padding: var(--space-8) var(--space-4);
  }

  .contact-container {
    gap: var(--space-6);
  }

  .contact-info {
    padding: var(--space-8) var(--space-4);
    margin-top: 0;
  }

  .contact-info h2 {
    font-size: 2rem;
    margin: 0 0 var(--space-3);
  }

  .contact-info p {
    line-height: var(--line-height-base);
    margin: 0 0 var(--space-4);
  }

  .contact-item {
    margin-bottom: var(--space-4);
  }

  .contact-item h3 {
    margin: 0 0 var(--space-2);
  }

  .social {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    margin-top: var(--space-2);
  }

  .contact-form {
    padding: var(--space-5) var(--space-4);
  }

  .contact-form h2 {
    font-size: 1.5rem;
    margin: 0 0 var(--space-4);
  }

  .contact-form label {
    margin-top: var(--space-3);
    margin-bottom: var(--space-1);
  }

  .contact-form input,
  .contact-form textarea {
    width: 100%;
    max-width: 100%;
    font-family: inherit;
    font-size: var(--font-size-body);
  }

  .submit {
    margin-top: var(--space-4);
  }

  .contact-bottom {
    padding: var(--space-8) var(--space-4);
  }

  .contact-bottom h2 {
    font-size: 1.75rem;
    line-height: var(--line-height-heading);
  }

  .contact-bottom p {
    max-width: 60ch;
    margin: 0 auto;
    line-height: var(--line-height-base);
  }

  footer {
    font-size: var(--font-size-body);
    padding: var(--space-4);
  }
}

/* ---------- Tablet: deliberate hybrid ----------
   Two columns where they still fit, but with tablet-appropriate type,
   gutters and card padding instead of compressed desktop values. */
@media (min-width: 641px) and (max-width: 1024px) {
  .contact-hero {
    padding: var(--space-12) var(--space-8);
  }

  .contact-hero h1 {
    font-size: 2.75rem;
  }

.contact-hero p,
  .contact-bottom p {
    max-width: 60ch;
  }

  /* Stage 6: Get in Touch needs balanced padding around its content so
     nothing sits against the container edge at tablet widths. */
  .contact-hero {
    padding: var(--space-10) var(--space-8);
  }

  .contact-hero > div {
    padding: 0 var(--space-2);
  }

  .contact-section {
    padding: var(--space-10) var(--space-6);
  }

  .contact-container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    max-width: 900px;
  }

  .contact-info,
  .contact-form {
    padding: var(--space-6);
  }

  .contact-info h2 {
    font-size: 1.75rem;
  }

  .contact-form h2 {
    font-size: 1.5rem;
  }
}

/* ---------- Phones: stacked columns + form usability ---------- */
@media (max-width: 640px) {
  /* Sections that stayed side-by-side on phones become stacked columns. */
  .contact-container {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  /* Get in Touch: comfortable, balanced side padding so nothing touches the
     screen edges (the hero previously relied on tiny 20px padding). */
  .contact-hero,
  .contact-info,
  .contact-form,
  .contact-bottom {
    margin-left: 0;
    margin-right: 0;
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }

  .contact-hero {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
  }

  .contact-hero p,
  .contact-bottom p {
    max-width: 100%;
  }

  .contact-info,
  .contact-form {
    padding: var(--space-5) var(--space-4);
  }

  .social {
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
  }

  /* Contact form: full-width controls and a comfortable submit target */
  .contact-form form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }

  .contact-form input,
  .contact-form textarea {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--font-size-body);
  }

  .contact-form textarea {
    min-height: 140px;
    resize: vertical;
  }

  .submit {
    width: 100%;
    min-height: 48px;
    margin-top: var(--space-4);
    border-radius: var(--radius-md);
    cursor: pointer;
  }
}

/* Social row (all viewports).
   Root cause of the desktop column layout: `.social` has no display rule in
   about.css, so it stayed a block container and the grid-displayed icons each
   took their own row. An explicit flex row fixes desktop while still wrapping
   on narrow screens. */
.social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.social a {
  display: grid;
  place-items: center;
  align-content: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  line-height: 0;
  padding: 0;
  border-radius: var(--radius-md);
  color: var(--color-primary);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
}

.social a:hover {
  background-color: var(--color-primary-soft);
  border-color: var(--color-primary);
}

.social a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

.social a img {
  width: 24px;
  height: 24px;
  display: block;
}

/* Contact form feedback */
.form-status {
  margin: var(--space-3) 0 0;
  font-size: var(--font-size-small);
  line-height: var(--line-height-base);
  text-align: center;
}

.form-status[data-state='success'] { color: var(--color-success); }
.form-status[data-state='error'] { color: var(--color-error); }
.form-status[data-state='pending'] { color: var(--color-text-muted); }