@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --color-text: #1f2933;
  --color-heading: #22222d;
  --color-muted: #3d4a6d;
  --color-primary: #d98f3f;
  --color-accent: #a34b24;
  --color-bg: #f4f5fb;
  --color-card-bg: rgba(255, 255, 255, 0.92);
  --color-border: rgba(61, 74, 109, 0.12);
  --color-link: #983b19;
  --shadow-sm: 0 8px 20px rgba(41, 30, 20, 0.06);
  --shadow-md: 0 14px 30px rgba(41, 30, 20, 0.08);
  --shadow-lg: 0 20px 40px rgba(41, 30, 20, 0.10);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Poppins', sans-serif;
  color: var(--color-text);
  line-height: 1.5;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
}

body.page-home {
  background: linear-gradient(180deg, #fff4f4 0%, #fde3e2 48%, #f7e0de 100%);
  position: relative;
}

body.page-home::before {
  content: "";
  position: fixed !important;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 14% 18%, rgba(243, 128, 128, 0.42) 0%, rgba(243, 128, 128, 0.02) 24%),
    radial-gradient(circle at 78% 24%, rgba(255, 176, 176, 0.32) 0%, rgba(255, 176, 176, 0) 20%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 25%),
    linear-gradient(60deg, rgba(248, 194, 194, 0.18) 0%, rgba(248, 194, 194, 0) 25%);
}

body.page-home::after {
  content: "";
  position: absolute !important;
  left: 4%;
  top: 8%;
  width: 180px;
  height: 180px;
  background: linear-gradient(145deg, rgba(255, 211, 211, 0.95), rgba(239, 134, 134, 0.9));
  transform: rotate(20deg) skewY(-12deg);
  box-shadow: 12px 18px 32px rgba(180, 80, 80, 0.15);
  border-radius: 22px;
}

body.page-home .hero:before {
  content: "";
  position: absolute;
  right: 5%;
  top: 30%;
  width: 140px;
  height: 140px;
  background: linear-gradient(225deg, rgba(255, 196, 196, 0.78), rgba(234, 124, 124, 0.82));
  transform: rotate(-15deg);
  box-shadow: 10px 14px 24px rgba(160, 60, 60, 0.16);
  border-radius: 24px;
  z-index: 0;
}

body.page-home .hero {
  position: relative;
}

body.page-home .hero h1 {
  position: relative;
  z-index: 1;
}

body.page-home .hero .hero-subtitle,
body.page-home .hero .hero-link,
body.page-home .hero .speech-bubble {
  position: relative;
  z-index: 1;
}

body.page-sites {
  background-color: #eacbac;
  background-image: url('code.svg');
  background-repeat: repeat;
  background-position: center center;
  background-size: 320px;
  background-blend-mode: overlay;
}

body.page-sites .hero,
body.page-sites main {
  position: relative;
  z-index: 1;
}

.bg-dim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 0;
}

* { box-sizing: border-box; }

.hero, main, footer {
  width: min(100% - 2rem, 960px);
  margin-inline: auto;
}

main {
  padding-top: 2rem;
  border-radius: 2rem;
  margin-top: 2rem;
}

.site-header {
  width: min(100% - 2rem, 960px);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  gap: 1rem;
  position: relative;
}

.site-header .brand a {
  color: #1f2933;
  font-weight: 800;
  text-decoration: none;
  font-size: 1.05rem;
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: #3d4a6d;
  font-weight: 700;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.site-nav a.active,
.site-nav a:hover,
.site-nav a:focus-visible {
  background: #fff;
}

.site-nav a.active {
  color: #111;
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.25rem;
  padding: 5rem 0 3rem;
}

.eyebrow { margin: 0; color: #a34b24; font-weight: 700; }
h1, h2 { line-height: 1.1; }
body.page-home h1 {
  color: var(--color-heading);
}

body.page-sites h1,
body.page-sites h2 {
  color: #fff;
}

body.page-booking {
  background: linear-gradient(180deg, #fff4f4 0%, #fde3e2 48%, #f7e0de 100%);
  position: relative;
}

body.page-booking h1 {
  color: var(--color-heading);
}

.crayon-bulb {
  display: inline-block;
  transform: rotate(-3deg);
  margin-right: 0.5rem;
  font-size: 1.1em;
  text-shadow: 0 0 0.08em rgba(255, 255, 255, 0.9),
               0 0 0.2em rgba(255, 205, 80, 0.6),
               0 0 0.35em rgba(245, 166, 35, 0.45);
  filter: saturate(1.2) contrast(1.1);
}

.crayon-bulb::after {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: -0.35rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 214, 88, 0.2));
  box-shadow: 0 0 0.4rem rgba(255, 215, 0, 0.3);
  position: relative;
  top: -0.05rem;
}

.hero-title-black {
  color: #22222d;
}

h2 { font-size: 1.75rem; }
.speech-bubble {
  position: relative;
  max-width: 700px;
  margin-top: 1.5rem;
  padding: 1.6rem 1.7rem;
  background-color: rgba(255,255,255,0.95);
  background-image: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(245,233,220,0.95));
  border: 4px solid transparent;
  border-image: linear-gradient(135deg, #7b61ff, #118ab2, #06d6a0, #39b7c7) 1;
  border-radius: 2rem;
  box-shadow: 0 14px 30px rgba(41, 30, 20, 0.12);
}
.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 42px;
  border-width: 18px 16px 0 16px;
  border-style: solid;
  border-color: rgba(245,233,220,0.95) transparent transparent transparent;
}
.speech-bubble::before {
  content: "♪♫";
  position: absolute;
  top: -0.75rem;
  right: 1.2rem;
  font-size: 1.1rem;
  color: #5b78e7;
}
.hero-subtitle {
  margin: 0;
  max-width: 620px;
  font-size: 1.15rem;
  color: #3d4a6d;
}

