/* ============================================================
   Artwork Contact Form — form.css v1.3
   Design: Apple-inspired system UI — Graphik/system font
   ============================================================ */

/* ---- Variables — Light ---- */
.acf-wrap {
  --acf-serif:       'Graphik', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --acf-mono:        'Graphik', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;

  --acf-ink:         #1d1d1f;
  --acf-muted:       #6e6e73;
  --acf-hint:        #a1a1a6;
  --acf-border:      #d2d2d7;
  --acf-border-hi:   #a1a1a6;
  --acf-bg:          transparent;
  --acf-bg-card:     #ffffff;
  --acf-bg-hover:    #f5f5f7;
  --acf-bg-selected: #f0f0f5;

  --acf-btn-primary-bg:   #121212;
  --acf-btn-primary-fg:   #ffffff;
  --acf-btn-secondary-bg: #ffffff;
  --acf-btn-secondary-fg: #2A2A2A;
  --acf-btn-secondary-bd: #d2d2d7;

  --acf-radius-btn:   50px;
  --acf-radius-field: 5px;
  --acf-radius-opt:   12px;
  --acf-radius-hero:  14px;

  --acf-ease: cubic-bezier(.4,0,.2,1);
}

/* ---- Base ---- */
.acf-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 0 5rem;
  font-family: var(--acf-serif);
  color: var(--acf-ink);
  background: var(--acf-bg);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* ---- Screen transitions — fade fluido ---- */
.acf-screen {
  display: none;
  opacity: 0;
}
.acf-screen.active {
  display: block;
  animation: acf-fade .42s var(--acf-ease) both;
}
.acf-screen.acf-out {
  animation: acf-fade-out .2s var(--acf-ease) both;
}
@keyframes acf-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes acf-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}

/* ============================================================
   LOADING OVERLAY — appare durante l'invio
============================================================ */
.acf-loading-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 8px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.acf-loading-overlay.visible {
  display: flex;
  animation: acf-fade .2s var(--acf-ease) both;
}

.acf-loading-spinner {
  width: 36px; height: 36px;
  border: 2.5px solid rgba(29,29,31,.12);
  border-top-color: #121212;
  border-radius: 50%;
  animation: acf-spin .7s linear infinite;
}

.acf-loading-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--acf-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ============================================================
   HERO
============================================================ */
.acf-hero-title {
  font-size: clamp(27px, 5vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--acf-ink);
  margin: 0 0 12px;
}

.acf-hero-sub {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--acf-muted);
  margin: 0 0 32px;
  max-width: 440px;
}

/* Hero CTA — card buttons affiancate */
.acf-hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.acf-hero-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px 18px 16px;
  border-radius: var(--acf-radius-hero);
  border: 0.5px solid var(--acf-border);
  background: var(--acf-bg-card);
  cursor: pointer;
  text-align: left;
  gap: 3px;
  transition:
    border-color .18s var(--acf-ease),
    box-shadow .18s var(--acf-ease),
    transform .18s var(--acf-ease);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.acf-hero-btn:hover {
  border-color: var(--acf-border-hi);
  box-shadow: 0 4px 16px rgba(0,0,0,.09);
  transform: translateY(-2px);
}
.acf-hero-btn:active { transform: scale(.97); box-shadow: none; }
.acf-hero-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(29,29,31,.2);
  border-color: var(--acf-ink);
}
.acf-hero-btn--primary {
  background: var(--acf-bg-card);
  border-color: var(--acf-border);
  border-width: 0.5px;
}
.acf-hero-btn--primary:hover {
  background: var(--acf-bg-hover);
  border-color: var(--acf-ink);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.acf-hero-btn-label {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--acf-ink);
  line-height: 1.3;
}

.acf-hero-btn-desc {
  font-size: 10.5px;
  color: var(--acf-hint);
  line-height: 1.45;
  letter-spacing: .01em;
}

