/* ==========================================================================
   HAZON TECH — project form & contact map overlays
   Builds on css/style.css tokens (--orange, --text, --line, --f-display, --ease-out, .btn…).
   ========================================================================== */

.hz-lock { overflow: hidden; }

/* ---------- Modal shell ---------- */

.hz-modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: max(16px, var(--safe-top)) 16px max(16px, var(--safe-bottom));
}
.hz-modal[hidden] { display: none; }

.hz-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 4, 10, .62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .5s var(--ease-out);
}
.hz-modal.is-open .hz-modal__backdrop { opacity: 1; }

.hz-modal__panel {
  position: relative;
  display: flex; flex-direction: column;
  width: min(640px, 100%);
  max-height: min(calc(var(--vvh, 100dvh) - 32px), 900px);
  border-radius: 26px;
  border: 1px solid transparent;
  background:
    linear-gradient(160deg, rgba(241, 244, 248, .09), rgba(241, 244, 248, 0) 40%, rgba(241, 244, 248, .04)) padding-box,
    linear-gradient(rgba(7, 12, 24, .74), rgba(7, 12, 24, .74)) padding-box,
    conic-gradient(from 210deg, rgba(130, 175, 255, .5), rgba(243, 141, 44, .32), rgba(196, 150, 255, .3), rgba(96, 222, 230, .3), rgba(130, 175, 255, .5)) border-box;
  -webkit-backdrop-filter: blur(22px) saturate(1.25); backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .85);
  overflow: hidden;
  outline: none;
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(.98);
  transition: opacity .6s var(--ease-out), transform .8s var(--ease-out);
}
.hz-modal.is-open .hz-modal__panel { opacity: 1; transform: none; }
.hz-modal__panel::before { /* faint holographic sheen */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(90% 60% at 0% 0%, rgba(130, 175, 255, .10), transparent 60%),
    radial-gradient(70% 50% at 100% 100%, rgba(243, 141, 44, .07), transparent 60%);
}

.hz-modal__body {
  position: relative;
  flex: 1; min-height: 0;
  overflow: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 44px 40px 34px;
  scrollbar-width: thin; scrollbar-color: rgba(241, 244, 248, .2) transparent;
}

.hz-modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 1100;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: rgba(2, 4, 10, .45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color .3s, background .3s, transform .5s var(--ease-out);
}
.hz-modal__close:hover { border-color: rgba(241, 244, 248, .6); transform: rotate(90deg); }
.hz-modal__close:active { transform: rotate(90deg) scale(.92); }

/* staggered entrance of anything tagged with --i */
.hz-modal [style*="--i"] {
  opacity: 0; transform: translate3d(0, 12px, 0);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(.12s + var(--i) * .045s);
}
.hz-modal.is-open [style*="--i"] { opacity: 1; transform: none; }

/* ---------- Shared type ---------- */

.hz-kicker { margin: 0 0 12px; font: 500 11px/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--orange); }
.hz-title {
  margin: 0;
  font: 700 clamp(28px, 7.6vw, 40px)/.98 var(--f-display); letter-spacing: -.025em; text-transform: uppercase;
}
.hz-title .ln { clip-path: inset(0 0 100% 0); transform: translateY(.5em); transition: clip-path 1s var(--ease-out), transform 1s var(--ease-out); }
.hz-title .ln:nth-child(2) { transition-delay: .08s; }
.hz-modal.is-open .hz-title .ln { clip-path: inset(0 0 -10% 0); transform: none; }
.hz-sub { max-width: 40ch; margin: 14px 0 0; font: 400 14.5px/1.5 var(--f-body); color: var(--text-dim); }

/* ---------- Form ---------- */

.hz-form { margin-top: 28px; }
.hz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hz-field { position: relative; grid-column: span 2; }
.hz-field--half { grid-column: span 1; }

