/* =============================================================
   GIB — Stylesheet v5 · Warm Precision
   Light Editorial · Italian Industrial
   ============================================================= */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Warm light palette */
    --c-bg:          #f5f2eb;
    --c-bg-alt:      #edeae1;
    --c-surface:     #ffffff;
    --c-surface-2:   #f8f5ee;
    --c-ink:         #1a1b20;
    --c-ink-soft:    rgba(26,27,32,0.64);
    --c-muted:       rgba(26,27,32,0.38);
    --c-line:        rgba(26,27,32,0.10);
    --c-line-s:      rgba(26,27,32,0.05);
    --c-accent:      #b07828;
    --c-accent-b:    #c98f38;
    --c-accent-2:    #1c3a60;
    --c-dark:        #1c1e27;
    --c-accent-dim:  rgba(176,120,40,0.10);
    --c-accent-glow: rgba(176,120,40,0.22);

    --f-sans:    'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
    --f-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

    --container: 1240px;
    --section-y: clamp(5rem, 10vw, 9rem);
    --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--c-accent) var(--c-bg-alt);
}
html::-webkit-scrollbar { width: 4px; }
html::-webkit-scrollbar-track { background: var(--c-bg-alt); }
html::-webkit-scrollbar-thumb { background: var(--c-accent); border-radius: 2px; }

body {
    font-family: var(--f-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--c-ink);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Film grain overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.038;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--c-accent); }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--c-accent); color: #fff; }

/* ---------- CUSTOM CURSOR ---------- */
.cursor-dot {
    position: fixed;
    width: 5px; height: 5px;
    background: var(--c-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: opacity .3s;
    will-change: left, top;
}
.cursor-ring {
    position: fixed;
    width: 30px; height: 30px;
    border: 1px solid rgba(176,120,40,0.45);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width .4s var(--ease), height .4s var(--ease), border-color .4s var(--ease), opacity .3s;
    will-change: left, top;
}
.cursor-ring.cursor-expanded {
    width: 50px; height: 50px;
    border-color: var(--c-accent);
}
.cursor-dot.cursor-hidden, .cursor-ring.cursor-hidden { opacity: 0; }
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
    font-family: var(--f-display);
    font-weight: 500;
    line-height: 1.1;
    color: var(--c-ink);
    letter-spacing: -0.02em;
}
h1 {
    font-size: clamp(2.9rem, 7.5vw, 6.2rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
    padding-bottom: 0.25em;
}
h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); letter-spacing: -0.025em; }
h3 {
    font-family: var(--f-sans);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
h4 {
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--f-sans);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

p { color: var(--c-ink-soft); }
.lead-text { font-size: 1.1rem; color: var(--c-ink); margin-bottom: 1rem; line-height: 1.72; }

.eyebrow {
    font-family: var(--f-sans);
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--c-accent);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 1px;
    background: currentColor;
    flex-shrink: 0;
}

.accent { color: var(--c-accent); font-style: italic; }

/* ---------- LAYOUT ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section { padding: var(--section-y) 0; }

.section-alt {
    background: var(--c-bg-alt);
    position: relative;
}
.section-alt::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(26,27,32,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26,27,32,0.028) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
}

.section-header { max-width: 720px; margin-bottom: 4rem; }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---------- GOLDEN DIVIDER ---------- */
.gold-line {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--c-accent) 50%, transparent 100%);
    opacity: 0.30;
    border: none;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.25rem;
    font-family: var(--f-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: 0;
    transition: all .4s var(--ease);
    cursor: pointer;
    line-height: 1;
    position: relative;
    overflow: hidden;
}
.btn-primary { background: var(--c-ink); color: #fff; }
.btn-primary:hover {
    background: var(--c-accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--c-accent-glow);
}
.btn-light { background: #fff; color: var(--c-ink); }
.btn-light:hover { background: var(--c-accent); color: #fff; transform: translateY(-2px); }
.btn-ghost {
    background: transparent;
    color: var(--c-ink);
    border: 1px solid var(--c-line);
}
.btn-ghost:hover { border-color: var(--c-accent); color: var(--c-accent); }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-family: var(--f-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-ink);
    border-bottom: 1px solid var(--c-line);
    padding-bottom: 3px;
    transition: all .3s var(--ease);
}
.link-arrow:hover { color: var(--c-accent); border-color: var(--c-accent); letter-spacing: 0.22em; }

/* ---------- HEADER ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.75rem 0;
    background: transparent;
    transition: all .5s var(--ease);
}
.site-header.scrolled {
    background: rgba(245,242,235,0.94);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 1px 0 var(--c-line), 0 4px 20px rgba(26,27,32,0.06);
    padding: 1rem 0;
}

.header-inner { display: flex; align-items: center; justify-content: center; position: relative; }
.main-nav { margin-left: 2.5rem; }
.nav-toggle { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }

.logo {
    display: flex;
    align-items: center;
}
.logo-img {
    height: 72px;
    width: auto;
    display: block;
    transition: opacity .25s var(--ease);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.20));
}
.logo:hover .logo-img { opacity: 0.85; }
.footer-brand .logo-img { height: 64px; filter: none; }

.main-nav ul { display: flex; gap: 2.75rem; }
.main-nav a {
    position: relative;
    font-family: var(--f-sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-muted);
    padding: 0.5rem 0;
    transition: color .25s var(--ease);
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 0; height: 1px;
    background: var(--c-accent);
    transition: width .35s var(--ease);
}
.main-nav a:hover, .main-nav a.active { color: var(--c-ink); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.nav-toggle {
    display: none;
    width: 42px; height: 42px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 22px; height: 1.5px;
    background: var(--c-ink);
    transition: all .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed;
        top: 0; right: 0;
        width: 80%;
        max-width: 360px;
        height: 100vh;
        background: var(--c-surface);
        border-left: 1px solid var(--c-line);
        padding: 6rem 2.5rem 2rem;
        transform: translateX(100%);
        transition: transform .4s var(--ease);
        box-shadow: -10px 0 50px rgba(26,27,32,0.12);
    }
    .main-nav.open { transform: translateX(0); }
    .main-nav ul { flex-direction: column; gap: 1.75rem; }
    .main-nav a { font-size: 0.85rem; }
}

/* ---------- HERO (homepage) ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 8rem 0 5rem;
    overflow: hidden;
    background: var(--c-bg);
}
/* Subtle grid overlay on hero image */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: 1;
    pointer-events: none;
}
/* Left gold accent bar */
.hero::after {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, var(--c-accent) 25%, var(--c-accent) 75%, transparent 100%);
    z-index: 4;
}
/* Hero background — parallax container */
.hero-bg {
    position: absolute;
    top: -15%; left: 0; right: 0; bottom: 0;
    z-index: 0;
    will-change: transform;
}
.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../images/stock/azienda_01.jpg') center 40% / cover no-repeat;
    filter: contrast(1.15) brightness(0.92) saturate(1.12);
}
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(110deg, rgba(14,17,22,0.80) 0%, rgba(14,17,22,0.52) 55%, rgba(14,17,22,0.22) 100%),
        linear-gradient(0deg, rgba(14,17,22,0.65) 0%, transparent 45%);
}
.hero-watermark { display: none; }