/* Telefono */
.acf-hero-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--acf-hint);
  letter-spacing: .03em;
  margin: 0;
}
.acf-hero-phone::before {
  content: '';
  display: block;
  width: 18px; height: 1px;
  background: var(--acf-border);
  flex-shrink: 0;
}
.acf-phone-link {
  color: var(--acf-muted);
  text-decoration: none;
  transition: color .15s;
}
.acf-phone-link:hover { color: var(--acf-ink); }

/* ============================================================
   PROGRESS BAR — linea che si riempie
============================================================ */
.acf-progress-bar {
  position: relative;
  width: 100%;
  height: 3px;
  background: var(--acf-border);
  border-radius: 3px;
  margin-bottom: 36px;
  overflow: hidden;
}

.acf-progress-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--acf-ink);
  border-radius: 3px;
  transition: width .45s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   TYPOGRAPHY — h3 titoli step
============================================================ */
h3.testo_medio,
h3.testo_ridotto {
  font-family: var(--acf-serif);
  font-size: clamp(19px, 2.8vw, 24px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.025em;
  color: var(--acf-ink);
  margin: 0 0 6px;
  font-style: normal;
}

.acf-micro {
  font-size: 11px;
  color: var(--acf-hint);
  letter-spacing: .02em;
  margin: 0 0 22px;
  min-height: 16px;
}

/* ============================================================
   OPTIONS
============================================================ */
.acf-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }

.acf-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 0.5px solid var(--acf-border);
  border-radius: var(--acf-radius-opt);
  cursor: pointer;
  font-family: var(--acf-serif);
  font-size: 14px;
  font-weight: 400;
  color: var(--acf-ink);
  background: var(--acf-bg-card);
  text-align: left;
  line-height: 1.4;
  transition:
    border-color .15s var(--acf-ease),
    background .15s var(--acf-ease),
    box-shadow .15s var(--acf-ease);
  -webkit-tap-highlight-color: transparent;
}
.acf-opt:hover {
  border-color: var(--acf-border-hi);
  background: var(--acf-bg-hover);
}
.acf-opt.selected {
  border-color: var(--acf-ink);
  background: var(--acf-bg-selected);
  box-shadow: inset 0 0 0 .5px var(--acf-ink);
}
.acf-opt:active { transform: scale(.99); }

.acf-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 0.5px solid var(--acf-border);
  flex-shrink: 0;
  position: relative;
  transition: border-color .15s;
}
.acf-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: transparent;
  transition: background .15s;
}
.acf-opt.selected .acf-dot         { border-color: var(--acf-ink); }
.acf-opt.selected .acf-dot::after  { background: var(--acf-ink); }
.acf-opts--multi .acf-dot,
.acf-opts--multi .acf-dot::after   { border-radius: 4px; }

/* ============================================================
   FIELDS
============================================================ */
.acf-field { margin-bottom: 12px; }

