:root {
  color-scheme: light;
  --forest: #19863C;
  --olive: #4f9f63;
  --moss: #a5ad70;
  --clay: #b85c3d;
  --cream: #fbf8ef;
  --paper: #ffffff;
  --ink: #1b2420;
  --muted: #63706a;
  --line: #d9decf;
  --shadow: 0 24px 70px rgba(23, 63, 53, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(11, 47, 25, 0.34), rgba(11, 47, 25, 0.22)),
    url("./DJI_0155 (1).webp") center / cover fixed,
    var(--cream);
}

a {
  color: inherit;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.hero-panel,
.form-layout,
.portal-layout,
.qr-layout,
.thanks-panel {
  width: min(1080px, 100%);
  background: rgba(251, 248, 239, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 34px;
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
}

.brand-block h1,
.copy-column h1,
.thanks-panel h1 {
  margin: 8px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 7vw, 6.5rem);
  line-height: 0.9;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: 0;
}

.copy-column h1,
.thanks-panel h1 {
  font-size: clamp(2.2rem, 5vw, 4.7rem);
}

.brand-logo {
  display: block;
  width: min(220px, 62vw);
  height: auto;
  margin-bottom: 22px;
}

.compact-logo {
  width: min(172px, 50vw);
}

.centered .brand-logo,
.thanks-panel .brand-logo {
  margin-inline: auto;
}

.brand-block p,
.copy-column p,
.thanks-panel p {
  max-width: 620px;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
}

.kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--forest);
}

.rating-card,
.feedback-form,
.qr-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}

legend {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--forest);
  margin-bottom: 18px;
}

.stars {
  display: grid;
  grid-template-columns: repeat(5, minmax(42px, 1fr));
  gap: 8px;
}

.star-button {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f2e3;
  color: #b8af8b;
  font-size: clamp(2rem, 7vw, 3.1rem);
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.star-button:hover,
.star-button:focus-visible,
.star-button.is-active {
  color: #f4b63f;
  border-color: #e6b24b;
  background: #fff7df;
  transform: translateY(-2px);
}

.primary-action {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: var(--forest);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.68;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: #12652d;
}

.secondary-action {
  min-height: 52px;
  border: 1px solid var(--forest);
  border-radius: 8px;
  background: transparent;
  color: var(--forest);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

.rating-card.needs-rating::after {
  content: "Seleziona una valutazione per continuare.";
  display: block;
  margin-top: 14px;
  color: var(--clay);
  font-weight: 700;
}

.form-layout,
.qr-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  padding: clamp(24px, 5vw, 54px);
}

.portal-layout,
.thanks-panel {
  padding: clamp(26px, 5vw, 58px);
}

.centered {
  text-align: center;
  margin-inline: auto;
}

.centered p {
  margin-inline: auto;
}

.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  text-decoration: none;
  font-weight: 800;
  color: var(--forest);
}

.feedback-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: var(--forest);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 15px;
  font: inherit;
  color: var(--ink);
  background: #fffefa;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(111, 127, 67, 0.24);
  border-color: var(--olive);
}

.full-span {
  grid-column: 1 / -1;
}

.review-instructions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.instruction-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.booking-panel {
  border-color: rgba(0, 59, 149, 0.28);
}

.airbnb-panel {
  border-color: rgba(255, 56, 92, 0.28);
}

.google-panel {
  border-color: rgba(26, 115, 232, 0.28);
}

.instruction-panel h2 {
  margin: 0 0 10px;
  color: var(--forest);
  font-size: 1.15rem;
}

.booking-panel h2 {
  color: #003b95;
}

.airbnb-panel h2 {
  color: #ff385c;
}

.google-panel h2 {
  color: #1a73e8;
}

.instruction-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.instruction-action {
  min-height: 48px;
  border-radius: 8px;
  background: var(--forest);
  color: #fff;
  display: inline-grid;
  place-items: center;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 800;
}

.booking-panel .instruction-action {
  background: #003b95;
}

.airbnb-panel .instruction-action {
  background: #ff385c;
}

.google-panel .instruction-action {
  background: #1a73e8;
}

.qr-card {
  display: grid;
  place-items: center;
}

.qr-card img {
  display: block;
  width: min(100%, 420px);
  aspect-ratio: 1;
  border-radius: 8px;
}

.small-note {
  margin-top: 18px !important;
  font-size: 0.92rem !important;
  font-weight: 800;
  word-break: break-word;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--forest);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.45;
}

.inline-action {
  width: auto;
  padding-inline: 24px;
  margin-top: 28px;
  margin-right: 10px;
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }

  .page-shell {
    min-height: 100svh;
    padding: 14px;
    place-items: center;
  }

  .hero-panel,
  .form-layout,
  .qr-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 24px;
    padding: 24px 18px;
  }

  .portal-layout,
  .thanks-panel {
    text-align: center;
    padding: 24px 18px;
  }

  .brand-block,
  .copy-column,
  .rating-card,
  .feedback-form,
  .qr-card,
  .review-instructions {
    width: 100%;
    max-width: 430px;
  }

  .brand-logo,
  .compact-logo {
    width: min(190px, 72vw);
    margin-inline: auto;
    margin-bottom: 18px;
  }

  .brand-block p,
  .copy-column p,
  .thanks-panel p,
  .centered p {
    margin-inline: auto;
  }

  .back-link {
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
  }

  .rating-card,
  .feedback-form,
  .qr-card {
    padding: 18px;
  }

  legend {
    text-align: center;
  }

  .feedback-form,
  .review-instructions {
    grid-template-columns: 1fr;
    margin-inline: auto;
  }

  .full-span {
    grid-column: auto;
  }

  .brand-block h1,
  .copy-column h1,
  .thanks-panel h1 {
    font-size: clamp(2.45rem, 16vw, 4rem);
  }

  .instruction-panel {
    text-align: center;
  }

  .instruction-action {
    width: 100%;
  }

  .inline-action {
    width: 100%;
    margin-right: 0;
  }
}

@media (max-width: 420px) {
  .page-shell {
    padding: 10px;
  }

  .hero-panel,
  .form-layout,
  .portal-layout,
  .qr-layout,
  .thanks-panel {
    padding: 20px 14px;
  }

  .stars {
    gap: 6px;
  }

  .star-button {
    min-width: 0;
    font-size: 2rem;
  }
}
