/* Contact — page-specific layout. Values from Figma frame "Notate — Contact" (10268:46818, 1440 wide). */

/* ---------- Simple hero (same pattern as Pricing / Resources) ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 512px;
  display: grid;
  align-items: center;
  padding: 72px 0;
  background: linear-gradient(165.07deg, #fffaf0 7.14%, #f9ece8 39.29%, #f3e7e4 78.57%);
}
.page-hero__bg { position: absolute; inset: 0; z-index: -1; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; animation: phIn 1.6s var(--ease-out) both; }
@keyframes phIn { from { opacity: 0; transform: scale(1.05); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.page-hero__copy { width: min(760px, 100%); margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.page-hero .lead { font-size: 18px; }
#contact-title { max-width: 12.4em; }
.breadcrumb { display: flex; align-items: center; justify-content: center; gap: 16px; }
.breadcrumb a { color: inherit; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: color .25s, background-size .45s var(--ease-out); }
.breadcrumb a:hover { color: var(--accent); background-size: 100% 1px; }

/* ---------- Contact section ---------- */
.contact { position: relative; isolation: isolate; overflow: hidden; padding: 96px 0; }
.contact__bg { position: absolute; inset: 0; z-index: -1; }
.contact__bg img { width: 100%; height: 100%; object-fit: cover; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 371fr) minmax(0, 761fr); gap: 20px; align-items: stretch; }
.contact__info { display: flex; flex-direction: column; gap: 20px; }

/* 88px icon cut from the Figma sprite sheet (same crop offsets as the design) */
.sprite { position: relative; display: block; flex: none; overflow: hidden; }
.sprite img { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); max-width: none; }

.info-card { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 32px; }
.info-card__text { display: flex; flex-direction: column; gap: 8px; }
.contact__info > :last-child { min-height: 240px; }
.info-card .title-sm { transition: color .25s; }
a.info-card:hover .title-sm { color: var(--accent); }
.info-card__url { color: var(--ink-2); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; transition: color .25s, background-size .45s var(--ease-out); }
a.info-card:hover .info-card__url { color: var(--accent); background-size: 100% 1px; }

/* ---------- Form card ---------- */
.form-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 40px;
  background: var(--panel);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  transition: box-shadow .6s var(--ease-out);
}
.form-card.is-highlight { animation: formPulse 1.6s var(--ease-out); }
@keyframes formPulse {
  0% { box-shadow: var(--shadow-card), 0 0 0 0 rgba(0, 100, 255, 0.35); }
  35% { box-shadow: var(--shadow-card), 0 0 0 10px rgba(0, 100, 255, 0.12); }
  100% { box-shadow: var(--shadow-card), 0 0 0 18px rgba(0, 100, 255, 0); }
}
.form-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-card > .field { width: 100%; }

