/* ==========================================================================
   AKSO — Contact Page
   Elegant, premium and effortless. Large editorial typography, minimal
   black-and-white aesthetic, generous whitespace — matches the design
   language established on Home, Photos, Videos, Projects and About.
   ========================================================================== */

/* ---------------------------------------------------------------------
   1. HERO
   --------------------------------------------------------------------- */
.contact-hero {
  padding-bottom: var(--space-7);
}

.contact-hero__eyebrow {
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.contact-hero__heading {
  max-width: 20ch;
}

.contact-hero__intro {
  margin-top: var(--space-4);
  max-width: 52ch;
}

/* ---------------------------------------------------------------------
   2. CONTACT FORM
   An elevated panel — the one deliberate departure from pure black,
   per the "elevated panel background — forms, cards" convention in
   sections.css.
   --------------------------------------------------------------------- */
.contact-form-section {
  padding-bottom: var(--space-8);
}

.contact-form-wrap {
  max-width: 780px;
  margin-inline: auto;
  padding: var(--space-7) var(--space-6);
  border: 1px solid var(--color-border);
}

@media (max-width: 640px) {
  .contact-form-wrap {
    padding: var(--space-5) var(--space-3);
  }
}

.contact-form-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.contact-form-panel[hidden] {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- Text inputs / textarea — underline fields, no boxes ------------- */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-field__label {
  font-family: var(--font-body);
  font-size: var(--text-nav);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.form-field__optional {
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: var(--tracking-normal);
  font-weight: var(--weight-regular);
}

.form-field__input,
.form-field__textarea,
.form-field__select {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text-primary);
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border-hover);
  border-radius: 0;
  padding-block: var(--space-2);
  transition: border-color var(--duration-fast) var(--ease-standard);
}

.form-field__textarea {
  resize: vertical;
  min-height: 8.5rem;
  line-height: var(--leading-relaxed);
}

.form-field__input::placeholder,
.form-field__textarea::placeholder {
  color: var(--color-text-muted);
}

.form-field__input:focus-visible,
.form-field__textarea:focus-visible,
.form-field__select:focus-visible {
  outline: none;
  border-bottom-color: var(--color-focus);
}

/* The closed <select> correctly inherits the page's light text on a
   transparent dark background, but browsers render the open dropdown
   *popup* with their own default (light) background regardless of the
   page's theme — so <option> elements need their own explicit colors
   or they inherit the light page text and become illegible against
   that light popup background. Applies equally on desktop and mobile. */
.form-field__select option {
  color: #1a1a1a;
  background-color: #f5f5f3;
}

.form-field__input.has-error,
.form-field__textarea.has-error {
  border-bottom-color: var(--color-error);
}

.form-field__error {
  min-height: 1.1em;
  font-size: var(--text-caption);
  color: var(--color-error);
}

/* --- Select (Budget) — native element, custom chrome ------------------ */
.form-field__select-wrap {
  position: relative;
}

.form-field__select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--space-5);
  cursor: pointer;
}

.form-field__select-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  color: var(--color-text-secondary);
  pointer-events: none;
}

/* --- Project Type — accessible pill radio group ----------------------- */
.form-field--group {
  gap: var(--space-2);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pill-option {
  position: relative;
}

.pill-option__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.pill-option__label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: var(--text-nav);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-hover);
  padding: var(--space-1) var(--space-3);
  transition: color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              background-color var(--duration-fast) var(--ease-standard);
}

.pill-option__input:hover + .pill-option__label {
  border-color: var(--color-text-primary);
  color: var(--color-text-primary);
}

.pill-option__input:checked + .pill-option__label {
  background-color: var(--color-text-primary);
  border-color: var(--color-text-primary);
  color: var(--color-inverse-text);
}

.pill-option__input:focus-visible + .pill-option__label {
  outline: 1px solid var(--color-focus);
  outline-offset: 4px;
}

/* --- Honeypot — hidden from sighted users and screen readers, still
   present in the DOM for Formspree's spam filtering -------------------- */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Submit + status ---------------------------------------------------- */
