/* =================================================================
   SNOWLEOPARD Studio & Research — contact.css
   Contact page (contact.html): introduction and portrait beside the
   inquiry form on desktop, one column on smaller screens.
   Depends on the tokens, header, footer and buttons in base.css.
   ================================================================= */

/* ----- Page ground ------------------------------------------------ */
/* Birch Light, so the bone Field Notes band reads as a separate band. */
.contact-main {
  background: var(--bone);
}

/* ----- Banner ----------------------------------------------------- */
.contact-banner {
  display: grid;
  /* The portrait column is wide enough to keep the landscape around the subject. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
  gap: 4rem;
  align-items: stretch;
}
/* The copy carries the top padding so the portrait can meet the band's top edge. */
/* Interior page heading, a step below the other page openers so the band
   and form fit one screen. */
.contact-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.72rem, 2.25vw, 2.05rem);
  line-height: 1.14;
  letter-spacing: -0.012em;
  /* Museum Black, as on every interior page. */
  color: var(--museum-black);
  margin: 0;
  text-wrap: balance;
}
.contact-title em {
  font-style: italic;
  font-weight: 600;
}

/* Measured to break over two lines, keeping the button in the first screen. */

/* ----- Portrait --------------------------------------------------- */
/* Stretches to the height of the copy column and fades on its inner edge,
   like the site's other photo bands. */
.contact-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
/* The fade sits on the frame, never on the caption. */
/* A zero flex basis lets the copy column, not the photograph, set the band height. */
.contact-portrait-frame {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}
.contact-portrait {
  width: 100%;
  height: 100%;
  /* Anchored to the foot of the picture, so any crop comes off the sky. */
  object-fit: cover;
  object-position: 50% 100%;
  border-radius: 0; /* Square corners on photographs. */
}
/* An eased fade avoids a visible seam; Bone at zero alpha avoids the grey
   midtones of `transparent`. */
.contact-portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(243, 239, 230, 1) 0%,
    rgba(243, 239, 230, 0.97) 4%,
    rgba(243, 239, 230, 0.9) 9%,
    rgba(243, 239, 230, 0.79) 14%,
    rgba(243, 239, 230, 0.65) 19%,
    rgba(243, 239, 230, 0.5) 24%,
    rgba(243, 239, 230, 0.35) 29%,
    rgba(243, 239, 230, 0.22) 34%,
    rgba(243, 239, 230, 0.12) 39%,
    rgba(243, 239, 230, 0.05) 45%,
    rgba(243, 239, 230, 0) 52%
  );
  pointer-events: none;
}

/* ----- Form ------------------------------------------------------- */
.contact-form {
  display: grid;
  /* Compact rhythm keeps the form within one screen. */
  gap: 1.3rem;
  margin-top: 1rem;
}
/* Turnstile takes no space until it shows a challenge. */
.contact-form .cf-turnstile:empty {
  display: none;
}

/* Label stacked above its control. */
.field label {
  display: block;
  font-family: var(--serif);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(22, 59, 54, 0.78); /* 6.0:1 on Bone. */
  margin-bottom: 0.5rem;
  transition: color 0.25s ease;
}

/* Ruled fields set in the page serif; the rule is the field boundary. */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  display: block;
  width: 100%;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--museum-black);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(22, 59, 54, 0.55); /* 3.2:1 against the ground. */
  border-radius: 0;
  padding: 0.35rem 0 0.6rem;
  -webkit-appearance: none;
  appearance: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* Vertical resize only, without the corner grabber. */
.contact-form textarea {
  resize: vertical;
  min-height: 92px;
}
.contact-form textarea::-webkit-resizer {
  display: none;
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-bottom-color: rgba(22, 59, 54, 0.82);
}

/* Focus: a doubled Fireweed rule drawn with box-shadow, so the baseline does
   not move. */
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--fireweed);
  box-shadow: 0 1px 0 0 var(--fireweed);
}
.contact-form .field:focus-within label {
  color: var(--apothecary);
}

