/* ==========================================================================
   Vellox · /contact/ (Programează un demo). Page-only, on the shared .phero.
   The band holds the title; the demo form is a white card rising out of it onto
   the lavender ground; „Ce urmează” and the email sit below the band.
   ≥ 1100px: title and „Ce urmează” left (5/12), the form right (7/12) from the
   top. Below: one column in DOM order (title, form, steps, email).
   ========================================================================== */

/* „Programează” is one long word (about 7.2 × the font size): keep it inside its column */
.page-contact .phero__title { font-size: clamp(2.375rem, 1rem + 3.3vw, 4rem); }

/* The grid: the band covers the copy row plus an overlap row, so the card rises out of it */
.page-contact .phero--contact {
  --overlap: clamp(170px, 26vw, 260px);
  grid-template-columns: [full-start] var(--side) [content-start copy-start media-start side-start] minmax(0, 1fr) [copy-end media-end side-end content-end] var(--side) [full-end];
  grid-template-rows: [band-start copy-start] auto [copy-end overlap-start] var(--overlap) [overlap-end band-end rest-start] auto [rest-end side-start] auto [side-end];
}
.page-contact .contact__card { grid-column: media; grid-row: overlap-start / rest-end; }
.page-contact .contact__side { grid-column: side; grid-row: side-start / side-end; padding-top: clamp(56px, 7vw, 80px); }
/* Narrow screens: the lede runs past the reach of the band's left shade, so the copy rows get an
   even shade too (it fades out behind the card): the lede stays ≥ 4.5:1 on every fold */
@media (max-width: 1099.98px) {
  .page-contact .phero__band::after {
    background:
      linear-gradient(180deg, rgb(20 13 51 / .32) 0, rgb(20 13 51 / 0) 160px),
      linear-gradient(90deg, rgb(20 13 51 / .24) 0, rgb(20 13 51 / 0) 62%),
      linear-gradient(180deg, rgb(20 13 51 / .16) 0, rgb(20 13 51 / .16) calc(100% - var(--overlap)), rgb(20 13 51 / 0) calc(100% - var(--overlap) / 3));
  }
}
@media (min-width: 1100px) {
  .page-contact .phero--contact {
    grid-template-columns: [full-start] var(--side) [content-start copy-start side-start] minmax(0, 5fr) [copy-end side-end] clamp(48px, 5vw, 96px) [media-start] minmax(0, 7fr) [media-end content-end] var(--side) [full-end];
    /* The form spans both rows and the second row takes its extra height: the band is only as tall as the title */
    grid-template-rows: [band-start copy-start] auto [copy-end band-end side-start] 1fr [side-end];
  }
  .page-contact .phero--contact .phero__copy { padding-bottom: calc(var(--skew) + clamp(40px, 3vw, 56px)); }
  .page-contact .contact__card { grid-row: copy-start / side-end; align-self: start; margin-top: calc(var(--header-h) + clamp(32px, 4.2vw, 72px)); }
  .page-contact .contact__side { padding-top: clamp(32px, 2.6vw, 44px); }
  .page-contact .contact__side .contact__mail { margin-top: clamp(32px, 2.8vw, 44px); }
}

/* The form card: white, generous radius, the screens' layered violet depth */
.page-contact .contact__card {
  position: relative; z-index: 2; min-width: 0;
  padding: clamp(22px, 2.8vw, 44px);
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow: var(--sh-frame);
  transition: box-shadow .5s var(--ease);
}
/* While the visitor fills it in, the card answers with a violet edge */
.page-contact .contact__card:focus-within { box-shadow: 0 0 0 1.5px var(--violet-200), var(--sh-frame); }
@media (max-width: 759.98px) {
  .page-contact .contact__card { padding: 22px 18px 24px; border-radius: var(--r-lg); }
}

/* A rendered legend sits outside the fieldset's grid, so it misses the gap labels get */
.page-contact fieldset.field > legend { margin-bottom: var(--s3); }
/* The message is optional: four lines keep the whole form in view */
.page-contact .textarea { min-height: 120px; }

/* „Ce te interesează”: pills wrap on phones; where a free wrap would leave one chip alone on a
   row, they line up in the columns of the fields above */
.page-contact .contact__form { container-type: inline-size; }
@container (min-width: 580px) {
  .page-contact .check-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s5); }
  .page-contact .check-chip span { flex: 1 1 auto; }
}
@container (min-width: 870px) {
  .page-contact .check-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s4); }
}