.hero-content { position: relative; z-index: 3; max-width: 1000px; }
.hero h1 { margin-bottom: 2rem; color: #fff; }
.hero h1 .accent { color: var(--c-accent-b); }
.hero .eyebrow { color: var(--c-accent-b); }
.hero .eyebrow::before { background: var(--c-accent-b); }
.hero-lead {
    font-size: 1.1rem;
    line-height: 1.72;
    color: rgba(255,255,255,0.75);
    max-width: 580px;
    margin-bottom: 3rem;
}
.hero-actions { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.hero-actions .btn-ghost { padding-left: 0; padding-right: 0; border: none; color: rgba(255,255,255,0.75); }
.hero-actions .btn-ghost:hover { color: var(--c-accent-b); border: none; }

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 3;
}
.hero-scroll-label {
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.30em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.30);
}
.hero-scroll-line {
    width: 1px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    overflow: hidden;
    position: relative;
}
.hero-scroll-line::after {
    content: "";
    position: absolute;
    top: -40%;
    left: 0;
    width: 100%;
    height: 40%;
    background: var(--c-accent);
    animation: scrollDown 2.2s var(--ease) infinite;
}
@keyframes scrollDown { 0% { top: -40%; } 100% { top: 140%; } }

/* ---------- TICKER STRIP ---------- */
.ticker {
    background: var(--c-surface);
    border-top: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    padding: 1rem 0;
    overflow: hidden;
    position: relative;
}
.ticker::before, .ticker::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 6rem;
    z-index: 2;
    pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(90deg, var(--c-surface), transparent); }
.ticker::after  { right: 0; background: linear-gradient(-90deg, var(--c-surface), transparent); }

.ticker-track {
    display: flex;
    animation: tickerScroll 38s linear infinite;
    width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 2.5rem;
    font-family: var(--f-sans);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--c-muted);
    white-space: nowrap;
}
.ticker-item .dot {
    display: inline-block;
    width: 3px; height: 3px;
    background: var(--c-accent);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---------- PAGE HERO (inner pages) ---------- */
.page-hero {
    padding: 12rem 0 5.5rem;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    position: relative;
}
.page-hero::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, var(--c-accent) 20%, var(--c-accent) 65%, transparent 100%);
    z-index: 2;
}
.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(26,27,32,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26,27,32,0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: 1.5rem; color: var(--c-ink); }
.page-hero .hero-lead { max-width: 700px; color: var(--c-ink-soft); }

/* ---------- STATS ---------- */
.stats {
    background: var(--c-dark);
    color: #fff;
    padding: 5.5rem 0;
    position: relative;
    overflow: hidden;
}
.stats::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(176,120,40,0.14) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(28,58,96,0.10) 0%, transparent 50%);
    pointer-events: none;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
    z-index: 1;
}
.stat { padding-right: 2.5rem; border-right: 1px solid rgba(255,255,255,0.08); }
.stat:last-child { border-right: none; }
.stat:not(:first-child) { padding-left: 2.5rem; }
.stat-value {
    font-family: var(--f-display);
    font-size: clamp(3.2rem, 5.5vw, 5rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    transition: text-shadow .6s var(--ease);
}
.stat-value.counted {
    text-shadow: 0 0 36px rgba(176,120,40,0.45);
}
.stat-value.plus::after {
    content: "+";
    color: var(--c-accent-b);
    font-size: 0.52em;
    vertical-align: super;
    margin-left: 0.1em;
}
.stat-label {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.42);
    text-transform: uppercase;
    letter-spacing: 0.20em;
    font-weight: 700;
    line-height: 1.55;
}
@media (max-width: 720px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem 2rem; }
    .stat { border-right: none; padding: 0; }
    .stat:not(:first-child) { padding-left: 0; }
}

/* =========== ORG TREE =========== */
.section-tree {
    background: var(--c-ink);
    background-image: url('../images/stock/team-network.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 38% 20%;
    position: relative;
    overflow: hidden;
}
.section-tree::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(18,19,24,0.78);
    z-index: 0;
}
.section-tree .container { position: relative; z-index: 2; }
.section-tree .section-header h1 { color: #fff; }
.section-tree .section-header .eyebrow { color: var(--c-accent); border-color: var(--c-accent); }
.section-tree--top {
    padding-top: 7rem;
}
.section-tree .section-header h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    white-space: nowrap;
    text-align: center;
}
@media (max-width: 900px) {
    .section-tree .section-header h1 { white-space: normal; }
}
.section-tree .section-header {
    max-width: 100%;
    text-align: center;
    margin-top: 2.5rem;
}
.section-tree .section-header .eyebrow {
    justify-content: center;
}

