:root {
  color-scheme: light;
  --navy: #12314d;
  --navy-dark: #0b2236;
  --ink: #172432;
  --muted: #5c6974;
  --line: #d9e0e5;
  --paper: #ffffff;
  --soft: #f3f6f7;
  --warm: #f5f1e9;
  --focus: #1876b7;
  --shadow: 0 24px 70px rgba(7, 28, 45, 0.24);
  --shell: min(1180px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 92px;
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid rgba(18, 49, 77, 0.1);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: var(--navy);
  line-height: 1;
}

.brand-link {
  text-decoration: none;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  letter-spacing: 0.035em;
}

.brand-subtitle {
  margin-top: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.hero {
  position: relative;
  min-height: 570px;
  display: grid;
  place-items: center;
  overflow: hidden;

  /*
   * Fallback robusto per Cala Gavetta:
   * anche se il tag <img> fosse momentaneamente in cache/errore,
   * la stessa foto viene caricata come sfondo della sezione.
   */
  background-color: var(--navy-dark);
  background-image: url("cala-gavetta.jpg?v=2");
  background-size: cover;
  background-position: center 46%;
  background-repeat: no-repeat;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  z-index: 0;
  display: block;
  object-fit: cover;
  object-position: center 46%;
  opacity: 1;
}

.hero-shade {
  z-index: 0;
  background: linear-gradient(90deg, rgba(5, 24, 39, 0.62) 0%, rgba(8, 34, 53, 0.22) 48%, rgba(8, 34, 53, 0.04) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.intro-card {
  width: min(510px, 100%);
  padding: clamp(32px, 5vw, 54px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(7px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.75rem, 6vw, 4.7rem);
}

h2 {
  font-size: clamp(2.1rem, 4vw, 3.25rem);
}

.intro-line {
  margin: 16px 0 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

.intro-copy {
  max-width: 39ch;
  margin: 18px 0 28px;
  color: #334553;
  font-size: 1.06rem;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  border: 1px solid var(--navy);
  border-radius: 3px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.button:hover {
  background: var(--navy-dark);
}

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

.button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.contact {
  padding: clamp(70px, 9vw, 120px) 0;
  background: var(--soft);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(50px, 8vw, 110px);
  align-items: start;
}

.contact-heading {
  position: sticky;
  top: 32px;
}

.contact-heading > p:last-child {
  max-width: 36ch;
  margin: 22px 0 0;
  color: var(--muted);
}

.contact-form {
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(22, 43, 59, 0.08);
}

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

.field {
  margin-bottom: 21px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 650;
}

.field label span,
.field-note {
  color: var(--muted);
  font-weight: 400;
}

select,
input,
textarea {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  border: 1px solid #bcc8d0;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

select,
input {
  min-height: 50px;
  padding: 10px 13px;
}

textarea {
  min-height: 150px;
  padding: 13px;
  resize: vertical;
}

.field-note {
  margin: 7px 0 0;
  font-size: 0.8rem;
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--muted);
  font-size: 0.9rem;
}

.privacy-check input {
  width: 18px;
  min-height: auto;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--navy);
  flex: 0 0 auto;
}

.privacy-check a,
.legal-content a,
.photo-credit a {
  text-underline-offset: 3px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.submit-button[disabled] {
  cursor: wait;
  opacity: 0.7;
}

.form-status {
  min-height: 25px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-status.success {
  color: #17633a;
}

.form-status.error {
  color: #9c2727;
}

.site-footer {
  padding: 34px 0;
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.78);
}

.footer-content {
  text-align: center;
}

.footer-content p {
  margin: 5px 0;
}

.development-note {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
}

.photo-credit {
  font-size: 0.75rem;
}

.legal-page {
  background: var(--soft);
}

.legal-content {
  max-width: 820px;
  padding-top: clamp(60px, 9vw, 100px);
  padding-bottom: clamp(70px, 10vw, 120px);
}

.legal-content h1 {
  margin-bottom: 32px;
}

.legal-content h2 {
  margin-top: 38px;
  font-size: 1.55rem;
}

.legal-content p {
  color: #43525e;
}

.text-link {
  display: inline-block;
  margin-top: 28px;
  color: var(--navy);
  font-weight: 650;
}

@media (max-width: 760px) {
  :root {
    --shell: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 80px;
  }

  .brand-subtitle {
    font-size: 0.59rem;
    letter-spacing: 0.17em;
  }

  .hero {
    min-height: 660px;
    align-items: end;
    padding: 0 0 24px;
  }

  .hero-image {
    object-position: 52% center;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(5, 24, 39, 0.62) 0%, rgba(8, 34, 53, 0.04) 72%);
  }

  .intro-card {
    padding: 30px 26px;
  }

  .contact-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    gap: 40px;
  }

  .contact-heading {
    position: static;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .submit-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