.field { --bd: var(--line); --ring: transparent; position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label { display: block; padding: 0; font-weight: 500; font-size: 15px; line-height: 1.4; color: var(--ink); transition: color .25s var(--ease-out); }
.field__box {
  position: relative;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: #fff;
  border: 1.5px solid var(--bd);
  border-radius: var(--r-md);
  box-shadow: 0 0 0 4px var(--ring);
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  text-align: left;
  transition: border-color .25s var(--ease-out), box-shadow .45s var(--spring), background-color .25s;
}
.field__box--area { height: 120px; align-items: stretch; padding: 14px 16px; }
.field__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  caret-color: var(--accent);
}
textarea.field__input { resize: none; }
.field__input::placeholder { color: #8894a3; }
.field__input:focus-visible { outline: none; }

.field:hover { --bd: #b4bfcc; }
.field:focus-within { --bd: var(--accent); --ring: rgba(0, 100, 255, 0.12); }
.field:focus-within > .field__label { color: var(--accent); }

/* valid tick (after the field has been touched) */
.field.is-valid .field__box::after {
  content: "";
  flex: none;
  width: 6px;
  height: 11px;
  margin: -3px 4px 0 0;
  border: solid #12a150;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(1);
  animation: tickIn .5s var(--spring-bouncy);
}
@keyframes tickIn { from { transform: rotate(45deg) scale(0); opacity: 0; } }

/* error state */
.field.is-invalid { --bd: #d93025; --ring: rgba(217, 48, 37, 0.1); }
.field.is-invalid > .field__label { color: #b3261e; }
.field.is-invalid.shake .field__box { animation: shake .45s var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.field__msg { display: grid; grid-template-rows: 0fr; margin-top: -8px; transition: grid-template-rows .45s var(--spring), margin .45s var(--spring); }
.field__msg > p { overflow: hidden; font-size: 13px; line-height: 1.45; color: #b3261e; opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .45s var(--spring); }
.field.is-invalid .field__msg { grid-template-rows: 1fr; margin-top: -2px; }
.field.is-invalid .field__msg > p { opacity: 1; transform: none; }

/* ---------- Custom select ---------- */
.cselect { position: relative; width: 100%; }
.cselect__btn { cursor: pointer; padding-block: 2px; }
@media (max-width: 1180px) { .cselect__btn { padding-block: 8px; } }
.cselect__value { flex: 1 1 auto; min-width: 0; }
.cselect__chev { flex: none; width: 20px; height: 20px; transition: transform .5s var(--spring-bouncy); }
.cselect.is-open .cselect__chev { transform: rotate(180deg); }
.cselect__btn:focus-visible { outline: none; }
.cselect.is-open { z-index: 20; }
.field:has(.cselect.is-open) { --bd: var(--accent); --ring: rgba(0, 100, 255, 0.12); }
.field:has(.cselect.is-open) > .field__label { color: var(--accent); }
.cselect__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: 0 0 0 1px rgba(12, 26, 43, 0.06), var(--shadow-menu);
  transform-origin: top center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transition: opacity .2s var(--ease-out), transform .45s var(--spring), visibility 0s linear .45s;
}
.cselect.is-open .cselect__list { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--ease-out), transform .5s var(--spring-bouncy), visibility 0s; }
.cselect__list:focus { outline: none; }
.cselect__list li {
  position: relative;
  padding: 10px 36px 10px 12px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: background-color .2s, color .2s, opacity .3s var(--ease-out), transform .45s var(--spring);
}
.cselect.is-open .cselect__list li { opacity: 1; transform: none; }
.cselect.is-open .cselect__list li:nth-child(2) { transition-delay: 0s, 0s, 30ms, 30ms; }
.cselect.is-open .cselect__list li:nth-child(3) { transition-delay: 0s, 0s, 60ms, 60ms; }
.cselect.is-open .cselect__list li:nth-child(4) { transition-delay: 0s, 0s, 90ms, 90ms; }
.cselect.is-open .cselect__list li:nth-child(5) { transition-delay: 0s, 0s, 120ms, 120ms; }
.cselect.is-open .cselect__list li:nth-child(6) { transition-delay: 0s, 0s, 150ms, 150ms; }
.cselect__list li.is-active { background: var(--bg); }
.cselect__list li[aria-selected="true"] { color: var(--accent); font-weight: 500; }
.cselect__list li[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 6px;
  height: 11px;
  margin-top: -7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- Radios ---------- */
.choice { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.choice legend { margin-bottom: 4px; }
.choice__opts { display: flex; flex-wrap: wrap; column-gap: 32px; }
.radio { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; font-size: 17px; line-height: 1.4; color: var(--ink); }
.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.radio__ui { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; transition: transform .5s var(--spring-bouncy), box-shadow .3s var(--ease-out); }
.radio__ui img { position: absolute; inset: 0; width: 22px; height: 22px; }
.radio__on { opacity: 0; transform: scale(0.4); transition: opacity .2s var(--ease-out), transform .55s var(--spring-bouncy); }
.radio input:checked + .radio__ui .radio__on { opacity: 1; transform: none; }
.radio:hover .radio__ui { transform: scale(1.08); }
.radio:active .radio__ui { transform: scale(0.92); }
.radio input:focus-visible + .radio__ui { box-shadow: 0 0 0 4px rgba(0, 100, 255, 0.18); }
.radio__label { transition: color .2s; }
.radio:hover .radio__label { color: var(--accent); }

/* ---------- Submit ---------- */
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-submit { min-width: 149px; }
.form-submit .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-card.is-sending .form-submit { pointer-events: none; }
.form-card.is-sent .form-submit { --btn-bg: #12a150; --btn-bd: #12a150; opacity: 1; cursor: default; animation: sentPop .7s var(--spring-bouncy); }
@keyframes sentPop { 0% { transform: scale(0.94); } 100% { transform: none; } }
.form-status { font-size: 14px; line-height: 1.5; color: var(--muted); }
.form-status.is-error { color: #b3261e; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .contact__grid { grid-template-columns: minmax(0, 320fr) minmax(0, 640fr); }
  .info-card { padding: 28px; }
  .form-card { padding: 32px; }
}
/* Tablet + phone (≤ 1023): hero copy first, the Figma artwork as a full-width band underneath
   (its glass icons sit at the image edges and would be cropped away as a background);
   form full width, the three info cards in a row under it */
@media (max-width: 1023px) {
  .page-hero.fig-hero--simple { min-height: 0; flex-direction: column; align-items: stretch; }
  .page-hero.fig-hero--simple > .page-hero__bg {
    position: relative; inset: auto; order: 2; aspect-ratio: 2880 / 1024;
    margin-top: calc(-1 * clamp(24px, 8vw, 80px)); /* tuck the band's empty top under the copy; the fade hides the seam */
    -webkit-mask-image: linear-gradient(transparent 0 15%, #000 45%);
    mask-image: linear-gradient(transparent 0 15%, #000 45%);
  }
  .page-hero.fig-hero--simple .page-hero__copy { padding: 56px 0 8px; }
  .page-hero .breadcrumb a { padding-block: 10px; margin-block: -10px; background-origin: content-box; background-clip: content-box; } /* 40px tap area, same layout */

  .contact { padding: 80px 0; }
  .contact__grid { grid-template-columns: 1fr; gap: 16px; }
  .contact__info { order: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .contact__info > :last-child { min-height: 0; }
  .info-card { padding: 24px; gap: 16px; }
  .info-card .icon-88 { width: 64px; height: 64px; border-radius: 18px; }
  .form-card { padding: 32px 28px; }
  .cselect__list li { padding-block: 12px; } /* 46px touch rows */
}
/* Phone (≤ 767): one field per row, stacked info cards (icon beside text), full-width submit */
@media (max-width: 767px) {
  .page-hero__copy { gap: 20px; }
  .page-hero.fig-hero--simple .page-hero__copy { padding: 0 0 4px; } /* artwork sits above (shared phone hero) */

  .contact { padding: 64px 0; }
  .contact__info { grid-template-columns: 1fr; gap: 12px; }
  .info-card { flex-direction: row; gap: 16px; padding: 20px; }
  .info-card .icon-88 { width: 56px; height: 56px; border-radius: 16px; }
  .info-card .title-sm { font-size: 18px; }
  .info-card__text { gap: 6px; }

  .form-card { gap: 20px; padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .choice__opts { flex-direction: column; }
  .radio { min-height: 44px; padding-block: 8px; }
  .form-actions { align-self: stretch; flex-direction: column; align-items: stretch; gap: 12px; }
  .form-submit { width: 100%; }
}
