/* Magenta Development — sito vetrina (bozza)
   Plain CSS, mobile-first, system fonts, no external resources.
   Contrast values for every colour pair are listed in README.md. */

:root {
  --bg: #FAF8F5;         /* page background, off-white */
  --bg-2: #F2EEE9;       /* alternate section background, darker off-white */
  --white: #FFFFFF;      /* cards */
  --ink: #111114;        /* main text, black */
  --ink-soft: #55504C;   /* secondary text, warm grey */
  --black: #0B0B0B;      /* footer background, deep black */
  --accent: #743A43;     /* buttons, step numbers, eyebrow: brand wine (8.2:1 on --bg) */
  --accent-hover: #111114; /* button hover: black (wine is the only colour) */
  --brand: #743A43;      /* links, hero accent: brand wine */
  --on-dark: #FAF8F5;    /* text and links on the black footer */
  --line: #E8E4DE;       /* hairlines, decorative only */
  --mark: #FFE9A8;       /* placeholder highlight */

  /* Headings and body: system sans, closest to the logo's Manrope without loading a web font (H-0017). */
  --heading: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 1.25rem;
  --max: 64rem;
  --radius: 14px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--heading);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

/* Skip link: hidden until focused */
.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--ink);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo {
  display: block;
  height: 2.1rem;
  width: auto;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.35rem 0;
  display: inline-block;
}
.site-nav a:hover { color: var(--brand); text-decoration: underline; }

/* Language switch IT | EN (links, no script; current language marked with aria-current).
   Phone and tablet: brand and switch share the first row, the menu takes the second.
   Desktop: brand, menu, switch on one row. */
.lang-switch ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang-switch li + li { position: relative; }
.lang-switch li + li::before { /* visual "|" separator, not read aloud */
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 1.1em;
  transform: translateY(-50%);
  border-left: 1px solid var(--ink-soft);
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 0.4rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.lang-switch a:hover { color: var(--brand); text-decoration: underline; }
.lang-switch a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--brand);
}
.site-header .site-nav { flex-basis: 100%; }

/* Hero */
.hero {
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.hero .eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero h1 { max-width: 14ch; }
.hero h1 .accent { color: var(--brand); }
.hero .lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 1.8rem;
}
.hero-arch {
  display: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
}
.button:hover { background: var(--accent-hover); text-decoration: none; }
.text-link { font-weight: 600; }

/* Sections */
section { scroll-margin-top: 1rem; }
.section { padding: 3.5rem 0; }
.section.alt { background: var(--bg-2); }
.section-intro {
  color: var(--ink-soft);
  max-width: 38rem;
  margin-bottom: 2rem;
}

/* Services */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.service {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
  border-top: 4px solid var(--accent);
}
.service:nth-child(2n) { border-top-color: var(--ink); }
.service h3 { margin-bottom: 0.4rem; }
.service p { margin: 0; color: var(--ink-soft); }

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.4rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* About */
.about p { max-width: 40rem; }
.about .note {
  border-left: 4px solid var(--brand);
  padding-left: 1rem;
  color: var(--ink-soft);
}

/* Contacts */
.contacts {
  display: grid;
  gap: 1rem;
  margin: 0;
}
.contact {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.contact dt {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.contact dd {
  margin: 0;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}
.contact dd a { font-weight: 600; }
.contact .hint {
  display: block;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

/* Legal pages */
.legal { padding: 2.5rem 0 3.5rem; }
.legal .wrap { max-width: 46rem; }
.legal h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.4rem; }
.updated { color: var(--ink-soft); font-size: 0.95rem; }

/* Placeholder that the CEO must fill before launch */
.placeholder {
  background: var(--mark);
  color: var(--ink);
  padding: 0 0.25em;
  border-radius: 3px;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--black);
  color: var(--bg-2);
  padding: 2.2rem 0;
  font-size: 0.95rem;
}
.site-footer p { margin: 0 0 0.4rem; }
.site-footer a { color: var(--on-dark); }
.site-footer :focus-visible { outline-color: var(--on-dark); } /* 19:1 on black; wine would be 2.4:1 */
.site-footer .footer-name {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.1rem;
}

/* 404 */
.notfound { padding: 4rem 0 5rem; }
.notfound .h1-alt {
  display: block;
  font-size: 0.6em;
  color: var(--ink-soft);
  margin-top: 0.3em;
}
.notfound-en { margin-top: 2rem; }

/* Tablet and up */
@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
  .hero { padding: 5rem 0 4.5rem; }
  .hero .wrap {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: center;
  }
  .hero-arch {
    display: block;
    justify-self: end;
    width: 100%;
    max-width: 18rem;
    height: auto;
  }
  .services { grid-template-columns: repeat(2, 1fr); }
  .contacts { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 4.5rem 0; }
}

/* Desktop */
@media (min-width: 64rem) {
  .site-header .site-nav { flex-basis: auto; margin-left: auto; order: 2; }
  .lang-switch { order: 3; }
  .services { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding-left: 0; padding-top: 3.4rem; }
}

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

@media print {
  .site-nav, .lang-switch, .skip, .hero-arch { display: none; }
  body { background: #fff; }
}
