/* ============================================================
   CONTACT PAGE · Officine Allegra
   Page-specific styles · loaded after styles.css
   ============================================================ */

/* ---------- nav state ---------- */
.nav-link.is-current {
  color: var(--orange);
}
.nav-link.is-current::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--orange);
  margin-top: 4px;
}

/* ============== HERO ============== */
.contact-hero {
  padding: 96px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.contact-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: end;
}
.contact-hero h1 {
  font-family: 'Anton', sans-serif;
  font-size: var(--h1);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-top: 24px;
}
.contact-hero h1 .it {
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--orange);
}
.contact-hero-right .lead {
  font-family: 'Archer', Georgia, serif;
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink-2);
  font-weight: 300;
}
.contact-hero-quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 32px;
  border: 1px solid var(--black);
  background: var(--white);
}
.quick-link {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--rule);
  transition: background 0.2s;
}
.quick-link:last-child { border-right: none; }
.quick-link:hover { background: var(--ivory-2); }
.quick-link .ix {
  font-family: 'Archer', Georgia, serif;
  font-size: 18px;
  color: var(--orange);
  margin-bottom: 4px;
}
.quick-link .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 500;
}
.quick-link .val {
  font-family: 'Archivo', sans-serif;
  font-size: 14px;
  color: var(--black);
  font-weight: 500;
}

/* ============== MAIN GRID ============== */
.contact-main {
  padding: 96px 0;
}
.contact-main-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 72px;
  align-items: start;
}

