/*
Theme Name: Monferrato Rilievi
Theme URI: https://www.monferratorilievi.it/
Author: Monferrato Rilievi
Description: Tema aziendale leggero per servizi di rilievo laser scanner 3D.
Version: 0.3.7
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: monferrato-rilievi
*/

:root {
  --ink: #0d1b2a;
  --ink-soft: #46586b;
  --paper: #f4f7fa;
  --white: #ffffff;
  --line: rgba(23, 33, 38, 0.14);
  --red: #1e88e5;
  --red-dark: #0055a5;
  --red-soft: #dcecff;
  --steel: #e6e9ee;
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 34px;
  --shadow: 0 18px 55px rgba(23, 33, 38, 0.13);
  --container: min(1180px, calc(100vw - 40px));
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

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

a { color: inherit; }

button, input, textarea, select { font: inherit; }

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

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

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

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 10px 28px rgba(23, 33, 38, .06);
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.035em;
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 850;
  line-height: 1;
}

.brand-logo {
  width: clamp(220px, 23vw, 305px);
  max-height: 68px;
  object-fit: contain;
  object-position: left center;
}

.brand-mark {
  width: 36px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, #0d1b2a 22%, #0055a5 58%, #1e88e5 100%);
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: -.08em;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 4px;
}

.brand > span:last-child {
  color: var(--ink);
  letter-spacing: .025em;
}

.site-nav { display: flex; align-items: center; gap: 30px; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 730;
}

.site-nav a:not(.button-link):hover { color: var(--red); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  transition: .2s ease;
}

.button-link,
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 19px;
  border: 1px solid var(--red-dark);
  border-radius: 999px;
  color: var(--white);
  background: var(--red-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 780;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.button:hover, .button-link:hover {
  border-color: var(--ink);
  background: var(--ink);
  transform: translateY(-2px);
}

.button.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: transparent;
}

.button.secondary:hover { border-color: var(--ink); background: var(--white); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 58px;
}

.hero::before {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  top: -260px;
  left: -210px;
  border: 1px solid rgba(201, 45, 52, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(201,45,52,.025), 0 0 0 140px rgba(201,45,52,.018);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(410px, .92fr);
  align-items: center;
  gap: clamp(42px, 7vw, 92px);
}

.hero h1 {
  max-width: 770px;
  margin: 0;
  font-size: clamp(48px, 6.4vw, 88px);
  line-height: .99;
  letter-spacing: -.065em;
  font-weight: 860;
}

.hero h1 em { color: var(--red); font-style: normal; }

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.55;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-visual {
  position: relative;
  min-height: 570px;
}

.scan-frame {
  position: absolute;
  inset: 0 0 38px 0;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.scan-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.15) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.15) 1px, transparent 1px);
  background-size: 44px 44px;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.scan-frame img { width: 100%; height: 100%; object-fit: cover; }

.scan-line {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff5961 15%, #fff 50%, #ff5961 85%, transparent);
  box-shadow: 0 0 14px rgba(255,70,80,.8);
  animation: scanning 5.5s ease-in-out infinite;
}

@keyframes scanning { 0%,100% { top: 12%; } 50% { top: 88%; } }

.trust-strip { padding: 28px 0 70px; }

.trust-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-list li {
  position: relative;
  padding: 18px 14px 18px 28px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.trust-list li::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 8px;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
}

.section { padding: clamp(74px, 9vw, 128px) 0; }
.section-white { background: var(--white); }
.section-dark { color: var(--white); background: var(--ink); }
.section-dark .eyebrow { color: #8ac5ff; }

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(320px, .45fr);
  gap: 70px;
  align-items: end;
  margin-bottom: 56px;
}

.section-heading h2 {
  max-width: 790px;
  margin: 0;
  font-size: clamp(38px, 4.6vw, 66px);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.section-heading > p { margin: 0; color: var(--ink-soft); }
.section-dark .section-heading > p { color: rgba(255,255,255,.65); }

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

.service-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.service-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); border-color: transparent; }

