/* IM Holding — imholding.eu */

/* ---------- Fonts (self-hosted, GDPR-safe) ---------- */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --ink: #0e1116;
  --ink-soft: #2a313b;
  --muted: #5c6672;
  --paper: #f7f5f1;
  --paper-deep: #efece6;
  --white: #ffffff;
  --accent: #29abe2;
  --accent-ink: #147cab;
  --line: #d9d4cb;
  --line-dark: #232a33;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --w-content: 72rem;
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem);
  --step-3: clamp(2.2rem, 1.7rem + 2.6vw, 3.9rem);
  --step-4: clamp(2.7rem, 1.9rem + 4vw, 5.4rem);
  color-scheme: light;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0 0 0.5em; text-wrap: balance; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--w-content); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

.eyebrow {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-ink);
  display: flex; align-items: center; gap: 0.75rem; margin-block-end: 1.25rem;
}
.eyebrow::before { content: ""; inline-size: 2.25rem; block-size: 2px; background: var(--accent); }

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 46ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-block-size: 4.25rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand img { block-size: 2.1rem; inline-size: auto; }
.brand span { font-weight: 600; letter-spacing: 0.04em; font-size: 0.95rem; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); font-size: 0.92rem; font-weight: 600; }
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--accent-ink); }
.lang { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem; text-decoration: none; }
.lang:hover { border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 47rem) { .nav .hide-m { display: none; } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(1rem, 2.5vw, 2rem) clamp(3rem, 7vw, 6rem); }
.hero h1 { font-size: var(--step-4); max-width: 14ch; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--accent-ink); }
.hero .lead { margin-block: 1.75rem 2.5rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; border: 1px solid var(--ink);
  transition: background 0.2s, color 0.2s;
}
.btn-solid { background: var(--ink); color: var(--white); }
.btn-solid:hover { background: var(--ink-soft); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

/* ---------- Pillars strip ---------- */
.pillars { border-block: 1px solid var(--line); background: var(--paper-deep); }
.pillars .wrap { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); padding-block: 0; }
.pillar { padding: 1.75rem clamp(0rem, 2vw, 1.5rem); }
.pillar strong { display: block; font-family: var(--serif); font-size: 1.15rem; margin-block-end: 0.35rem; }
.pillar span { color: var(--muted); font-size: 0.95rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section h2 { font-size: var(--step-3); max-width: 18ch; }
.section-head { margin-block-end: clamp(2rem, 4vw, 3.5rem); }

/* Founder */
.founder .wrap { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 56rem) { .founder .wrap { grid-template-columns: 5fr 6fr; } }
.founder figure { margin: 0; position: relative; }
.founder img { border-radius: 0.5rem; box-shadow: 0 24px 60px -24px rgb(14 17 22 / 0.35); }
.founder figcaption { margin-block-start: 0.9rem; font-size: 0.85rem; color: var(--muted); }
.founder .link-more { font-weight: 600; color: var(--accent-ink); text-decoration: none; border-block-end: 2px solid var(--accent); }

/* Aree */
.areas { background: var(--ink); color: #e9e6e0; }
.areas .eyebrow { color: var(--accent); }
.areas h2 { color: var(--white); }
.areas-grid { display: grid; gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.area { background: var(--ink); padding: 2rem 1.75rem 2.25rem; position: relative; }
.area:hover { background: #131922; }
.area .num { font-family: var(--serif); font-size: 0.95rem; color: var(--accent); }
.area h3 { color: var(--white); font-size: 1.35rem; margin-block: 0.6rem 0.6rem; }
.area p { color: #aab2bd; font-size: 0.95rem; margin: 0; }
.area-scopes { background: #131922; grid-column: span 2; }
.area-scopes p { margin-block-end: 1.1rem; }
.scopes-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.scopes-list span {
  border: 1px solid rgba(233, 230, 224, 0.22); border-radius: 999px;
  padding: 0.35rem 0.85rem; font-size: 0.82rem; color: #cfd6dd; line-height: 1.4;
}
@media (max-width: 47rem) { .area-scopes { grid-column: auto; } }

/* Track record */
.track .grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 56rem) { .track .grid { grid-template-columns: 6fr 5fr; } }
.track blockquote {
  margin: 2rem 0 0; padding-inline-start: 1.5rem; border-inline-start: 3px solid var(--accent);
  font-family: var(--serif); font-style: italic; font-size: var(--step-1); color: var(--ink-soft);
}
.cred-block h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-block: 2.25rem 1rem; }
.logo-band { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.25rem; }
.logo-band img { block-size: clamp(2rem, 4vw, 2.6rem); inline-size: auto; filter: grayscale(1) contrast(0.9); opacity: 0.85; mix-blend-mode: multiply; }
.logo-band img:hover { filter: none; opacity: 1; }
.logo-text {
  font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: #3a424d;
  border: 1px solid var(--line); border-radius: 0.35rem; padding: 0.45rem 0.9rem; opacity: 0.9;
}

/* Fondamenta — variante scura */
.track.dark { background: var(--ink); color: #e9e6e0; }
.track.dark .eyebrow { color: var(--accent); }
.track.dark h2 { color: var(--white); }
.track.dark p { color: #aab2bd; }
.track.dark blockquote { color: #dfe3e8; }
.track.dark .cred-block h3 { color: #8b97a5; }
.track.dark .logo-band img {
  mix-blend-mode: normal; background: var(--white); border-radius: 0.4rem;
  padding: 0.45rem 0.75rem; box-sizing: content-box;
  block-size: clamp(1.8rem, 3.5vw, 2.3rem); filter: grayscale(1); opacity: 0.95;
}
.track.dark .logo-band img:hover { filter: none; opacity: 1; }

/* Competenze landing */
.dark-band { background: var(--ink); color: #e9e6e0; }
.dark-band .eyebrow { color: var(--accent); }
.dark-band h2 { color: var(--white); }
.comp-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); margin-block-start: 2.25rem; }
.comp { border: 1px solid var(--line); border-radius: 0.5rem; padding: 1.75rem; background: var(--white); }
.comp h3 { font-size: 1.3rem; }
.comp p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
.comp .eng { margin-block-start: 1rem; font-size: 0.82rem; color: var(--muted); }
.comp .eng strong { display: block; color: var(--accent-ink); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; margin-block-end: 0.2rem; }
.dark-band .comp { background: #131922; border-color: var(--line-dark); }
.dark-band .comp h3 { color: var(--white); }
.dark-band .comp p { color: #aab2bd; }
.dark-band .comp .eng { color: #8b97a5; }
.dark-band .comp .eng strong { color: var(--accent); }
.badge { display: inline-block; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); border: 1px solid var(--accent); border-radius: 999px; padding: 0.12rem 0.55rem; margin-inline-start: 0.4rem; vertical-align: middle; font-family: var(--sans); font-weight: 600; }
.dark-band .badge { color: var(--accent); }
.sig-list { display: grid; gap: 1.4rem; margin-block-start: 2.25rem; max-width: 52rem; }
.sig { border-inline-start: 3px solid var(--accent); padding-inline-start: 1.1rem; }
.sig strong { display: block; font-family: var(--serif); font-size: 1.2rem; margin-block-end: 0.2rem; }
.sig span { color: var(--muted); font-size: 0.95rem; }

/* Insights */
.insights { background: var(--paper-deep); border-block: 1px solid var(--line); }
.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 0.5rem;
  padding: 1.75rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -20px rgb(14 17 22 / 0.25); }
.card .tag { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.card h3 { font-size: 1.25rem; margin: 0; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; flex-grow: 1; }
.card .arrow { font-weight: 600; color: var(--accent-ink); }

/* Contact */
.contact .wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; }
@media (min-width: 56rem) { .contact .wrap { grid-template-columns: 1fr 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; font-size: 1.05rem; }
.contact-list a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.contact-list .label { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* Footer */
.site-footer { background: var(--ink); color: #9aa3ae; font-size: 0.85rem; }
.site-footer .wrap { padding-block: 2.5rem; display: grid; gap: 1rem; }
.site-footer .legal { line-height: 1.8; }
.site-footer a { color: #cdd3da; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-row { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }

/* ---------- Reveal on scroll (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
    @keyframes rise {
      from { opacity: 0; translate: 0 1.5rem; }
      to { opacity: 1; translate: 0 0; }
    }
  }
}

@media print { .site-header, .cta-row { display: none; } }
