/* Theme variables */
:root {
    --color-bg: #ffffff;
    --color-text: #2a2a2a;
    --color-muted: #1f1f1f;
    --color-accent: #2e7d32; /* stronger green */
    --color-accent-2: #a0bf38; /* light green */
    --color-surface: #ffffff;
    --color-surface-2: #f0f2f4;
    --color-face: #eebc86; /* face color */
    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.06);
    --radius-md: 10px;
    --space-1: 0.8rem;
    --space-2: 1.2rem;
    --space-3: 1.6rem;
    --space-4: 2.4rem;
    --space-5: 3.2rem;
    --pattern-color: rgba(46, 125, 50, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: "Lato", sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image:
        linear-gradient(180deg, rgba(160, 191, 56, 0.12) 0%, rgba(46, 125, 50, 0.08) 100%),
        radial-gradient(var(--pattern-color) 1px, transparent 1px),
        radial-gradient(var(--pattern-color) 1px, transparent 1px);
    background-position: center, 0 0, 25px 25px;
    background-size: cover, 50px 50px, 50px 50px;
}

/* Optional photo background: add class "has-photo" on <body> and place bg.jpg */
body.has-photo {
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.25) 100%),
        url('bg.jpg'),
        radial-gradient(var(--pattern-color) 1px, transparent 1px),
        radial-gradient(var(--pattern-color) 1px, transparent 1px);
    background-position: center, center, 0 0, 25px 25px;
    background-size: cover, cover, 50px 50px, 50px 50px;
    background-repeat: no-repeat;
}

img {
    width: 100%;
}
.site-logo { width: 200px; max-width: 70%; }

.page {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
}

main.container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-title {
    text-align: center;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.main-title h1 {
    font-size: 7rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--color-muted);
}

.main-title h2 {
    font-size: 4rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-accent);
}

.main-title .subtitolo {
    font-size: 1.6rem;
    color: var(--color-text);
}

/* Status badges */
.status-badge-wrapper {
    display: inline-block;
    margin-bottom: var(--space-2);
}
.status-badge {
    display: none;
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    font-size: 1.4rem;
    letter-spacing: 0.03em;
    background: #e8f5e9;
    color: var(--color-accent);
    border: 1px solid rgba(46, 125, 50, 0.25);
}
.client-chips {
    margin-top: var(--space-3);
    margin-bottom: var(--space-3);
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 1rem;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06);
    color: var(--color-text);
    border-radius: 999px;
    margin: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    font-size: 1.3rem;
}
.chip .material-icons { font-size: 1.4rem; color: var(--color-accent); }
.chip a { color: inherit; text-decoration: none; }
.chip a:hover { text-decoration: underline; }
/* Hide all status labels by default (badges and footer) */
.status-construction,
.status-maintenance { display: none; }
body[data-status="construction"] .status-construction { display: inline-block; }
body[data-status="maintenance"] .status-maintenance { display: inline-block; }

.svg-img {
    display: block;
    margin: auto;
}

svg {
    display: block;
    margin: auto;
}

/* Prevent hero overflowing viewport */
.svg-img svg { max-height: 40vh; height: auto; width: 100%; }
.main-title { margin-top: 2rem; margin-bottom: 2rem; }
.client-chips { margin-top: 0; }

#clock {
    animation: clockHand 5s infinite linear;

    transform-box: fill-box;
    transform-origin: bottom;
}

#leftTree,
#righTree {
    animation: tree 2s ease-in-out infinite alternate;
    transform-box: fill-box;
    transform-origin: bottom;
}

#man {
    animation: manBody 1s ease-in-out infinite alternate;
    transform-box: fill-box;
    transform-origin: bottom;
}

#pc-circle {
    fill: #6ace66;
    stroke-width: 4;
    animation: change-light 4s linear infinite alternate;
}

/* SVG face color customization */
#man path[fill="#A0616A"] {
    fill: var(--color-face);
}

