/* =============================================================================
   Round 3 preview: /contact/. Port of Claude Design's Contact.dc.html (the v2
   redraw of contact/index.html, keeping its copy and form states). Shared
   shell (header, footer, buttons, tokens) is r3film.css.

   The form's behaviour is the old page's inline script, unchanged; this file
   only gives its states the canvas's look. Hooks the script toggles:
     .rf-contact-msg              status line, hidden until a state is set
     .rf-contact-msg--err         error line under the button
     .rf-contact-msg--ok          success box (tick + two paragraphs)
     .rf-contact-field-err        per-field message, toggled with [hidden]
     [aria-invalid="true"]        red border on the offending field
   ============================================================================= */

.rf-contact-hero,
.rf-contact-body {
  /* Canvas #D62828 for field and form errors. It is site.css's --red, which
     r3film.css has no token for; kept page-local rather than invented as a
     shared token. 5.0:1 on Paper. */
  --rf-contact-error: #D62828;
  --rf-contact-field-line: rgba(36, 48, 71, .25);
}

/* ---- Hero --------------------------------------------------------------------- */
.rf-contact-hero {
  background: var(--blueberry);
  color: var(--oat);
  padding-inline: var(--gutter);
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(56px, 7vw, 96px);
}
.rf-contact-hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.rf-contact-hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.rf-contact-badge {
  background: var(--sage);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  border-radius: 999px;
  padding: 6px 16px;
}
.rf-contact-h1 {
  font-weight: 700;
  font-size: clamp(44px, 6.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.rf-contact-sun { color: var(--sunshine); } /* display size only, on Blueberry */
.rf-contact-lead {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.45;
  max-width: 34ch;
  text-wrap: pretty;
}

/* Photo print with a speech bubble and stars */
.rf-contact-art {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 420px;
  padding-top: 24px;
}
.rf-contact-bubble {
  position: absolute;
  left: -6px;
  top: 0;
  z-index: 2;
  transform: rotate(-4deg);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.rf-contact-bubble__text {
  background: var(--petal);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 20px;
  padding: 10px 18px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(20, 24, 70, .25);
}
.rf-contact-bubble__tail {
  width: 16px;
  height: 16px;
  background: var(--petal);
  transform: rotate(45deg);
  margin: -9px 0 0 26px;
}
.rf-contact-print {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 12px 18px;
  box-shadow: 0 20px 44px rgba(10, 14, 50, .35);
  transform: rotate(2deg);
}
.rf-contact-print img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.rf-contact-print figcaption { padding: 12px 4px 0; font-size: 17px; }
.rf-contact-print__lede { font-family: var(--font-head); font-weight: 600; color: var(--blueberry-deep); }
.rf-contact-stars {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 88px;
  transform: rotate(10deg);
  z-index: 2;
}
/* The canvas hangs the stars 18px past the print; at phone width that would
   poke past the 20px gutter once rotated, so it only goes that far out when
   there is room. */
@media (min-width: 520px) {
  .rf-contact-stars { right: -18px; }
}

/* ---- Form and side panels ------------------------------------------------------ */
.rf-contact-body {
  padding-inline: var(--gutter);
  padding-block: clamp(48px, 7vw, 96px);
}
.rf-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 24px;
  align-items: start;
}
.rf-contact-card {
  background: var(--paper);
  border-radius: 28px;
  padding: clamp(24px, 3.4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.rf-contact-h2 {
  font-weight: 700;
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.1;
}

.rf-contact-form { display: flex; flex-direction: column; gap: 6px; }
.rf-contact-form label { display: block; font-weight: 600; font-size: 17px; }
.rf-contact-optional { font-weight: 400; }
.rf-contact-form input,
.rf-contact-form select,
.rf-contact-form textarea {
  width: 100%;
  min-width: 0;
  height: 52px;
  border-radius: 16px;
  border: 2px solid var(--rf-contact-field-line);
  background: var(--oat);
  padding: 0 16px;
  font: inherit;
  color: var(--ink);
  margin-bottom: 10px;
}
.rf-contact-form select { padding: 0 14px; }
.rf-contact-form textarea {
  height: auto;
  min-height: 150px;
  padding: 12px 16px;
  resize: vertical;
}
.rf-contact-form input:focus,
.rf-contact-form select:focus,
.rf-contact-form textarea:focus { border-color: var(--blueberry); }
.rf-contact-form input[aria-invalid="true"],
.rf-contact-form select[aria-invalid="true"],
.rf-contact-form textarea[aria-invalid="true"] { border-color: var(--rf-contact-error); }

/* Sits under its field: the field's 10px bottom margin is taken back so the
   message hugs the box, as in the canvas's fieldError state. */
.rf-contact-field-err { margin: -10px 0 10px; color: var(--rf-contact-error); font-size: 16px; }
.rf-contact-field-err[hidden] { display: none; }

/* Honeypot: off-screen rather than display:none (which some password
   managers still autofill). Paired with aria-hidden + tabindex=-1 in the
   markup so assistive tech can't reach it either. */
.rf-contact-honeypot {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; white-space: nowrap;
}

.rf-contact-submit { margin-top: 6px; min-height: 56px; width: 100%; }
.rf-contact-submit:disabled { cursor: progress; opacity: .8; }

/* Status line. Empty and out of flow until the script gives it a state. */
.rf-contact-msg { display: none; }
.rf-contact-msg--err {
  display: block;
  margin-top: 6px;
  color: var(--rf-contact-error);
  font-size: 17px;
}
/* Success: the canvas's Oat box with a Sage tick. The tick gets its own grid
   column so the wrapped lines keep one left edge; min-width + break-word so a
   long address the visitor typed wraps instead of widening the card past 375w. */
.rf-contact-msg--ok {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 14px;
  align-items: start;
  background: var(--oat);
  border-radius: 16px;
  padding: 18px 20px;
  color: var(--ink);
}
.rf-contact-msg--ok p { grid-column: 2; min-width: 0; overflow-wrap: break-word; }
.rf-contact-msg__icon {
  grid-column: 1;
  grid-row: 1;
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--ink);
}

.rf-contact-aside { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rf-contact-panel {
  border-radius: 22px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rf-contact-panel--cloud { background: var(--cloud); }
.rf-contact-panel--petal { background: var(--petal); }
.rf-contact-panel--paper { background: var(--paper); }
.rf-contact-panel a { overflow-wrap: anywhere; }
.rf-contact-h3 { font-weight: 600; font-size: 23px; line-height: 1.25; }
.rf-contact-h3--spaced { margin-top: 10px; }
/* Inline rather than flex, so when the heading wraps at phone width the heart
   follows the last word instead of floating to the far edge. */
.rf-contact-heart { display: inline-block; vertical-align: -2px; margin-left: 4px; color: var(--raspberry-deep); transform: rotate(-8deg); }
.rf-contact-address { font-style: normal; }
