* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue-deep: #07152f;
  --blue: #102a62;
  --blue-selected: #3b82f6;
  --indigo: #4236a4;
  --violet: #8b5cf6;
  --violet-soft: #b99cff;
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.20);
  --yellow: #facc15;
  --yellow-soft: rgba(250, 204, 21, 0.18);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.18);
  --text-main: #f8f7ff;
  --text-muted: #c9c5e8;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-bg-strong: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.16);
  --card-border-strong: rgba(255, 255, 255, 0.28);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.34), transparent 32rem),
    radial-gradient(circle at top left, rgba(66, 54, 164, 0.30), transparent 28rem),
    linear-gradient(135deg, var(--blue-deep), var(--blue) 48%, #1b1240);
  color: var(--text-main);
  min-height: 100vh;
}

a {
  color: inherit;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 82vh;
  padding: 28px 0 72px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 82px;
}

.logo {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 850;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.nav a:hover {
  color: var(--text-main);
}

.status {
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.hero-grid {
  display: grid;
  gap: 52px;
  align-items: center;
}

.eyebrow {
  color: var(--violet-soft);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(3rem, 8vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.075em;
  max-width: 820px;
  margin-bottom: 24px;
}

.subtitle {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.65;
  max-width: 720px;
}

.seo-line {
  margin-top: 18px;
  color: var(--text-main);
  font-weight: 650;
  line-height: 1.55;
  max-width: 640px;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cta {
  width: fit-content;
  padding: 13px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), #5b7cff);
  color: white;
  font-weight: 750;
  box-shadow: 0 18px 50px rgba(91, 124, 255, 0.3);
  text-decoration: none;
}

.microcopy {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.image-card {
  width: min(100%, 440px);
  aspect-ratio: 1 / 1;
  border-radius: 34px;
  border: 1px solid var(--card-border);
  background:
    radial-gradient(circle at 50% 35%, rgba(139, 92, 246, 0.18), transparent 45%),
    rgba(255, 255, 255, 0.045);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px;
}

.hero-image {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.28));
}

.features {
  padding: 36px 0 76px;
}

.section-heading {
  max-width: 660px;
  margin-bottom: 30px;
}

.compact-heading {
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.feature-grid {
  display: grid;
  gap: 16px;
}

.feature-card {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 24px;
  padding: 24px;
}

.feature-card-link {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.feature-card-link:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-strong);
  background: var(--card-bg-strong);
}

.feature-card a {
  display: block;
  text-decoration: none;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  line-height: 1.55;
}

.footer {
  border-top: 1px solid var(--card-border);
  padding: 24px 0 36px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-main);
}

/* Pagina Ponti */

.tool-hero {
  padding: 28px 0 36px;
}

.tool-hero .header {
  margin-bottom: 56px;
}

.tool-hero-grid {
  display: grid;
  gap: 30px;
  align-items: center;
}

.tool-hero h1 {
  font-size: clamp(2.55rem, 6vw, 4.9rem);
}

.mini-mascot-card {
  justify-self: center;
  width: min(100%, 260px);
  aspect-ratio: 1 / 1;
  border-radius: 30px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.mini-mascot-card img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.25));
}

.tool-panel,
.content-note {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 28px;
  padding: 22px;
  margin: 18px 0;
}

.tool-panel {
  display: grid;
  gap: 18px;
}

.tool-panel h2,
.content-note h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.tool-panel p,
.content-note p {
  color: var(--text-muted);
  line-height: 1.55;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.controls label {
  color: var(--text-main);
  font-weight: 750;
  display: flex;
  gap: 8px;
  align-items: center;
}

select {
  appearance: none;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 10px 38px 10px 14px;
  color: var(--text-main);
  background:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%) right 16px center / 7px 7px no-repeat,
    rgba(255, 255, 255, 0.08);
  font: inherit;
  font-weight: 700;
}

.checkbox-control {
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.checkbox-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue-selected);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 30px;
}

.legend div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.legend-dot {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  display: inline-block;
}

.legend-holiday {
  background: var(--red);
}

.legend-weekend {
  background: rgba(255, 255, 255, 0.28);
}

.legend-recommended {
  background: var(--green);
}

.legend-selected {
  background: var(--blue-selected);
}

.legend-best {
  background: var(--yellow);
}

.best-bridges,
.calendar-section {
  padding: 20px 0 34px;
}

.bridge-summary {
  display: grid;
  gap: 14px;
}

.bridge-card {
  border: 1px solid var(--card-border);
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.10), transparent 45%),
    var(--card-bg);
  border-radius: 24px;
  padding: 20px;
}

.bridge-card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.bridge-card p {
  color: var(--text-muted);
  line-height: 1.5;
}

.bridge-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.badge-green {
  color: #dcfce7;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.38);
}

.badge-yellow {
  color: #fef9c3;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.38);
}

.badge-blue {
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.38);
}

.empty-state {
  color: var(--text-muted);
  border: 1px dashed var(--card-border);
  border-radius: 22px;
  padding: 20px;
  line-height: 1.5;
}

.calendar-grid {
  display: grid;
  gap: 18px;
}

.month-card {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 24px;
  padding: 16px;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.month-card.has-best-bridge {
  border-color: rgba(250, 204, 21, 0.58);
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.12),
    0 0 34px rgba(250, 204, 21, 0.12);
}

.month-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.month-header h3 {
  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.month-tag {
  color: #fef9c3;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.34);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.weekdays,
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.weekdays {
  margin-bottom: 8px;
}

.weekdays span {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  font-weight: 800;
}

.day {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.045);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 760;
  font-size: 0.9rem;
  cursor: pointer;
  position: relative;
}

.day.empty {
  visibility: hidden;
  pointer-events: none;
}

.day.weekend {
  color: rgba(248, 247, 255, 0.72);
  background: rgba(255, 255, 255, 0.085);
}

.day.holiday {
  background: var(--red-soft);
  border-color: rgba(251, 113, 133, 0.46);
  color: #ffe4e9;
}

.day.recommended {
  background: var(--green-soft);
  border-color: rgba(34, 197, 94, 0.58);
  color: #dcfce7;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.10);
}

.day.best {
  box-shadow:
    inset 0 0 0 1px rgba(250, 204, 21, 0.42),
    0 0 18px rgba(250, 204, 21, 0.13);
}

.day.selected {
  background: rgba(59, 130, 246, 0.35);
  border-color: rgba(147, 197, 253, 0.85);
  color: white;
}

.day.past {
  opacity: 0.58;
}

.day:hover {
  border-color: rgba(255, 255, 255, 0.38);
}

.day-info {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  min-height: 1.35em;
  line-height: 1.4;
}

.day-info strong {
  color: var(--text-main);
}

@media (min-width: 760px) {
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bridge-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-panel {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (min-width: 1040px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer {
    flex-direction: row;
    justify-content: space-between;
  }

  .tool-hero-grid {
    grid-template-columns: 1fr 280px;
  }

  .calendar-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 859px) {
  .header {
    margin-bottom: 56px;
  }

  .hero {
    padding-bottom: 54px;
  }

  .image-card {
    width: min(100%, 360px);
    padding: 28px;
  }

  .hero-image {
    max-width: 290px;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100% - 22px, 1180px);
  }

  .header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .day {
    min-height: 34px;
    border-radius: 10px;
    font-size: 0.82rem;
  }

  .month-card {
    padding: 13px;
  }
}