.footer {
    position: static;
    width: 100%;
    min-height: 45px;
    line-height: 45px;
    background-color: var(--color-surface-2);
    font-size: 1.4rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer .container { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer .sep { opacity: 0.5; margin: 0 6px; }
.footer .status-construction, .footer .status-maintenance { font-weight: 700; }
.footer .footer-lang { display: inline-flex; gap: 4px; }
.footer .lang-btn {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 1.2rem;
    line-height: 1.6rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer .lang-btn .flag { font-size: 1.4rem; }
.footer .lang-btn:focus { outline: none; box-shadow: 0 0 0 2px rgba(46,125,50,0.25); }
.footer .lang-btn.active { border-color: var(--color-accent); background: #e8f5e9; }

@media (max-width: 575.98px) {
    .footer .lang-btn .lang-label { display: none; }
    .footer .footer-lang { flex-basis: 100%; display: flex; justify-content: center; margin-top: 8px; padding-bottom: 12px; }
    .footer { min-height: auto; }
    .footer .container { padding: 8px 15px; }
}

@media (max-width: 767.98px) {
    .footer { min-height: auto; }
}

@keyframes clockHand {
    from {
        transform: rotateZ(0deg);
    }
    from {
        transform: rotateZ(-360deg);
    }
}

@keyframes manBody {
    from {
        transform: rotateX(0deg);
    }
    to {
        transform: rotateX(10deg);
    }
}

@keyframes tree {
    from {
        transform: rotateZ(10deg);
    }
    to {
        transform: rotateZ(-20deg);
    }
}

@keyframes change-light {
    0% {
        stroke: #cd61f8;
    }
    25% {
        stroke: #6ace66;
    }
    75% {
        stroke: #2995c0;
    }
    100% {
        stroke: #e92949;
    }
}

/* Cards */
.cliente-card, .dev-card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}
.cliente-card .card-title, .dev-card .card-title { color: var(--color-accent); }
.dev-card .card-title { font-size: 1.8rem; }
.dev-card p { font-size: 1.5rem; }
.dev-cta .btn { padding: 0.8rem 1.6rem; font-size: 1.4rem; font-weight: 500; }
.dev-cta .btn-primary { background-color: var(--color-accent); border-color: var(--color-accent); }
.dev-cta .btn-outline-primary { color: var(--color-accent); border-color: var(--color-accent); }
.dev-cta .btn-outline-primary:hover { background-color: var(--color-accent); color: #fff; }

@media (max-width: 767.98px) {
    .dev-cta { width: 100%; }
    .dev-cta .btn { flex: 1; margin: 0 4px; }
    .dev-cta .btn:first-child { margin-left: 0; }
    .dev-cta .btn:last-child { margin-right: 0; }
}

/* CTA buttons under hero */
.btn.btn-primary { background-color: var(--color-accent); border-color: var(--color-accent); }
.btn.btn-primary:hover { filter: brightness(0.95); }
.btn.btn-outline-primary { color: var(--color-accent); border-color: var(--color-accent); }
.btn.btn-outline-primary:hover { background-color: var(--color-accent); color: #fff; }

/* Media Queries */

@media (min-width: 640px) {
    .main-title h1 {
        font-size: 5rem;
        text-transform: uppercase;
        font-weight: 700;
        color: var(--color-muted);
    }

    .main-title h2 {
        font-size: 3rem;
        font-weight: 300;
        text-transform: uppercase;
    }
}

@media (min-width: 768px) {
    .main-title h1 {
        font-size: 6rem;
        text-transform: uppercase;
        font-weight: 800;
        color: var(--color-muted);
    }

    .main-title h2 {
        font-size: 4rem;
        font-weight: 300;
        text-transform: uppercase;
    }
}

@media (min-width: 1024px) {
    img {
        width: 50%;
    }
    .main-title h1 {
        font-size: 7rem;
        text-transform: uppercase;
        font-weight: 900;
        color: var(--color-muted);
    }

    .main-title h2 {
        font-size: 5rem;
        font-weight: 300;
        text-transform: uppercase;
    }
}

@media (min-width: 1200px) {
    .main-title h1 {
        font-size: 8rem;
        text-transform: uppercase;
        font-weight: 900;
        color: var(--color-muted);
    }

    .main-title h2 {
        font-size: 5rem;
        font-weight: 300;
        text-transform: uppercase;
    }

    .main-title {
        text-align: center;
        margin-top: 4rem;
        margin-bottom: 4rem;
    }
}

/* Responsive tweaks */
@media (max-width: 575.98px) {
    .svg-img { max-width: 360px; margin: 0 auto; padding: 1.2rem !important; }
    .main-title h2 { font-size: 2.4rem; }
    .main-title .subtitolo { font-size: 1.4rem; }
    .chip { font-size: 1.2rem; }
}
