/* ==========================================================================
   pages/visit.css: what to expect, directions, contact form, giving.
   ========================================================================== */

/* Photo crop for this page's header. */
.page-hero .bg-photo img { object-position: 58% 72%; }

/* ---------- What to expect ---------- */
.expect { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.expect div { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.expect .num { font-family: var(--f-display); font-size: 2.4rem; color: var(--crimson); line-height: 1; display: block; margin-bottom: 0.5rem; }
.expect h3 { font-size: 1.55rem; margin-bottom: 0.4rem; }
.expect p { font-size: 1.02rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 860px) { .expect { grid-template-columns: 1fr; } }

/* ---------- Map ---------- */
.map-wrap { position: relative; border: 10px solid var(--facade); box-shadow: 0 20px 40px rgba(36, 22, 27, 0.18); background: var(--paper-3); }
.map-wrap iframe { display: block; width: 100%; height: 420px; border: 0; filter: sepia(0.25) saturate(0.9); }

/* ---------- Contact form ("Send a note") ---------- */
.form { display: grid; gap: 1rem; }
.form--panel { background: var(--paper-2); padding: clamp(1.4rem, 3vw, 2.2rem); }
.form label {
  display: grid; gap: 0.4rem; font-family: var(--f-label); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; font-size: 0.85rem;
  color: var(--ink-soft); transition: color 0.2s ease;
}
.form label:focus-within { color: var(--crimson); }
.form input, .form textarea, .form select {
  font: inherit; font-family: var(--f-body); font-size: 1.05rem; letter-spacing: 0; text-transform: none; font-weight: 400;
  padding: 0.8rem 0.95rem; border: 1px solid rgba(36, 22, 27, 0.2); background: #fffdf9; color: var(--ink);
  border-radius: 6px;
  /* Same three shadow layers in every state so focus can ease between them:
     edge ring, soft lift, inner bevel. */
  box-shadow: 0 0 0 0 rgba(143, 0, 56, 0), 0 0 0 0 rgba(143, 0, 56, 0), inset 0 1px 2px rgba(36, 22, 27, 0.05);
  transition: color 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.25s ease;
}
.form input:hover, .form textarea:hover, .form select:hover { border-color: rgba(36, 22, 27, 0.38); }
/* Focus: a crisp crimson edge with a soft crimson lift beneath the field. */
.form input:focus, .form textarea:focus, .form select:focus,
.form input:focus-visible, .form textarea:focus-visible, .form select:focus-visible {
  outline: none;
  border-color: var(--crimson);
  background-color: #fff;
  box-shadow: 0 0 0 1px var(--crimson), 0 10px 22px -12px rgba(143, 0, 56, 0.55), inset 0 1px 2px rgba(36, 22, 27, 0.03);
}
.form textarea { min-height: 150px; resize: vertical; }
.form .note { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* "Send to" dropdown: custom chevron everywhere; a fully styled, eased list
   where the browser supports customizable <select> (appearance: base-select),
   the native list elsewhere. */
.form select {
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
  padding-right: 3rem;
  background-color: #fffdf9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5 8 8l6.5-6.5' fill='none' stroke='%238f0038' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  background-size: 14px 9px;
}
.form select option { background: #fffdf9; color: var(--ink); font-family: var(--f-body); font-size: 1.05rem; }
.form select option:checked { background: var(--paper-3); color: var(--crimson-deep); }

@supports (appearance: base-select) {
  .form select,
  .form select::picker(select) { appearance: base-select; }
  .form select {
    background-image: none;
    display: flex; align-items: center; justify-content: space-between;
    padding-right: 1rem;
  }
  .form select::picker-icon {
    content: "";
    width: 14px; height: 9px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5 8 8l6.5-6.5' fill='none' stroke='%238f0038' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: rotate 0.2s ease;
  }
  .form select:open::picker-icon { rotate: 180deg; }
  .form select::picker(select) {
    border: 1px solid rgba(36, 22, 27, 0.18);
    border-top: 3px solid var(--crimson);
    border-radius: 0 0 var(--radius) var(--radius);
    background: #fffdf9;
    padding: 0.35rem;
    margin-top: 4px;
    box-shadow: 0 18px 36px rgba(36, 22, 27, 0.18);
    /* Ease the list open and closed as one piece: a fade and a short glide.
       (No scaling and no separate motion on the options, which made the
       text jitter as it opened.) */
    opacity: 0;
    translate: 0 -6px;
    transition: opacity 0.2s ease, translate 0.26s var(--ease-out),
      display 0.26s allow-discrete, overlay 0.26s allow-discrete;
  }
  .form select:open::picker(select) { opacity: 1; translate: 0 0; }
  @starting-style {
    .form select:open::picker(select) { opacity: 0; translate: 0 -6px; }
  }
  .form select option {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.7rem 0.85rem;
    border-radius: 3px;
    cursor: pointer;
  }
  .form select option::checkmark { content: "✦"; color: var(--brass); font-size: 0.8em; order: 0; }
  .form select option:not(:checked)::checkmark { visibility: hidden; }
  .form select option:hover,
  .form select option:focus-visible { background: var(--paper-2); color: var(--crimson-deep); outline: none; }
  .form select option:checked { background: var(--crimson); color: #fff; }
  .form select option:checked::checkmark { color: var(--brass-light); }
}

/* ---------- Giving panel ---------- */
.give-panel {
  background: var(--crimson); color: #fbf6ee; padding: clamp(2rem, 5vw, 3.6rem);
  position: relative; overflow: hidden; isolation: isolate;
}
.give-panel h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem); }
.give-panel .lede { color: rgba(251, 246, 238, 0.86); }
.give-action { text-align: center; }
.give-action p { margin-top: 1rem; opacity: 0.8; }
/* Phones and tablets: the button and caption line up with the text above. */
@media (max-width: 860px) {
  .give-action { text-align: left; }
  .give-panel .slits { color: rgba(255, 255, 255, 0.05); }
}

/* The sanctuary facade's scattered slit windows, drawn faintly behind the
   giving panel by slits.js. */
.slits { position: absolute; pointer-events: none; color: currentColor; }
.slits svg { width: 100%; height: 100%; }
.give-panel .slits { right: -6%; top: 0; width: 55%; height: 100%; color: rgba(255, 255, 255, 0.08); z-index: -1; }
