/* Open Sans ospitato sul sito: nessuna richiesta a Google Fonts */
@font-face {
  font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/fonts/open-sans-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: "Open Sans"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/fonts/open-sans-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;
}

*, *::before, *::after { box-sizing: border-box; }

/* Colori presi dal sito WordPress attuale */
:root {
  --blue: #065f9d;       /* blu del logo */
  --navy: #112f47;       /* blu scuro */
  --sky: #2392bf;        /* azzurro */
  --text: #1d2a36;
  --muted: #5b6875;
  --line: #e2e8ef;
  --soft: #f3f7fb;
  --error: #c0392b;
}

html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }
img { max-width: 100%; height: auto; }

/* Una sola delle due viste è visibile */
#fattura { display: none; }
.mode-fattura #azienda { display: none; }
.mode-fattura #fattura { display: block; }

/* ---------- Pagina aziendale ---------- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo img { display: block; width: 190px; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--sky); }

.hero {
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(35, 146, 191, .45), transparent 45%),
    linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 88px 0 96px;
}
.eyebrow { margin: 0 0 14px; font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9fd3ea; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; line-height: 1.15; margin: 0 0 20px; max-width: 760px; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: #dbe9f4; margin: 0; max-width: 680px; }

.section { padding: 72px 0; }
.section-alt { background: var(--soft); }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 800; color: var(--navy); margin: 0 0 28px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  padding: 28px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--text); text-decoration: none;
  box-shadow: 0 2px 6px rgba(17, 47, 71, .05);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(17, 47, 71, .12); border-color: #c5d9ea; }
.card-tag {
  align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--blue); background: #e6f1f9; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.card-title { font-size: 1.35rem; color: var(--navy); margin-bottom: 8px; }
.card p { margin: 0 0 18px; color: var(--muted); flex: 1; }
.card-link { font-weight: 700; color: var(--blue); }

.contact { font-size: 1.1rem; margin: 0; }

.site-footer { background: var(--navy); color: #b8c9d8; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 36px; padding-bottom: 36px; }
.site-footer p { margin: 0; }
.site-footer strong { color: #fff; }
.site-footer a { color: #fff; }

@media (max-width: 560px) {
  .logo img { width: 150px; }
  .nav { gap: 14px; }
  .hero { padding: 64px 0 72px; }
  .section { padding: 56px 0; }
  .card { padding: 22px; }
}

/* ---------- Form fatturazione ---------- */
.mode-fattura body {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%) fixed;
  min-height: 100vh;
}
.form-header { text-align: center; padding: 28px 16px 20px; }
.form-header img {
  width: 220px; background: #fff; padding: 10px 16px; border-radius: 10px;
}

.form-wrap {
  max-width: 720px; margin: 0 auto 48px;
  background: #fff; border-radius: 16px;
  padding: 36px 40px 40px;
  box-shadow: 0 30px 40px rgba(0, 0, 0, .25);
}
@media (max-width: 760px) {
  .form-wrap { margin: 0 16px 32px; padding: 28px 20px 32px; }
}
.form-title { font-size: 1.6rem; font-weight: 800; color: var(--navy); margin: 0 0 6px; }
.form-intro { color: var(--muted); margin: 0 0 28px; }

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; color: var(--navy); font-weight: 600; font-size: .95rem; }
.req { color: #e05555; margin-left: 3px; }

.field input, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: 10px 14px; border: 1px solid #ccd6e0; border-radius: 8px; background: #fff;
  min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
.field input[readonly] { background: #eef2f6; color: var(--muted); }
.field input:focus, .field select:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(35, 146, 191, .2); }
.field.invalid input, .field.invalid select { border-color: var(--error); }
.field .msg { color: var(--error); font-size: .85rem; font-weight: 600; margin-top: 6px; }

.actions { text-align: center; margin-top: 12px; }
button[type="submit"] {
  font: inherit; font-size: 1.05rem; font-weight: 700; color: #fff; background: var(--blue);
  border: 0; border-radius: 10px; padding: 14px 34px; cursor: pointer;
  transition: background .15s;
}
button[type="submit"]:hover { background: var(--sky); }
button[type="submit"]:disabled { opacity: .6; cursor: wait; }

.alert { border-radius: 10px; padding: 16px 18px; margin: 16px 0; }
.alert p { margin: 0 0 10px; }
.alert p:last-child { margin: 0; }
.alert-error { background: #fdecea; color: #7a1f16; border: 1px solid #f5c2bc; }
.alert-success { background: #eaf6ee; color: #1f4d2f; border: 1px solid #b9dfc5; margin: 0; }

/* ---------- Chi siamo ---------- */
.hero-link { display: inline-block; margin-top: 28px; color: #fff; font-weight: 700; text-decoration: none; border-bottom: 2px solid rgba(255, 255, 255, .5); }
.hero-link:hover { border-color: #fff; }
.hero-small { padding: 64px 0 72px; }
.hero-small h1 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); }
.nav a[aria-current="page"] { color: var(--blue); }

.prose { max-width: 720px; }
.prose p { font-size: 1.08rem; margin: 0 0 16px; }
.eyebrow-dark { color: var(--sky); }

.founder { display: flex; gap: 40px; align-items: flex-start; }
.founder h2 { margin-bottom: 16px; }
.founder-mark {
  flex: none; width: 120px; height: 120px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 2.4rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--blue));
}
@media (max-width: 640px) {
  .founder { flex-direction: column; gap: 24px; }
  .founder-mark { width: 88px; height: 88px; font-size: 1.8rem; }
}

.cta { text-align: center; }
.cta h2 { margin-bottom: 20px; }
.button, .contact-box button[type="submit"] {
  display: inline-block; font: inherit; font-size: 1.05rem; font-weight: 700; color: #fff; background: var(--blue);
  border: 0; border-radius: 10px; padding: 14px 34px; cursor: pointer; text-decoration: none;
  transition: background .15s;
}
.button:hover, .contact-box button[type="submit"]:hover { background: var(--sky); }

/* ---------- Contatti ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 8px; } }
.contact-intro { color: var(--muted); font-size: 1.08rem; margin: 0; }
.contact-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: 0 2px 6px rgba(17, 47, 71, .05); }
@media (max-width: 560px) { .contact-box { padding: 20px; } }
.field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: 10px 14px; border: 1px solid #ccd6e0; border-radius: 8px; background: #fff; resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(35, 146, 191, .2); }
.field.invalid textarea { border-color: var(--error); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; font-weight: 400 !important; color: var(--text) !important; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 4px; flex: none; accent-color: var(--blue); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-box button[type="submit"]:disabled { opacity: .6; cursor: wait; }

.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
section[id] { scroll-margin-top: 72px; }
.field .check { display: flex; }
.field .check input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 4px 0 0; box-shadow: none; }
.nav a { white-space: nowrap; }
@media (max-width: 420px) {
  .logo img { width: 124px; }
  .nav { gap: 12px; }
  .nav a { font-size: .85rem; }
}
