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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--site-header-height) + 1.25rem);
}

:root {
  --site-header-height: 4.75rem;
  --site-header-blur: 12px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 45% at 100% 0%, rgba(91, 78, 140, 0.07), transparent 55%),
    radial-gradient(ellipse 55% 40% at 0% 100%, rgba(180, 83, 9, 0.06), transparent 50%),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--font-weight-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

a,
button {
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

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

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

.site-shell {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}

/* ---------- Header ---------- */
[data-site-header] {
  position: relative;
  z-index: 40;
  display: block;
  min-height: var(--site-header-height);
}

.site-header-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--color-header-bg) 92%, transparent);
  backdrop-filter: blur(var(--site-header-blur)) saturate(120%);
  -webkit-backdrop-filter: blur(var(--site-header-blur)) saturate(120%);
  box-shadow: var(--shadow-header);
  border-bottom: 1px solid var(--color-header-border);
  color: var(--color-header-fg);
}

.site-header-bar a,
.site-header-bar button {
  color: var(--color-header-fg);
}

.site-header-bar .nav-link {
  position: relative;
  font-weight: 500;
  color: var(--color-header-fg);
  opacity: 0.85;
}

.site-header-bar .nav-link:hover {
  opacity: 1;
  color: var(--color-accent);
}

.site-header-bar .nav-link.is-active {
  opacity: 1;
  color: var(--color-accent);
}

.site-header-bar .nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
}

.nav-link--external {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  opacity: 0.88;
}

.nav-link--external:hover {
  opacity: 1;
}

.nav-external-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  line-height: 0;
}

.nav-link--external:hover .nav-external-icon {
  color: var(--color-accent-hover);
}

.site-mobile-menu .nav-external-icon {
  margin-left: 0.35rem;
}

.site-mobile-menu {
  background: var(--color-surface);
  color: var(--color-header-fg);
  border-bottom: 1px solid var(--color-header-border);
  box-shadow: var(--shadow-card);
}

.site-mobile-menu a {
  color: var(--color-header-fg);
}

.site-mobile-menu a:hover,
.site-mobile-menu a.is-active {
  color: var(--color-accent);
}

.site-mobile-menu .mobile-cta {
  color: var(--color-accent);
  font-weight: 600;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header-bar,
  .site-mobile-menu {
    background: var(--color-header-bg);
  }
}

[data-menu-toggle] .mobile-menu-close {
  display: none;
}

[data-menu-toggle][aria-expanded="true"] .mobile-menu-burger {
  display: none;
}

[data-menu-toggle][aria-expanded="true"] .mobile-menu-close {
  display: inline-flex;
}

[data-mobile-menu] {
  transition: opacity 180ms ease, transform 180ms ease;
}

[data-mobile-menu].is-hidden {
  display: none;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-0.5rem);
}

/* ---------- Tipografia ---------- */
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 1.4rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.section-title {
  font-size: clamp(1.85rem, 2.1vw + 1rem, 2.75rem);
  letter-spacing: -0.02em;
}

.section-title--xl {
  font-size: clamp(2.2rem, 2.8vw + 1.1rem, 3.5rem);
  line-height: 1.12;
}

.text-highlight {
  color: var(--color-accent);
}

.eyebrow-rule {
  width: 3.5rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.text-link {
  color: var(--color-accent-cyan);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--color-accent-cyan) 35%, transparent);
  text-underline-offset: 3px;
}

.text-link:hover {
  color: var(--color-accent-cyan-hover);
  text-decoration-color: var(--color-accent-cyan);
}

/* ---------- Hero professionale ---------- */
.hero-intro {
  position: relative;
  padding: 0.5rem 0;
}

.hero-intro__content {
  position: relative;
  z-index: 1;
}

.hero-portrait-wrap {
  position: relative;
  z-index: 1;
  align-self: center;
}

.hero-portrait {
  width: 100%;
  max-height: 28rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-lg);
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow-card);
}

/* ---------- Cards ---------- */
.section-card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.section-card--subtle {
  background: var(--color-surface-elevated);
  box-shadow: 0 4px 20px rgba(36, 59, 74, 0.06);
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
  background: color-mix(in srgb, var(--color-accent) 8%, var(--color-surface));
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Pulsanti ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-button);
  background: var(--color-accent);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--color-accent);
  box-shadow: 0 6px 20px rgba(180, 83, 9, 0.22);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.28);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-button);
  color: var(--color-heading);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-on-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-button);
  background: var(--color-accent);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid var(--color-accent);
}