.contact-form-footer {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.btn-submit {
  position: relative;
  cursor: pointer;
  background: none;
}

.btn-submit__spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--color-inverse-text);
  border-top-color: transparent;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
}

.btn-submit.is-loading .btn-submit__spinner {
  display: inline-block;
}

.btn-submit:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

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

.form-status {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

/* --- Success confirmation ---------------------------------------------- */
.contact-success {
  text-align: center;
  padding-block: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.contact-success[hidden] {
  display: none;
}

.contact-success__icon {
  width: 40px;
  height: 40px;
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.contact-success__heading {
  max-width: 20ch;
}

.contact-success__heading:focus {
  outline: none;
}

.contact-success__text {
  max-width: 42ch;
}

/* ---------------------------------------------------------------------
   3. DIRECT CONTACT
   Large tappable link rows, hairline-divided — same editorial list
   language as About's Services section.
   --------------------------------------------------------------------- */
.contact-direct {
  padding-bottom: var(--space-8);
}

.direct-list {
  display: flex;
  flex-direction: column;
}

.direct-item {
  border-bottom: 1px solid var(--color-border);
}

.direct-item:first-child {
  border-top: 1px solid var(--color-border);
}

.direct-item__link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-4);
  transition: gap var(--duration-base) var(--ease-out);
}

.direct-item__link:hover,
.direct-item__link:focus-visible {
  gap: var(--space-5);
}

.direct-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--color-border-hover);
  color: var(--color-text-primary);
}

.direct-item__icon svg {
  width: 18px;
  height: 18px;
}

.direct-item__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.direct-item__label {
  color: var(--color-text-muted);
}

.direct-item__value {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.direct-item__arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
  transition: transform var(--duration-base) var(--ease-out);
}

.direct-item__link:hover .direct-item__arrow,
.direct-item__link:focus-visible .direct-item__arrow {
  transform: translate(4px, -4px);
}

@media (max-width: 640px) {
  .direct-item__value {
    font-size: var(--text-lead);
  }
}

/* ---------------------------------------------------------------------
   4. AVAILABILITY
   --------------------------------------------------------------------- */
.contact-availability {
  padding-bottom: var(--space-8);
}

.availability-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5) var(--space-4);
}

.availability-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-nav);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.availability-item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-text-primary);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .availability-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .availability-list {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------------
   5. LOCATION
   --------------------------------------------------------------------- */
.contact-location {
  padding-bottom: var(--space-8);
  text-align: center;
}

.contact-location p {
  color: var(--color-text-secondary);
}

/* ---------------------------------------------------------------------
   6. FAQ
   Independently-expandable native <details> accordion — same
   accessible pattern as the Gear section on About.
   --------------------------------------------------------------------- */
.contact-faq {
  padding-bottom: var(--space-8);
}

.faq-list {
  max-width: 68ch;
  margin-inline: auto;
}

.faq-item {
  border-top: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--color-border);
}

.faq-item__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-4);
  cursor: pointer;
  list-style: none;
}

.faq-item__summary::-webkit-details-marker {
  display: none;
}

.faq-item__summary-label {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
}

.faq-item__icon {
  width: 20px;
  height: 20px;
  color: var(--color-text-secondary);
  transition: transform var(--duration-base) var(--ease-standard);
  flex-shrink: 0;
}

.faq-item[open] .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__content {
  padding-bottom: var(--space-4);
  max-width: 58ch;
}

.faq-item__content p {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

@media (prefers-reduced-motion: reduce) {
  .faq-item__icon {
    transition: none;
  }
}

/* ---------------------------------------------------------------------
   7. CALL TO ACTION
   Same inverted full-width treatment as Home/About.
   --------------------------------------------------------------------- */
.contact-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.contact-cta__heading {
  max-width: 18ch;
}

.contact-cta .btn-outline {
  border-color: var(--color-inverse-text);
  color: var(--color-inverse-text);
}

.contact-cta .btn-outline:hover {
  background-color: var(--color-inverse-text);
  color: var(--color-inverse-bg);
}