/* ---------- atelier (left) ---------- */
.atelier .num-block { margin-bottom: 24px; }
.atelier-card {
  position: relative;
  padding: 36px 32px;
  background: var(--ivory-2);
}
.atelier-tag {
  display: inline-block;
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--orange);
  margin-bottom: 16px;
}
.atelier-card h3 {
  font-family: 'Anton', sans-serif;
  font-size: 32px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin-bottom: 32px;
}
.atelier-card h3 .it {
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  font-size: 28px;
}
.atelier-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.atelier-row:last-child { padding-bottom: 0; }
.atelier-row .ix {
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  color: var(--orange);
  font-size: 16px;
  padding-top: 2px;
}
.atelier-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.atelier-row p,
.atelier-row address {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  font-style: normal;
}
.atelier-action {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--black);
  border-bottom: 1px solid var(--orange);
  padding-bottom: 2px;
}
.atelier-action:hover { color: var(--orange); }
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6ea357;
  display: inline-block;
}
.status-text {
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: #6ea357;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.atelier-hours {
  list-style: none;
  font-size: 14px;
}
.atelier-hours li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dotted var(--rule);
}
.atelier-hours li:last-child { border-bottom: none; }
.atelier-note {
  margin-top: 10px;
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
}
.atelier-contacts {
  list-style: none;
  font-size: 14px;
}
.atelier-contacts li {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  border-bottom: 1px dotted var(--rule);
}
.atelier-contacts li:last-child { border-bottom: none; }
.atelier-contacts li span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.atelier-contacts a {
  color: var(--black);
  font-family: 'Archivo', sans-serif;
}
.atelier-contacts a:hover { color: var(--orange); }
.atelier-social {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.atelier-social a {
  font-size: 14px;
  color: var(--black);
  font-weight: 500;
}
.atelier-social a:hover { color: var(--orange); }

/* ---------- form (right) ---------- */
.contact-form-wrap .num-block { margin-bottom: 24px; }
.contact-form {
  background: var(--white);
  border: 1px solid var(--black);
  padding: 40px;
  position: relative;
}
.form-intro {
  font-family: 'Archer', Georgia, serif;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.form-intro em {
  font-style: italic;
  color: var(--ink-2);
}
.req-mark {
  color: var(--orange);
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
}
.opt {
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.field {
  display: block;
  margin-bottom: 20px;
}
.field-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  background: var(--ivory);
  font-family: 'Archivo', sans-serif;
  font-size: 15px;
  color: var(--black);
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  font-family: 'Archer', Georgia, serif;
  font-size: 16px;
  line-height: 1.5;
}
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
                    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--orange);
  background: var(--white);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted-2);
  font-style: italic;
}
.field-error {
  display: none;
  margin-top: 6px;
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--orange);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--orange);
  background: var(--orange-soft);
}
.field.has-error .field-error {
  display: block;
}
.field-file input[type="file"] {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px dashed var(--rule);
  background: var(--ivory);
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  cursor: pointer;
}
.field-hint {
  display: block;
  margin-top: 6px;
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
}
.field-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  margin: 24px 0;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  cursor: pointer;
}
.field-check input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--orange);
}
.field-check a {
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.field-check a:hover { color: var(--orange); }

.form-actions {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-submit {
  position: relative;
  cursor: pointer;
  border: none;
  align-self: flex-start;
}
.form-submit .lbl-loading {
  display: none;
  align-items: center;
  gap: 8px;
}
.form-submit.is-loading .lbl-idle { display: none; }
.form-submit.is-loading .lbl-loading { display: inline-flex; }
.form-submit .dots {
  display: inline-flex;
  gap: 3px;
}
.form-submit .dots i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ivory);
  animation: dot 1.2s infinite ease-in-out both;
}
.form-submit .dots i:nth-child(2) { animation-delay: 0.15s; }
.form-submit .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot {
  0%, 80%, 100% { opacity: 0.2; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
.form-privacy {
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
}
/* anti-spam honeypot — kept out of view & out of the tab order */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  display: none;
  margin-top: 14px;
  padding: 14px 18px;
  background: #fdecec;
  border: 1px solid #e05a4b;
  color: #b23325;
  font-family: 'Archer', Georgia, serif;
  font-size: 14px;
  line-height: 1.5;
}
.form-error.is-visible { display: block; }

.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
  background: var(--orange-soft);
  border: 1px solid var(--orange);
  margin-top: 8px;
}
.form-success.is-visible { display: flex; }
.form-success .ix {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.form-success h4 {
  font-family: 'Anton', sans-serif;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.form-success p {
  font-family: 'Archer', Georgia, serif;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 400px;
}
.form-success a {
  color: var(--black);
  border-bottom: 1px solid var(--orange);
}
.contact-form.is-submitted .form-intro,
.contact-form.is-submitted .field,
.contact-form.is-submitted .field-row,
.contact-form.is-submitted .field-check,
.contact-form.is-submitted .form-actions {
  display: none;
}

/* ============== MAP ============== */
.map-section {
  padding: 96px 0;
}
.map-head { margin-bottom: 48px; max-width: 720px; }
.map-head h2 {
  font-family: 'Anton', sans-serif;
  font-size: var(--h2);
  line-height: 1;
  text-transform: uppercase;
  margin: 12px 0 16px;
}
.map-head h2 .it {
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  color: var(--orange);
}
.map-head p {
  font-family: 'Archer', Georgia, serif;
  font-size: 18px;
  color: var(--ink-2);
}
.map-frame {
  position: relative;
  aspect-ratio: 16 / 8;
  width: 100%;
  background: var(--ivory-2);
  overflow: hidden;
}
.map-frame iframe,
.map-frame .leaflet-container-oa {
  width: 100%; height: 100%;
  border: 0;
}
.map-frame .leaflet-container-oa { background: var(--ivory-2); }
.map-frame .ch-tl, .map-frame .ch-tr,
.map-frame .ch-bl, .map-frame .ch-br {
  z-index: 800;
  pointer-events: none;
}

.map-cta h4 .it {
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  color: var(--orange);
}

/* ---------- legend ---------- */
.map-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 700;
  background: var(--ivory);
  border: 1px solid var(--black);
  padding: 10px 14px;
  display: flex;
  gap: 18px;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  pointer-events: none;
}
.map-frame:has(.map-placeholder) .map-legend { display: none; }
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}
.legend-item .pin-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-item .pin-dot--workshop {
  background: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}
.legend-item .pin-dot--market {
  width: 8px; height: 8px;
  background: var(--ink-2);
}

