/* Stile allineato alla landing marscompliance.com (palette mars-*, Cormorant Garamond + IBM Plex Sans) */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/cormorant-garamond-normal-var-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/cormorant-garamond-normal-var-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/ibm-plex-sans-normal-var-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/ibm-plex-sans-normal-var-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F6F3EC;
  --surface: #FBF9F4;
  --surface-2: #EEE8DD;
  --text: #132017;
  --muted: #5B675F;
  --line: rgba(19, 32, 23, 0.12);
  --line-strong: rgba(19, 32, 23, 0.22);
  --primary: #123B2E;
  --primary-2: #1E5A43;
  --accent: #A6D96A;
  --accent-soft: rgba(166, 217, 106, 0.18);
  --error: #A3261E;
  --error-soft: #FBEDEA;
  --radius: 12px;
  --shadow-soft: 0 4px 24px rgba(19, 32, 23, 0.08);
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
}
::selection { background: var(--accent-soft); color: var(--primary); }
a { color: var(--primary); }

/* forme decorative sottili, come nella landing */
.deco {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, rgba(166, 217, 106, 0.22), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(166, 217, 106, 0.10), transparent 70%);
}
.deco::before, .deco::after { content: ""; position: absolute; border: 1px solid var(--line); }
.deco::before { width: 180px; height: 180px; top: 70px; right: 6%; transform: rotate(45deg); }
.deco::after { width: 120px; height: 120px; bottom: 12%; left: 4%; transform: rotate(12deg); }
@media (max-width: 720px) { .deco::before, .deco::after { display: none; } }

/* ------------------------------------------------------------ header */
.site-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1080px; width: 100%; margin: 0 auto; padding: 24px 20px;
}
.site-header img { height: 44px; width: auto; display: block; }
.pill-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 9999px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  color: var(--primary); border: 1px solid var(--line-strong); background: rgba(251, 249, 244, 0.7);
}
.pill-link:hover { background: var(--surface); }
@media (max-width: 420px) { .pill-link { display: none; } }

/* ------------------------------------------------------------ layout */
main.wrap { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 20px 56px; }
.hero { text-align: center; margin: 0 0 34px; }
.hero-logo { display: block; width: 200px; height: auto; margin: 4px auto 22px; filter: drop-shadow(0 10px 24px rgba(19, 32, 23, 0.12)); }
@media (max-width: 560px) { .hero-logo { width: 150px; margin-bottom: 16px; } }
.eyebrow {
  margin: 0 0 12px; font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.hero h1 { margin: 0; font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.02; }
.hero h1 span { color: var(--primary); display: block; }
.hero p.sub { margin: 16px auto 0; max-width: 34rem; color: var(--muted); font-size: 1.08rem; }

.card {
  background: rgba(251, 249, 244, 0.95);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  padding: 36px 36px 32px;
}
@media (max-width: 560px) { .card { padding: 26px 18px 24px; border-radius: 20px; } }

/* gruppi del modulo */
.group { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
.group-title {
  display: flex; align-items: center; gap: 12px; padding: 0; margin: 0 0 16px;
  font-family: var(--display); font-size: 1.55rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text);
}
.group-title .num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 50%; background: var(--accent-soft); border: 1px solid rgba(166, 217, 106, 0.55);
  font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--primary);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; min-width: 0; }

label { display: block; font-weight: 500; font-size: 0.95rem; margin-bottom: 6px; color: var(--text); }
.req { color: var(--error); }
.opt { color: var(--muted); font-weight: 400; }
.help { color: var(--muted); font-size: 0.88rem; margin: 6px 0 0; }
.scelto {
  margin: 8px 0 0; padding: 8px 12px; border-radius: 10px;
  background: var(--accent-soft); color: var(--primary); font-weight: 500; font-size: 0.92rem;
}