.hz-field input, .hz-field textarea {
  display: block; width: 100%;
  padding: 24px 16px 9px;
  font: 400 16px/1.4 var(--f-body); /* 16px: no zoom-on-focus on iOS */
  color: var(--text);
  background: rgba(241, 244, 248, .035);
  border: 1px solid rgba(241, 244, 248, .12);
  border-radius: 14px;
  outline: none;
  -webkit-appearance: none; appearance: none;
  transition: border-color .25s, background-color .25s, box-shadow .3s;
}
.hz-field textarea { min-height: 168px; padding-top: 30px; resize: vertical; line-height: 1.55; }
.hz-field textarea::placeholder { color: var(--text-dim); opacity: 0; transition: opacity .3s; }
.hz-field:focus-within textarea::placeholder { opacity: .55; }
.hz-field input:-webkit-autofill { -webkit-text-fill-color: var(--text); transition: background-color 9999s; }

.hz-field label {
  position: absolute; left: 17px; top: 17px;
  font: 400 15px/1.2 var(--f-body); color: var(--text-dim);
  pointer-events: none; transform-origin: left top;
  transition: transform .25s var(--ease-out), color .25s;
}
.hz-field label small { font-size: 11px; letter-spacing: .04em; opacity: .7; margin-left: 4px; }
.hz-field:focus-within label,
.hz-field input:not(:placeholder-shown) + label, .hz-field.is-filled label {
  transform: translateY(-9px) scale(.76);
}
.hz-field:focus-within label { color: var(--orange); }

.hz-field input:hover, .hz-field textarea:hover { border-color: rgba(241, 244, 248, .22); }
.hz-field:focus-within input, .hz-field:focus-within textarea {
  border-color: rgba(243, 141, 44, .55);
  background-color: rgba(241, 244, 248, .055);
  box-shadow: 0 0 0 4px rgba(243, 141, 44, .07), 0 0 28px -8px rgba(243, 141, 44, .35);
}
.hz-field__line {
  position: absolute; left: 16px; right: 16px; top: calc(100% - 1px); height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), rgba(130, 175, 255, .9), transparent);
  transform: scaleX(0); transition: transform .55s var(--ease-out);
  pointer-events: none;
}
.hz-field--area .hz-field__line { top: auto; bottom: calc(100% - 1px); display: none; }
.hz-field:focus-within .hz-field__line { transform: scaleX(1); }

