/* =========================
   RESET & BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --text: #111111;
  --line: rgba(17, 17, 17, 0.45);
  --bg: #f4f1ec;
  --container: min(1300px, calc(100% - 48px));
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.5;
  background-color: var(--bg);
  background-image: url('/difrancesco/images/background.png');
  background-repeat: repeat;
  background-size: cover;
  min-height: 100vh;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

/* ===================================================================
   HEADER
====================================================================== */

.site-header {
  padding-top: 34px;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  transition: opacity 0.25s ease;
}

.main-nav a:hover {
  opacity: 0.65;
}

/* =================================================================
   HERO
==================================================================== */

.hero {
  padding: 42px 0 28px;
}

.hero-inner {
  display: grid;
  gap: 30px;
}

.hero-content {
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}

.hero-title {
  max-width: 1240px;
  font-size: clamp(46px, 6vw, 67px);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.hero-subtitle {
  width: 100%;
  text-align: right;
  padding-right: 58px;
  font-size: clamp(20px, 2.8vw, 36px);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.hero-media {
  width: 100%;
  aspect-ratio: 16 / 6.2;
  background-image: url('/difrancesco/images/di-francesco-group-homepage.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* ==================================================================
   HERO RESPONSIVE
===================================================================== */
@media (max-width: 1100px) {
  .main-nav ul {
    gap: 22px;
  }

  .main-nav a {
    font-size: 17px;
  }

  .hero-subtitle {
    padding-right: 10px;
  }
}

@media (max-width: 860px) {
  .header-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .logo {
    margin: 0 auto;
  }

  .main-nav ul {
    justify-content: center;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-content {
    justify-items: start;
    text-align: left;
  }

  .hero-title {
    text-align: left;
  }

  .hero-subtitle {
    width: 100%;
    text-align: right;
    padding-right: 0;
  }

  .hero-media {
    aspect-ratio: 16 / 9;
  }
}

/* ===============================================================
   SERVIZI
================================================================== */

.services-overview {
  padding: 40px 0 50px;
}

.services-overview__intro {
  display: grid;
  gap: 52px;
  margin-bottom: 55px;
}

.services-overview__title {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.services-overview__text {
  max-width: 930px;
  margin: 0 auto;
  text-align: center;
}

.services-overview__text p {
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.5;
  font-weight: 400;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.service-card {
  min-height: 220px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(17, 17, 17, 0.18);
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(17, 17, 17, 0.35);
  background: rgba(255, 255, 255, 0.48);
}

.service-card__number {
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.service-card__title {
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

/* ===============================================================
   SERVIZI RESPONSIVE
================================================================== */

@media (max-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-card {
    min-height: 190px;
  }
}

@media (max-width: 860px) {
  .services-overview {
    padding: 60px 0 80px;
  }

  .services-overview__intro {
    gap: 36px;
    margin-bottom: 36px;
  }

  .services-overview__text {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .services-overview {
    padding: 30px 0 62px;
  }

  .services-overview__title {
    text-align: center;
    max-width: 100%;
    font-size: clamp(28px, 8vw, 42px);
  }

  .services-overview__text p {
    font-size: 18px;
    line-height: 1.22;
    text-align: center;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .service-card {
    min-height: 145px;
    padding: 18px 16px;
  }

  .service-card__title {
    font-size: 20px;
    line-height: 1.02;
  }
}

@media (max-width: 640px) {
  :root {
    --container: min(100%, calc(100% - 28px));
  }

  .site-header {
    padding-top: 22px;
  }

  .logo {
    font-size: 18px;
  }

  .main-nav ul {
    gap: 14px 18px;
  }

  .main-nav a {
    font-size: 14px;
  }

  .hero {
    padding: 28px 0 20px;
  }

  .hero-inner {
    gap: 20px;
  }

  .hero-title {
    font-size: clamp(32px, 11vw, 48px);
    line-height: 1.08;
  }

  .hero-subtitle {
    font-size: 18px;
  }
}

/* ===============================================================
   PROGETTI
================================================================== */

.projects {
  padding: 40px 0 33px;
}

.projects__title {
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin-bottom: 30px;
  text-align: center;
}

/* Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Card */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Image */

.project-card__flip {
  position: relative;
  perspective: 1200px;
  cursor: pointer;
}

.project-card__flip-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10.6;
  transition: transform 1.7s ease;
  transform-style: preserve-3d;
}

.project-card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.project-card__face--front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__face--back {
  transform: rotateY(180deg);
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.project-card__back-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
  transform: scale(1.08);
}

.project-card__back-dark {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
}

.project-card__overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  text-align: center;
}

.project-card__price {
  color: #ffffff;
  font-size: clamp(22px, 2vw, 34px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.project-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 14px 24px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: #ffffff;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.project-card__button:hover {
  background: #ffffff;
  color: #111111;
  border-color: #ffffff;
}

/* DESKTOP HOVER */
@media (hover: hover) and (pointer: fine) {
  .project-card__flip:hover .project-card__flip-inner {
    transform: rotateY(180deg);
  }
}

/* MOBILE / TAP */
.project-card__flip.is-flipped .project-card__flip-inner {
  transform: rotateY(180deg);
}

/* Info */

.project-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  opacity: 0.7;
}

.project-card__title {
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-card__stars {
  display: flex;
  gap: 4px;
}

.project-card__stars img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* ===============================================================
   PROGETTI RESPONSIVE
================================================================== */

@media (max-width: 860px) {
  .projects__title {
    text-align: center; 
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 50px;
    justify-items: stretch;
  }

  .project-card {
    width: 100%;
    max-width: none;
    text-align: left;
  }

  .project-card__flip {
    width: 100%;
  }

  .project-card__flip-inner {
    width: 100%;
    aspect-ratio: 16 / 10.6;
  }

  .project-card__face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .project-card__meta {
    align-items: flex-start;
  }

  .project-card__back-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px);
    transform: scale(1.08);
  } 

  .project-card__back-dark {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.40);
  }

}

@media (max-width: 640px) {
  .projects {
    padding: 0px 0 33px;
  }

  .project-card {
    width: 100%;
  }

  .project-card__flip {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }

  .project-card__flip-inner {
    aspect-ratio: 16 / 11.5;
  }

  .project-card__face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .project-card__back-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px);
    transform: scale(1.08);
  }

  .project-card__back-dark {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.40);
  }

}


/* ===============================================================
   METODO
================================================================== */

.method {
  padding: 40px 0 40px;
}

.method__title {
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 56px;
}

.method-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.12);
}

.method-item__number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.method-item__content {
  display: grid;
  gap: 8px;
  padding-top: 6px;
}

.method-item__title {
  font-size: 22px;
  line-height: 1.6;
  font-weight: 600;
  text-transform: uppercase;
}

.method-item__text {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  color: rgba(17, 17, 17, 0.72);
}

/* ===============================================================
   METODO RESPONSIVE
================================================================== */

@media (max-width: 860px) {
  .method {
    padding: 40px 0 10px;
  }

  .method__title {
    text-align: center;
  }

  .method-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }
}

@media (max-width: 640px) {
  .method {
    padding: 20px 0 10px;
  }

  .method-item {
    grid-template-columns: 58px 1fr;
    gap: 14px;
    padding: 18px 0;
  }

  .method-item__number {
    width: 58px;
    height: 58px;
    font-size: 20px;
  }

  .method-item__content {
    gap: 6px;
    padding-top: 2px;
  }

  .method-item__title {
    font-size: 17px;
    line-height: 1.6;
  }

  .method-item__text {
    font-size: 15px;
    line-height: 1.5;
  }
}

/* ===============================================================
   LAVORA CON NOI
================================================================== */

.why-us {
  padding: 60px 0 60px;
}

.why-us__intro {
  margin-bottom: 52px;
  text-align: center;
}

.why-us__title {
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  line-height: 1.05;
}

.why-us__subtitle {
  margin-top: 6px;
  font-size: clamp(20px, 2vw, 36px);
  line-height: 1.5;
  font-weight: 400;
}

.why-us__layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 54px;
  align-items: stretch;
}