.btn-on-header:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #ffffff;
}

.site-header-bar a.btn-on-header {
  color: #ffffff;
  opacity: 1;
}

.site-header-bar a.btn-on-header:hover {
  color: #ffffff;
}

/* ---------- Feature & method cards ---------- */
.feature-card {
  position: relative;
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.feature-card:hover {
  border-color: color-mix(in srgb, var(--color-accent) 35%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(36, 59, 74, 0.1);
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 3px;
  background: var(--color-accent);
  border-radius: 0 0 2px 2px;
  opacity: 0.85;
}

.method-step {
  position: relative;
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: 0 4px 20px rgba(36, 59, 74, 0.05);
}

.method-step__num {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  line-height: 1;
  font-weight: 600;
  color: color-mix(in srgb, var(--color-accent) 75%, var(--color-accent-secondary));
}

/* ---------- Skill bar ---------- */
.skill-row {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.skill-row__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-heading);
}

.skill-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.skill-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-secondary));
}

/* ---------- Testimonial ---------- */
.testimonial {
  position: relative;
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface-elevated);
  box-shadow: 0 4px 20px rgba(36, 59, 74, 0.05);
}

.testimonial__mark {
  font-family: var(--font-heading);
  font-size: 3rem;
  line-height: 0.8;
  color: var(--color-accent);
  opacity: 0.5;
}

.testimonial__author {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-accent-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.testimonial__author::before {
  content: "";
  width: 1.2rem;
  height: 2px;
  background: var(--color-accent);
}

/* ---------- Contact ---------- */
.contact-card {
  padding: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-accent) 20%, transparent);
  color: var(--color-accent);
}

.contact-card a {
  color: var(--color-heading);
  font-weight: 500;
  border-bottom: 1px solid transparent;
}

.contact-card a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.map-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  aspect-ratio: 16 / 9;
  min-height: 320px;
  box-shadow: var(--shadow-card);
}

.map-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.2) contrast(1.02);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 3px solid var(--color-accent);
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
}

.site-footer a {
  color: var(--color-footer-muted);
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer .nav-external-icon {
  color: var(--color-accent);
}

.site-footer a:hover .nav-external-icon {
  color: color-mix(in srgb, var(--color-accent) 75%, #ffffff);
}

.site-footer__brand > a {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.site-footer .brand-logo {
  filter: none;
  opacity: 1;
}

.site-footer .brand-wordmark__name {
  color: #ffffff;
}

.site-footer .brand-wordmark__role {
  color: var(--color-footer-muted);
}

.site-footer .font-heading.text-accent-cyan,
.site-footer .tracking-label {
  color: color-mix(in srgb, var(--color-accent) 85%, #ffffff) !important;
}

.site-footer .border-border {
  border-color: rgba(255, 255, 255, 0.12);
}

.site-footer .text-muted {
  color: var(--color-footer-muted);
}

/* ---------- Brand ---------- */
.brand-logo {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-wordmark__name {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-header-fg);
  letter-spacing: -0.01em;
}

.brand-wordmark__role {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

/* ---------- Privacy ---------- */
.privacy-content {
  color: var(--color-text);
  line-height: 1.85;
}

.privacy-content h2 {
  margin-top: 2.2rem;
  margin-bottom: 0.9rem;
  font-size: 1.35rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-heading);
}

.privacy-content p {
  margin: 0.75rem 0;
}

.privacy-content ul {
  padding-left: 1.2rem;
  margin: 0.75rem 0;
}

.privacy-content li {
  margin: 0.35rem 0;
}

.privacy-content strong {
  color: var(--color-heading);
}

.privacy-info-box {
  border-left: 3px solid var(--color-accent);
  background: var(--color-surface-elevated);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.25rem 0;
}

.privacy-back-info {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-elevated);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ---------- Network pills (ecosistema) ---------- */
.network-card h3 a {
  color: var(--color-heading);
}

.network-card h3 a:hover {
  color: var(--color-accent);
}

@media (max-width: 768px) {
  :root {
    --site-header-height: 4.25rem;
  }
}
