/*
 * Doctor P — controlled homepage refinement layer.
 * This file intentionally overrides the existing visual system without
 * changing the page's narrative order, content or dynamic integrations.
 */
:root {
  --dp-header-height: 64px;
  --dp-section-xl: clamp(76px, 8vw, 118px);
  --dp-section-lg: clamp(64px, 6.5vw, 96px);
  --dp-section-md: clamp(52px, 5vw, 76px);
  --dp-content: 1180px;
  --dp-reading: 66ch;
  --dp-focus: 0 0 0 3px rgba(38, 127, 181, .28);
  --dp-card-shadow: 0 18px 46px rgba(38, 31, 24, .07);
  --dp-card-shadow-hover: 0 22px 54px rgba(38, 31, 24, .1);
}

html {
  scroll-padding-top: calc(var(--dp-header-height) + 18px);
}

body {
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

main {
  display: block;
}

#metodo,
#tecnologia,
#modalita,
#faq,
#contatti,
#cta-finale {
  scroll-margin-top: calc(var(--dp-header-height) + 18px);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 14px;
  z-index: 1000;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 600 14px/1 "DM Sans", sans-serif;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--dp-focus);
}

/* Header */
nav[aria-label="Navigazione principale"] {
  height: var(--dp-header-height);
  background: rgba(255, 255, 255, .92);
  border-color: rgba(26, 23, 20, .08);
  transition: height .25s ease, background-color .25s ease, box-shadow .25s ease;
}

nav[aria-label="Navigazione principale"].is-scrolled {
  height: 54px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 9px 28px rgba(36, 31, 27, .055);
}

.nav-in {
  max-width: 1340px;
  padding-inline: clamp(20px, 3vw, 40px);
}

.nav-logo,
.nav-links a {
  border-radius: 8px;
}

.nav-links {
  gap: clamp(18px, 2vw, 30px);
}

.nav-links a:not(.nav-cta) {
  position: relative;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  font-weight: 450;
}

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .22s ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="location"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links a[aria-current="location"] {
  color: var(--ink);
}

.nav-cta {
  min-height: 40px;
  padding-inline: 23px;
  box-shadow: 0 8px 22px rgba(26, 23, 20, .12);
}

.nav-burger {
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Type and shared rhythm */
.title,
.mfq-hdr h2,
.fw-hdr h2,
.faq-hdr h2 {
  font-size: clamp(32px, 4.1vw, 52px);
  line-height: 1.08;
  text-wrap: balance;
}

.desc,
.hero-sub,
.pb-sub,
.contact-section__intro {
  max-width: var(--dp-reading);
}

.lbl,
.hero-tag,
.contact-section__eyebrow {
  letter-spacing: .16em;
}

/* Hero */
.hero {
  min-height: clamp(720px, 100svh, 920px);
  grid-template-columns: minmax(0, 53%) minmax(430px, 47%);
  background: var(--off-white);
}

.hero-text {
  padding: clamp(118px, 12vh, 154px) clamp(46px, 5vw, 82px) clamp(72px, 8vh, 104px);
}

.hero h1 {
  max-width: 630px;
  margin-bottom: 24px;
  font-size: clamp(42px, 4.15vw, 62px);
  line-height: 1.04;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.hero-sub {
  margin-bottom: 30px;
  font-size: clamp(16px, 1.2vw, 18px);
}

.hero-actions {
  margin-bottom: 34px;
}

.btn-p,
.btn-teal {
  box-shadow: 0 12px 28px rgba(26, 23, 20, .12);
}

.btn-g {
  padding-block: 10px;
}

.hero-price {
  margin-bottom: 16px;
}

.hero-trust {
  max-width: 520px;
  gap: 12px 20px;
}

.hero-photo img {
  object-position: center 26%;
  transition: transform 1.2s cubic-bezier(.22, .61, .36, 1);
}

.hero-badge {
  bottom: clamp(24px, 3vw, 42px);
  left: clamp(24px, 3vw, 42px);
  border: 1px solid rgba(255, 255, 255, .75);
  padding: 17px 22px;
}

/* Photography and split sections */
.pb {
  height: clamp(340px, 39vw, 550px);
}

.pb img {
  transition: transform .9s cubic-bezier(.22, .61, .36, 1);
}

.pb::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
}

.pb-ov {
  z-index: 2;
  padding: clamp(34px, 5vw, 76px);
}

.problem,
.whatis,
.tech,
.porta {
  min-height: min(760px, 80svh);
}

.prob-content,
.tech-content,
.porta-content,
.whatis-content {
  padding: clamp(60px, 6vw, 94px);
}

.prob-content,
.tech-content,
.porta-content {
  background: #1b1917;
}

.prob-card {
  gap: 18px;
  padding: 18px 0;
}

.prob-card p,
.tech-content .desc,
.porta-content .desc {
  color: rgba(255, 255, 255, .72);
}

.prob-photo img,
.whatis-photo img,
.tech-photo img,
.porta-photo img {
  transition: transform .8s cubic-bezier(.22, .61, .36, 1);
}

.whatis-content {
  justify-content: center;
}

.stats-bar {
  position: relative;
  z-index: 2;
  box-shadow: inset 0 1px rgba(26, 23, 20, .04), inset 0 -1px rgba(26, 23, 20, .04);
}

.stat-cell {
  padding-block: clamp(28px, 3.5vw, 46px);
}

/* Fast answers */
.mfq-sec {
  padding: var(--dp-section-lg) 24px;
}

.mfq-hdr {
  margin-bottom: clamp(38px, 5vw, 58px);
}

.mfq-grid {
  gap: clamp(16px, 2vw, 24px);
}

.mfq-card {
  position: relative;
  min-height: 310px;
  padding: 34px 31px;
  box-shadow: var(--dp-card-shadow);
  overflow: hidden;
}

.mfq-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 30px;
  left: 30px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(133, 197, 237, .9), transparent);
  opacity: .7;
}