/* =========== HERO INTRO (below tree) =========== */
.hero-intro {
    background: var(--c-bg);
    padding: var(--section-y) 0;
    position: relative;
}
.hero-intro::after {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, var(--c-accent) 25%, var(--c-accent) 75%, transparent 100%);
}
.hero-intro-content { max-width: 900px; }
.hero-intro h1 { margin-bottom: 2rem; }
.hero-intro h1 .accent { color: var(--c-accent); }
.hero-intro .hero-lead {
    font-size: 1.1rem;
    line-height: 1.72;
    color: var(--c-ink-soft);
    max-width: 620px;
    margin-bottom: 3rem;
}
.hero-intro .hero-actions { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.section-tree::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
    z-index: 1;
}

.org-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ---- ROOT (GIB) ---- */
.tree-root-wrap { position: relative; }
.tree-node--root {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 2.25rem;
    padding: 1.75rem 2.75rem;
    background: linear-gradient(135deg, rgba(10,11,16,0.98) 0%, rgba(16,17,24,0.99) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(176,120,40,0.30);
    animation: rootPulse 5s ease infinite alternate;
}
@keyframes rootPulse {
    0%  { box-shadow: 0 0 60px -20px rgba(176,120,40,0.35), 0 24px 72px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.05); border-color: rgba(176,120,40,0.25); }
    100%{ box-shadow: 0 0 100px -20px rgba(176,120,40,0.55), 0 24px 72px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.05); border-color: rgba(176,120,40,0.42); }
}

.tree-root-logo-wrap {
    background: rgba(255,255,255,0.96);
    border-radius: 8px;
    padding: 0.75rem 1.1rem;
    flex-shrink: 0;
    animation: logoAura 4s ease infinite alternate;
}
@keyframes logoAura {
    0%  { box-shadow: 0 0 0 1px rgba(176,120,40,0.25), 0 0 32px rgba(176,120,40,0.42), 0 0 64px rgba(176,120,40,0.15); }
    100%{ box-shadow: 0 0 0 1px rgba(176,120,40,0.42), 0 0 56px rgba(176,120,40,0.62), 0 0 96px rgba(176,120,40,0.30); }
}
.tree-root-logo {
    height: 90px;
    width: auto;
    display: block;
}
.tree-node-body-root {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    border-left: 1px solid rgba(176,120,40,0.28);
    padding-left: 2.25rem;
}
.tree-node--root .tree-node-tag {
    color: rgba(255,255,255,0.42);
    font-size: 0.58rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}
.tree-node--root .tree-node-name {
    display: block;
    font-family: var(--f-sans);
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #fff;
    line-height: 1;
}
.tree-node-sub { font-size: 0.72rem; color: rgba(255,255,255,0.35); margin-top: 0.1rem; }

/* ---- TRUNK ---- */
.tree-trunk {
    width: 2px;
    height: 4.5rem;
    background: linear-gradient(180deg, var(--c-accent) 0%, rgba(176,120,40,0.25) 100%);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    transition: transform .25s var(--ease), opacity .2s;
    border-radius: 1px;
}

/* ---- BRANCH ROW ---- */
.tree-branch-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    position: relative;
    padding-top: 4.5rem;
    perspective: 1400px;
}
.tree-branch-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(100% / 8);
    right: calc(100% / 8);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-accent) 20%, var(--c-accent) 80%, transparent);
    clip-path: inset(0 50% 0 50%);
    transition: clip-path .25s var(--ease);
    box-shadow: 0 0 8px rgba(176,120,40,0.45);
}

/* ---- CHILD CARDS ---- */
.tree-node--child {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(12, 13, 19, 0.92);
    border: 1px solid rgba(255,255,255,0.07);
    border-top: none;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    transition: transform .5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow .5s ease, border-color .35s;
    opacity: 0;
    transform: translateY(20px);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    will-change: transform;
}

/* Vertical connector */
.tree-node--child::before {
    content: "";
    position: absolute;
    top: calc(-4.5rem + 1px);
    left: 50%;
    width: 1px;
    height: 4.5rem;
    background: linear-gradient(180deg, var(--c-accent) 0%, var(--node-color, var(--c-accent)) 100%);
    transform: translateX(-50%) scaleY(0);
    transform-origin: top;
    transition: transform .25s var(--ease);
}

/* Shimmer sweep on hover */
.tree-node--child::after {
    content: "";
    position: absolute;
    top: 0; left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
    pointer-events: none;
    transition: none;
}
.tree-node--child:hover::after {
    left: 150%;
    transition: left .8s ease;
}

.tree-node--child:hover {
    transform: translateY(-14px);
    box-shadow:
        0 36px 72px -16px rgba(0,0,0,0.6),
        0 0 0 1px color-mix(in srgb, var(--node-color, var(--c-accent)) 55%, transparent),
        0 0 60px -15px var(--node-color, var(--c-accent));
    border-color: color-mix(in srgb, var(--node-color, var(--c-accent)) 40%, transparent);
}

/* ---- CARD HEADER (year + logo) ---- */
.tree-card-header {
    padding: 1.35rem 1.65rem 1.3rem;
    background: color-mix(in srgb, var(--node-color, var(--c-accent)) 22%, rgba(6,7,12,0.96));
    border-bottom: 1px solid rgba(255,255,255,0.055);
    position: relative;
}
.tree-card-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--node-color, var(--c-accent));
    box-shadow: 0 0 18px var(--node-color, var(--c-accent)), 0 0 6px var(--node-color, var(--c-accent));
}