/* Beside the button: the „*” note, replaced by the status line once it has something to say.
   The empty live region stays in the accessibility tree but takes no space. */
.page-contact .form__foot { margin-top: var(--s2); }
.page-contact .contact__foot-text { min-width: 0; }
.page-contact .contact__foot-text .form-status { min-height: 0; border-radius: 8px; }
.page-contact .form-status:focus-visible { outline-offset: 5px; }
.page-contact .contact__foot-text:has(.form-status:not(:empty)) .note { display: none; }
@media (max-width: 519.98px) {
  .page-contact .form__foot .btn { width: 100%; }
}

/* StoreIQ has its own free trial: offered only once the StoreIQ chip is checked */
.page-contact .contact__hint { display: none; }
.page-contact .form:has(input[name="interests"][value="StoreIQ"]:checked) .contact__hint {
  display: flex; align-items: center; gap: 14px;
  margin-top: var(--s4);
  padding: 12px 18px 12px 12px;
  border-radius: var(--r-md);
  background: var(--violet-50);
  font-size: .9375rem; line-height: 1.45;
  animation: contact-hint .45s var(--ease-out) both;
}
.page-contact .contact__hint .link { white-space: nowrap; }
.page-contact .contact__hint-icon { flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), var(--sh-1); }
@keyframes contact-hint { from { opacity: 0; transform: translateY(-6px); } }

/* Sent: the card becomes the confirmation, and step 1 of „Ce urmează” lights up */
.page-contact .form.is-sent .form__foot > .btn,
.page-contact .form.is-sent .contact__foot-text .note { display: none; }
.page-contact .form.is-sent .form-status {
  display: grid; justify-items: start; gap: var(--s5);
  padding-block: var(--s2);
  color: var(--ink);
  font-size: var(--fs-h3); font-weight: 660; font-stretch: var(--wd-h3); line-height: 1.3; letter-spacing: -.01em;
}
.page-contact .form.is-sent .form-status::before {
  content: ""; width: 64px; height: 64px; border-radius: 20px;
  background: var(--mint-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.6l4.2 4L18.5 7.5' fill='none' stroke='%230F7A4E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 32px no-repeat;
  animation: contact-pop .6s var(--ease-pop) both;
}
.page-contact .phero--contact:has(.form.is-sent) .contact__steps > .step:first-child .step__n {
  background: var(--violet); color: #fff;
  box-shadow: 0 0 0 6px var(--violet-100), 0 10px 22px -10px var(--violet);
  animation: contact-pop .6s var(--ease-pop) both;
}
@keyframes contact-pop { from { transform: scale(.6); opacity: 0; } }

/* „Ce urmează”: the vertical step rail (contact.js fills its line once, in order) */
.page-contact .contact__next-title { font-size: clamp(1.75rem, 1.1rem + 1.1vw, 2.25rem); }
.page-contact .contact__steps { --gap: var(--s6); margin-top: var(--s6); }

/* The direct email: a card whose whole surface is the link */
.page-contact .contact__mail {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 16px;
  max-width: 30rem;
  margin-top: clamp(40px, 4vw, 56px);
  padding: 18px 24px 18px 18px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line), var(--sh-1);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.page-contact .contact__mail > .ico { grid-row: 1 / span 2; }
.page-contact .contact__mail-label { color: var(--slate); font-size: .9375rem; line-height: 1.35; }
.page-contact .contact__mail-addr { min-width: 0; line-height: 1.25; }
.page-contact .contact__mail-link {
  color: var(--ink);
  font-size: var(--fs-h3); font-weight: 680; font-stretch: var(--wd-h3); letter-spacing: -.01em;
  text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--violet-200); text-underline-offset: .22em;
  padding-block: 2px; overflow-wrap: anywhere;
  transition: text-decoration-color var(--t-fast) ease;
}
.page-contact .contact__mail-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.page-contact .contact__mail:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--violet-200), var(--sh-3); }
.page-contact .contact__mail:hover .contact__mail-link { text-decoration-color: var(--violet); }
.page-contact .contact__mail-link:focus-visible { outline: 0; }
.page-contact .contact__mail:has(.contact__mail-link:focus-visible) { outline: 2.5px solid var(--violet); outline-offset: 3px; }

/* Large tablets: „Ce urmează” and the email side by side under the form */
@media (min-width: 900px) and (max-width: 1099.98px) {
  .page-contact .contact__side { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s7); }
  .page-contact .contact__mail { margin-top: 0; }
}
