:root {
  --green: #004f3b;
  --orange: #f15135;
  --orange-dark: #d9422f;
  --ink: #222222;
  --muted: #6f6f6f;
  --line: #d8d8d8;
  --soft-line: #ececea;
  --panel: #f7f7f4;
  --error: #c80000;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Libre Franklin", Arial, Helvetica, sans-serif;
}

body.is-support-modal-open {
  overflow: hidden;
}

a {
  color: var(--orange);
  font-weight: 600;
}

.page-shell {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--white);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 50%;
  min-height: 86px;
  z-index: 5;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  padding: 14px 32px;
}

.site-header img {
  display: block;
  width: 270px;
  max-width: 82%;
  height: auto;
}

.header-close-link {
  display: none;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
}

.header-close-link span {
  display: inline-block;
  margin-left: 10px;
  font-size: 25px;
  line-height: 0.7;
  font-weight: 400;
  vertical-align: -3px;
}

.page-content {
  display: grid;
  grid-template-columns: minmax(430px, 50%) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}

.form-container {
  width: 100%;
  max-width: 570px;
  margin: 0 auto;
  padding: 124px 0 52px;
}

.section-label {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  color: #1f1f1f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
}

.intro-copy {
  max-width: 530px;
  margin: 0 0 18px;
  color: #747474;
  font-size: 20px;
  line-height: 1.38;
  font-weight: 400;
}

.card-form {
  margin: 20px 0 0;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--soft-line);
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.06);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.field {
  display: block;
  position: relative;
}

.field span {
  position: absolute;
  top: 18px;
  left: 16px;
  display: inline-block;
  margin: 0;
  z-index: 1;
  color: #222222;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  pointer-events: none;
  transform-origin: left top;
  transition: color 0.18s ease, font-size 0.18s ease, transform 0.18s ease;
}

.field input {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 24px 16px 8px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  color: #222222;
  background: var(--white);
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus,
.field:focus-within input {
  border-color: var(--orange);
  box-shadow: none;
}

.field:focus-within span,
.field.is-filled span {
  color: #222222;
  font-size: 12px;
  transform: translateY(-10px);
}

.field input[aria-invalid="true"] {
  border-color: var(--error);
}

.field:has(input[aria-invalid="true"]) span {
  color: var(--error);
}

.form-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
}

.form-error {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
}

.form-error:empty {
  display: none;
}

.form-actions {
  margin: 16px 0 0;
}

button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 14px 24px;
  border: 0;
  border-radius: 4px;
  color: var(--white);
  background: var(--orange);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

button:hover,
button:focus {
  background: var(--orange-dark);
}

button:active {
  transform: translateY(1px);
}

.privacy-copy {
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  text-align: center;
}

.privacy-copy a {
  color: var(--orange);
  font-weight: 500;
  text-decoration: none;
}

.privacy-copy a:hover,
.privacy-copy a:focus {
  text-decoration: underline;
}

.support-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: auto;
  min-height: 0;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--green);
  background: transparent;
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 400;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.support-trigger:hover,
.support-trigger:focus {
  color: var(--orange);
  background: transparent;
  text-decoration: underline;
}

.support-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--orange);
  background: #fde8e2;
}

.support-trigger-icon svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nowrap {
  white-space: nowrap;
}

.keep-together {
  white-space: nowrap;
}

.support-modal[hidden] {
  display: none;
}

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.support-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.44);
}

.support-modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 18px;
  width: min(100%, 520px);
  padding: 28px 34px 26px;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.support-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  color: #222222;
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
}

.support-modal-close:hover,
.support-modal-close:focus {
  color: var(--orange);
  background: transparent;
}

.support-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  grid-row: 1 / span 2;
  margin-top: 2px;
  border-radius: 999px;
  color: var(--orange);
  background: #fde8e2;
}

.support-modal-icon svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.support-modal h2 {
  margin: 0 42px 10px 0;
  color: #111111;
  font-family: "Libre Franklin", Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.support-modal-content {
  display: grid;
  gap: 8px;
}

.support-modal-content p {
  margin: 0;
  color: #3b3b3b;
  font-size: 15px;
  line-height: 1.38;
}

.support-modal-content a {
  color: var(--orange);
  font-weight: 400;
  text-decoration: underline;
}

.visual-panel {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: minmax(380px, 62vh) minmax(220px, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  color: var(--white);
  background: var(--green);
}

.close-link {
  position: absolute;
  top: 32px;
  right: 28px;
  z-index: 2;
  color: var(--white);
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.close-link span {
  display: inline-block;
  margin-left: 12px;
  font-size: 24px;
  line-height: 0.7;
  vertical-align: -2px;
}

.visual-image {
  min-height: 380px;
  background: url("../img/tessera-sempre-con-te.jpg?v=20260609-1") center center / cover no-repeat;
  border-bottom: 0;
}

.visual-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 34px 8vw 46px;
  text-align: center;
}

.visual-copy h2 {
  max-width: 620px;
  margin: 0 auto 16px;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 700;
}

.visual-copy p {
  max-width: 650px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.94);
  font-size: 18px;
  line-height: 1.46;
  font-weight: 400;
}

.visual-copy p + p {
  margin-top: 18px;
}

.footer-istituzionale {
  position: relative;
  z-index: 2;
  padding: 0 30px 24px;
  color: #e8e8e8;
  background-color: #202020;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
}

.footer-istituzionale a {
  color: #e8e8e8;
  font-weight: 400;
  text-decoration: none;
}

.footer-istituzionale a:hover,
.footer-istituzionale a:focus {
  color: #ffffff;
  text-decoration: none;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 42px);
  min-height: 46px;
  border-bottom: 1px solid #0f0f0f;
  text-transform: uppercase;
}