/* ---- CARD BODY ---- */
.tree-card-body {
    padding: 1.5rem 1.65rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* ---- TREE-VISIBLE ANIMATIONS ---- */
.org-tree.tree-visible .tree-trunk {
    opacity: 1;
    transform: scaleY(1);
    transition: transform .55s .08s var(--ease), opacity .1s;
    box-shadow: 0 0 12px rgba(176,120,40,0.6);
}
.org-tree.tree-visible .tree-branch-row::before {
    clip-path: inset(0 0% 0 0%);
    transition: clip-path .5s .6s var(--ease);
}
.org-tree.tree-visible .tree-node--child:nth-child(1)::before {
    transform: translateX(-50%) scaleY(1);
    transition: transform .4s .88s var(--ease);
}
.org-tree.tree-visible .tree-node--child:nth-child(2)::before {
    transform: translateX(-50%) scaleY(1);
    transition: transform .4s .96s var(--ease);
}
.org-tree.tree-visible .tree-node--child:nth-child(3)::before {
    transform: translateX(-50%) scaleY(1);
    transition: transform .4s 1.04s var(--ease);
}
.org-tree.tree-visible .tree-node--child:nth-child(4)::before {
    transform: translateX(-50%) scaleY(1);
    transition: transform .4s 1.12s var(--ease);
}
.org-tree.tree-visible .tree-node--child:nth-child(1) {
    opacity: 1; transform: translateY(0);
    transition: opacity .5s 1.08s var(--ease), transform .5s 1.08s var(--ease);
}
.org-tree.tree-visible .tree-node--child:nth-child(2) {
    opacity: 1; transform: translateY(0);
    transition: opacity .5s 1.18s var(--ease), transform .5s 1.18s var(--ease);
}
.org-tree.tree-visible .tree-node--child:nth-child(3) {
    opacity: 1; transform: translateY(0);
    transition: opacity .5s 1.28s var(--ease), transform .5s 1.28s var(--ease);
}
.org-tree.tree-visible .tree-node--child:nth-child(4) {
    opacity: 1; transform: translateY(0);
    transition: opacity .5s 1.38s var(--ease), transform .5s 1.38s var(--ease);
}

/* ---- YEAR BADGE ---- */
.tree-node-year {
    font-size: 0.57rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: color-mix(in srgb, var(--node-color, var(--c-accent)) 90%, #fff);
    text-transform: uppercase;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.tree-node-year::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--node-color, var(--c-accent));
    opacity: 0.75;
    flex-shrink: 0;
    border-radius: 1px;
}

/* ---- LOGO PILL ---- */
.tree-node-logo {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.93);
    border-radius: 5px;
    padding: 0.45rem 0.8rem;
    flex-shrink: 0;
    transition: box-shadow .4s;
}
.tree-node--child:hover .tree-node-logo {
    box-shadow: 0 0 28px -4px var(--node-color, var(--c-accent));
}
.tree-node-logo img {
    height: 38px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    object-position: center;
    display: block;
    mix-blend-mode: multiply;
    transition: transform .4s var(--ease);
}
.tree-node--child:hover .tree-node-logo img {
    transform: scale(1.04);
}

/* ---- NAME ---- */
.tree-node-name {
    display: block;
    font-family: var(--f-display);
    font-size: 1.62rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

/* ---- SPEC ---- */
.tree-node-spec {
    font-size: 0.57rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--node-color, var(--c-accent)) 80%, #fff);
    margin-bottom: 1.25rem;
}

/* ---- DESCRIPTION ---- */
.tree-node-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.44);
    line-height: 1.72;
    flex-grow: 1;
    margin-bottom: 1.4rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* ---- CTA ---- */
.tree-node-cta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.59rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--node-color, var(--c-accent)) 85%, #fff);
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    transition: gap .35s var(--ease), letter-spacing .35s var(--ease), color .3s;
}
.tree-node--child:hover .tree-node-cta {
    gap: 0.95rem;
    letter-spacing: 0.28em;
    color: #fff;
}

/* ---- MOBILE ---- */
@media (max-width: 900px) {
    .tree-branch-row {
        grid-template-columns: 1fr;
        padding-top: 2rem;
        max-width: 480px;
        gap: 1rem;
    }
    .tree-trunk { height: 2rem; }
    .tree-branch-row::before, .tree-node--child::before { display: none; }
    .tree-node--child {
        opacity: 1 !important;
        transform: translateY(0) !important;
        transition: transform .4s var(--ease), box-shadow .4s var(--ease) !important;
    }
    .tree-node--child:hover { transform: translateX(4px) !important; }
    .tree-node--root {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1.5rem 1.75rem;
    }
    .tree-node-body-root {
        border-left: none;
        border-top: 1px solid rgba(176,120,40,0.22);
        padding-left: 0;
        padding-top: 1rem;
        align-items: center;
    }
}

/* ---------- COMPANIES (cards) ---------- */
.companies-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.company-card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    overflow: hidden;
    transition: all .4s var(--ease);
    position: relative;
}
.company-card::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--c-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s var(--ease);
}
.company-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 60px -20px rgba(26,27,32,0.16);
    border-color: transparent;
}
.company-card:hover::after { transform: scaleX(1); }
.company-card-img {
    height: 260px;
    background: linear-gradient(135deg, #1a3a5c 0%, #0e1116 100%);
    background-size: cover;
    background-position: center;
    transition: transform .8s var(--ease);
    overflow: hidden;
}
.company-card-img.mabo-img {
    background: linear-gradient(180deg, rgba(3,123,173,0.2) 0%, rgba(3,123,173,0.55) 100%),
                url('../images/mabo/officina.jpg') center / cover no-repeat;
}
.company-card-img.promec-img {
    background: linear-gradient(180deg, rgba(14,17,22,0.15) 0%, rgba(14,17,22,0.55) 100%),
                url('../images/promec/lavorazioni.jpg') center / cover no-repeat;
}
.company-card:hover .company-card-img { transform: scale(1.05); }
.company-card-body { padding: 2rem 2rem 2.5rem; }
.company-card-body h3 { color: var(--c-ink); }
.company-card-body p { color: var(--c-ink-soft); }
.company-tag {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--c-muted);
    margin-bottom: 0.6rem;
    font-weight: 700;
}
.company-card h3 { margin-bottom: 0.85rem; font-size: 1.5rem; }
@media (max-width: 860px) { .companies-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .companies-grid { grid-template-columns: 1fr; } }