.service-number {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  color: var(--red-dark);
  border: 1px solid rgba(0,85,165,.34);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.service-card h3 { margin: 42px 0 12px; font-size: 27px; line-height: 1.12; letter-spacing: -.035em; }
.service-card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.service-details {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.service-details li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.48;
}

.service-details li::before {
  content: "";
  position: absolute;
  top: .65em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-dark);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 130px;
  gap: 16px;
}

.work-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: var(--radius-md);
  background: #27343a;
}

.work-card:nth-child(1) { grid-column: span 7; grid-row: span 4; }
.work-card:nth-child(2) { grid-column: span 5; grid-row: span 3; }
.work-card:nth-child(3) { grid-column: span 5; grid-row: span 3; }

.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.work-card:hover img { transform: scale(1.035); }

.work-card figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 58px 24px 22px;
  color: var(--white);
  background: linear-gradient(transparent, rgba(10,18,22,.88));
  font-weight: 750;
}

.work-card figcaption span { display: block; color: rgba(255,255,255,.7); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  counter-reset: steps;
  border-top: 1px solid rgba(255,255,255,.18);
}

.process-step { position: relative; padding: 30px 26px 0 0; counter-increment: steps; }
.process-step::before { content: "0" counter(steps); color: var(--red-soft); font-size: 13px; font-weight: 800; }
.process-step::after { content: ""; position: absolute; top: -4px; left: 0; width: 8px; height: 8px; background: var(--red); border-radius: 50%; }
.process-step h3 { margin: 28px 0 10px; font-size: 20px; }
.process-step p { margin: 0; color: rgba(255,255,255,.62); font-size: 14px; }

.about-grid { display: grid; grid-template-columns: minmax(320px,.8fr) 1fr; align-items: center; gap: clamp(50px,8vw,110px); }

.about-visual { position: relative; }
.about-visual img { width: 100%; aspect-ratio: 5/4; object-fit: cover; border-radius: var(--radius-lg); }
.about-visual::before { content: ""; position: absolute; z-index: -1; inset: 32px -28px -28px 32px; border: 1px solid var(--red); border-radius: var(--radius-lg); }

.about-copy h2 { margin: 0 0 24px; font-size: clamp(38px,4.2vw,60px); line-height: 1.05; letter-spacing: -.05em; }
.about-copy p { color: var(--ink-soft); }

.use-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; list-style: none; padding: 0; margin: 28px 0 0; }
.use-list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 730; }

.coverage-section { padding-top: 0; background: var(--white); }

.coverage-panel {
  display: grid;
  grid-template-columns: minmax(180px, .4fr) minmax(0, 1fr);
  gap: clamp(36px, 7vw, 100px);
  align-items: start;
  padding: clamp(42px, 6vw, 76px);
  color: var(--white);
  background: linear-gradient(135deg, var(--ink) 0%, #0b3157 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.coverage-panel .eyebrow { color: #77b7f4; }

.coverage-copy > p {
  max-width: 820px;
  margin: 0;
  color: var(--white);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.35;
  letter-spacing: -.025em;
}

.coverage-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.coverage-list li {
  position: relative;
  padding: 12px 0 12px 24px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: 14px;
  font-weight: 730;
}

.coverage-list li::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.contact-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 50px;
  padding: clamp(38px,6vw,74px);
  color: var(--white);
  background: var(--red-dark);
  border-radius: var(--radius-lg);
}

.contact-panel::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -150px;
  top: -190px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgba(255,255,255,.035), 0 0 0 100px rgba(255,255,255,.025);
}

.contact-panel h2 { max-width: 780px; margin: 0; font-size: clamp(39px,5vw,67px); line-height: 1.02; letter-spacing: -.055em; }
.contact-panel p { max-width: 700px; margin: 18px 0 0; color: rgba(255,255,255,.82); }
.contact-panel .button { position: relative; z-index: 2; color: var(--ink); border-color: var(--white); background: var(--white); white-space: nowrap; }