.mfq-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--dp-card-shadow-hover);
}

/* Method and related benefits */
.metodo {
  padding: var(--dp-section-xl) 24px var(--dp-section-lg);
}

.metodo-hdr {
  margin-bottom: clamp(42px, 5vw, 62px);
}

.m-card {
  box-shadow: var(--dp-card-shadow);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.m-card:hover {
  transform: translateY(-2px);
  border-color: rgba(133, 197, 237, .42);
  box-shadow: var(--dp-card-shadow-hover);
}

.diff-sec {
  padding: var(--dp-section-lg) 24px var(--dp-section-xl);
}

.diff-hdr {
  margin-bottom: clamp(38px, 4vw, 52px);
}

.diff-grid {
  gap: 0 48px;
}

.diff-card {
  padding: 27px 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.diff-card:nth-last-child(-n + 2) {
  border-bottom: 1px solid var(--border);
}

.diff-card:hover {
  transform: none;
  box-shadow: none;
}

.diff-card:hover .diff-icon {
  transform: translateY(-2px);
  background: #deeff9;
}

.diff-icon {
  transition: transform .22s ease, background-color .22s ease;
}

/* Technology */
.ts {
  border-color: rgba(255, 255, 255, .11);
  background: rgba(255, 255, 255, .045);
}

.tech-stats {
  gap: 14px;
}

.modalita,
.comp,
.ugelli,
.forwho {
  padding-top: var(--dp-section-xl);
  padding-bottom: var(--dp-section-xl);
}

.mod-grid {
  gap: clamp(16px, 2vw, 24px);
}

.mod-card {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.mod-card:hover {
  transform: translateY(-2px);
  border-color: rgba(133, 197, 237, .42);
  box-shadow: var(--dp-card-shadow);
}

/* Comparison */
.comp-hdr {
  margin-bottom: clamp(38px, 5vw, 54px);
}

.tbl-wrap {
  border: 1px solid rgba(26, 23, 20, .12);
  box-shadow: 0 24px 58px rgba(40, 33, 27, .1);
}

tbody tr {
  border-color: rgba(26, 23, 20, .105);
}

thead th,
tbody td {
  min-height: 64px;
}

tbody td:nth-child(3) {
  background: rgba(133, 197, 237, .115);
}

thead th:nth-child(3) {
  color: #165f8b;
  background: #9ed4f2;
}

/* Package and product experience */
.ug-grid {
  gap: clamp(14px, 2vw, 22px);
}

.ug-card {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ug-card:hover {
  transform: translateY(-2px);
  border-color: rgba(133, 197, 237, .36);
  box-shadow: var(--dp-card-shadow);
}

.porta {
  min-height: 650px;
}

/* Audience cards */
.forwho {
  padding-inline: 24px;
}

.fw-grid {
  gap: 20px;
}

.fw-card {
  min-height: 252px;
  border-top: 2px solid rgba(133, 197, 237, .38);
  box-shadow: 0 12px 32px rgba(38, 31, 24, .045);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.fw-card:hover {
  transform: translateY(-2px);
  border-top-color: var(--teal);
  box-shadow: var(--dp-card-shadow);
}

/* FAQ */
.faq-sec {
  padding: var(--dp-section-lg) 24px var(--dp-section-xl);
}

.faq-hdr {
  margin-bottom: clamp(38px, 4vw, 50px);
}

.faq-list {
  max-width: 880px;
}

.faq-q {
  min-height: 72px;
  padding: 21px 6px;
  border-radius: 10px;
}

.faq-q:hover {
  padding-inline: 10px;
  background: rgba(133, 197, 237, .06);
}

.faq-q h3 {
  font-size: clamp(16px, 1.35vw, 18px);
}

.faq-a-in {
  max-width: 730px;
  padding: 0 42px 24px 6px;
}

/* Final CTA */
.cta-sec {
  padding: var(--dp-section-lg) 24px;
}

.price-pill {
  box-shadow: var(--dp-card-shadow);
}

/* Dynamic contacts */
.contact-section {
  padding: var(--dp-section-lg) 24px;
}

.contact-section__inner {
  grid-template-columns: minmax(0, 1fr) minmax(360px, .78fr);
  gap: clamp(44px, 6vw, 82px);
  align-items: center;
}

.contact-section h2 {
  font-size: clamp(38px, 4.3vw, 58px);
}

.contact-section__intro {
  margin-top: 18px;
}

.contact-section__support {
  margin-top: 30px;
  padding-top: 24px;
}

.contact-section__panel {
  padding: clamp(24px, 2.6vw, 34px);
  box-shadow: var(--dp-card-shadow);
}

/* Footer */
footer {
  padding: clamp(50px, 5vw, 64px) 32px 34px;
}

.ft-top {
  gap: clamp(30px, 4vw, 50px);
  margin-bottom: 42px;
}

.ft-col a,
.ft-col p,
.ft-desc {
  font-size: 13px;
  line-height: 1.6;
}

.ft-col a {
  min-height: 28px;
  width: fit-content;
}

/* Reveal refinement */
.rv {
  transform: translateY(18px);
  transition-duration: .52s;
}

.rv.in {
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .hero:hover .hero-photo img {
    transform: scale(1.012);
  }

  .pb:hover img,
  .prob-photo:hover img,
  .whatis-photo:hover img,
  .tech-photo:hover img,
  .porta-photo:hover img {
    transform: scale(1.015);
  }
}

@media (max-width: 1100px) {
  :root {
    --dp-header-height: 60px;
  }

  .nav-links {
    gap: 15px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero {
    grid-template-columns: minmax(0, 52%) minmax(400px, 48%);
  }

  .hero-text {
    padding-inline: 42px;
  }
}

@media (max-width: 960px) {
  .hero {
    min-height: 0;
  }

  .hero-photo {
    aspect-ratio: 5 / 4;
  }

  .hero-text {
    padding: 48px 7vw 70px;
  }

  .hero h1 {
    max-width: 720px;
    font-size: clamp(40px, 7.3vw, 60px);
  }

  .hero-sub {
    max-width: 620px;
  }

  .mob-menu {
    top: var(--dp-header-height);
    max-height: calc(100svh - var(--dp-header-height));
    padding: 14px 24px 28px;
    overflow-y: auto;
    background: rgba(255, 255, 255, .985);
    box-shadow: 0 22px 42px rgba(33, 28, 24, .12);
  }

  .mob-menu a {
    min-height: 50px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(26, 23, 20, .08);
  }

  .mob-menu a:last-child {
    justify-content: center;
    margin-top: 16px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
  }

  .problem,
  .whatis,
  .tech,
  .porta {
    min-height: 0;
  }

  .prob-content,
  .tech-content,
  .porta-content,
  .whatis-content {
    padding: 58px 7vw;
  }

  .diff-grid {
    gap: 0 32px;
  }

  .contact-section__inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 768px) {
  :root {
    --dp-section-xl: 72px;
    --dp-section-lg: 62px;
    --dp-section-md: 52px;
  }

  .nav-logo-sub {
    display: none;
  }

  .hero-photo {
    aspect-ratio: 4 / 3;
  }

  .hero-mid-mob {
    padding: 13px 20px;
  }

  .hero-mid-mob span {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.35;
    text-align: center;
  }

  .hero-text {
    padding: 42px 24px 62px;
  }

  .hero-actions {
    margin-bottom: 30px;
  }

  .pb {
    height: clamp(330px, 68vw, 460px);
  }

  .pb-ov {
    align-items: flex-end;
  }

  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }

  .stat-cell:nth-child(2) {
    border-right: 0;
  }

  .stat-cell:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .mfq-card {
    min-height: 0;
  }

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

  .diff-card,
  .diff-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .diff-card:last-child {
    border-bottom: 1px solid var(--border);
  }

  .comp-wrap {
    margin-inline: -24px;
    padding-inline: 24px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .tbl-wrap {
    min-width: 720px;
  }

  .faq-q:hover {
    padding-inline: 6px;
    background: transparent;
  }

  .contact-section__panel {
    width: 100%;
  }

  .ft-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  :root {
    --dp-header-height: 58px;
    --dp-section-xl: 60px;
    --dp-section-lg: 54px;
  }

  .nav-in {
    padding-inline: 16px;
  }

  .nav-logo-main {
    font-size: 24px;
  }

  .nav-mobile-actions {
    gap: 4px;
    flex: 0 0 auto;
  }

  .lang-select {
    min-height: 38px;
  }

  .nav-mobile-lang {
    width: 66px;
    max-width: 66px;
    padding-inline: 7px;
  }

  .nav-burger {
    flex: 0 0 42px;
  }

  .hero-photo {
    aspect-ratio: 1 / 1.05;
  }

  .hero-photo img {
    object-position: 45% 25%;
  }

  .hero-text {
    padding: 38px 20px 56px;
  }

  .hero h1 {
    font-size: clamp(37px, 11vw, 48px);
    letter-spacing: -.03em;
  }

  .hero-actions {
    width: 100%;
    align-items: stretch;
  }

  .hero-actions .btn-p,
  .hero-actions .btn-g {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .t-item {
    align-items: flex-start;
    line-height: 1.35;
  }

  .pb {
    height: 390px;
  }

  .pb-ov {
    padding: 30px 22px;
  }

  .prob-content,
  .tech-content,
  .porta-content,
  .whatis-content {
    padding: 50px 22px;
  }

  .prob-card {
    display: grid;
    grid-template-columns: 42px 1fr;
  }

  .tech-stats {
    grid-template-columns: 1fr;
  }

  .mfq-sec,
  .metodo,
  .diff-sec,
  .modalita,
  .comp,
  .ugelli,
  .forwho,
  .faq-sec,
  .cta-sec,
  .contact-section {
    padding-inline: 20px;
  }

  .mfq-card {
    padding: 28px 24px 30px;
  }

  .diff-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
  }

  .faq-q {
    min-height: 66px;
  }

  .faq-a-in {
    padding-right: 12px;
  }

  .contact-section__row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .contact-section__panel {
    padding: 22px;
  }

  footer {
    padding-inline: 22px;
  }

  .ft-top {
    grid-template-columns: 1fr;
  }

  .ft-bottom {
    align-items: flex-start;
    text-align: left;
  }

  .ft-legal {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .rv {
    opacity: 1;
    transform: none;
  }
}