/* ---------- COMPANY DETAIL ROWS ---------- */
.company-row { align-items: center; }
.company-row.reverse .col-visual { order: 2; }
@media (max-width: 860px) { .company-row.reverse .col-visual { order: 0; } }
.company-visual {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #1a3a5c 0%, #0e1116 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.company-visual.alt { background: linear-gradient(135deg, #b8893f 0%, #6d4f23 100%); }
.company-visual.mabo-visual { background: url('../images/mabo/officina.jpg') center / cover no-repeat; }
.company-visual.promec-visual { background: url('../images/promec/officina-3.jpg') center / cover no-repeat; }
.company-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.14) 100%);
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0.85rem 1.25rem;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
}
.cert-badge img { width: 56px; height: auto; }
.cert-badge-text { font-size: 0.85rem; line-height: 1.4; }
.cert-badge-text strong { display: block; color: var(--c-ink); font-weight: 600; }
.cert-badge-text span { color: var(--c-muted); }

/* =========== SLIDER =========== */
.slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0e1116;
}
.slider-track { position: relative; width: 100%; height: 100%; }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s var(--ease); }
.slide.active { opacity: 1; }
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 2rem 2.5rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.86) 100%);
    color: #fff;
    font-size: 0.9rem;
}
.slide-caption strong {
    display: block;
    font-family: var(--f-display);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #fff;
    letter-spacing: -0.01em;
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all .3s var(--ease);
    color: var(--c-ink);
    font-size: 1.3rem;
}
.slider-arrow:hover { background: var(--c-accent); color: #fff; }
.slider-arrow.prev { left: 1.25rem; }
.slider-arrow.next { right: 1.25rem; }
.slider-dots {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}
.slider-dots button {
    width: 20px; height: 2px;
    background: rgba(255,255,255,0.3);
    transition: all .3s var(--ease);
    padding: 0;
}
.slider-dots button.active { background: var(--c-accent); width: 36px; }
@media (max-width: 640px) {
    .slider-arrow { width: 38px; height: 38px; font-size: 1rem; }
    .slide-caption { padding: 1.25rem 1.5rem; font-size: 0.85rem; }
    .slide-caption strong { font-size: 1.1rem; }
}

/* =========== COMPANY PAGE LAYOUT =========== */
.company-hero {
    position: relative;
    padding: 12rem 0 5rem;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
}
.company-hero::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, var(--c-accent) 20%, var(--c-accent) 70%, transparent 100%);
    z-index: 1;
}
.company-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(26,27,32,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26,27,32,0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}
.company-hero .container { position: relative; z-index: 1; }
.company-hero h1 { color: var(--c-ink); }
.company-hero .hero-lead { color: var(--c-ink-soft); }
.company-hero .eyebrow { color: var(--c-accent); }
.company-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--c-line);
    font-size: 0.88rem;
    color: var(--c-muted);
}
.company-hero-meta div strong {
    display: block;
    color: var(--c-ink);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--c-line);
    border-left: 1px solid var(--c-line);
}
.service-item {
    padding: 2rem;
    border-right: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    transition: background .3s;
}
.service-item:hover { background: var(--c-surface-2); }
.service-item h4 { font-family: var(--f-sans); font-size: 0.9rem; text-transform: none; letter-spacing: 0; color: var(--c-ink); margin-bottom: 0.5rem; font-weight: 600; }
.service-item h4::before { content: "→ "; color: var(--c-accent); }
.service-item p { font-size: 0.87rem; color: var(--c-muted); margin: 0; }
@media (max-width: 640px) { .services-grid { grid-template-columns: 1fr; } }

.divisions { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.division-card {
    padding: 2.5rem;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-top: 3px solid var(--c-accent);
}
.division-card h3 { margin-bottom: 1.5rem; font-size: 1.3rem; font-family: var(--f-display); font-weight: 600; color: var(--c-ink); }
.division-card ul li {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--c-line);
    color: var(--c-ink-soft);
    font-size: 0.9rem;
    position: relative;
    padding-left: 1.5rem;
}
.division-card ul li:last-child { border-bottom: none; }
.division-card ul li::before { content: "—"; position: absolute; left: 0; color: var(--c-accent); font-size: 0.75em; }
@media (max-width: 760px) { .divisions { grid-template-columns: 1fr; } }