.site-footer { padding: 72px 0 30px; color: rgba(255,255,255,.72); background: #10191d; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .7fr .8fr; gap: 70px; padding-bottom: 54px; }
.footer-brand { color: var(--white); }
.footer-brand-logo { width: min(100%, 390px); border-radius: 18px; }
.site-footer h3 { margin: 0 0 16px; color: var(--white); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.site-footer p { margin: 0; font-size: 14px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }

.page-hero { padding: 80px 0 44px; }
.page-hero h1 { margin: 0; font-size: clamp(44px,7vw,84px); line-height: 1; letter-spacing: -.06em; }
.entry-content { max-width: 820px; margin: 0 auto; padding: 30px 0 100px; }
.entry-content > * { max-width: 100%; }
.entry-content h2 { margin-top: 2em; font-size: 36px; letter-spacing: -.04em; }
.entry-content a { color: var(--red-dark); }

.policy-updated { margin: 18px 0 0; color: var(--ink-soft); font-size: 14px; }
.policy-content { padding-top: 10px; }
.policy-content > p:first-child { color: var(--ink-soft); font-size: 19px; }
.policy-content h2 { padding-top: 20px; border-top: 1px solid var(--line); }
.policy-content strong { color: var(--ink); }

@media (max-width: 980px) {
  body.menu-open { overflow: auto; }
  .site-nav {
    display: none;
    position: fixed;
    z-index: 120;
    top: 92px;
    right: 16px;
    left: 16px;
    padding: 10px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 20px 55px rgba(13, 27, 42, .18);
    align-items: stretch;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav li:last-child { border-bottom: 0; }
  .site-nav a { display: block; padding: 13px 14px; font-size: 16px; }
  .site-nav .button-link { margin-top: 10px; padding: 11px 16px; text-align: center; }
  .menu-toggle { display: block; }
  .menu-toggle[aria-expanded="true"] span { opacity: 0; }
  .menu-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }
  .hero { padding-top: 58px; }
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 540px; max-width: 720px; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .service-card:last-child { grid-column: span 2; }
  .process-grid { grid-template-columns: 1fr 1fr; gap: 42px 20px; }
  .contact-panel { grid-template-columns: 1fr; }
  .coverage-panel { grid-template-columns: 1fr; }
  .coverage-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: span 2; }
}

@media (max-width: 680px) {
  :root { --container: min(100% - 30px, 1180px); }
  body { font-size: 16px; }
  .header-inner { min-height: 72px; }
  .brand-logo { width: 210px; max-height: 58px; }
  .site-nav { top: 80px; right: 10px; left: 10px; }
  .scan-line { display: none; }
  .hero { padding: 44px 0 34px; }
  .hero h1 { font-size: clamp(43px, 14vw, 62px); }
  .hero-grid { gap: 42px; }
  .hero-visual { min-height: 410px; }
  .scan-frame { bottom: 30px; border-radius: 24px; }
  .trust-strip { padding-bottom: 44px; }
  .trust-list { grid-template-columns: 1fr 1fr; }
  .section { padding: 72px 0; }
  .section-heading { margin-bottom: 34px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card, .service-card:last-child { min-height: 300px; grid-column: auto; }
  .work-grid { grid-template-columns: 1fr; grid-auto-rows: 320px; }
  .work-card:nth-child(n) { grid-column: auto; grid-row: auto; }
  .process-grid { grid-template-columns: 1fr; }
  .use-list { grid-template-columns: 1fr; }
  .about-visual::before { inset: 18px -8px -12px 18px; }
  .contact-panel { padding: 34px 24px; border-radius: 24px; }
  .coverage-panel { padding: 34px 24px; border-radius: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid > :first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