/* Replaces Chrome's opaque autofill box with the band's ground. */
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--museum-black);
  -webkit-box-shadow: 0 0 0 1000px var(--bone) inset;
  box-shadow: 0 0 0 1000px var(--bone) inset;
  caret-color: var(--museum-black);
}
.contact-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--museum-black);
  -webkit-box-shadow:
    0 0 0 1000px var(--bone) inset,
    0 1px 0 0 var(--fireweed);
  box-shadow:
    0 0 0 1000px var(--bone) inset,
    0 1px 0 0 var(--fireweed);
}

.contact-form .btn-pill {
  flex: 0 0 auto;
  min-width: 190px;
  padding: 0.78rem 1.9rem;
  font-size: 0.93rem;
}
/* The status message replaces the reply promise in the same two-line space,
   so the column (and the portrait beside it) never changes height. */
.contact-send .form-status {
  margin: 0;
  font-size: 0.84rem; /* Two lines at the promise's type size and measure. */
  line-height: 1.6;
  max-width: 46ch;
  min-height: 2.688rem;
}

/* The submit button with the reply promise beside it. */
.contact-send {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

/* Caption type comes from .media-caption in base.css. */
/* A zero width with a full minimum keeps the caption to the photograph's width. */

/* Page-opening eyebrow in the homepage hero's serif treatment. */
.contact-eyebrow {
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--museum-black);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.contact-eyebrow::after {
  content: "";
  flex: 0 1 48px;
  height: 1px;
  background: rgba(38, 38, 38, 0.45);
}

/* The banner sits on the page edge with no right padding, so the portrait
   runs flush to the window. */
.contact-banner {
  max-width: none;
  margin: 0;
  padding: 0 0 2.5rem var(--edge);
}

/* ----- Values ----------------------------------------------------- */
.cv-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
/* A shared box aligns engravings of different proportions. */
.cv-icon {
  flex: 0 0 auto;
  width: 58px;
  height: 46px;
  object-fit: contain;
  object-position: center;
}
.cv-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--museum-black);
  margin: 0 0 0.2rem;
}
.cv-note {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0;
}

/* ----- Responsive ------------------------------------------------- */

