/**
 * POL homepage — hub sezioni (28/09).
 * Navy / Sand / Terracotta · ombre rgba(27,42,74) · reveal stile Services hub.
 */

body.pol-index {
  color: var(--pol-navy, #1b2a4a);
  background: var(--pol-bg-main, var(--warm-white, #faf7f2));
}

/* Nav: navy esplicito, mai nero */
body.pol-index nav .nav-logo,
body.pol-index nav .pol-logo,
body.pol-index nav .pol-payoff {
  color: var(--pol-navy, #1b2a4a);
}

body.pol-index nav .nav-links a {
  color: var(--pol-navy, #1b2a4a);
}

body.pol-index .hero.hero-section--has-video .hero-eyebrow,
body.pol-index .hero-section--index .hero-eyebrow {
  text-shadow: 0 1px 10px rgba(27, 42, 74, 0.45);
}

body.pol-index .hero.hero-section--has-video .hero-subtitle,
body.pol-index .hero-section--index .hero-subtitle {
  text-shadow: 0 2px 14px rgba(27, 42, 74, 0.4);
}

/* Hero glass: navy, non nero · ombra navy (R-148) */
body.pol-index .hero-section--index.hero-section--has-video .hero-inner {
  background: rgba(27, 42, 74, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0.5px solid rgba(253, 251, 247, 0.22);
  box-shadow: 0 14px 48px rgba(27, 42, 74, 0.28);
}

body.pol-index .hero-section--index .pol-hero-brand-container .pol-logo,
body.pol-index .hero-section--index .pol-hero-title {
  text-shadow: 0 3px 22px rgba(27, 42, 74, 0.55) !important;
}

body.pol-index .hero-section--index .pol-hero-brand-container .pol-payoff,
body.pol-index .hero-section--index .pol-hero-subtitle {
  text-shadow: 0 2px 12px rgba(27, 42, 74, 0.5) !important;
}

/* Sezione hub: atmosfera Sand + alone soft */
body.pol-index .wrap > .section {
  position: relative;
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
}

body.pol-index .wrap > .section::before {
  content: "";
  position: absolute;
  inset: -1rem -4rem auto;
  height: 18rem;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 70% at 12% 40%, rgba(196, 102, 58, 0.12), transparent 70%),
    radial-gradient(ellipse 50% 65% at 88% 30%, rgba(27, 42, 74, 0.1), transparent 72%),
    radial-gradient(ellipse 40% 50% at 50% 90%, rgba(242, 235, 221, 0.9), transparent 75%);
  z-index: 0;
}

body.pol-index .wrap > .section > * {
  position: relative;
  z-index: 1;
}

body.pol-index .section-title {
  color: var(--pol-navy, #1b2a4a);
}

body.pol-index .section-sub {
  color: var(--pol-text-secondary, #5c6578);
  max-width: 38rem;
}

/* Hub cards */
body.pol-index .cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

@media (max-width: 960px) {
  body.pol-index .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  body.pol-index .cards-grid {
    grid-template-columns: 1fr;
  }
}

body.pol-index .card.pol-hub-card {
  --hub-accent: var(--pol-accent, #c4663a);
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--pol-bg-card, #f2ebdd) 88%, var(--hub-accent) 12%) 0%,
    var(--warm-white, #faf7f2) 48%,
    color-mix(in srgb, var(--pol-bg-main, #faf7f2) 82%, var(--pol-navy, #1b2a4a) 18%) 100%
  );
  border: 1px solid color-mix(in srgb, var(--hub-accent) 28%, rgba(27, 42, 74, 0.12));
  border-radius: 0.55rem;
  padding: 1.85rem 1.65rem 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 14rem;
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.3s ease;
}

/* Alone colorato dietro ogni card */
body.pol-index .card.pol-hub-card::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -20%;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--hub-accent) 35%, transparent) 0%,
    transparent 70%
  );
  pointer-events: none;
  transition: transform 0.5s ease, opacity 0.4s ease;
  opacity: 0.85;
}

body.pol-index .card.pol-hub-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.pol-index .card.pol-hub-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--hub-accent),
    color-mix(in srgb, var(--hub-accent) 40%, var(--pol-navy, #1b2a4a))
  );
  opacity: 0.9;
}

body.pol-index .card.pol-hub-card.is-visible:hover,
body.pol-index .card.pol-hub-card.is-visible:focus-visible {
  transform: translateY(-7px) scale(1.01);
  box-shadow: 0 16px 40px rgba(27, 42, 74, 0.16);
  border-color: color-mix(in srgb, var(--hub-accent) 55%, var(--pol-navy, #1b2a4a));
}

body.pol-index .card.pol-hub-card.is-visible:hover::after,
body.pol-index .card.pol-hub-card.is-visible:focus-visible::after {
  transform: scale(1.25) translate(-8%, 8%);
  opacity: 1;
}

body.pol-index .card.pol-hub-card:focus-visible {
  outline: 2px solid var(--pol-navy, #1b2a4a);
  outline-offset: 3px;
}

/* Pictogrammi hub — SVG lineari (no sigle); float + leggero respiro */
body.pol-index .pol-hub-logo {
  width: 3.35rem;
  height: 3.35rem;
  margin-bottom: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: var(--pol-navy, #1b2a4a);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--hub-accent) 28%, var(--warm-white, #fff)) 0%,
    color-mix(in srgb, var(--hub-accent) 12%, var(--warm-white, #fff)) 100%
  );
  border: 1px solid color-mix(in srgb, var(--hub-accent) 42%, transparent);
  box-shadow: 0 4px 14px rgba(27, 42, 74, 0.08);
  animation: polHubLogoFloat 4.2s ease-in-out infinite;
  transform-origin: center;
  position: relative;
  z-index: 1;
}

body.pol-index .pol-hub-logo svg {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
}

body.pol-index .card.pol-hub-card:nth-child(2) .pol-hub-logo {
  animation-delay: 0.35s;
}
body.pol-index .card.pol-hub-card:nth-child(3) .pol-hub-logo {
  animation-delay: 0.7s;
}
body.pol-index .card.pol-hub-card:nth-child(4) .pol-hub-logo {
  animation-delay: 1.05s;
}
body.pol-index .card.pol-hub-card:nth-child(5) .pol-hub-logo {
  animation-delay: 1.4s;
}
body.pol-index .card.pol-hub-card:nth-child(6) .pol-hub-logo {
  animation-delay: 1.75s;
}
body.pol-index .card.pol-hub-card:nth-child(7) .pol-hub-logo {
  animation-delay: 2.1s;
}

@keyframes polHubLogoFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
    box-shadow: 0 4px 14px rgba(27, 42, 74, 0.08);
  }
  40% {
    transform: translateY(-4px) rotate(-2deg) scale(1.05);
    box-shadow: 0 10px 22px rgba(27, 42, 74, 0.14);
  }
  70% {
    transform: translateY(-2px) rotate(1.5deg) scale(1.03);
  }
}

body.pol-index .card.pol-hub-card.is-visible:hover .pol-hub-logo {
  animation-play-state: paused;
  transform: scale(1.08) rotate(-3deg);
  border-color: color-mix(in srgb, var(--hub-accent) 65%, var(--pol-navy, #1b2a4a));
}

body.pol-index .card.pol-hub-card .card-eyebrow {
  color: var(--hub-accent);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

body.pol-index .card.pol-hub-card .card-title {
  font-family: var(--pol-font-brand, var(--font-display), "Cormorant Garamond", serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--pol-navy, #1b2a4a);
  letter-spacing: 0.01em;
  line-height: 1.2;
  transition: color 0.25s ease;
  position: relative;
  z-index: 1;
}

body.pol-index .card.pol-hub-card.is-visible:hover .card-title {
  color: var(--hub-accent);
}

body.pol-index .card.pol-hub-card .card-desc {
  color: var(--pol-text-secondary, #5c6578);
  font-size: 0.88rem;
  line-height: 1.65;
  flex: 1;
  position: relative;
  z-index: 1;
}

body.pol-index .pol-hub-card-link {
  margin-top: 0.7rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pol-navy, #1b2a4a);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
}

body.pol-index .pol-hub-card-link::after {
  content: "→";
  transition: transform 0.28s ease;
  color: var(--hub-accent);
}

body.pol-index .card.pol-hub-card.is-visible:hover .pol-hub-card-link::after {
  transform: translateX(5px);
}

/* Accenti per sezione */
body.pol-index .pol-hub-card[data-slug="holiday"] {
  --hub-accent: #c4663a;
}
body.pol-index .pol-hub-card[data-slug="home"] {
  --hub-accent: #2e4a7d;
}
body.pol-index .pol-hub-card[data-slug="rent"] {
  --hub-accent: #3d6b5c;
}
body.pol-index .pol-hub-card[data-slug="services"] {
  --hub-accent: #b5834a;
}
body.pol-index .pol-hub-card[data-slug="building"] {
  --hub-accent: #1b2a4a;
}
body.pol-index .pol-hub-card[data-slug="shop"] {
  --hub-accent: #a85a32;
}
body.pol-index .pol-hub-card[data-slug="news"] {
  --hub-accent: #8a6a45;
}

@media (prefers-reduced-motion: reduce) {
  body.pol-index .card.pol-hub-card,
  body.pol-index .pol-hub-logo {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