.contact-mini {
    background: var(--c-ink);
    color: #fff;
    padding: 3rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: center;
}
.contact-mini h3 { color: #fff; margin-bottom: 0.5rem; font-family: var(--f-display); font-size: 1.5rem; }
.contact-mini p { color: rgba(255,255,255,0.65); margin-bottom: 0; }
.contact-mini-info { font-size: 0.9rem; line-height: 1.9; }
.contact-mini-info strong { color: #fff; }
.contact-mini-info a { color: var(--c-accent-b); }
@media (max-width: 760px) { .contact-mini { grid-template-columns: 1fr; padding: 2rem; } }

/* =========== FULL-WIDTH IMAGE BANNER =========== */
.banner {
    position: relative;
    height: 60vh;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(14,17,22,0.90) 0%, rgba(14,17,22,0.62) 55%, rgba(14,17,22,0.28) 100%);
    z-index: 1;
}
.banner::after {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent 0%, var(--c-accent) 30%, var(--c-accent) 70%, transparent 100%);
    z-index: 2;
}
.banner .container { position: relative; z-index: 2; }
.banner h2 { color: #fff; max-width: 700px; margin-bottom: 1.5rem; }
.banner p { color: rgba(255,255,255,0.80); max-width: 580px; font-size: 1.05rem; line-height: 1.7; margin-bottom: 0; }
.banner .eyebrow { color: var(--c-accent-b); }
.banner .eyebrow::before { background: var(--c-accent-b); }
@media (max-width: 760px) { .banner { background-attachment: scroll; height: auto; padding: 4.5rem 0; } }

/* =========== SERVICE CARDS WITH IMAGE =========== */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.process-card {
    background: var(--c-surface);
    overflow: hidden;
    border: 1px solid var(--c-line);
    transition: all .35s var(--ease);
}
.process-card:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -20px rgba(26,27,32,0.18); border-color: transparent; }
.process-img { width: 100%; aspect-ratio: 4/3; background-size: cover; background-position: center; transition: transform .8s var(--ease); }
.process-card:hover .process-img { transform: scale(1.06); }
.process-body { padding: 1.75rem; }
.process-body h3 { font-size: 1rem; margin-bottom: 0.5rem; font-weight: 600; color: var(--c-ink); }
.process-body p { color: var(--c-muted); font-size: 0.87rem; margin: 0; }
@media (max-width: 980px) { .process-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px)  { .process-grid { grid-template-columns: 1fr; } }

/* =========== SECTOR CARDS WITH IMAGE =========== */
.sector-visual-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.sector-visual {
    position: relative;
    aspect-ratio: 4/5;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: all .4s var(--ease);
}
.sector-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.88) 100%);
    z-index: 1;
    transition: background .4s;
}
.sector-visual:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -16px rgba(26,27,32,0.28); }
.sector-visual:hover::before { background: linear-gradient(180deg, rgba(176,120,40,0.18) 0%, rgba(0,0,0,0.92) 100%); }
.sector-visual-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.75rem; z-index: 2; color: #fff; }
.sector-visual-text .num { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.18em; color: var(--c-accent-b); text-transform: uppercase; margin-bottom: 0.5rem; display: block; }
.sector-visual-text h3 { color: #fff; font-size: 1.2rem; margin-bottom: 0.4rem; font-family: var(--f-display); font-weight: 600; }
.sector-visual-text p { color: rgba(255,255,255,0.78); font-size: 0.85rem; line-height: 1.55; margin: 0; }
@media (max-width: 860px) { .sector-visual-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .sector-visual-grid { grid-template-columns: 1fr; } }

/* =========== SPLIT IMAGE BLOCK =========== */
.split-block { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; min-height: 480px; }
.split-block .split-img { background-size: cover; background-position: center; }
.split-block .split-text { padding: clamp(2.5rem, 5vw, 5rem); background: var(--c-bg-alt); display: flex; flex-direction: column; justify-content: center; }
.split-block .split-text.dark { background: var(--c-ink); color: #fff; }
.split-block .split-text.dark h2 { color: #fff; }
.split-block .split-text.dark p { color: rgba(255,255,255,0.72); }
@media (max-width: 860px) { .split-block { grid-template-columns: 1fr; } .split-block .split-img { min-height: 320px; } }

.gallery-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.5rem; }
.gallery-strip .gimg { aspect-ratio: 4/3; background-size: cover; background-position: center; overflow: hidden; transition: transform .6s var(--ease); cursor: zoom-in; }
.gallery-strip .gimg:hover { transform: scale(1.04); }
@media (max-width: 760px) { .gallery-strip { grid-template-columns: repeat(2, 1fr); } }

.feature-list { margin-top: 1.5rem; border-top: 1px solid var(--c-line); padding-top: 1.5rem; }
.feature-list li { padding: 0.65rem 0; border-bottom: 1px solid var(--c-line); color: var(--c-ink-soft); font-size: 0.9rem; }
.feature-list li:last-child { border-bottom: none; }
.feature-list strong { color: var(--c-ink); display: inline-block; min-width: 120px; }

/* ---------- VALUES / SECTORS GRID ---------- */
.values-grid, .sectors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.sectors-grid { grid-template-columns: repeat(3, 1fr); }
.value-card, .sector-card {
    padding: 2rem;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    transition: all .35s var(--ease);
    position: relative;
}
.value-card::before, .sector-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--c-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s var(--ease);
}
.value-card:hover, .sector-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -16px rgba(26,27,32,0.12); }
.value-card:hover::before, .sector-card:hover::before { transform: scaleX(1); }
.value-icon, .sector-num { font-family: var(--f-display); font-size: 1.6rem; color: var(--c-accent); margin-bottom: 1.25rem; font-weight: 400; }
.sector-num { font-size: 2rem; }
.value-card h3, .sector-card h3 { margin-bottom: 0.75rem; font-size: 1.1rem; color: var(--c-ink); }
.value-card p, .sector-card p { color: var(--c-ink-soft); }
@media (max-width: 980px) { .values-grid { grid-template-columns: repeat(2, 1fr); } .sectors-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .values-grid, .sectors-grid { grid-template-columns: 1fr; } }

/* ---------- TIMELINE ---------- */
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--c-line); }
.timeline-item { position: relative; padding-left: 2.5rem; padding-bottom: 3rem; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -5px; top: 10px;
    width: 11px; height: 11px;
    background: var(--c-accent);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--c-bg-alt);
}
.timeline-year { font-family: var(--f-display); font-size: 1.6rem; color: var(--c-accent); margin-bottom: 0.5rem; font-weight: 500; }
.timeline-content h3 { margin-bottom: 0.5rem; color: var(--c-ink); }
.timeline-content p { color: var(--c-ink-soft); }

