/* Contact — a friendly front porch (rebuilt 2026-09-29).
   The message form is a sheet of writing paper under a striped porch awning, with the
   "we read every message" promise hung from the awning like a sign. Beside it: an airmail
   envelope with a stamp for writing directly, and a pinned note for urgent help.
   Everything is scoped to body.p-contact. */

.p-contact main { overflow-x: clip; }
.p-contact .ct-open h1 { font-size: clamp(40px, 5vw, 60px); }
@media (min-width: 900px) {
  .p-contact main > .ct-open .page-hero-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .p-contact main > .ct-open .page-visual seasonal-artwork { max-width: 660px; }
}
.p-contact .ct-open .lede { font-size: clamp(18.5px, 1.6vw, 21px); color: var(--navy); max-width: 26em; }

.p-contact .ct-porch { background: var(--cream); padding-block: clamp(20px, 3vw, 40px) clamp(64px, 8vw, 110px); }
.p-contact .ct-porch-grid { display: grid; gap: 30px; align-items: start; }
@media (min-width: 900px) {
  .p-contact .ct-porch-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 5vw, 64px); }
  .p-contact .ct-side { padding-top: 58px; position: sticky; top: 110px; }
}

/* ---------- the letter under the awning ---------- */
.p-contact .ct-letter { --margin: 24px; width: auto; margin: 0; position: relative; isolation: isolate; border: 0; border-radius: 10px; background: none;
  padding: 118px 20px 26px 40px; box-shadow: 0 1px 1px rgba(60, 40, 10, .06), 0 30px 50px -30px rgba(60, 40, 10, .55); }