.why-us__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.why-us__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.why-us__stat {
  min-height: 300px;
  padding: 34px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.why-us__stat:nth-child(1),
.why-us__stat:nth-child(2) {
  border-bottom: 1px solid rgba(17, 17, 17, 0.12);
}

.why-us__stat:nth-child(1),
.why-us__stat:nth-child(3) {
  border-right: 1px solid rgba(17, 17, 17, 0.12);
}

.why-us__number {
  font-size: clamp(54px, 5vw, 88px);
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: -0.06em;
  margin-bottom: 18px;
}

.why-us__label {
  max-width: 240px;
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.25;
  font-weight: 400;
}

/* ===============================================================
   LAVORA CON NOI RESPONSIVE
================================================================== */

@media (max-width: 1100px) {
  .why-us__layout {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .why-us__image {
    max-width: 900px;
    margin: 0 auto;
  }
}

@media (max-width: 860px) {
  .why-us {
    padding: 50px 0 60px;
  }

  .why-us__intro {
    margin-bottom: 34px;
  }

  .why-us__stats {
    max-width: 760px;
    margin: 0 auto;
  }

  .why-us__stat {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .why-us {
    padding: 50px 0 40px;
  }

  .why-us__title,
  .why-us__subtitle {
    text-align: center;
  }

  .why-us__layout {
    gap: 24px;
  }

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

  .why-us__stat {
    min-height: auto;
    padding: 26px 0;
    text-align: center;
    align-items: center;
    border-right: none !important;
    border-bottom: 1px solid rgba(17, 17, 17, 0.12) !important;
  }

  .why-us__stat:last-child {
    border-bottom: none !important;
  }

  .why-us__number {
    margin-bottom: 10px;
    font-size: clamp(48px, 14vw, 72px);
  }

  .why-us__label {
    max-width: 260px;
    font-size: 18px;
  }
}

/* ===============================================================
   TEAM
================================================================== */

.team {
  padding: 50px 0 0px;
}

.team__intro {
  text-align: center;
  margin-bottom: 46px;
}

.team__title {
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 400;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  line-height: 1.05;
}

.team__subtitle {
  margin-top: 6px;
  font-size: clamp(20px, 2vw, 34px);
  line-height: 1.5;
  font-weight: 400;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.team-card {
  min-height: 100%;
  padding: 26px 24px;

  border: 1px solid rgba(17, 17, 17, 0.18);
  background: rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);

  display: flex;
  flex-direction: column;

  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: rgba(17, 17, 17, 0.35);
  background: rgba(255, 255, 255, 0.48);
}

.team-card__top {
  margin-bottom: 18px;
}

.team-card__company {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
}

.team-card__role {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 400;
  color: rgba(17, 17, 17, 0.72);
}

.team-card__text {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(17, 17, 17, 0.85);
}

.team-card__list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 22px;
  padding-left: 16px;
  list-style: disc;
}

.team-card__list li {
  font-size: 14px;
  line-height: 1.35;
  color: rgba(17, 17, 17, 0.86);
}

.team-card__person {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-card__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(17, 17, 17, 0.12);
}

.team-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__name {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.team-cta {
  display: flex;
  justify-content: center;
  margin-top: 42px;
}

.team-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 22px 46px;
  background: #111111;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.team-cta__button:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

/* ===============================================================
   TEAM RESPONSIVE
================================================================== */

@media (max-width: 1100px) {
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 760px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .team {
    padding: 0px 0 0px;
  }

  .team__intro {
    margin-bottom: 30px;
  }

  .team-card {
    padding: 18px 16px 20px;
  }

  .team-card__text {
    font-size: 14px;
  }

  .team-card__list li {
    font-size: 13px;
  }

  .team-cta {
    margin-top: 28px;
  }

  .team-cta__button {
    width: 100%;
    text-align: center;
    padding: 20px 24px;
    font-size: 13px;
  }
}

/* ===============================================================
   FOOTER
================================================================== */

.site-footer {
  margin-top: 100px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.footer-banner img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.footer-main {
  padding: 42px 0 56px;
}

.footer-brand {
  text-align: center;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  margin-bottom: 26px;
}

.footer-logo {
  display: inline-block;
  font-size: 24px;
  line-height: 0.95;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

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

.footer-title {
  margin-bottom: 16px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.footer-column p,
.footer-column a {
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  color: rgba(17, 17, 17, 0.88);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-social a {
  position: relative;
}

.footer-social a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: rgba(17, 17, 17, 0.3);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.footer-social a:hover::after {
  transform: scaleX(1);
}

/* ===============================================================
   FOOTER RESPONSIVE
================================================================== */

@media (max-width: 860px) {
  .footer-banner img {
    height: 250px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {

  .footer-banner img {
    height: 180px;
  }

  .footer-main {
    padding: 32px 0 42px;
  }

  .footer-brand {
    padding-bottom: 1px;
    margin-bottom: 25px;
  }

  .footer-logo {
    font-size: 20px;
  }

  .footer-title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .footer-column p,
  .footer-column a {
    font-size: 15px;
    line-height: 1.6;
  }

  .footer-social {
    gap: 14px;
  }
}