/* ---------- MISSION / PEOPLE ---------- */
.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.mission-card { padding: 3rem; background: var(--c-bg-alt); border-left: 3px solid var(--c-accent); }
.mission-card h3 { font-size: 1.5rem; margin: 1rem 0; font-family: var(--f-display); color: var(--c-ink); }
.mission-card p { color: var(--c-ink-soft); }
@media (max-width: 768px) { .mission-grid { grid-template-columns: 1fr; } }
.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.person-card { text-align: center; }
.person-photo { width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, #d8d4cc 0%, #a8a39a 100%); margin-bottom: 1.5rem; }
.person-card h3 { margin-bottom: 0.25rem; font-size: 1.25rem; color: var(--c-ink); }
.person-role { font-size: 0.68rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
@media (max-width: 768px) { .people-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; } }

/* ---------- CTA SECTION ---------- */
.section-cta {
    background: var(--c-ink);
    color: #fff;
    text-align: center;
    padding: clamp(4.5rem, 8vw, 8rem) 0;
    position: relative;
    overflow: hidden;
}
.section-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(176,120,40,0.14) 0%, transparent 60%);
    pointer-events: none;
}
.cta-inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.section-cta h2 { color: #fff; margin-bottom: 1rem; }
.section-cta p { color: rgba(255,255,255,0.62); margin-bottom: 2.5rem; font-size: 1.1rem; }

/* ---------- CONTACT PAGE ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 5rem); }
.contact-info h2, .contact-form-wrap h2 { margin-bottom: 2rem; font-size: 1.75rem; color: var(--c-ink); }
.contact-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--c-line); display: flex; flex-direction: column; gap: 0.4rem; color: var(--c-ink-soft); }
.contact-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--c-muted); font-weight: 700; }
.contact-list a:hover { color: var(--c-accent); }
.contact-form .form-row { margin-bottom: 1.5rem; }
.contact-form label { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.6rem; color: var(--c-ink); }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    font-family: var(--f-sans);
    font-size: 1rem;
    color: var(--c-ink);
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    transition: border-color .25s, box-shadow .25s;
    appearance: none;
    -webkit-appearance: none;
}
.contact-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%23b07828' d='M6 7L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-color: var(--c-surface);
    padding-right: 2.5rem;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px var(--c-accent-dim);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.form-check { display: flex; align-items: flex-start; gap: 0.75rem; }
.form-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    margin-top: 0.15rem;
    border: 2px solid var(--c-ink-soft);
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.form-check input[type="checkbox"]:hover { border-color: var(--c-ink); }
.form-check input[type="checkbox"]:checked {
    background: var(--c-ink);
    border-color: var(--c-ink);
}
.form-check input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 45%;
    width: 7px;
    height: 13px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}
.form-check input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--c-accent-dim);
}
.form-check label { margin-bottom: 0; font-weight: 400; font-size: 0.9rem; color: var(--c-ink-soft); text-transform: none; letter-spacing: 0; cursor: pointer; }
.form-check a { text-decoration: underline; color: var(--c-ink); }
.recipient-hint {
    margin-top: 0.55rem;
    font-size: 0.8rem;
    color: var(--c-muted);
    min-height: 1.1em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    opacity: 0;
    transition: opacity 0.25s;
}
.recipient-hint.show { opacity: 1; }
.recipient-hint::before {
    content: "→";
    color: var(--c-accent);
    font-size: 0.75rem;
}
.recipient-hint strong { color: var(--c-accent); font-weight: 600; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- FOOTER ---------- */
.site-footer { background: #0a0c10; color: rgba(255,255,255,0.55); padding: 5.5rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 4.5rem; }
.footer-col h4 { color: rgba(255,255,255,0.88); margin-bottom: 1.25rem; font-size: 0.62rem; letter-spacing: 0.20em; text-transform: uppercase; font-weight: 700; }
.footer-col ul li { margin-bottom: 0.75rem; font-size: 0.88rem; }
.footer-col a { color: rgba(255,255,255,0.45); transition: color .2s; }
.footer-col a:hover { color: var(--c-accent-b); }
.footer-brand .logo { color: #fff; margin-bottom: 1.25rem; }
.footer-brand .logo-mark { background: var(--c-accent); color: #fff; }
.footer-brand p { color: rgba(255,255,255,0.38); font-size: 0.85rem; max-width: 260px; line-height: 1.75; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding: 1.5rem 0; }
.footer-bottom p { color: rgba(255,255,255,0.28); font-size: 0.78rem; margin: 0; letter-spacing: 0.03em; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

.hero .reveal {
    transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.hero .reveal.visible { }
.hero .reveal:nth-child(1) { transition-delay: 0.12s; }
.hero .reveal:nth-child(2) { transition-delay: 0.28s; }
.hero .reveal:nth-child(3) { transition-delay: 0.44s; }
.hero .reveal:nth-child(4) { transition-delay: 0.60s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .reveal { opacity: 1; transform: none; clip-path: none !important; }
    .org-tree .tree-trunk,
    .org-tree .tree-node--child,
    .org-tree .tree-node--child::before { opacity: 1 !important; transform: none !important; clip-path: none !important; }
    .cursor-dot, .cursor-ring { display: none; }
}

/* =============================================================
   MOBILE OPTIMIZATION — phone-specific overrides
   Desktop layout is intentionally untouched.
   ============================================================= */
@media (max-width: 768px) {

    /* Container padding tighter on phone */
    .container { padding: 0 1.1rem; }

    /* Section vertical rhythm reduced */
    :root { --section-y: clamp(3rem, 9vw, 5rem); }
    .section { padding: var(--section-y) 0; }
    .section-header { margin-bottom: 2.5rem; }

    /* HEADER — smaller logo, room for hamburger */
    .site-header { padding: 1rem 0; }
    .site-header.scrolled { padding: 0.75rem 0; }
    .header-inner { justify-content: flex-start; }
    .logo-img { height: 52px; }
    .footer-brand .logo-img { height: 56px; }

    /* TYPOGRAPHY — tame oversized display sizes on phone */
    h1 { font-size: clamp(2.1rem, 9vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; }
    h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
    .lead-text, .hero-lead { font-size: 1rem; line-height: 1.65; }

    /* HERO — reduced padding so content isn't pushed off-screen */
    .hero { padding: 6rem 0 3.5rem; min-height: auto; }
    .hero h1 { margin-bottom: 1.25rem; }
    .hero-lead { margin-bottom: 2rem; }
    .hero-actions { gap: 1rem; }
    .hero-scroll { display: none; }

    /* PAGE HERO / COMPANY HERO — much smaller top padding */
    .page-hero { padding: 7rem 0 3rem; }
    .company-hero { padding: 7rem 0 3rem; }
    .page-hero h1, .company-hero h1 { margin-bottom: 1rem; }
    .company-hero-meta { margin-top: 1.75rem; padding-top: 1.5rem; gap: 1rem 1.75rem; }

    /* SECTION-TREE — first section under fixed header */
    .section-tree--top { padding-top: 5.5rem; padding-bottom: 3rem; }
    .section-tree .section-header { margin-top: 1rem; margin-bottom: 2rem; }
    .section-tree .section-header h1 {
        font-size: clamp(1.8rem, 7.5vw, 2.6rem);
        line-height: 1.18;
        text-align: center;
    }

    /* ORG TREE — root card stays readable */
    .tree-node--root { padding: 1.25rem 1.4rem; gap: 1rem; }
    .tree-root-logo { height: 70px; }
    .tree-node--root .tree-node-name { font-size: 1.35rem; }

    /* STATS — keep numbers from breaking the layout */
    .stats { padding: 3.5rem 0; }
    .stats-grid { gap: 2rem 1.25rem; }
    .stat-value { font-size: clamp(2.4rem, 11vw, 3.2rem); margin-bottom: 0.35rem; }
    .stat-label { font-size: 0.58rem; letter-spacing: 0.16em; }

    /* TICKER — smaller text and tighter padding */
    .ticker { padding: 0.75rem 0; }
    .ticker-item { padding: 0 1.5rem; font-size: 0.52rem; letter-spacing: 0.22em; }
    .ticker::before, .ticker::after { width: 3rem; }

    /* CHI SIAMO — generous spacing */
    .section-about .two-col { gap: 2rem; }

    /* BANNER — readable height */
    .banner { padding: 3.5rem 0; min-height: auto; }
    .banner p { font-size: 0.95rem; }

    /* VALUES / VALUE CARDS */
    .value-card, .sector-card { padding: 1.5rem; }
    .value-icon, .sector-num { font-size: 1.4rem; margin-bottom: 0.85rem; }

    /* SECTOR VISUAL — keep cards a sensible height */
    .sector-visual { aspect-ratio: 16/10; }
    .sector-visual-text { padding: 1.25rem; }
    .sector-visual-text h3 { font-size: 1.05rem; }

    /* CTA SECTION */
    .section-cta { padding: 3.5rem 0; }
    .section-cta p { font-size: 1rem; margin-bottom: 1.75rem; }

    /* CONTACT */
    .contact-grid { gap: 2.5rem; }
    .contact-info h2, .contact-form-wrap h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }
    .contact-form input, .contact-form select, .contact-form textarea {
        padding: 0.8rem 0.9rem;
        font-size: 16px; /* prevents iOS auto-zoom on focus */
    }

    /* MISSION / DIVISIONS */
    .mission-card { padding: 1.75rem; }
    .division-card { padding: 1.75rem; }
    .contact-mini { padding: 1.75rem; gap: 1.25rem; }

    /* PROCESS / GALLERY */
    .process-body { padding: 1.25rem; }
    .gallery-strip { gap: 0.6rem; margin-top: 1.75rem; }

    /* FOOTER */
    .site-footer { padding: 3.5rem 0 0; }
    .footer-grid { padding-bottom: 2.5rem; gap: 2rem; }
    .footer-col h4 { margin-bottom: 0.85rem; }
    .footer-col ul li { margin-bottom: 0.55rem; font-size: 0.85rem; }

    /* SLIDER caption smaller */
    .slide-caption { padding: 1rem 1.25rem; }
}

/* ----- Smallest phones ----- */
@media (max-width: 420px) {
    .container { padding: 0 1rem; }
    .logo-img { height: 46px; }

    h1 { font-size: clamp(1.85rem, 8.5vw, 2.4rem); }
    h2 { font-size: clamp(1.45rem, 7vw, 2rem); }

    .section-tree--top { padding-top: 5rem; }
    .section-tree .section-header h1 { font-size: clamp(1.6rem, 7.2vw, 2.2rem); }

    /* Root card stacks tighter */
    .tree-root-logo { height: 60px; }
    .tree-node--root .tree-node-name { font-size: 1.2rem; }

    /* Stats — single column on tiny screens prevents number squish */
    .stats-grid { grid-template-columns: 1fr; gap: 1.75rem; text-align: center; }
    .stat { padding: 0 !important; }
    .stat-value { font-size: 2.6rem; }

    /* Hero buttons stack full-width */
    .hero-actions .btn,
    .section-cta .btn { width: 100%; }
    .hero-actions { flex-direction: column; align-items: stretch; }

    /* Two-col / contact-mini compact */
    .contact-mini { padding: 1.5rem; text-align: center; }

    /* Footer spacing */
    .footer-grid { gap: 1.75rem; }
}
