/* ============================================
   RP-Hausmeisterservice — Design Foundation
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Custom Properties --- */
:root {
    /* Brand */
    --color-primary: #e62117;
    --color-primary-hover: #c41d14;
    --color-primary-light: rgba(230, 33, 23, 0.08);

    /* Neutrals */
    --color-heading: #4a4a4a;
    --color-text: #6b6b6b;
    --color-border: #e8e8e8;
    --color-bg-alt: #f7f7f7;
    --color-bg: #ffffff;
    --color-white: #ffffff;

    /* Typography — modular scale ~1.25 */
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.25rem;

    /* Spacing — 4px base */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Layout */
    --max-width: 1200px;
    --nav-height: 80px;
    --border-radius: 8px;
    --border-radius-lg: 16px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* --- Hero Fade-In --- */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__fade-in {
    animation: heroFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol {
    list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }

p { max-width: 65ch; }

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

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

.section--alt {
    background: var(--color-bg-alt);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-8);
    font-size: var(--text-base);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn--primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.btn--outline {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.hero .btn--outline {
    border-color: rgba(255,255,255,0.8);
    color: #fff;
}

.hero .btn--outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* --- Section Headings --- */
.section__header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section__label {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
}

.section__title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text);
    max-width: 55ch;
    margin: 0 auto;
}

/* --- Responsive breakpoints --- */
@media (max-width: 768px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    .section { padding: var(--space-16) 0; }
    .container { padding: 0 var(--space-4); }
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: transparent;
    transition: background var(--transition-base), box-shadow var(--transition-base), backdrop-filter var(--transition-base);
}

.nav--scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__logo-img {
    height: 52px;
    width: auto;
    transition: transform var(--transition-base);
}

.nav__logo:hover .nav__logo-img {
    transform: scale(1.04);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav__link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: #fff;
    transition: color var(--transition-base);
    position: relative;
}

.nav--scrolled .nav__link {
    color: var(--color-heading);
}

.nav__link:not(.btn):hover {
    color: var(--color-primary);
}

.nav__link:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.nav__link:not(.btn):hover::after {
    width: 100%;
}

.btn--nav {
    padding: var(--space-2) var(--space-6);
    font-size: var(--text-sm);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn--nav:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
    transform: translateY(-1px);
}

.nav--scrolled .btn--nav {
    background: var(--color-heading);
    color: var(--color-white);
    border-color: transparent;
}

.nav--scrolled .btn--nav:hover {
    background: #333;
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

/* Burger */
.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
    -webkit-tap-highlight-color: transparent;
}

.nav__burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transform-origin: center;
    will-change: transform, opacity;
}

.nav__burger span:nth-child(1) {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                background var(--transition-base);
}

.nav__burger span:nth-child(2) {
    transition: opacity 0.2s ease,
                background var(--transition-base);
}

.nav__burger span:nth-child(3) {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                background var(--transition-base);
}

.nav--scrolled .nav__burger span,
.nav--menu-open .nav__burger span {
    background: var(--color-heading);
}

.nav--menu-open {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.nav__burger--active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__burger--active span:nth-child(2) {
    opacity: 0;
}

.nav__burger--active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav__burger {
        display: flex;
    }

    .nav__links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        height: calc(100% - var(--nav-height));
        height: calc(100dvh - var(--nav-height));
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;
        padding: var(--space-8) var(--space-6) var(--space-8);
        background: var(--color-bg);
        opacity: 0;
        visibility: hidden;
        -webkit-transform: translateY(-12px);
        transform: translateY(-12px);
        transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                    visibility 0.35s,
                    -webkit-transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .nav__links--open {
        opacity: 1;
        visibility: visible;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }

    .nav__links li {
        width: 100%;
        border-bottom: 1px solid var(--color-border);
    }

    .nav__links li:last-child {
        border-bottom: none;
        margin-top: var(--space-4);
    }

    .nav__link {
        font-size: var(--text-xl);
        display: flex;
        align-items: center;
        width: 100%;
        padding: var(--space-5) var(--space-4);
        color: var(--color-text);
        border-left: 3px solid transparent;
        transition: color var(--transition-base), border-color var(--transition-base), background var(--transition-base);
    }

    .nav__links--open .nav__link {
        color: var(--color-heading);
    }

    .nav__link--active {
        color: var(--color-primary) !important;
        border-left-color: var(--color-primary);
        background: var(--color-primary-light);
    }

    .nav__link.btn--nav {
        background: var(--color-primary);
        color: var(--color-white);
        border: none;
        border-radius: var(--border-radius);
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-lg);
        font-weight: 600;
        justify-content: center;
    }

    .nav__links--open .nav__link.btn--nav {
        color: var(--color-white);
    }

}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: url('/assets/img/hero-bg.jpg') center/cover no-repeat;
    background: url('/assets/img/hero-bg.webp') center/cover no-repeat;
    z-index: 0;
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
}



.hero__content {
    position: relative;
    z-index: 1;
    padding-top: calc(var(--nav-height) + var(--space-16));
    padding-bottom: var(--space-16);
}

.hero__text {
    max-width: 700px;
}

.hero__badge {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary);
    border-radius: 100px;
    margin-bottom: var(--space-6);
}

