:root {
    --bg: #020c06;
    --surface: #06160e;
    --surface-2: #0b2216;
    --text: #e1ffe8;
    --text-muted: #8ab095;
    --brand-200: #88cc00;
    --brand-300: #669900;
    --brand-400: #558000;
    --brand-500: #406000;
    --brand-600: #2a4000;
    --accent: #118844;
    --danger: #ff5a6b;
    --radius: 12px;
    --container: 1120px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html:focus-within {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(18, 255, 90, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 255, 90, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(150, 240, 12, 0.1), transparent 60%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

main > .section:first-child {
    padding-top: 6rem;
}

img,
svg {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin: 0 0 .6rem 0;
}

h1 {
    font-size: clamp(1.8rem, 2.4vw + 1rem, 3rem);
}

h2 {
    font-size: clamp(1.3rem, 1.2vw + .8rem, 2rem);
    margin-bottom: .25rem;
}

h3 {
    font-size: 1.05rem;
}

.lead {
    font-size: clamp(1rem, .35vw + .95rem, 1.15rem);
    color: var(--text-muted);
}

.small {
    font-size: .9rem;
}

.mute {
    color: var(--text-muted);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    background: var(--brand-500);
    color: #000;
    padding: .5rem .75rem;
    border-radius: 6px;
    z-index: 1000;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.section {
    padding: 4rem 0;
}

.grid {
    display: grid;
    gap: 1rem;
}

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

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(11, 13, 18, 0.7);
    backdrop-filter: saturate(120%) blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}


.brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .2px;
}

.brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: block;
    box-shadow: 0 2px 10px rgba(11, 146, 255, 0.25);
}

.brand-logo-img {
    height: 40px;
    width: auto;
    border-radius: 6px;
    object-fit: contain;
}

.brand-text {
    font-family: sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #96f00c;
    font-weight: 700;
    font-size: 1.05rem;
}

.lang-switcher {
    display: flex;
    align-items: center;
    position: relative;
}

.lang-select {
    background: var(--surface-2);
    border: 1px solid rgba(150, 240, 12, 0.3);
    color: var(--text);
    padding: 0.4rem 2rem 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2396f00c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    box-shadow: 0 0 0 rgba(150, 240, 12, 0);
}

.lang-select:hover {
    border-color: rgba(150, 240, 12, 0.6);
    background-color: rgba(150, 240, 12, 0.05);
    box-shadow: 0 0 15px rgba(150, 240, 12, 0.1);
    transform: scale(1.02);
}

.lang-select:focus {
    border-color: var(--brand-200);
    box-shadow: 0 0 20px rgba(150, 240, 12, 0.2);
}

.lang-select option {
    background-color: var(--surface-2);
    color: var(--text);
    padding: 10px;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    padding: .55rem .8rem;
    border-radius: 8px;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.theme-nav-btn {
    margin: 0;
    white-space: nowrap;
}

.masthead {
    position: relative;
    padding: 6rem 0 2.5rem;
    text-align: center;
    background:
        radial-gradient(900px 600px at 80% -10%, rgba(11, 146, 255, 0.18), transparent),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.masthead-inner {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.masthead-title-glow {
    font-family: sans-serif;
    font-size: clamp(3rem, 5vw + 2rem, 5rem);
    color: #96f00c;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: none;
}

.masthead-sub {
    margin-top: .6rem;
}


.masthead-sub-names {
    font-size: 1.15rem;
    color: var(--text);
    background: rgba(150, 240, 12, 0.08);
    padding: .9rem 1.8rem;
    border-radius: 50px;
    border: 1px solid rgba(150, 240, 12, 0.22);
    display: inline-block;
    margin-top: 2rem;
    text-shadow: none;
    backdrop-filter: none;
    filter: none;
    font-weight: 500;
    transition: background-color 0.6s ease, color 0.6s ease;
}

.logo-large {
    width: clamp(90px, 9vw + 60px, 128px);
    height: auto;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(11, 146, 255, 0.25);
}

.brand-name-large {
    font-size: clamp(2.2rem, 2.4vw + 1.2rem, 3.2rem);
    margin: 0;
    letter-spacing: .3px;
}

.tagline {
    color: var(--text-muted);
}

.actions {
    display: flex;
    gap: .8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.page-hero {
    padding: 8rem 0 3rem;
    text-align: center;
    background:
        radial-gradient(600px 400px at 50% 0%, rgba(11, 146, 255, 0.1), transparent),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.page-hero h1 {
    font-size: clamp(2.5rem, 4vw + 1rem, 4rem);
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(150, 240, 12, 0.2);
}

.page-hero .section-intro {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.2rem;
}

.cards .card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
}

.cards .card p {
    color: var(--text-muted);
    margin: .4rem 0 0 0;
}


.grid .card:has(.intphoto),
.grid .card:has(.intphoto):hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    transform: none !important;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .6rem;
}

.checklist li {
    position: relative;
    padding-left: 1.6rem;
}

.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .35rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #fff 0 10%, transparent 11%),
        linear-gradient(135deg, var(--accent), var(--brand-500));
    box-shadow: 0 2px 10px rgba(36, 209, 139, 0.35);
}

.checklist-noicon {
    gap: .6rem;
}

.checklist-noicon > div {
    padding-left: 0;
    position: static;
}

.steps {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.steps li {
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 1rem;
}

.steps h3 {
    margin-bottom: .3rem;
}

.steps p {
    color: var(--text-muted);
    margin: 0;
}

.values .value {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 1rem;
}

.values .value p {
    color: var(--text-muted);
    margin: 0;
}

.contact-form {
    margin-top: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    text-align: left;
}

label {
    font-weight: 600;
}

input,
textarea {
    background: var(--surface);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: .7rem .8rem;
    font: inherit;
}

input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(11, 146, 255, 0.6);
    outline-offset: 1px;
    border-color: var(--brand-500);
}

.form-actions {
    margin-top: .8rem;
}

.help {
    color: var(--text-muted);
    margin-top: .5rem;
}

.btn {
    display: inline-block;
    border: 1px solid rgba(150, 240, 12, 0.3);
    background: linear-gradient(180deg, #1e4a05, #112b02);
    color: #adfa1d;
    padding: .7rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    filter: brightness(1.05);
}

.btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text);
}

.btn-small {
    padding: .5rem .7rem;
    font-size: .95rem;
}

.download-box {
    padding: 2rem;
    background: #0b2216;
    border-radius: 12px;
    border: 1px solid #305813;
    transition: background-color 0.6s ease, border-color 0.6s ease;
}

.pay-success-title {
    color: #ffffff;
    transition: color 0.6s ease;
}

.intphoto {
    width: 211.6px;
}

.mid-page-logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 0 45px rgba(150, 240, 12, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mid-page-logo-container {
    display: flex;
    justify-content: center;
}

.map-contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-info-block {
    text-align: center;
    order: 1;
}

.map-wrapper {
    order: 2;
    width: 100%;
    display: flex;
    justify-content: center;
}

.map-wrapper iframe {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.site-footer {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}

.footer-inner {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.site-footer nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: .6rem;
}

.site-footer a {
    color: var(--text);
    text-decoration: none;
    padding: .3rem .5rem;
    border-radius: 6px;
}

.site-footer a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.theme-transition,
.theme-transition * {
    transition: background-color 0.6s ease, color 0.6s ease !important;
}

.theme-btn:active {
    transform: scale(0.95);
    filter: brightness(1.2);
}

.site-nav ul,
.site-nav a {
    transition: background-color 0.6s ease, color 0.6s ease;
}

body.light-mode {
    --bg: #cbd2d6;
    --surface: #dde3e7;
    --surface-2: #b4bfc5;
    --text: #051207;
    --text-muted: #3a473f;
    --brand-200: #1b4d0a;
    --brand-300: #245c0c;
    --brand-400: #2d730f;
    --brand-500: #388e13;
    --brand-600: #1b4d0a;
    --accent: #245c0c;
}

body.light-mode .site-header {
    background: rgba(203, 210, 214, 0.9) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

body.light-mode .masthead-title-glow {
    color: #051207;
    text-shadow: 3px 3px 0px #558000;
    letter-spacing: -0.02em;
}

body.light-mode .masthead-sub-names {
    background: rgba(56, 142, 19, 0.12) !important;
    color: #1b4d0a !important;
    border: 1px solid rgba(56, 142, 19, 0.3) !important;
    font-weight: 600;
    text-shadow: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

body.light-mode .card,
body.light-mode .steps li,
body.light-mode .values .value {
    background: var(--surface) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

body.light-mode .card:hover {
    transform: translateY(-3px);
    background: #e4e9ec !important;
    border-color: var(--brand-400) !important;
    box-shadow: 0 6px 20px rgba(56, 142, 19, 0.1) !important;
}

body.light-mode input,
body.light-mode textarea {
    background: #e4e9ec !important;
    border: 1px solid #9aa7af !important;
    color: var(--text) !important;
}

body.light-mode input:focus-visible,
body.light-mode textarea:focus-visible {
    border-color: var(--brand-500) !important;
    outline: 3px solid rgba(56, 142, 19, 0.25) !important;
}

body.light-mode .btn {
    background: linear-gradient(180deg, #2d730f, #1b4d0a) !important;
    color: #ffffff !important;
    border: 1px solid #133a06 !important;
    box-shadow: 0 3px 8px rgba(27, 77, 10, 0.2) !important;
    text-transform: uppercase;
    text-shadow: none !important;
}

body.light-mode .btn:hover {
    filter: brightness(1.15) !important;
    box-shadow: 0 5px 12px rgba(27, 77, 10, 0.3) !important;
}

body.light-mode .btn-ghost {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid #2d730f !important;
    color: #1b4d0a !important;
    font-weight: 700;
}

body.light-mode .btn-ghost:hover {
    background: var(--surface) !important;
    color: #051207 !important;
}

body.light-mode .lang-select,
body.light-mode #theme-toggle {
    background-color: var(--surface) !important;
    border: 1px solid #9aa7af !important;
    color: var(--text) !important;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

body.light-mode .lang-select:hover,
body.light-mode #theme-toggle:hover {
    border-color: var(--brand-400) !important;
    background-color: #e4e9ec !important;
}

body.light-mode .download-box {
    background: var(--surface) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

body.light-mode .pay-success-title {
    color: var(--text) !important;
}

body.light-mode .grid .card:has(.intphoto),
body.light-mode .grid .card:has(.intphoto):hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

@media (min-width: 901px) {
    .grid.two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4rem;
    }
}

@media (min-width: 769px) {
    .brand {
        flex: 0 0 50%;
        justify-content: flex-start;
    }

    .header-right {
        flex: 0 0 50%;
        justify-content: flex-end;
    }

    .brand-logo-img {
        height: 60px;
        width: auto;
        max-width: 100%;
    }

    .serveis-container {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 4.5rem;
        align-items: start;
    }

    .mid-page-logo-container {
        padding-top: 1rem;
    }

    .mid-page-logo:hover {
        transform: scale(1.03);
        box-shadow: 0 0 55px rgba(150, 240, 12, 0.25);
    }

    .site-nav ul li a[href*="contacte"] {
        background-color: var(--brand-200);
        color: #ffffff;
        border: 1px solid var(--brand-200);
        transition: var(--transition);
    }

    .site-nav ul li a[href*="contacte"]:hover {
        background-color: var(--bg);
        color: var(--brand-200);
    }

    .map-contact-container {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 4rem;
    }

    .contact-info-block {
        text-align: left;
        order: unset;
    }

    .map-wrapper {
        order: unset;
        width: auto;
    }
}

@media (max-width: 900px) {
    .masthead {
        padding: 5rem 0 2rem;
    }

    .grid.two,
    .grid.three {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        display: grid !important;
        grid-template-columns: 1fr auto auto;
        grid-template-areas:
            "logo lang theme"
            "nav nav nav";
        padding: 0.8rem 0.75rem;
        gap: 0.8rem 0.6rem;
        align-items: center;
    }

    .brand {
        grid-area: logo;
        justify-self: start;
    }

    .header-right {
        display: contents !important;
    }

    .lang-switcher {
        grid-area: lang;
        justify-self: end;
    }

    #theme-toggle {
        grid-area: theme;
        justify-self: end;
        margin: 0 !important;
        padding: 0.35rem 0.6rem !important;
        font-size: 0.9rem !important;
        height: 34px;
        width: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
    }

    .site-nav {
        grid-area: nav;
        width: 100%;
    }

    .site-nav ul {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 1vw;
        padding: 0.8rem 0 0 0;
        margin: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background: transparent;
        width: 100%;
    }

    .site-nav a {
        font-size: clamp(0.75rem, 2.6vw, 0.95rem);
        padding: 0.4rem 0.15rem;
        color: var(--text);
        font-weight: 600;
        white-space: nowrap;
        letter-spacing: -0.01em;
    }

    .site-nav a.btn-small {
        background: #1a3306 !important;
        border: 1px solid #305813 !important;
        color: #ffffff !important;
        padding: 5px 3.5vw !important;
        border-radius: 5px !important;
        text-transform: uppercase;
        font-size: clamp(0.7rem, 2.4vw, 0.85rem) !important;
        font-weight: 700;
    }

    .lang-select {
        padding: 0.3rem 1.4rem 0.3rem 0.5rem;
        font-size: 0.85rem;
        height: 34px;
        background-color: rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(48, 88, 19, 0.4);
        border-radius: 6px;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23305813' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.4rem center;
    }

    .masthead-title-glow {
        font-size: clamp(2.5rem, 11vw, 4.5rem) !important;
        white-space: nowrap !important;
        line-height: 0.95;
        padding: 0 !important;
        letter-spacing: -1px;
        max-width: 100%;
    }

    .masthead-title-glow div {
        display: block;
        width: 100%;
    }

    .masthead,
    .masthead .container {
        overflow: hidden;
    }

    .serveis-container {
        display: flex;
        flex-direction: column;
    }

    .mid-page-logo-container {
        order: -1;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 0 0 3.5rem 0;
    }

    .mid-page-logo {
        display: block;
        margin: 0 auto;
        max-width: 290px;
        box-shadow: 0 0 40px rgba(150, 240, 12, 0.2);
    }

    input,
    textarea {
        padding: 1rem;
        font-size: 16px;
    }

    body.light-mode .site-nav ul {
        border-top: 1px solid rgba(0, 0, 0, 0.15) !important;
    }

    body.light-mode .site-nav a {
        color: var(--text) !important;
        font-weight: 600 !important;
    }

    body.light-mode .site-nav a.btn-small {
        background: linear-gradient(180deg, #2d730f, #1b4d0a) !important;
        border: 1px solid #133a06 !important;
        color: #ffffff !important;
    }

    body.light-mode .lang-select {
        background-color: rgba(255, 255, 255, 0.4);
        border-color: #669900;
        color: #020c06;
    }
}