.page-title-white,
.hero .page-title-white {
  color: #fff;
}

.hero .hero-subtitle {
  color: var(--color-muted);
}

.hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.hero-benefits span {
  background: rgba(217, 143, 63, 0.12);
  color: var(--color-accent);
  padding: .65rem 1rem;
  border-radius: 999px;
  font-size: .95rem;
  border: 1px solid rgba(217, 143, 63, 0.2);
  font-weight: 600;
}

.hero-link {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  background: #fff;
  color: #3d4a6d;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(61, 74, 109, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.hero-button.primary {
  background: #d98f3f;
  color: #fff;
  border-color: transparent;
}

.hero-button.secondary {
  background: rgba(255, 255, 255, 0.95);
  color: #3d4a6d;
}

.hero-button:hover,
.hero-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.why {
  padding-top: 1rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.why-card {
  background: rgba(255,255,255,0.92);
  padding: 1.25rem;
  border-radius: 1rem;
  box-shadow: 0 14px 40px rgba(0,0,0,0.06);
}

.why-card h3 {
  margin: 0 0 .65rem;
}

.why-card p {
  margin: 0;
  color: #4d4d4d;
}

.section-note {
  max-width: 720px;
  margin: .5rem 0 1rem;
  color: #3d4a6d;
}

.works {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.intro {
  max-width: 600px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #11131a;
  margin: 0;
}
.avatar-placeholder {
  display: grid;
  width: 11rem;
  aspect-ratio: 1;
  place-items: center;
  border: 3px dashed #c98562;
  border-radius: 50%;
  background: #f9dfcc;
  color: #7a351b;
  font-weight: 700;
}



.booking {
  width: min(720px, 92%);
  margin: 2rem auto 3rem;
  background: rgba(255, 255, 255, 0.96);
  padding: 2rem;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.booking h1,
.booking h2 {
  margin: 0 0 1rem 0;
}

.booking form {
  display: grid;
  gap: 0.85rem;
}

.booking label {
  font-weight: 700;
  font-size: 0.95rem;
}

.booking input[type="text"],
.booking input[type="email"],
.booking input[type="password"],
.booking select,
.booking textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid #e6dcd3;
  background: #fff;
  font-size: 1rem;
}

.booking .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.note {
  font-size: 0.95rem;
  color: #4a4a4a;
  margin: 0 0 1rem;
}

section { padding: 2rem 0 3rem; }
.page-hero {
  width: min(100% - 2rem, 960px);
  margin: 0 auto;
  padding: 2rem 0 0;
}
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  color: var(--color-heading);
}
.page-hero p {
  margin-top: 0.85rem;
  color: #4d5563;
  max-width: 680px;
}

.page-title-white {
  color: #fff;
}

.page-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.page-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.services-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: grid;
  gap: 0.75rem;
}
.services-list li {
  background: #fff;
  padding: 1rem;
  border-radius: 0.9rem;
  box-shadow: 0 8px 20px rgba(41,30,20,0.06);
}
.cta {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.cta-buttons { display: inline-flex; gap: .75rem; }

.pricing {
  margin-top: 1rem;
}
.price-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
  display: grid;
  gap: 0.5rem;
}
.price-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 6px 18px rgba(41,30,20,0.05);
}
.price-name { font-weight: 700; }
.price-value { color: #3d4a6d; font-weight: 700; }
.price-detail {
  margin: 0.35rem 0 0;
  color: #5b5b5b;
  font-size: 0.95rem;
  line-height: 1.5;
}
.how-it-works {
  margin-top: 2rem;
}
.how-it-works h2 {
  margin-bottom: 1rem;
  color: #111;
}
.steps-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.step-card {
  background: #fff;
  padding: 1.25rem;
  border-radius: 1rem;
  box-shadow: 0 14px 30px rgba(0,0,0,0.06);
}
.step-card h3 {
  margin: 0 0 0.65rem;
}
.step-card p {
  margin: 0;
  color: #4d4a6d;
  line-height: 1.6;
}

.works h2 {
  writing-mode: horizontal-tb;
  text-orientation: sideways-right;
  transform: none;
  font-size: clamp(1.8rem, 2.5vw, 2.2rem);
  margin: 0;
  letter-spacing: 0.04em;
  color: #111;
  text-shadow: none;
  align-self: center;
  padding-right: 1rem;
  max-width: 260px;
  white-space: normal;
}

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
figure { margin: 0; }
.artwork-placeholder div {
  display: grid;
  aspect-ratio: 1 / 1;
  place-items: center;
  border: 2px dashed #c98562;
  border-radius: .5rem;
  background: #f9dfcc;
  color: #7a351b;
  font-weight: 700;
}
figcaption { padding-top: .5rem; }

.contact {
  position: relative;
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: #fff;
  overflow: hidden;
}

.contact-content {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  min-width: 160px;
}

.contact-links a {
  display: inline-flex;
  padding: 0.75rem 1rem;
  background: #f2e8df;
  color: #3d4a6d;
  text-decoration: none;
  border-radius: 1rem;
  box-shadow: 0 0 0 1px rgba(61, 74, 109, 0.08);
}

.contact-links a:hover,
.contact-links a:focus-visible {
  background: #e6d7cc;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: -3px;
  background: #f2e8df;
  z-index: -1;
  border-radius: 1.8rem;
}

.site-footer {
  width: min(100% - 2rem, 960px);
  margin: 2rem auto 1.5rem;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--color-border);
  color: #5b5b5b;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--color-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-col a {
  color: #5b5b5b;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: #8a8a8a;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* === Menu hamburger mobile === */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 10;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-heading);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle span + span {
  margin-top: 5px;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 800px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-toggle {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .site-nav {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .site-nav.open {
    max-height: 400px;
  }

  .site-nav a {
    width: 100%;
    text-align: center;
  }

  .hero, .works {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .hero-link,
  .cta-buttons,
  .page-cta {
    flex-direction: column;
    width: 100%;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .why-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    flex-direction: column;
    gap: 1.25rem;
  }
}

.contact h2,
.contact dl {
  position: relative;
  z-index: 1;
}

.contact dl {
  display: grid;
  gap: 1rem;
  max-width: 520px;
  padding: 1rem;
  border-radius: 1.2rem;
  background: #fff;
  color: #111;
}

.contact dl div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  background: rgba(255,255,255,0.9);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
}

dt { font-weight: 700; }
dd { margin: 0; }
a { color: #983b19; }

@media (max-width: 600px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 3.5rem; }
  .avatar-placeholder { width: 8rem; }
  .gallery { grid-template-columns: 1fr; }
  dl div { grid-template-columns: 1fr; gap: .2rem; }
}

/* === Transizioni === */
.site-nav a {
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.site-nav a:hover {
  transform: translateY(-1px);
}

.hero-button {
  transition: transform var(--transition), box-shadow var(--transition);
}

.why-card,
.step-card,
.services-list li,
.price-item {
  transition: transform var(--transition), box-shadow var(--transition);
}

.why-card:hover,
.step-card:hover,
.services-list li:hover,
.price-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.artwork-placeholder {
  transition: transform var(--transition);
}
.artwork-placeholder:hover {
  transform: scale(1.03);
}

.contact-links a {
  transition: background var(--transition), transform var(--transition);
}
.contact-links a:hover {
  transform: translateX(-2px);
}

/* === Form migliorati === */
.booking input[type="text"],
.booking input[type="email"],
.booking input[type="password"],
.booking select,
.booking textarea {
  transition: border-color var(--transition), box-shadow var(--transition);
}

.booking input:focus,
.booking select:focus,
.booking textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 143, 63, 0.2);
}

.booking button[type="submit"] {
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.booking button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* === Animazioni fade-in on scroll === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in.visible {
  animation: fadeInUp 0.6s ease forwards;
}

/* === Sezione testimonianze === */
.testimonials {
  padding: 2rem 0 3rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.testimonial-card {
  background: var(--color-card-bg);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.testimonial-card p {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-style: italic;
  line-height: 1.6;
}

.testimonial-card .testimonial-author {
  font-weight: 700;
  color: var(--color-heading);
  font-size: 0.95rem;
}

.testimonial-card .testimonial-author::before {
  content: "— ";
  color: var(--color-primary);
}

/* === Icone sezioni === */
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(217, 143, 63, 0.12);
  margin-bottom: 0.75rem;
}

.section-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: var(--color-primary);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.page-sites .section-icon {
  background: rgba(255, 255, 255, 0.15);
}

body.page-sites .section-icon svg {
  stroke: #fff;
}

.inline-icon {
  vertical-align: middle;
  margin-right: 0.4rem;
  stroke: var(--color-primary);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* === Riduzione movimento per accessibilità === */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