/* ---------- Leaflet markers (custom) ---------- */
.oa-pin {
  position: relative;
  display: block;
}
.oa-pin .pin-dot {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--ink-2);
  display: block;
}
.oa-pin--market .pin-dot {
  width: 8px; height: 8px;
  background: var(--ink-2);
  box-shadow: 0 0 0 1.5px var(--ivory);
}
.oa-pin--workshop .pin-dot {
  width: 10px; height: 10px;
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--ivory);
  z-index: 2;
}
.oa-pin--workshop .pin-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.25;
  animation: oa-pulse 2.4s ease-out infinite;
}
@keyframes oa-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0.45; }
  70%  { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

/* ---------- Leaflet popup (override default styles) ---------- */
.leaflet-container-oa .leaflet-popup-content-wrapper {
  background: var(--ivory);
  border: 1px solid var(--black);
  border-radius: 0;
  box-shadow: 4px 4px 0 var(--ink-2);
  padding: 0;
}
.leaflet-container-oa .leaflet-popup-content {
  margin: 0;
  padding: 14px 18px;
  font-family: 'Archivo', sans-serif;
  min-width: 180px;
}
.leaflet-container-oa .leaflet-popup-tip {
  background: var(--ivory);
  border: 1px solid var(--black);
}
.oa-popup .oa-popup-eyebrow {
  display: block;
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: var(--orange);
  margin-bottom: 4px;
}
.oa-popup h5 {
  font-family: 'Anton', sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.05;
  margin-bottom: 4px;
  color: var(--black);
}
.oa-popup .oa-popup-country {
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  font-size: 14px;
  color: var(--muted);
}
.oa-popup p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

/* ---------- Leaflet zoom + attribution skin ---------- */
.leaflet-container-oa .leaflet-control-zoom a {
  background: var(--ivory);
  color: var(--black);
  border: 1px solid var(--black);
  font-family: 'Archer', Georgia, serif;
}
.leaflet-container-oa .leaflet-control-zoom a:hover {
  background: var(--orange);
  color: var(--ivory);
}
.leaflet-container-oa .leaflet-control-attribution {
  background: rgba(246,246,238,0.85);
  font-family: 'Archivo', sans-serif;
  font-size: 10px;
  color: var(--muted);
}
.leaflet-container-oa .leaflet-control-attribution a {
  color: var(--ink-2);
}
.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, var(--ivory-2) 0, var(--ivory-2) 10px, var(--ivory-3) 10px, var(--ivory-3) 20px);
  cursor: pointer;
  transition: opacity 0.3s;
}
.map-cta {
  text-align: center;
  background: var(--ivory);
  padding: 32px 40px;
  border: 1px solid var(--black);
  max-width: 440px;
}
.map-eyebrow {
  display: block;
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  color: var(--orange);
  font-size: 13px;
  margin-bottom: 8px;
}
.map-cta h4 {
  font-family: 'Anton', sans-serif;
  font-size: 22px;
  text-transform: uppercase;
  margin-bottom: 16px;
  line-height: 1.1;
}
.map-cta button { cursor: pointer; }
.map-note {
  margin-top: 14px;
  font-family: 'Archer', Georgia, serif;
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
  .contact-main-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
}
@media (max-width: 768px) {
  .contact-hero { padding: 64px 0 40px; }
  .contact-hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .contact-hero-quick {
    grid-template-columns: 1fr;
  }
  .quick-link {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .quick-link:last-child { border-bottom: none; }
  .contact-main { padding: 64px 0; }
  .contact-form { padding: 28px 22px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .map-section { padding: 64px 0; }
  .map-frame { aspect-ratio: 4 / 3; }
  .map-legend {
    bottom: 12px; left: 12px;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px;
    font-size: 10px;
  }
}

/* =================================================================
   TITLE SPACING — match homepage main style
   ================================================================= */
.contact-hero h1 { line-height: 1.06; }
.map-head h2 { line-height: 1.04; }
.atelier-card h3 { line-height: 1.02; }

.contact-hero h1 .it,
.atelier-card h3 .it,
.map-head h2 .it,
.map-cta h4 .it {
  line-height: 0.9;
  display: inline-block;
}
