/* ==========================================================================
   Hawthorne Mail and Forms, front end.

   The tokens below are COPIED from the website stylesheet rather than
   eyeballed, so the form and the page around it cannot drift into looking
   like two different websites. If the site palette ever changes, change it
   here in the same commit and bump HAWM_VERSION.

   When the form is swapped into a page built by Hawthorne Psychiatry Pages it
   inherits the site styles anyway. These rules make it self sufficient, so it
   still looks right if the shortcode is placed on a page of the client's own,
   or if the static host is briefly unreachable.
   ========================================================================== */
.hawm-form{
  /* Copied from the site stylesheet, which takes them from the client's brand
     board. If the palette changes, change it here in the same commit and bump
     HAWM_VERSION, or the form quietly drifts out of step with the page. */
  --hawm-green:#153B2E;    /* FOREST   12.38:1 on white */
  --hawm-gold:#BA9839;     /* GOLD     BACKGROUND ONLY. White on it is 2.75:1
                              and fails. Labels on gold are --hawm-onGold. */
  --hawm-gold-d:#866D29;   /* 4.96:1 on white, safe for small text */
  --hawm-text:#505D59;     /* 6.88:1 on white */
  --hawm-ink:#24352F;      /* CHARCOAL 12.92:1 on white */
  --hawm-onGold:#24352F;   /* 4.70:1 on gold */
  --hawm-line:#EBE6E0;     /* STONE tint */
  --hawm-tint:#E9EFEA;     /* SAGE tint */
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  color:var(--hawm-text);
}
.hawm-form *{box-sizing:border-box}
.hawm-form .haw-fg{display:grid;gap:18px}
.hawm-form .haw-f2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.hawm-form .haw-fl{display:block;font-size:13.6px;font-weight:600;line-height:1.4;
  color:var(--hawm-ink);margin:0 0 7px}
.hawm-form .haw-fl i{font-style:normal;color:var(--hawm-gold-d)}
.hawm-form input[type=text],.hawm-form input[type=email],.hawm-form input[type=tel],
.hawm-form select,.hawm-form textarea{
  width:100%;padding:14px 16px;border:1px solid var(--hawm-line);border-radius:10px;
  font-family:inherit;font-size:15.6px;font-weight:400;line-height:1.5;color:var(--hawm-ink);background:#fff;
  transition:border-color .18s ease,box-shadow .18s ease}
.hawm-form textarea{min-height:130px;resize:vertical}
.hawm-form input:focus,.hawm-form select:focus,.hawm-form textarea:focus{
  outline:none;border-color:#647A6A;box-shadow:0 0 0 3px rgba(100,122,106,.18)}
.hawm-form :focus-visible{outline:3px solid var(--hawm-gold-d);outline-offset:3px}
.hawm-form .haw-fhelp{display:block;margin-top:7px;font-size:13.2px;line-height:1.6;
  color:var(--hawm-text)}
.hawm-form .haw-consent{display:flex;align-items:flex-start;gap:12px;
  font-size:14.2px;line-height:1.62}
.hawm-form .haw-consent input{margin-top:4px;width:18px;height:18px;flex:none;
  accent-color:var(--hawm-green)}

/* The button variant doubles its class so it reaches 0,2,0 and cannot be
   out-ranked by a theme rule on `.something a`, which would otherwise repaint
   the label and leave a gold block with no visible text. */
.hawm-form .haw-btn,.hawm-form .haw-btn.haw-btn-gold{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;
  padding:16px 28px;border:2px solid transparent;border-radius:999px;cursor:pointer;
  font:600 15.5px/1 inherit;text-align:center;
  background:var(--hawm-gold);color:var(--hawm-onGold);
  box-shadow:0 8px 20px rgba(186,152,57,.32);
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease}
.hawm-form .haw-btn:hover,.hawm-form .haw-btn.haw-btn-gold:hover{
  background:#CBA845;transform:translateY(-2px);box-shadow:0 12px 26px rgba(186,152,57,.4)}

.hawm-form .haw-fnote{margin:16px 0 0;padding:13px 16px;border-radius:10px;
  font-size:14.2px;line-height:1.6;background:var(--hawm-tint);color:var(--hawm-ink)}
.hawm-form .haw-fnote.haw-form-ok{background:var(--hawm-tint);color:var(--hawm-green)}
.hawm-form .haw-fnote.haw-form-err{background:#FDF5F3;color:#7A2A1D}

/* Honeypot. Moved off screen rather than display:none, so a bot still fills it
   in, while screen readers and the keyboard skip it. */
.hawm-form .haw-hp{position:absolute !important;left:-9999px !important;
  width:1px !important;height:1px !important;overflow:hidden !important}

@media(prefers-reduced-motion:reduce){
  .hawm-form *{transition-duration:.01ms !important}
  .hawm-form .haw-btn:hover{transform:none}
}
@media(max-width:575px){
  .hawm-form .haw-f2{grid-template-columns:1fr}
}

/* After sending, the visitor is returned to #haw-contact-form. Without this
   offset the sticky site header sits over the top of the form and the notice. */
.hawm-form{scroll-margin-top:110px}
@media(max-width:575px){ .hawm-form{scroll-margin-top:84px} }
