/* ── Contact page — minimal, typography-led layout, split into a
   content half and a full-bleed photo half. ────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400&display=swap');

.contact-split {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

.contact-content {
  position: relative;
  z-index: 2;
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 6vw, 6rem) 1.5rem;
}

/* Pinned to the viewport instead of flowing with the page, so opening
   the form (which grows .contact-content) never stretches, scrolls,
   or otherwise moves the photo — it just sits fixed in place, like a
   background rather than a page element. */
.contact-photo {
  position: fixed;
  top: var(--header-height);
  right: 0;
  z-index: 1;
  width: 50%;
  height: calc(100vh - var(--header-height));
  margin: 0;
  overflow: hidden;
}

.contact-photo-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Two different photos for two different layouts — the desktop side
   panel and the mobile banner show different crops, swapped outright
   at the breakpoint rather than animated between. */
.contact-photo-img-mobile {
  display: none;
}

@media (max-width: 900px) {
  /* Fixed positioning stops making sense once the layout stacks —
     column-reverse puts the (now in-flow) photo back on top without
     needing to reorder the markup. */
  .contact-split {
    flex-direction: column-reverse;
  }

  .contact-content {
    width: 100%;
    padding: clamp(2.5rem, 8vw, 4rem) 1.5rem clamp(3.5rem, 10vw, 5rem);
  }

  .contact-photo {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 46vh;
  }

  .contact-photo-img-desktop {
    display: none;
  }

  .contact-photo-img-mobile {
    display: block;
    object-fit: contain;
    object-position: center;
  }
}

/* ── Hero: small eyebrow + one oversized, tightly-tracked line ── */

.contact-hero {
  max-width: 28rem;
  margin: 0 auto clamp(3rem, 7vw, 4.5rem);
  text-align: center;
}

.contact-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: #999;
  margin-bottom: 1rem;
}

.contact-heading {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #000;
  margin: 0;
}

/* ── Contact rows — plain rules, no cards. Each value underlines in
   from the left on hover, the only flourish in an otherwise flat
   list. Shares its max-width with the hero and the form below, so
   every divider line and border in the column lines up flush at the
   same left/right edge instead of floating at different widths. ── */

.contact-links {
  max-width: 28rem;
  margin: 0 auto;
}

.contact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid #000;
  text-decoration: none;
  color: inherit;
}

.contact-links .contact-row:last-child {
  border-bottom: 1px solid #000;
}

.contact-row-label {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #999;
}

.contact-row-value {
  position: relative;
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #000;
  text-align: right;
}

.contact-row-value::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 0;
  border-top: 1px solid #000;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

.contact-row:hover .contact-row-value::after {
  transform: scaleX(1);
}

@media (max-width: 480px) {
  .contact-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.9rem 0;
  }

  .contact-row-value {
    text-align: left;
  }
}

/* ── Mail trigger — a plain circular icon button. Its glyph is two
   stacked SVGs (envelope / X) crossfaded via opacity, the same
   pattern the about page uses for its letter swap, so opening the
   form never causes any layout shift. ── */

.contact-form-section {
  margin-top: clamp(3rem, 7vw, 4.5rem);
}

.mail-trigger-wrap {
  display: flex;
  justify-content: center;
}

.mail-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  border: none;
  background: none;
  padding: 0;
  color: #000;
  font: inherit;
  cursor: pointer;
}

.mail-trigger-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  background: #000;
  color: #fff;
  transition: transform 0.2s ease;
}

.mail-trigger:hover .mail-trigger-circle {
  transform: scale(1.06);
}

.mail-icon {
  position: relative;
  display: inline-block;
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.mail-trigger.is-open .mail-icon {
  transform: rotate(90deg);
}

.mail-icon-glyph {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 0.2s ease;
}

.mail-icon-alt {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.mail-trigger.is-open .mail-icon-base {
  opacity: 0;
}

.mail-trigger.is-open .mail-icon-alt {
  opacity: 1;
}

.mail-trigger-text {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Form panel — height-animated open via a 0fr → 1fr grid track,
   so it slides open/closed without ever measuring pixel heights
   in JS. ── */

.contact-form-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.contact-form-panel.is-open {
  grid-template-rows: 1fr;
}

.contact-form-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.contact-form {
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: clamp(2rem, 5vw, 2.75rem);
}

.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* One black-bordered block instead of three separate underlined
   inputs — each field is a row inside it, and the border between
   rows doubles as the divider between fields, so the whole group
   reads as a single connected outline rather than floating lines. */
.contact-fields {
  border: 1px solid #000;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
  transition: background-color 0.15s ease;
}

.contact-field + .contact-field {
  border-top: 1px solid #000;
}

.contact-field:focus-within {
  background-color: #f6f6f3;
}

.contact-field span {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
}

.contact-field input,
.contact-field textarea {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: #000;
  padding: 0;
  resize: none;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
}

.contact-submit {
  align-self: flex-start;
  margin-top: 0.25rem;
  padding: 0.75rem 1.85rem;
  border: none;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.contact-submit:hover {
  opacity: 0.75;
}

.contact-submit:disabled {
  opacity: 0.4;
  cursor: default;
}

.contact-form-status {
  min-height: 1.2em;
  font-size: 0.8rem;
  color: #666;
}

.contact-form-status[data-state="error"] {
  color: #b3261e;
}