.p-contact .ct-letter::before { /* the sheet beneath */ content: ""; position: absolute; inset: 10px -6px -8px 6px; background: #f1e3c2; border-radius: 10px; z-index: -2; rotate: 1.2deg; }
.p-contact .ct-letter::after { /* writing paper with a red margin line */ content: ""; position: absolute; inset: 0; border-radius: 10px; z-index: -1;
  background: linear-gradient(90deg, transparent var(--margin), rgba(169, 84, 47, .35) var(--margin) calc(var(--margin) + 2px), transparent calc(var(--margin) + 2px)), #fffdf7; }
.p-contact .ct-awning { position: absolute; top: -10px; left: -10px; right: -10px; height: 46px; z-index: 2; border-radius: 8px 8px 0 0;
  background: repeating-linear-gradient(90deg, var(--navy) 0 36px, #e9d7a9 36px 72px); filter: drop-shadow(0 5px 4px rgba(29, 44, 76, .28)); transform-origin: top;
  -webkit-mask: linear-gradient(#000, #000) 0 0 / 100% 28px no-repeat, radial-gradient(circle 18px at 50% 0, #000 98%, transparent 100%) 0 28px / 36px 18px repeat-x;
  mask: linear-gradient(#000, #000) 0 0 / 100% 28px no-repeat, radial-gradient(circle 18px at 50% 0, #000 98%, transparent 100%) 0 28px / 36px 18px repeat-x; }
/* the promise, hung from the awning on two strings */
.p-contact .ct-tag { position: absolute; top: 58px; left: 50%; translate: -50% 0; z-index: 1; display: flex; align-items: center; gap: 9px; margin: 0; width: max-content; max-width: calc(100% - 44px);
  padding: 10px 16px; border-radius: 10px; background: var(--sage-soft); color: var(--sage-ink); font-size: 14.5px; font-weight: 700; line-height: 1.35; rotate: -1.5deg; transform-origin: 50% -40px;
  box-shadow: 0 12px 18px -12px rgba(60, 40, 10, .5); }
.p-contact .ct-tag::before, .p-contact .ct-tag::after { content: ""; position: absolute; bottom: 100%; width: 2px; height: 24px; background: #9d7128; }
.p-contact .ct-tag::before { left: 22%; } .p-contact .ct-tag::after { right: 22%; }
.p-contact .ct-tag svg { color: var(--sage-ink); }
.p-contact .ct-letter .form { gap: 16px; padding-top: 38px; }
.p-contact .ct-letter .form label { font-family: var(--f-display); font-weight: 600; font-size: 16px; }
.p-contact .ct-letter .form input, .p-contact .ct-letter .form select { background: var(--paper); min-height: 48px; }
.p-contact .ct-letter .form textarea { min-height: 12rem; line-height: 32px; padding-top: 6px;
  background: repeating-linear-gradient(180deg, transparent 0 31px, rgba(143, 165, 198, .35) 31px 32px) 0 5px / 100% 32px local, var(--paper); }
.p-contact .ct-letter .btn[type="submit"] { min-height: 54px; padding-inline: 32px; font-size: 18px; }
.p-contact .ct-letter .form-status { font-size: 16px; }
.p-contact .ct-letter .form-status.ok { color: #2f6b4f; }
@media (min-width: 900px) { .p-contact .ct-letter { --margin: 40px; padding: 124px 40px 36px 68px; } .p-contact .ct-letter .form { padding-top: 26px; } }
@media (max-width: 420px) { .p-contact .ct-letter { padding-top: 124px; } .p-contact .ct-tag { top: 52px; font-size: 14px; } .p-contact .ct-letter .form { padding-top: 44px; } }

/* ---------- airmail envelope ---------- */
.p-contact .ct-envelope { display: flow-root; position: relative; margin: 0 0 26px; padding: 20px; border-radius: 12px; border: 7px solid transparent; box-shadow: var(--shadow);
  background: linear-gradient(var(--paper), var(--paper)) padding-box, repeating-linear-gradient(135deg, var(--brick) 0 14px, var(--paper) 14px 22px, var(--blue-ink) 22px 36px, var(--paper) 36px 44px) border-box; }
.p-contact .ct-envelope p { margin: 0; font-size: 16.5px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.p-contact .ct-envelope p + p { margin-top: 10px; }
.p-contact .ct-envelope a { color: var(--navy); font-weight: 800; text-decoration: none; box-shadow: inset 0 -.32em 0 var(--gold-soft); }
.p-contact .ct-envelope a:hover { box-shadow: inset 0 -1.1em 0 var(--gold-soft); }
.p-contact .ct-stamp { float: right; margin: -6px -6px 10px 14px; width: 72px; height: 84px; padding: 7px; background: #fffdf6; rotate: 5deg; display: grid; place-items: center;
  filter: drop-shadow(0 3px 3px rgba(60, 40, 10, .25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 3.5px, transparent 95%, #000) -5px -5px / 10px 10px padding-box; -webkit-mask-composite: source-over;
  mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 3.5px, transparent 95%, #000) -5px -5px / 10px 10px padding-box; mask-composite: add; }
.p-contact .ct-stamp img { width: 100%; height: 100%; object-fit: contain; background: var(--gold-soft); border-radius: 2px; padding: 4px; }

/* ---------- urgent note ---------- */
.p-contact .ct-urgent { position: relative; background: var(--brick-soft); border-radius: 6px; padding: 26px 22px 22px; rotate: -.8deg; box-shadow: 0 18px 28px -20px rgba(60, 40, 10, .55); }
.p-contact .ct-urgent::before { content: ""; position: absolute; top: -11px; left: 50%; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--brick) 32% 100%); box-shadow: 0 5px 6px -2px rgba(0, 0, 0, .35); }
.p-contact .ct-urgent h2 { margin: 0; font-size: 22px; color: var(--brick-ink, #8f4424); }
.p-contact .ct-urgent p { margin: 6px 0 14px; color: var(--text); font-size: 16.5px; }
.p-contact .ct-urgent .btn { --edge: #7c3a1d; background: var(--brick); color: #fff; }
.p-contact .ct-urgent .btn:hover { background: #b9613a; color: #fff; }

/* the open door, left ajar for you */
.p-contact .ct-door { display: none; }
@media (min-width: 900px) {
  .p-contact .ct-door { display: grid; place-items: center; width: 190px; aspect-ratio: 1; margin: 34px auto 0; border-radius: 50%;
    background: radial-gradient(circle at 50% 62%, var(--gold-soft), var(--cream) 72%); box-shadow: inset 0 0 0 10px var(--paper), 0 0 0 2px var(--gold-soft); }
  .p-contact .ct-door img { width: 70%; height: auto; mix-blend-mode: multiply; }
}

/* ---------- meaningful movement ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* the porch awning rolls down, then the sign swings out beneath it */
  @keyframes ct-unroll { from { transform: scaleY(0); } 70% { transform: scaleY(1.12); } to { transform: none; } }
  @keyframes ct-swing { 0% { transform: rotate(9deg); opacity: 0; } 40% { transform: rotate(-5deg); opacity: 1; } 70% { transform: rotate(2deg); } 100% { transform: none; opacity: 1; } }
  .p-contact .ct-awning { animation: ct-unroll .7s .25s var(--ease) both; transition: transform .5s var(--spring); }
  .p-contact .ct-tag { animation: ct-swing 1.3s .7s var(--ease) both; }
  .p-contact .ct-letter:hover .ct-awning { transform: scaleY(1.12); }
  /* the letter lifts while you write it */
  .p-contact .ct-letter { transition: translate .45s var(--spring), box-shadow .45s var(--ease); }
  .p-contact .ct-letter:focus-within { translate: 0 -4px; box-shadow: 0 1px 1px rgba(60, 40, 10, .06), 0 40px 60px -30px rgba(60, 40, 10, .6); }
  .p-contact .ct-stamp { transition: rotate .5s var(--spring); }
  .p-contact .ct-envelope:hover .ct-stamp { rotate: -3deg; }
  .p-contact .ct-door img { transition: transform .6s var(--spring); }
  .p-contact .ct-door:hover img { transform: translateY(-5px) rotate(-3deg); }
  /* once the message is sent, the paper gives a small nod */
  @keyframes ct-sent { 30% { transform: translateY(-10px) rotate(-1deg); } 60% { transform: translateY(2px); } 100% { transform: none; } }
  .p-contact .ct-letter:has(.form-status.ok) { animation: ct-sent .8s var(--ease); }
}
@media print { .p-contact .ct-awning, .p-contact .ct-door { display: none; } .p-contact .ct-tag { position: static; translate: none; } }
@media (max-width: 520px) {
  /* phones: the stamp sits on the envelope's corner so the address gets the full line */
  .p-contact .ct-envelope { padding-top: 40px; margin-top: 18px; }
  .p-contact .ct-stamp { float: none; position: absolute; top: -26px; right: 8px; margin: 0; width: 58px; height: 68px; }
}
