/* /our-guides/ (form 2): the page header, the form panel and the form itself.

   The theme's main.css is a fixed Tailwind build. Its .contact-form rules use !important
   and are not in a cascade layer, so rules here either use anu-* classes the theme never
   styles, or out-rank it with "body .anu-guides.contact-form" (the section carries both classes) and !important.

   Gestalt notes: one panel holds the whole task (common region); each label sits 6px above
   its own box and 22px from the field before it (proximity); the guide choices are cover
   cards, so they never read as text boxes (similarity). */

.anu-guides {
  --anu-green-dark: #484d3f;
  --anu-green-medium: #93a287;
  --anu-sage-tint: #f2f5ef;
  --anu-sage-chip: #e3eadf;
  --anu-line: #e2e6dd;
  --anu-card-line: #d9dfd3;
  --anu-muted: #5f6458;
  --anu-slate: #52737e;
  --anu-pink: #ea5982;
  --anu-pink-light: #fdf4f4;
  --anu-error: #b8325a;
  --anu-focus: 0 0 0 3px rgba(147, 162, 135, 0.55);
  padding: 0 16px 80px;
  background: linear-gradient(var(--anu-sage-tint), var(--anu-sage-tint)) top / 100% 300px no-repeat;
  font-family: var(--font-body, "Outfit", sans-serif);
  color: var(--anu-green-dark);
}

.anu-guides-wrap {
  max-width: 760px;
  margin: 0 auto;
}

/* Header */

.anu-guides-head {
  text-align: center;
  padding: 48px 8px 36px;
}

.anu-guides-eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--anu-slate);
}

.anu-guides-title {
  margin: 0;
  font-family: var(--font-headings, "Playfair Display", serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--anu-green-dark);
}

.anu-guides-dek {
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--anu-muted);
}

/* The panel */

.anu-guides-panel {
  background: #fff;
  border: 1px solid var(--anu-line);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(72, 77, 63, 0.04), 0 18px 40px -20px rgba(72, 77, 63, 0.22);
  padding: 40px 44px 44px;
}

/* Steps */

.anu-guides .anu-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  font-family: var(--font-body, "Outfit", sans-serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--anu-green-dark);
}

/* A floated legend is laid out like any other child of its fieldset. */
.anu-guides legend.anu-step {
  float: left;
  width: 100%;
}

.anu-guides .anu-step-number {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--anu-sage-chip);
  font-size: 15px;
  font-weight: 600;
}

.anu-guides .anu-step-head {
  border-top: 1px solid var(--anu-line);
  margin-top: 14px;
  padding-top: 32px;
}

.anu-guides .anu-step-head .anu-step {
  margin-bottom: 4px;
}

.anu-guides .anu-step-note {
  margin: 0 0 2px 42px;
  font-size: 14px;
  color: var(--anu-muted);
}

/* Field grid */

.guides-form #gform_fields_2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 22px;
}

.guides-form #gform_fields_2 > .gfield,
.guides-form #gform_fields_2 > .anu-step-head {
  grid-column: 1 / -1;
  min-width: 0;
}

/* The mirrored markup keeps an empty spacer after Phone: it has no job in this grid. */
.guides-form #gform_fields_2 > .spacer {
  display: none;
}

@media (min-width: 641px) {
  .guides-form #gform_fields_2 > #field_2_4,
  .guides-form #gform_fields_2 > #field_2_5 {
    grid-column: span 1;
  }
}

/* Each field stacks label, box, then its error message (the Worker puts the message first). */
body .anu-guides.contact-form .gfield {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  padding: 0;
  border: 0;
}

body .anu-guides.contact-form .gfield_validation_message {
  order: 9;
}

/* Labels */

.anu-guides .anu-label {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--anu-green-dark);
}

.anu-guides legend.anu-label {
  float: left;
  width: 100%;
  margin-bottom: 8px;
}

.anu-guides .anu-sublabel {
  display: block;
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--anu-muted);
}

body .anu-guides.contact-form .anu-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Text boxes keep the theme's pill shape; focus is a soft sage ring. */

body .anu-guides.contact-form input[type="text"],
body .anu-guides.contact-form input[type="email"],
body .anu-guides.contact-form input[type="tel"] {
  height: 52px;
  margin: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body .anu-guides.contact-form input[type="text"]:focus,
body .anu-guides.contact-form input[type="email"]:focus,
body .anu-guides.contact-form input[type="tel"]:focus {
  outline: none !important;
  border-color: var(--anu-green-dark) !important;
  box-shadow: var(--anu-focus) !important;
}

body .anu-guides.contact-form input::placeholder {
  color: #6e7368 !important;
  opacity: 1;
}

/* Name: First name and Last name side by side. */
body .anu-guides.contact-form #input_2_3 {
  gap: 16px !important;
}

/* Birthdate: three short boxes, not the full width. */
body .anu-guides.contact-form #input_2_6 {
  clear: both;
  max-width: 340px;
  gap: 12px !important;
}

body .anu-guides.contact-form #input_2_6_3_container {
  flex: 1.4 !important;
}

/* Step 1: guide cards */

.anu-guides .anu-guide-options {
  clear: both;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.anu-guides .anu-guide-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 22px 16px 18px;
  text-align: center;
  cursor: pointer;
  border-radius: 16px;
  transition: transform 0.2s;
}