.hero__title {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero__accent {
    color: #fff;
    -webkit-text-fill-color: transparent;
    background: linear-gradient(135deg, #fff 30%, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
}

.hero__description {
    font-size: var(--text-lg);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-10);
    max-width: 55ch;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.btn--lg {
    padding: var(--space-4) var(--space-10);
    font-size: var(--text-lg);
}

@media (max-width: 768px) {
    .hero {
        min-height: 100dvh;
    }
    .hero__title {
        font-size: var(--text-3xl);
    }
    .hero__description {
        font-size: var(--text-base);
    }
    .btn--lg {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-base);
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Services Grid
   ============================================ */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
}

.service-card {
    padding: var(--space-10);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-slow);
    background: var(--color-bg);
}

.service-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 12px 40px rgba(230, 33, 23, 0.08), var(--shadow-md);
    transform: translateY(-6px);
}

.service-card:hover .service-card__icon {
    transform: scale(1.1);
}

.service-card__icon {
    transition: transform var(--transition-slow);
}

.service-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-6);
    color: var(--color-primary);
}

.service-card__icon svg {
    width: 24px;
    height: 24px;
}

.service-card__title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
}

.service-card__text {
    font-size: var(--text-sm);
    line-height: 1.7;
    color: var(--color-text);
}

@media (max-width: 768px) {
    .services__grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    .service-card {
        padding: var(--space-6);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   About
   ============================================ */
.about__content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-16);
    align-items: start;
}

.about__text {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.about__text p {
    font-size: var(--text-lg);
    line-height: 1.8;
}

.about__stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.stat {
    padding: var(--space-6);
    border-left: 3px solid var(--color-primary);
    background: var(--color-bg);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.stat__number {
    display: block;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: var(--space-1);
}

.stat__label {
    font-size: var(--text-sm);
    color: var(--color-text);
}

@media (max-width: 768px) {
    .about__content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    .about__stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .stat {
        flex: 1;
        min-width: 140px;
    }
}

/* ============================================
   Jobs / Career
   ============================================ */
.jobs__list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.jobs__empty, .jobs__loading {
    text-align: center;
    padding: var(--space-12);
    color: var(--color-text);
    font-size: var(--text-lg);
}

.job-card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: border-color var(--transition-base);
}

.job-card:hover {
    border-color: var(--color-primary);
}

.job-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-6) var(--space-8);
    text-align: left;
    background: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.job-card__meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.job-card__title {
    font-size: var(--text-lg);
    color: var(--color-heading);
}

.job-card__tags {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.job-card__tag {
    font-size: var(--text-xs);
    font-weight: 500;
    padding: var(--space-1) var(--space-3);
    background: var(--color-bg-alt);
    border-radius: 100px;
    color: var(--color-text);
}

.job-card__chevron {
    color: var(--color-text);
    transition: transform var(--transition-base);
    flex-shrink: 0;
}

.job-card--open .job-card__chevron {
    transform: rotate(180deg);
}

.job-card__body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--transition-slow), padding var(--transition-slow);
}

.job-card__body > :first-child {
    overflow: hidden;
}

.job-card--open .job-card__body {
    grid-template-rows: 1fr;
    padding: 0 var(--space-8) var(--space-8);
}

.job-card__section {
    margin-bottom: var(--space-6);
}

.job-card__section h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.job-card__section p {
    font-size: var(--text-base);
    line-height: 1.7;
    white-space: pre-line;
}

/* ============================================
   Contact
   ============================================ */
.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
}

.form__group {
    margin-bottom: var(--space-5);
}

.form__label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-heading);
    margin-bottom: var(--space-2);
}

.form__input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-family);
    font-size: var(--text-base);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-bg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    color: var(--color-heading);
}

.form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

.form__hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.form__submit {
    width: 100%;
}

.form__status {
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
    text-align: center;
}

.form__status--success { color: #16a34a; }
.form__status--error { color: var(--color-primary); }

.contact__details {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.contact__item {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.contact__item svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact__item strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: var(--space-1);
}

.contact__item p {
    font-size: var(--text-sm);
    line-height: 1.6;
}

.contact__item a {
    color: var(--color-primary);
    transition: opacity var(--transition-fast);
}

.contact__item a:hover {
    opacity: 0.8;
}

/* Google Reviews */
.google-reviews-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    background: var(--color-bg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    margin-top: var(--space-6);
}

.google-reviews-badge:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.google-reviews-badge__g {
    flex-shrink: 0;
}

.google-reviews-badge__score {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1;
}

.google-reviews-badge__stars {
    color: #fbbc05;
    font-size: var(--text-sm);
    letter-spacing: 1px;
    line-height: 1;
}

.google-reviews-badge__label {
    font-size: var(--text-sm);
    color: var(--color-text);
}

.google-reviews-badge__arrow {
    color: var(--color-text);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.google-reviews-badge:hover .google-reviews-badge__arrow {
    transform: translate(2px, -2px);
}

@media (max-width: 768px) {
    .contact__grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-heading);
    color: rgba(255, 255, 255, 0.6);
    padding: var(--space-10) 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer__logo {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.footer__links {
    display: flex;
    gap: var(--space-6);
}

.footer__links a {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

.footer__links a:hover {
    color: var(--color-white);
}

.footer__copy {
    font-size: var(--text-xs);
}

@media (max-width: 768px) {
    .footer__inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-page {
    padding-top: calc(var(--nav-height) + var(--space-16));
    padding-bottom: var(--space-16);
}

.legal-page h1 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-10);
}

.legal-page h2 {
    font-size: var(--text-xl);
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
}

.legal-page h3 {
    font-size: var(--text-lg);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.legal-page p {
    margin-bottom: var(--space-4);
    line-height: 1.8;
}

.legal-page a {
    color: var(--color-primary);
}

.legal-page a:hover {
    text-decoration: underline;
}