input[type=text], input[type=email], input[type=tel], select {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: inherit; color: var(--text);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
select {
  padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23123B2E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input::placeholder { color: #8A948D; }
input:focus, select:focus {
  outline: 2px solid var(--primary); outline-offset: 1px;
  border-color: var(--primary); box-shadow: 0 0 0 5px var(--accent-soft);
}
#codice_fiscale { text-transform: uppercase; letter-spacing: 0.06em; }
.invalid input, .invalid select { border-color: var(--error); background-color: var(--error-soft); }
.err { color: var(--error); font-size: 0.88rem; margin: 5px 0 0; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------ pulsanti a pillola */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 14px 28px;
  font: 600 1.02rem/1.2 var(--body); color: #fff; text-decoration: none;
  background: var(--primary); border: 0; border-radius: 9999px; cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--primary-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible, .btn-ghost:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn .arrow { font-size: 1.15em; line-height: 1; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 22px; border-radius: 9999px;
  font: 500 0.95rem/1.2 var(--body); color: var(--text); text-decoration: none;
  background: rgba(251, 249, 244, 0.8); border: 1px solid var(--line-strong); cursor: pointer;
}
.btn-ghost:hover { background: var(--surface-2); }

.form-msg { color: var(--error); font-weight: 500; margin: 0 0 14px; }
.form-msg:empty { display: none; }
.privacy-ok { margin: 14px 0 0; color: var(--muted); font-size: 0.88rem; text-align: center; }
.privacy-ok button { font: inherit; color: var(--primary); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.note { color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; text-align: center; }

/* ------------------------------------------------------------ conferma */
.done { text-align: center; padding-block: 44px; }
.done:focus { outline: none; }
.tick {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid rgba(166, 217, 106, 0.6);
  color: var(--primary); font-size: 30px; font-weight: 700;
}
.done h2 { font-size: 2.4rem; margin: 0 0 8px; line-height: 1.1; }
.done p { color: var(--muted); max-width: 30rem; margin: 8px auto 0; }
.done p strong { color: var(--text); }

/* ------------------------------------------------------------ banner privacy */
.gate {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(19, 32, 23, 0.38);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.gate-box {
  position: relative; width: 100%; max-width: 620px; max-height: calc(100vh - 40px); overflow: auto;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 32px;
  box-shadow: 0 24px 80px rgba(19, 32, 23, 0.28);
  padding: 34px 34px 28px;
}
@media (max-width: 560px) { .gate { padding: 10px; align-items: flex-end; } .gate-box { padding: 26px 20px 22px; border-radius: 26px; max-height: calc(100vh - 20px); } }
.gate-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.gate-icon {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid rgba(166, 217, 106, 0.55); color: var(--primary);
}
.gate h2 { margin: 0; font-size: 2rem; line-height: 1.1; }
.gate .lead { color: var(--muted); margin: 6px 0 16px; }
.gate details { border: 1px solid var(--line); border-radius: 16px; background: #fff; margin-bottom: 18px; }
.gate summary {
  cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 500; color: var(--primary);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.gate summary::-webkit-details-marker { display: none; }
.gate summary::after { content: "+"; font-size: 1.3rem; line-height: 1; }
.gate details[open] summary::after { content: "–"; }
.informativa { padding: 0 16px 14px; font-size: 0.9rem; color: var(--muted); }
.informativa h3 { font-family: var(--body); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); margin: 14px 0 4px; font-weight: 600; }
.informativa p, .informativa ul { margin: 0 0 6px; }
.informativa ul { padding-left: 18px; }
.gate-actions { display: grid; gap: 10px; }
.gate-actions .row-2 { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.gate-msg { color: var(--error); font-weight: 500; text-align: center; margin: 12px 0 0; }
.gate-msg:empty { display: none; }
body.gate-open { overflow: hidden; }

/* ------------------------------------------------------------ footer */
.site-footer {
  position: relative; z-index: 1;
  background: var(--primary); color: #FBF9F4;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  font-size: 0.88rem;
}
.site-footer .inner { max-width: 1080px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
.site-footer strong { font-family: var(--display); font-size: 1.25rem; font-weight: 600; letter-spacing: 0; }
.site-footer a { color: #FBF9F4; text-underline-offset: 3px; }
.site-footer .muted { color: rgba(251, 249, 244, 0.72); }

/* ------------------------------------------------------------ area riservata */
.corsi { list-style: none; padding: 0; margin: 0 0 22px; }
.corsi li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.corsi .count { font-size: 1.3rem; font-weight: 600; min-width: 2ch; text-align: right; color: var(--primary); font-variant-numeric: lining-nums tabular-nums; }
.btn-sec {
  display: inline-block; padding: 8px 16px; border-radius: 9999px; text-decoration: none; text-align: center;
  font-size: 0.88rem; font-weight: 500; color: var(--primary); border: 1px solid var(--line-strong); background: #fff;
}
.btn-sec:hover { background: var(--accent-soft); }
.admin .note { text-align: left; }
@media (max-width: 560px) {
  .corsi li { grid-template-columns: 1fr auto; }
  .corsi .btn-sec { grid-column: 1 / -1; }
}