/* Label sr-only — visibile agli screen reader, nascosta visivamente */
.acf-field label {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Eccezione: label privacy rimane visibile */
.acf-privacy label {
  position: static;
  width: auto; height: auto;
  padding: 0; margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.acf-field input[type="text"],
.acf-field input[type="email"],
.acf-field input[type="tel"],
.acf-field select,
.acf-field textarea {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--acf-serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--acf-ink);
  background: var(--acf-bg-card);
  border: 0.5px solid #cccccc;
  border-radius: 4px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
  min-height: 50px;
  margin-top: 0;
}
.acf-field input:focus,
.acf-field select:focus,
.acf-field textarea:focus {
  border-color: var(--acf-ink);
  box-shadow: 0 0 0 3px rgba(29,29,31,.08);
}
.acf-field input::placeholder,
.acf-field textarea::placeholder { color: var(--acf-hint); }
.acf-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
  cursor: pointer;
}
.acf-field select option { color: #1d1d1f; background: #fff; }
.acf-field textarea { resize: vertical; line-height: 1.6; min-height: 118px; }

/* ============================================================
   PRIVACY
============================================================ */
.acf-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 20px;
}
.acf-privacy input[type="checkbox"] {
  width: 17px; height: 17px;
  margin-top: 2px; flex-shrink: 0;
  cursor: pointer; accent-color: var(--acf-ink);
}
.acf-privacy label {
  font-size: 12px;
  color: var(--acf-muted); line-height: 1.65; cursor: pointer;
}
.acf-privacy a { color: var(--acf-ink); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   NAVIGATION — Indietro a sinistra, Avanti a destra
============================================================ */
.acf-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.acf-btn {
  font-family: 'Graphik', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: .07em;
  padding: 20px 30px;
  border-radius: var(--acf-radius-btn);
  border: 1.5px solid var(--acf-btn-secondary-bd);
  cursor: pointer;
  background: var(--acf-btn-secondary-bg);
  color: var(--acf-btn-secondary-fg);
  transition: background .2s, border-color .2s, box-shadow .2s, transform .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  outline: none;
}
.acf-btn:hover {
  background: var(--acf-bg-hover);
  border-color: var(--acf-border-hi);
  transform: translateY(-2px);
}
.acf-btn:active { transform: scale(.97); }
.acf-btn:focus-visible { box-shadow: 0 0 0 3px rgba(29,29,31,.18); }

.acf-btn--primary {
  background: #121212;
  color: #ffffff;
  border-color: #121212;
  border-radius: 50px;
}
.acf-btn--primary:hover {
  background: #242424;
  border-color: #242424;
  opacity: .75;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.acf-btn--primary:active {
  transform: scale(.97);
  opacity: 1;
}
.acf-btn:disabled,
.acf-btn--primary:disabled {
  opacity: .28; cursor: not-allowed; pointer-events: none; transform: none;
}

/* Indietro — testo puro a sinistra */
.acf-btn--back {
  font-family: var(--acf-serif);
  font-size: 14px;
  font-weight: 400;
  color: var(--acf-hint);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
  order: -1;
}
.acf-btn--back:hover { color: var(--acf-muted); }

/* ============================================================
   SAVED MESSAGE
============================================================ */
.acf-saved-msg {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: #34c759; letter-spacing: .02em;
  opacity: 0; transition: opacity .4s ease;
  margin: 10px 0 0;
}
.acf-saved-msg::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%; background: #34c759; flex-shrink: 0;
}
.acf-saved-msg.visible { opacity: 1; }

/* ============================================================
   LOADING SPINNER (bottone)
============================================================ */
.acf-btn--loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
  opacity: 1 !important;
}
.acf-btn--loading::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: acf-spin .65s linear infinite;
}
@keyframes acf-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ============================================================
   THANKS
============================================================ */
.acf-thanks      { text-align: center; padding: 4rem 1rem; }
.acf-thanks-mark {
  font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--acf-hint); margin-bottom: 24px;
}
.acf-thanks-title {
  font-size: clamp(24px,4vw,32px); font-weight: 700;
  line-height: 1.15; letter-spacing: -.03em;
  margin: 0 0 14px; color: var(--acf-ink);
}
.acf-thanks-body {
  font-size: 15px; font-weight: 400; line-height: 1.75;
  color: var(--acf-muted); max-width: 400px; margin: 0 auto;
}

/* ============================================================
   TURNSTILE
============================================================ */
.acf-turnstile-wrap {
  margin: 12px 0 4px;
  min-height: 65px;
}

/* ============================================================
   FORM CLASSICO — [artwork_contact_form_classic]
============================================================ */
.acf-classic-wrap {
  max-width: 100vw;
  margin: 0 auto;
  padding: 2rem 0 4rem;
  font-family: var(--acf-serif);
  color: var(--acf-ink);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

.acf-classic-wrap .acf-field { margin-bottom: 10px; }

.acf-classic-submit {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.acf-classic-msg {
  font-size: 13px;
  color: var(--acf-muted);
  opacity: 0;
  transition: opacity .3s;
}
.acf-classic-msg.visible { opacity: 1; }
.acf-classic-msg.error   { color: #121212; }
.acf-classic-msg.success { color: #121212; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 600px) {
  .acf-wrap { padding: 2rem 20px 4rem; }
  .acf-hero-actions { grid-template-columns: 1fr; }
  .acf-hero-btn { flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; }
}