.hz-field.is-invalid input, .hz-field.is-invalid textarea { border-color: rgba(255, 120, 100, .6); }
.hz-field.is-invalid label { color: #ff9f8c; }
.hz-field__err { margin: 0; padding: 0 4px; font: 400 12.5px/1.4 var(--f-body); color: #ff9f8c; }
.hz-field__err:not(:empty) { margin-top: 6px; animation: hz-in .3s var(--ease-out); }

.hz-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.hz-form__error { margin: 16px 0 0; font: 400 13.5px/1.5 var(--f-body); color: #ff9f8c; }
.hz-form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.hz-note { max-width: 30ch; margin: 0; font: 400 12px/1.5 var(--f-body); color: rgba(241, 244, 248, .45); }

.hz-submit { position: relative; gap: 10px; min-width: 210px; font-weight: 500; }
.hz-submit:active { transform: scale(.98); }
.hz-submit:disabled { cursor: progress; }
.hz-submit__spin {
  display: none; width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(10, 31, 51, .9); border-right-color: transparent;
  animation: hz-spin .8s linear infinite;
}
.is-sending .hz-submit__spin { display: inline-block; }

/* ---------- Success ---------- */

.hz-success { text-align: center; padding: 34px 6px 10px; animation: hz-in .7s var(--ease-out) both; }
.hz-success__mark { position: relative; width: 76px; height: 76px; margin: 0 auto 22px; }
.hz-success__mark::before {
  content: ""; position: absolute; inset: -30px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(243, 141, 44, .22), rgba(130, 175, 255, .08) 60%, transparent 75%);
}
.hz-success__mark svg { position: relative; width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hz-success__mark circle { stroke: rgba(243, 141, 44, .9); stroke-width: 1.5; stroke-dasharray: 151; stroke-dashoffset: 151; animation: hz-draw .9s .15s var(--ease-out) forwards; }
.hz-success__mark path { stroke: var(--text); stroke-width: 2; stroke-dasharray: 36; stroke-dashoffset: 36; animation: hz-draw .5s .75s var(--ease-out) forwards; }
.hz-success__pulse {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(243, 141, 44, .6);
  opacity: 0; animation: hz-pulse 1.8s .8s var(--ease-out) 2;
}
.hz-success__msg {
  max-width: 22ch; margin: 0 auto 28px;
  font: 600 clamp(22px, 5.4vw, 28px)/1.22 var(--f-display); letter-spacing: -.01em;
  outline: none;
}

/* ---------- Map overlay ---------- */

.hz-modal--map .hz-modal__panel { width: min(1180px, 100%); height: min(calc(var(--vvh, 100dvh) - 32px), 760px); max-height: none; }
.hz-modal--map .hz-modal__body { padding: 0; overflow: hidden; }
/* the map covers the whole panel: skip blurs nobody would see (keeps the map smooth) */
.hz-modal--map .hz-modal__panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: #060a13; }
.hz-modal--map .hz-modal__backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(2, 4, 10, .78); }
.hz-modal--map .hz-modal__close { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 12, 24, .75); }

.hz-map {
  position: absolute; inset: 0;
  background: #060a13;
  opacity: 0; transform: scale(1.04);
  transition: opacity 1s var(--ease-out), transform 1.4s var(--ease-out);
}
.is-map-ready .hz-map { opacity: 1; transform: none; }
.hz-map.leaflet-container { background: #060a13; font-family: var(--f-body); outline-offset: -3px; }
/* monochrome, Hazon-blue tinted basemap; labels kept soft */
.hz-map .hz-map__base { filter: sepia(.45) hue-rotate(178deg) saturate(1.9) brightness(.84) contrast(1.12); }
.hz-map .hz-map__labels { opacity: .7; }

.hz-map__vignette {
  position: absolute; inset: 0; z-index: 450; pointer-events: none;
  background:
    radial-gradient(ellipse at 55% 45%, transparent 45%, rgba(2, 4, 10, .72) 100%),
    linear-gradient(to bottom, rgba(2, 4, 10, .45), transparent 22%);
}
.hz-map__status {
  position: absolute; inset: 0; z-index: 440;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  font: 500 10px/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--text-dim);
  transition: opacity .6s;
}
.hz-map__status span { width: 90px; height: 1px; background: linear-gradient(90deg, transparent, var(--orange), transparent); animation: hz-scan 1.4s ease-in-out infinite; }
.is-map-ready .hz-map__status { opacity: 0; }

/* Leaflet controls, restyled */
.hz-map .leaflet-control-zoom { border: 0; margin: 16px 0 0 16px; box-shadow: none; }
.hz-map .leaflet-control-zoom a {
  width: 40px; height: 40px; line-height: 38px; margin-bottom: 6px;
  border: 1px solid rgba(241, 244, 248, .14) !important; border-radius: 12px !important;
  background: rgba(7, 12, 24, .78); color: var(--text);
  font: 300 20px/38px var(--f-body);
  transition: background .3s, border-color .3s;
}
.hz-map .leaflet-control-zoom a:hover { background: rgba(241, 244, 248, .1); border-color: rgba(241, 244, 248, .4) !important; }
.hz-map .leaflet-control-attribution {
  background: rgba(2, 4, 10, .6); color: rgba(241, 244, 248, .5);
  font-size: 9.5px; padding: 2px 8px; border-radius: 8px 0 0 0;
}
.hz-map .leaflet-control-attribution a { color: rgba(241, 244, 248, .72); }

/* Marker */
.hz-marker { position: relative; }
.hz-marker__dot {
  position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(243, 141, 44, .25), 0 0 26px 8px rgba(243, 141, 44, .45);
}
.hz-marker__ring {
  position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid rgba(243, 141, 44, .75);
  animation: hz-ring 2.6s var(--ease-out) infinite;
}
.hz-marker__ring--2 { animation-delay: 1.3s; }
.hz-marker__label {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  font: 700 10px/1 var(--f-display); letter-spacing: .3em; padding-left: .3em;
  color: var(--text); text-shadow: 0 1px 10px rgba(0, 0, 0, .9);
  white-space: nowrap;
}
.is-map-ready .hz-marker__dot { animation: hz-pop .7s 1.1s var(--ease-out) both; }

/* Floating glass card */
.hz-card {
  position: absolute; left: 20px; bottom: 24px; z-index: 1000;
  width: min(340px, calc(100% - 40px));
  padding: 20px 22px 18px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(241, 244, 248, .08), rgba(241, 244, 248, .02)), rgba(7, 12, 24, .62);
  border: 1px solid rgba(241, 244, 248, .12);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
  opacity: 0; transform: translate3d(0, 16px, 0);
  transition: opacity .8s .45s var(--ease-out), transform .8s .45s var(--ease-out);
}
.hz-modal.is-open .hz-card { opacity: 1; transform: none; }
.hz-card .hz-kicker { margin-bottom: 10px; }
.hz-card__title { margin: 0; font: 700 24px/1 var(--f-display); letter-spacing: .14em; }
.hz-card__addr { margin: 10px 0 0; font: 400 13.5px/1.5 var(--f-body); font-style: normal; color: var(--text-dim); }
.hz-card__list { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.hz-card__list li { display: flex; justify-content: space-between; gap: 12px; font: 400 13px/1.4 var(--f-body); }
.hz-card__list li > span:first-child { font: 500 10px/1.9 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: rgba(241, 244, 248, .45); }
.hz-card__list a { color: var(--text); text-decoration: none; }
.hz-card__list a:hover { color: var(--orange); }
.hz-card__actions { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; }
.hz-card__link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  font: 500 13.5px/1 var(--f-body); color: var(--text); text-decoration: none;
}
.hz-card__link span { color: var(--orange); transition: transform .45s var(--ease-out); }
.hz-card__link:hover span { transform: translateX(3px); }