.footer-nav a {
  color: #e8e8e8;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 400;
  text-decoration: none;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1.35fr 1.25fr 0.8fr;
  gap: 0;
  border-top: 1px solid #303030;
}

.footer-column {
  min-width: 0;
  padding: 20px 28px;
  border-right: 1px solid #0f0f0f;
  font-weight: 400;
}

.footer-column:last-child {
  border-right: 0;
}

.footer-column p {
  margin: 0;
  font-weight: 400;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  height: 100%;
  min-height: 70px;
  color: #ffffff;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #ffffff;
  text-decoration: none;
}

.footer-social svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (min-width: 981px) and (max-height: 820px) {
  .form-container {
    padding-top: 96px;
    padding-bottom: 42px;
  }

  h1 {
    margin-bottom: 18px;
    font-size: 34px;
  }

  .intro-copy {
    margin-bottom: 26px;
    font-size: 18px;
    line-height: 1.28;
  }

  .form-grid {
    gap: 14px;
  }

  .field input {
    min-height: 52px;
  }

  .form-note {
    margin-top: 16px;
  }

  .form-actions {
    margin-top: 14px;
  }

  .privacy-copy {
    margin-top: 18px;
  }
}

@media (max-width: 980px) {
  .site-header {
    position: relative;
    width: 100%;
    min-height: 78px;
  }

  .site-header .inner {
    min-height: 78px;
    padding: 14px 20px;
  }

  .site-header img {
    width: 230px;
  }

  .header-close-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
  }

  .page-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .form-container {
    order: 2;
    max-width: 640px;
    padding: 36px 24px 56px;
  }

  h1 {
    text-align: left;
    font-size: 34px;
  }

  .intro-copy {
    max-width: none;
    font-size: 16px;
    margin-bottom: 16px;
  }

  .visual-panel {
    position: relative;
    order: 1;
    display: block;
    min-height: 0;
  }

  .visual-image {
    display: none;
  }

  .visual-copy {
    align-items: flex-start;
    padding: 22px 24px 24px;
    text-align: left;
  }

  .visual-copy h2 {
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
    font-size: 25px;
  }

  .visual-copy p {
    width: 100%;
    text-align: left;
    max-width: 560px;
    font-size: 16px;
    line-height: 1.42;
  }

  .visual-copy p + p {
    margin-top: 10px;
  }

  .visual-panel .close-link {
    display: none;
  }

  .footer-istituzionale {
    padding: 0 18px 22px;
  }

  .footer-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px 20px;
    padding: 14px 0;
  }

  .footer-columns {
    display: block;
  }

  .footer-column {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid #0f0f0f;
  }

  .footer-column:last-child {
    border-bottom: 0;
  }

  .footer-social {
    justify-content: flex-start;
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .site-header .inner {
    min-height: 64px;
    padding: 12px 24px;
  }

  .site-header img {
    width: 160px;
    max-width: calc(100vw - 150px);
  }

  .form-container {
    max-width: none;
    padding: 34px 22px 38px;
  }

  .section-label {
    margin-bottom: 9px;
    font-size: 12px;
  }

  h1 {
    text-align: left;
    margin-bottom: 10px;
    font-size: 31px;
  }

  .intro-copy {
    font-size: 16px;
    line-height: 1.38;
    margin-bottom: 20px;
  }

  .card-form {
    margin-top: 18px;
    padding: 18px;
    border-radius: 0;
    margin-left: -4px;
    margin-right: -4px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.055);
  }

  .form-grid {
    gap: 15px;
  }

  .field span {
    top: 17px;
    left: 15px;
    font-size: 15px;
  }

  .field input {
    min-height: 54px;
    padding: 23px 15px 8px;
  }

  .form-note {
    margin-top: 12px;
  }

  .privacy-copy {
    margin-top: 18px;
    max-width: 300px;
    line-height: 1.45;
  }

  .privacy-copy br {
    display: none;
  }

  .support-trigger {
    margin-top: 12px;
    font-size: 13px;
  }

  .support-modal {
    padding: 18px;
  }

  .support-modal-panel {
    grid-template-columns: 38px 1fr;
    gap: 0 14px;
    padding: 24px 22px 22px;
  }

  .support-modal h2 {
    font-size: 14px;
  }

  .support-modal-content p {
    font-size: 14px;
  }

  .close-link {
    top: 20px;
    right: 18px;
  }

  .visual-panel {
    background: var(--green);
  }

  .visual-image {
    display: none;
  }

  .visual-copy {
    padding: 16px 22px 18px;
  }

  .visual-copy h2 {
    width: 100%;
    text-align: left;
    margin-bottom: 7px;
    font-size: 20px;
    line-height: 1.2;
  }

  .visual-copy p {
    width: 100%;
    text-align: left;
    font-size: 14px;
    line-height: 1.38;
  }

  .visual-copy p + p {
    display: none;
  }
}