/* Below 1000px: one column; the portrait becomes a framed photograph. */
@media screen and (max-width: 999px),
  screen and (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
  screen and (min-width: 601px) and (max-width: 1024px) and (orientation: portrait),
  screen and (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .contact-banner {
    max-width: 680px;
    margin: 0 auto;
    padding: 4.5rem var(--edge) 6rem;
    grid-template-columns: 1fr;
    /* Spacing comes from each block's own margin. */
    gap: 0;
  }
  /* .contact-copy is dissolved into the banner grid so the portrait can sit
     directly beneath the identification. */
  /* The aside is dissolved as well, so its children order within the grid. */
  .contact-content-main {
    order: 1;
  }
  .contact-bio {
    order: 2;
  }
  .contact-figure {
    order: 3;
    margin: 1.5rem 0 0;
    justify-self: center;
    max-width: 420px;
    height: auto;
    width: 100%;
  }
  .cv-column {
    order: 4;
  }
  .contact-portrait-frame {
    flex: none;
    width: 100%;
    aspect-ratio: 1041 / 1145;
  }
  .contact-portrait-frame::after {
    display: none;
  }
  /* Values two by two. */
}

@media screen and (max-width: 600px),
  screen and (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
  screen and (min-width: 601px) and (max-width: 1024px) and (orientation: portrait),
  screen and (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .contact-banner {
    padding: 2.75rem var(--edge) 4.5rem;
    gap: 2.5rem;
  }
  .contact-eyebrow {
    margin-bottom: 1.1rem;
  }
  .field label {
    font-size: 0.82rem;
  }
  .contact-form .btn-pill {
    width: 100%;
    min-width: 0;
  }
  /* Values one to a line on phones. */
  /* Notes wrap naturally in one column. */
}

/* Stacked order: purpose, portrait and caption, then the lede and form. */
@media (max-width: 600px),
  (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
  (min-width: 601px) and (max-width: 1024px) and (orientation: portrait),
  (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .contact-banner {
    padding: 2.75rem var(--edge) 4.5rem;
  }
  .cv-column {
    margin-top: 2.25rem;
  }
}

/* ----- Desktop: 1000px and wider ---------------------------------- */
@media screen and (min-width: 1000px) and (orientation: landscape) and (min-height: 501px),
  screen and (min-width: 1001px) and (orientation: landscape),
  screen and (min-width: 1025px) and (hover: hover),
  screen and (min-width: 1367px) {
  .contact-banner {
    grid-template-columns: minmax(0, 1.58fr) minmax(430px, 0.92fr);
    gap: 0;
    padding: 0;
    align-items: stretch;
  }

  .contact-bio {
    align-self: start;
    padding-top: 0.12rem;

    padding-bottom: 1.2rem;
  }

  .contact-bio-name {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--museum-black);
    margin: 0 0 0.75rem;
  }

  .contact-bio-meta {
    font-family: var(--sans);
    font-size: 0.67rem;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0;
  }

  .contact-form {
    margin-top: 1.05rem;
    gap: 1.15rem;
    /* Fields stay on the text measure. */
  }

  .contact-form input[type="text"],
  .contact-form input[type="email"] {
    padding: 0.3rem 0 0.55rem;
  }

  .contact-form textarea {
    min-height: 86px;
    padding: 0.3rem 0 0.55rem;
  }

  .contact-send {
    margin-top: 0.3rem;
  }

  .contact-figure {
    min-height: 0;
  }

  .contact-portrait-frame {
    min-height: 0;
  }

  .contact-portrait {
    object-fit: cover;
    object-position: 50% 50%;
  }

  .contact-portrait-frame::after {
    display: none;
  }
}

@media screen and (max-width: 999px),
  screen and (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
  screen and (min-width: 601px) and (max-width: 1024px) and (orientation: portrait),
  screen and (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .contact-bio {
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(38, 38, 38, 0.18);
  }
  .contact-bio-name {
    font-family: var(--serif);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 0.55rem;
  }
  .contact-bio-meta {
    font-family: var(--sans);
    font-size: 0.68rem;
    line-height: 1.65;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0;
  }
}

/* ----- Desktop values rail ---------------------------------------- */
@media screen and (min-width: 1000px) and (orientation: landscape) and (min-height: 501px),
  screen and (min-width: 1001px) and (orientation: landscape),
  screen and (min-width: 1025px) and (hover: hover),
  screen and (min-width: 1367px) {
  .contact-content-main {
    min-width: 0;
  }

  .contact-bio {
    padding: 0;
    border-bottom: 0;
    margin: 0;
  }

  .contact-bio-name {
    margin-top: 0;
  }

  .cv-column {
    list-style: none;
    /* The four values centre in the space below the bio. */
    margin: auto 0;
    padding: 0;
    display: grid;
    gap: 1.2rem;
  }

  .cv-column .cv-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
  }

  .cv-column .cv-icon {
    width: 48px;
    height: 42px;
  }

  .cv-column .cv-title {
    font-size: 0.86rem;
    margin-bottom: 0.1rem;
  }

  .cv-column .cv-note {
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .contact-form {
    width: 100%;
    max-width: 690px;
  }
}

@media screen and (max-width: 999px),
  screen and (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
  screen and (min-width: 601px) and (max-width: 1024px) and (orientation: portrait),
  screen and (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .contact-bio {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .cv-column {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem 1.6rem;
  }
}

@media screen and (max-width: 600px),
  screen and (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
  screen and (min-width: 601px) and (max-width: 1024px) and (orientation: portrait),
  screen and (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .cv-column {
    grid-template-columns: 1fr;
  }
}

/* Portrait plate: Birch Light mat and Apothecary hairline. */
.contact-banner .contact-figure {
  height: auto;
  min-height: 0;
  justify-content: center;
  align-items: center;
  padding: clamp(2rem, 3vw, 3.5rem);
}
.contact-banner .contact-portrait-frame {
  flex: none;
  width: 100%;
  max-width: 480px;
  min-height: 0;
  aspect-ratio: auto;
  margin: 0 auto;
  padding: 8px;
  background: var(--bone);
  border: 1px solid var(--apothecary);
}
.contact-banner .contact-portrait-frame::after {
  display: none;
}
.contact-banner .contact-portrait {
  display: block;
  position: static;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
@media (max-width: 600px),
  (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
  (min-width: 601px) and (max-width: 1024px) and (orientation: portrait),
  (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .contact-banner .contact-figure {
    padding: 1.5rem var(--edge);
  }
}

/* Introduction at left, inquiry at right. */
#inquiry.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) !important;
  column-gap: clamp(3rem, 6vw, 6rem);
  row-gap: 1.5rem;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem var(--edge) 4rem;
}
.contact-layout > .contact-eyebrow {
  grid-column: 1 / -1;
  margin: 0;
}
.contact-layout .contact-profile {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-layout .contact-bio {
  order: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.contact-layout .contact-bio-name {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  max-width: 320px;
  line-height: 1.4;
}
.contact-layout .contact-bio-meta {
  font-size: 0.7rem;
  line-height: 1.65;
}
.contact-layout .contact-figure {
  order: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 320px;
  align-self: flex-start;
}
.contact-layout .contact-portrait-frame {
  max-width: 320px;
  margin: 0;
}
.contact-layout .cv-column {
  order: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-layout .cv-column .cv-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
}
.contact-layout .cv-column .cv-icon {
  width: 36px;
  height: 40px;
  object-fit: contain;
}
.contact-layout .cv-column .cv-title {
  font-size: 0.86rem;
  margin: 0 0 0.15rem;
}
.contact-layout .cv-column .cv-note {
  font-size: 0.74rem;
  line-height: 1.4;
  margin: 0;
}
.contact-layout > .contact-content-main {
  order: 0;
  min-width: 0;
  width: 100%;
  padding: 0;
}
.contact-layout .contact-form {
  max-width: none;
}
@media (max-width: 900px),
  (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
  (min-width: 601px) and (max-width: 1024px) and (orientation: portrait),
  (min-width: 1025px) and (max-width: 1366px) and (hover: none) and (pointer: coarse) and (orientation: portrait) {
  #inquiry.contact-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 720px;
    row-gap: 1.5rem;
  }
  .contact-layout > .contact-content-main {
    order: 1;
  }
  .contact-layout .contact-profile {
    order: 2;
    margin-top: 1.5rem;
  }
}
@media (max-width: 400px) {
  .contact-layout .cv-column {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Profile and all four values fit the opening view. */
@media (min-width: 901px) and (orientation: landscape) and (min-height: 501px),
  (min-width: 1001px) and (orientation: landscape),
  (min-width: 1025px) and (hover: hover),
  (min-width: 1367px) {
  .contact-layout .contact-profile {
    margin-top: -1rem;
    gap: 0.75rem;
  }
  .contact-layout .cv-column {
    row-gap: 1rem;
  }
}

.contact-layout .contact-studio-name {
  white-space: nowrap;
}
@media (min-width: 901px) and (orientation: landscape) and (min-height: 501px),
  (min-width: 1001px) and (orientation: landscape),
  (min-width: 1025px) and (hover: hover),
  (min-width: 1367px) {
  .contact-layout > .contact-content-main {
    margin-top: -1rem;
  }
}

/* Shares the header gutter. */
@media (min-width: 901px) and (orientation: landscape) and (min-height: 501px),
  (min-width: 1001px) and (orientation: landscape),
  (min-width: 1025px) and (hover: hover),
  (min-width: 1367px) {
  #inquiry.contact-layout {
    /* The gap is taken from the total width so the form keeps its width. */
    width: calc(min(100%, 1280px) - clamp(1rem, 2vw, 2rem));
    max-width: none;
    margin-left: 0;
    margin-right: auto;
    column-gap: clamp(2rem, 4vw, 4rem);
  }
  .contact-layout .cv-column {
    margin-top: 10px;
  }
}

/* Balances the wide mountain engraving against the taller marks. */
.contact-layout .cv-column .cv-icon--purpose {
  transform: scale(1.25);
  transform-origin: center;
}

/* Newsletter band: the photograph fades into Birch Light. */
.field-notes.field-notes--birch {
  background-color: var(--birch-light);
}