/* ---------- Keyframes ---------- */

@keyframes hz-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes hz-spin { to { transform: rotate(360deg); } }
@keyframes hz-draw { to { stroke-dashoffset: 0; } }
@keyframes hz-pulse { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes hz-ring { 0% { opacity: .85; transform: scale(1); } 100% { opacity: 0; transform: scale(4.2); } }
@keyframes hz-pop { 0% { transform: scale(0); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes hz-scan { 0%, 100% { transform: scaleX(.3); opacity: .4; } 50% { transform: scaleX(1); opacity: 1; } }

/* ---------- Mobile ---------- */

@media (max-width: 560px) {
  .hz-modal { padding: 8px; align-items: end; }
  .hz-modal__panel { border-radius: 22px; max-height: calc(var(--vvh, 100dvh) - 16px); transform: translate3d(0, 40px, 0); }
  .hz-modal__body { padding: 30px 20px calc(22px + var(--safe-bottom)); }
  .hz-grid { grid-template-columns: 1fr; }
  .hz-field--half { grid-column: span 2; }
  .hz-field textarea { min-height: 190px; }
  .hz-form__foot { flex-direction: column-reverse; align-items: stretch; }
  .hz-submit { width: 100%; }
  .hz-note { max-width: none; text-align: center; }
  .hz-head { padding-right: 44px; }

  .hz-modal--map .hz-modal__panel { height: calc(var(--vvh, 100dvh) - 16px); }
  .hz-card { left: 10px; right: 10px; width: auto; bottom: 26px; padding: 16px 18px 12px; }
  .hz-card__title { font-size: 20px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hz-modal__panel, .hz-modal__backdrop, .hz-map, .hz-card, .hz-modal [style*="--i"], .hz-title .ln { transition-duration: .01s !important; transition-delay: 0s !important; }
  .hz-modal__panel { transform: none; }
  .hz-marker__ring, .hz-success__pulse, .hz-map__status span { animation: none; }
  .hz-marker__ring { opacity: 0; }
  .hz-success__mark circle, .hz-success__mark path { animation-duration: .01s; animation-delay: 0s; }
  .is-map-ready .hz-marker__dot { animation: none; }
}
