:root {
  /* tema dark fisso */
  --bg: #020617;
  --bg-alt: #020617;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --border: #1f2937;
  --shadow-soft: 0 20px 40px rgba(0, 0, 0, 0.7);
}

/* opzionale: adattarsi automaticamente alla preferenza di sistema */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f7;
    --bg-alt: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --accent: #1d4ed8;
    --accent-soft: #dbeafe;
    --border: #e5e7eb;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.12);
  }
}
/* se vuoi dark sempre e comunque, elimina il blocco @media sopra */

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

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

/* Layout di base */

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-alt);
}

h1, h2, h3 {
  margin: 0 0 16px;
  font-weight: 600;
  color: var(--text);
}

p {
  margin: 0 0 16px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Hero */

.hero {
  background: radial-gradient(circle at top left, #0b1120 0, #020617 55%);
  padding: 20px 0 72px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto 24px;
  padding: 0 16px;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 40px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
}

.hero-subtitle {
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease,
              background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn.primary {
  background: var(--accent);
  color: #020617;
  box-shadow: var(--shadow-soft);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(8, 47, 73, 0.9);
}

.btn.secondary {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-soft);
}

.btn.secondary:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
}

.hero-image img {
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  object-fit: cover;
}

/* Tags */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

/* Liste */

.list {
  padding-left: 20px;
  margin: 0;
}

.list li {
  margin-bottom: 8px;
}

.list.subtle li {
  color: var(--text-muted);
}

/* Due colonne per desktop */

.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px;
}

/* Sezione fotografia: griglia card */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.photo-card {
  background: radial-gradient(circle at top left, #020617, #020617 40%, #020617);
  border-radius: 18px;
  padding: 14px 14px 18px;
  border: 1px solid #1f2937;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(8, 47, 73, 0.9);
  border-color: #38bdf8;
}

.photo-thumb {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
}

.photo-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.photo-card:hover .photo-thumb img {
  transform: scale(1.04);
}

.photo-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
  color: var(--text);
}

.card-link {
  margin-top: auto;
  font-size: 0.9rem;
  text-decoration: none;
  color: #38bdf8;
}

/* Contatti */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.contact-grid h3 {
  margin-bottom: 4px;
}

.contact-grid a {
  color: var(--accent);
  text-decoration: none;
}

.contact-grid a:hover {
  text-decoration: underline;
}

/* Footer */

.footer {
  padding: 18px 0 26px;
  border-top: 1px solid #1f2937;
  background: #020617;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-note {
  opacity: 0.7;
}

/* Responsive */

@media (max-width: 800px) {
  .hero-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-image {
    order: -1;
  }

  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .two-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }
}
