/* =============================================
   5J SRL — Corporate One-Page
   Minimal · Elegant · Visually Confident
   ============================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Language toggle --- */
html.it .en { display: none !important; }
html.en .it { display: none !important; }

/* --- Design tokens --- */
:root {
    --bg: #F7F6F3;
    --surface: #FFFFFF;
    --dark: #111111;
    --text: #1A1A1A;
    --text-2: #555555;
    --text-3: #999999;
    --border: #DEDBD5;
    --accent: #2D6A4F;
    --accent-soft: #EAF2EC;
    --max-w: 1160px;
    --gap: 40px;
}

/* --- Base --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16.5px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

p { color: var(--text-2); }
a { color: inherit; text-decoration: none; }

/* --- Layout --- */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 1.25rem;
}

/* =====================
   HEADER
   ===================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(247, 246, 243, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.site-header .container {
    display: flex;
    justify-content: center;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}

.header-logo img {
    height: 110px;
    width: auto;
    display: block;
}

/* --- Language switch --- */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lang-switch button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    color: var(--text-3);
    transition: color 0.2s;
}

.lang-switch button:hover { color: var(--text-2); }
.lang-switch button.active { color: var(--text); }
.lang-switch .sep { color: var(--border); font-weight: 300; user-select: none; }

/* =====================
   HERO
   ===================== */
.hero {
    padding: 160px 0 80px;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-logo {
    width: 600px;
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
}

.hero-tagline {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    line-height: 1.7;
}

.hero-right h1 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    margin-bottom: 1.5rem;
}

.hero-right p {
    font-size: 1.0625rem;
    line-height: 1.8;
    max-width: 440px;
}

/* =====================
   ABOUT
   ===================== */
.about {
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 80px;
    align-items: start;
}

.about-left h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-top: 0.25rem;
}

.about-right p {
    font-size: 1.0625rem;
    line-height: 1.9;
    max-width: 580px;
}

/* =====================
   SERVICES
   ===================== */
.services {
    padding: 0 0 100px;
}

.services-header {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 80px;
    align-items: start;
    margin-bottom: 3.5rem;
}

.services-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-top: 0.25rem;
}

.services-header p {
    font-size: 1.0625rem;
    line-height: 1.8;
    max-width: 540px;
}

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

.s-card {
    background: var(--surface);
    padding: 2.5rem 2rem 2.25rem;
    border: 1px solid var(--border);
    margin-left: -1px;
    margin-top: -1px;
    position: relative;
    transition: background 0.3s;
}

.s-card:hover {
    background: var(--bg);
}

.s-card-num {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--border);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 1.75rem;
}

.s-card h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.s-card p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-2);
}

/* =====================
   ENERGY
   ===================== */
.energy {
    background: var(--dark);
    color: #FFFFFF;
    padding: 100px 0;
    text-align: center;
}

.energy-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.energy-left .label {
    color: var(--accent);
}

.energy-left h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #FFFFFF;
    margin-bottom: 1.5rem;
}

.energy-left p {
    font-size: 1.0625rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.65);
    max-width: 560px;
    margin: 0 auto;
}

.energy-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.energy-icon {
    width: 140px;
    height: auto;
    opacity: 0.85;
}

.repower-badge {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 20px 32px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

.repower-badge span {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.repower-badge img {
    height: 44px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.55;
}

/* =====================
   CONTACT
   ===================== */
.contact {
    padding: 100px 0 80px;
}

.contact-header {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 80px;
    align-items: start;
}

.contact-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-top: 0.25rem;
}

.contact-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.contact-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 0.75rem;
}

.contact-value {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
}

.contact-value a {
    border-bottom: 1px solid var(--border);
    transition: border-color 0.2s;
}

.contact-value a:hover {
    border-color: var(--text);
}

/* =====================
   CTA
   ===================== */
.cta {
    background: var(--accent);
    padding: 72px 0;
    text-align: center;
}

.cta p {
    font-size: 1.1875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.cta-btn {
    display: inline-block;
    padding: 16px 52px;
    background: #FFFFFF;
    color: var(--accent);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.cta-btn:hover {
    opacity: 0.88;
}

/* =====================
   FOOTER
   ===================== */
.site-footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--text-3);
}

/* =====================
   RESPONSIVE
   ===================== */

/* --- Tablet --- */
@media (max-width: 960px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-brand {
        align-items: center;
        text-align: center;
    }

    .hero-right {
        text-align: center;
    }

    .hero-right p {
        margin: 0 auto;
    }

    .about-grid,
    .services-header,
    .contact-header {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-items {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Mobile --- */
@media (max-width: 640px) {
    :root { --gap: 24px; }

    /* Header */
    .header-inner { height: 56px; }

    /* Hero */
    .hero {
        padding: 88px 0 48px;
    }

    .hero-content {
        gap: 32px;
    }

    .hero-logo {
        width: 360px;
        max-width: 100%;
    }

    .hero-right h1 {
        font-size: 1.625rem;
    }

    .hero-right p {
        font-size: 0.9375rem;
    }

    .hero-tagline {
        font-size: 0.6875rem;
    }

    /* Sections spacing */
    .about, .contact {
        padding: 64px 0;
    }

    .services {
        padding: 0 0 64px;
    }

    .energy { padding: 64px 0; }

    /* About */
    .about-right p {
        font-size: 0.9375rem;
        line-height: 1.8;
    }

    /* Services cards — single column, no collapsed borders */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .s-card {
        padding: 1.75rem 1.5rem 1.5rem;
        margin-left: 0;
        margin-top: -1px;
    }

    .s-card-num {
        font-size: 1.5rem;
        margin-bottom: 0.875rem;
    }

    .s-card h3 {
        font-size: 0.9375rem;
        margin-bottom: 0.5rem;
    }

    .s-card p {
        font-size: 0.8125rem;
    }

    /* Energy */
    .energy-left h2 {
        font-size: 1.5rem;
    }

    .energy-left p {
        font-size: 0.9375rem;
    }

    .energy-icon {
        width: 80px;
    }

    .repower-badge {
        padding: 14px 20px;
        gap: 14px;
    }

    .repower-badge img {
        height: 32px;
    }

    .repower-badge span {
        font-size: 0.75rem;
    }

    /* CTA */
    .cta {
        padding: 48px 0;
    }

    .cta p {
        font-size: 1rem;
    }

    .cta-btn {
        padding: 14px 40px;
        font-size: 0.75rem;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        font-size: 0.75rem;
    }
}

/* --- Small phones --- */
@media (max-width: 420px) {
    :root { --gap: 20px; }

    .hero {
        padding: 76px 0 40px;
    }

    .hero-logo {
        width: 300px;
        max-width: 100%;
    }

    .hero-right h1 {
        font-size: 1.375rem;
    }

    .about, .contact {
        padding: 52px 0;
    }

    .services {
        padding: 0 0 52px;
    }

    .energy { padding: 52px 0; }
    .cta { padding: 40px 0; }

    .s-card {
        padding: 1.5rem 1.25rem 1.25rem;
    }
}

