/* ==========================================================================
   IPSO FACTO SYNERGY SRL — main stylesheet
   Palette: white (background), green #1E3A2E, burgundy #6E1D2B, black (text).
   No other colours: the secondary tones are transparencies of black or of the
   two primary colours.
   ========================================================================== */

:root {
  --green: #1E3A2E;
  --burgundy: #6E1D2B;
  --black: #000000;
  --white: #FFFFFF;

  --text: rgba(0, 0, 0, 0.82);
  --text-muted: rgba(0, 0, 0, 0.58);
  --line: rgba(0, 0, 0, 0.12);
  --tint: rgba(30, 58, 46, 0.04);

  --max-width: 1160px;
  --gutter: 24px;
  --radius: 4px;
}

/* --------------------------------------------------------------- Reset --- */

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

body,
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }

ul, ol { list-style: none; }

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

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

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

/* ------------------------------------------------------------ Typography - */

body {
  background: var(--white);
  color: var(--text);
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--black);
}

strong { font-weight: 600; }

a { color: var(--green); }

p + p { margin-top: 1.1em; }

/* -------------------------------------------------------------- Layout --- */

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

.section { padding: 96px 0; }

.section--alt {
  background: var(--tint);
  border-block: 1px solid var(--line);
}

.section__title {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  max-width: 20ch;
  margin-bottom: 32px;
}

.section__intro {
  max-width: 62ch;
  margin-bottom: 56px;
  color: var(--text-muted);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 14px;
}

.rule {
  width: 72px;
  height: 3px;
  border: 0;
  background: var(--burgundy);
  margin: 28px 0;
}

.green { color: var(--green); }
.burgundy { color: var(--burgundy); }

/* Revealed only when it receives keyboard focus. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: var(--white);
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
}

/* --------------------------------------------------------------- Header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 96px;
}

.site-header__logo img {
  height: 58px;
  width: auto;
}

.site-nav ul {
  display: flex;
  gap: 34px;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--green);
  border-bottom-color: var(--burgundy);
}

/* Hamburger button: hidden on desktop, shown below 900px. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  margin-inline: auto;
  background: var(--green);
}

/* ----------------------------------------------------------------- Hero -- */

.hero {
  padding: 104px 0 88px;
  position: relative;
  overflow: hidden;
}

/* Watermark: the brand mark, oversized on the right side, as on the poster. */
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: 50%;
  translate: 0 -50%;
  width: 460px;
  height: 460px;
  background: url("../img/marchio.png") center / contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .hero::after { display: none; }
}

.hero__inner { position: relative; z-index: 1; }

.hero__title {
  font-size: clamp(2.4rem, 6.5vw, 4.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero__text {
  max-width: 60ch;
  font-size: 1.06rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn--solid {
  background: var(--green);
  color: var(--white);
}
.btn--solid:hover,
.btn--solid:focus-visible {
  background: var(--burgundy);
  border-color: var(--burgundy);
}

.btn--outline {
  background: transparent;
  color: var(--green);
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--green);
  color: var(--white);
}

/* ---------------------------------------------------------------- About -- */

.two-columns {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 64px;
  align-items: start;
}

.quote {
  border-left: 3px solid var(--burgundy);
  padding-left: 26px;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
  color: var(--green);
}

/* --------------------------------------------------------- How we work --- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.step {
  padding: 0 28px;
  border-left: 1px solid var(--line);
}
.step:first-child { border-left: 0; padding-left: 0; }
.step:last-child { padding-right: 0; }

.step__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step__title {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--green);
  margin-bottom: 10px;
}

.step__text {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------- Products -- */

.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 40px;
}

.product img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  object-position: center bottom;
  margin-bottom: 22px;
  transition: transform 0.3s ease;
}

.product:hover img { transform: scale(1.04); }

/* Set by the script on the images that hold more than one shot: a click walks
   through the other photographs of the category. */
.product img.is-clickable { cursor: pointer; }

.product__title {
  font-size: 1.1rem;
  font-weight: 600;
  padding-top: 16px;
  border-top: 2px solid var(--green);
  margin-bottom: 8px;
}

.product__text {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------------- Franchising -- */

.offer__lead {
  font-weight: 600;
  color: var(--green);
  margin-bottom: 28px;
}

.offer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  counter-reset: offer;
}

.offer__item {
  counter-increment: offer;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
}

/* Round badge carrying the list number. */
.offer__item::before {
  content: counter(offer);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 20px;
}

.offer__text {
  font-size: 0.98rem;
  color: var(--text);
}

/* -------------------------------------------------------------- Partner -- */

.partner {
  background: var(--green);
  color: var(--white);
  padding: 72px 0;
}

.partner p {
  max-width: 68ch;
  margin-inline: auto;
  text-align: center;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
  line-height: 1.6;
}

/* ------------------------------------------------------------- Contacts -- */

.contacts {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 56px;
  align-items: start;
}

.contacts__details { font-style: normal; }

.contact { margin-bottom: 28px; }

.contact__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 4px;
}

.contact a {
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.contact a:hover { color: var(--green); border-bottom-color: var(--green); }

.contacts__map {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.contacts__map iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* --------------------------------------------------------------- Footer -- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 44px;
  text-align: center;
}

.site-footer__brand {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
}

.site-footer__name {
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--green);
}

.site-footer__line {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.site-footer__copy {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 20px;
}

/* ---------------------------------------------------------- Responsive --- */

@media (max-width: 980px) {
  .products { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .step:nth-child(odd) { border-left: 0; padding-left: 0; }
  .two-columns,
  .contacts { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px 0 20px;
  }

  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding-inline: var(--gutter);
  }

  .site-nav a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 56px; }
  .site-header__inner { min-height: 76px; }
  .site-header__logo img { height: 42px; }
  .products { grid-template-columns: 1fr; gap: 44px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-left: 0; padding-inline: 0; }
  .btn { flex: 1 1 100%; text-align: center; }
}