/* Visually hidden, still reachable with Tab and the arrow keys. */
.anu-guides .anu-guide-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

/* The card's border and fill, drawn behind its content. */
.anu-guides .anu-guide-frame {
  position: absolute;
  inset: 0;
  border: 1px solid var(--anu-card-line);
  border-radius: inherit;
  background: #fff;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.anu-guides .anu-guide-option:hover {
  transform: translateY(-2px);
}

.anu-guides .anu-guide-option:hover .anu-guide-frame {
  border-color: var(--anu-green-medium);
  box-shadow: 0 12px 24px -16px rgba(72, 77, 63, 0.4);
}


.anu-guides .anu-guide-input:checked ~ .anu-guide-frame {
  border: 2px solid var(--anu-pink);
  background: var(--anu-pink-light);
}

/* Keyboard focus uses an outline, which neither the checked nor the error state sets. */
.anu-guides .anu-guide-input:focus-visible ~ .anu-guide-frame {
  outline: 3px solid var(--anu-green-dark);
  outline-offset: 3px;
}

.anu-guides .anu-guide-check {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--anu-pink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M13.3 4 6 11.3 2.7 8' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
}

.anu-guides .anu-guide-input:checked ~ .anu-guide-check {
  opacity: 1;
  transform: scale(1);
}

.anu-guides .anu-guide-cover {
  position: relative;
  display: block;
  width: min(132px, 78%);
  aspect-ratio: 480 / 679;
  overflow: hidden;
  border-radius: 4px;
  background: var(--anu-sage-tint);
  box-shadow: 0 1px 2px rgba(72, 77, 63, 0.12), 0 12px 24px -12px rgba(72, 77, 63, 0.45);
}

.anu-guides .anu-guide-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.anu-guides .anu-guide-text {
  position: relative;
  display: block;
}

.anu-guides .anu-guide-name {
  display: block;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--anu-green-dark);
}

.anu-guides .anu-guide-for {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--anu-muted);
}

/* Consent, then the button: the last step before sending. */

.guides-form #field_2_7 {
  margin-top: 6px !important;
  padding-top: 26px;
  border-top: 1px solid var(--anu-line);
}

/* The theme sets .gform-field-label { display: block; width: 100% !important },
   which drops the consent text under its box. */
.guides-form #field_2_7 .gchoice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.guides-form #field_2_7 .gchoice > input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--anu-pink);
  cursor: pointer;
}

body .guides-form #field_2_7 .gchoice > label {
  flex: 1 1 0;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.5;
  color: var(--anu-muted) !important;
  cursor: pointer;
}

body .anu-guides.contact-form .gform_footer {
  margin: 24px 0 0 !important;
  padding: 0 !important;
}

body .anu-guides.contact-form .gform_footer .gform_button:focus-visible {
  outline: 3px solid var(--anu-green-dark) !important;
  outline-offset: 3px;
}

/* Errors: the summary at the top, each message under its own field. */

body .anu-guides.contact-form .gform_validation_errors {
  margin: 0 0 28px;
  padding: 14px 18px;
  border: 1px solid rgba(184, 50, 90, 0.35);
  border-radius: 12px;
  background: var(--anu-pink-light);
}

body .anu-guides.contact-form .gform_validation_errors .gform_submission_error {
  margin: 0;
  font-family: var(--font-body, "Outfit", sans-serif);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--anu-error);
}

body .anu-guides.contact-form .gfield_validation_message {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: 14px;
  line-height: 1.4;
  color: var(--anu-error);
}

body .anu-guides.contact-form .gfield_error input[type="text"],
body .anu-guides.contact-form .gfield_error input[type="email"],
body .anu-guides.contact-form .gfield_error input[type="tel"] {
  border-color: var(--anu-error) !important;
}

body .anu-guides.contact-form .gfield_error .anu-guide-input:not(:checked) ~ .anu-guide-frame {
  border-color: var(--anu-error);
}

/* Phones */

@media (max-width: 640px) {
  .anu-guides {
    padding: 0 12px 56px;
    background-size: 100% 260px;
  }

  .anu-guides-head {
    padding: 32px 4px 24px;
  }

  .anu-guides-dek {
    font-size: 16px;
  }

  .anu-guides-panel {
    padding: 26px 18px 28px;
    border-radius: 20px;
  }

  .anu-guides .anu-step {
    font-size: 18px;
  }

  .anu-guides .anu-guide-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .anu-guides .anu-guide-option {
    flex-direction: row;
    gap: 14px;
    padding: 12px 48px 12px 12px;
    text-align: left;
    border-radius: 14px;
  }

  .anu-guides .anu-guide-option:hover {
    transform: none;
  }

  .anu-guides .anu-guide-check {
    top: 50%;
    right: 14px;
    margin-top: -12px;
  }

  .anu-guides .anu-guide-cover {
    flex: 0 0 auto;
    width: 56px;
  }

  .anu-guides .anu-guide-name {
    font-size: 16px;
  }

  body .anu-guides.contact-form .gform_footer .gform_button {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anu-guides .anu-guide-option,
  .anu-guides .anu-guide-frame,
  .anu-guides .anu-guide-check,
  body .anu-guides.contact-form input {
    transition: none;
  }

  .anu-guides .anu-guide-option:hover {
    transform: none;
  }
}
