/* ============================================
   Wirfs Electric — Brand Styles
   Palette: Terracotta + Sand + Charcoal
   ============================================ */

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

:root {
    --color-terracotta: #C05A3A;
    --color-terracotta-dark: #A04830;
    --color-terracotta-light: #D4795C;
    --color-sand: #F5E6D3;
    --color-sand-light: #FAF3EB;
    --color-sand-dark: #E8D5C0;
    --color-charcoal: #1E1E1E;
    --color-text: #2A2A2A;
    --color-text-muted: #6B6B6B;
    --color-white: #FFFFFF;
    --color-cream: #FDF8F4;
    
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 1px 3px rgba(30, 30, 30, 0.06);
    --shadow-md: 0 4px 20px rgba(30, 30, 30, 0.08);
    --shadow-lg: 0 12px 40px rgba(30, 30, 30, 0.12);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
    padding: 20px 0;
}

.nav.scrolled {
    background: rgba(253, 248, 244, 0.97);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-white);
    transition: color 0.4s ease;
}

.nav.scrolled .nav__logo {
    color: var(--color-terracotta);
}

.nav__logo-icon {
    color: var(--color-terracotta);
}

.nav.scrolled .nav__logo-icon {
    color: var(--color-terracotta);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav__link {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-terracotta);
    transition: width 0.3s ease;
}

.nav__link:hover::after {
    width: 100%;
}

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

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

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

.nav__cta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-white);
    background: var(--color-terracotta);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease, transform 0.2s ease;
}

.nav__cta:hover {
    background: var(--color-terracotta-dark);
    transform: translateY(-1px);
}

.nav.scrolled .nav__cta {
    color: var(--color-white);
}

/* Mobile Toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.nav__toggle-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.nav.scrolled .nav__toggle-line {
    background: var(--color-charcoal);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(2) {
    opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
    }
    
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-cream);
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        padding: 40px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-lg);
    }
    
    .nav__menu.open {
        right: 0;
    }
    
    .nav__link {
        color: var(--color-text) !important;
        font-size: 1.1rem;
    }
    
    .nav__link::after {
        background: var(--color-terracotta);
    }
    
    .nav__cta {
        color: var(--color-white) !important;
        justify-content: center;
        width: 100%;
    }
    
    .nav__overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }
    
    .nav__overlay.active {
        display: block;
    }
}

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

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(30, 30, 30, 0.82) 0%,
        rgba(30, 30, 30, 0.65) 50%,
        rgba(192, 90, 58, 0.3) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 24px 80px;
    color: var(--color-white);
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-sand);
    margin-bottom: 28px;
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-terracotta);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.hero__headline {
    font-family: var(--font-serif);
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
    max-width: 780px;
}

.hero__headline em {
    font-style: italic;
    color: var(--color-terracotta-light);
}

.hero__sub {
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    max-width: 540px;
    margin-bottom: 44px;
    font-weight: 300;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero__scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-terracotta);
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(192, 90, 58, 0.35);
}

.btn--primary:hover {
    background: var(--color-terracotta-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(192, 90, 58, 0.4);
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

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

.btn--light:hover {
    background: var(--color-sand);
    transform: translateY(-2px);
}

.btn--outline-light {
    background: transparent;
    color: var(--color-white);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.btn--outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-white);
    transform: translateY(-2px);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

/* ============================================
   Trust Bar
   ============================================ */
.trust {
    background: var(--color-sand);
    border-top: 1px solid var(--color-sand-dark);
    border-bottom: 1px solid var(--color-sand-dark);
}

.trust__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.trust__item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.trust__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-charcoal);
    letter-spacing: 0.02em;
}

.trust__divider {
    width: 4px;
    height: 4px;
    background: var(--color-terracotta);
    border-radius: 50%;
    opacity: 0.5;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .trust__inner {
        justify-content: center;
    }
    .trust__item {
        width: 100%;
        justify-content: center;
    }
    .trust__divider {
        display: none;
    }
}

/* ============================================
   Section Shared
   ============================================ */
.section-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--color-charcoal);
    margin-bottom: 20px;
}

.section-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 560px;
}

.section-header {
    margin-bottom: 64px;
}

.section-header--centered {
    text-align: center;
}

.section-header--centered .section-desc {
    margin: 0 auto;
}

/* ============================================
   Services
   ============================================ */
.services {
    padding: 120px 0;
    background: var(--color-cream);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 40px 32px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-terracotta);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-sand-light);
    border-radius: var(--radius-sm);
    color: var(--color-terracotta);
    margin-bottom: 24px;
    transition: background 0.3s ease;
}

.service-card:hover .service-card__icon {
    background: var(--color-terracotta);
    color: var(--color-white);
}

.service-card__title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-charcoal);
    margin-bottom: 12px;
}

.service-card__desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

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

@media (max-width: 560px) {
    .services__grid {
        grid-template-columns: 1fr;
    }
    .services {
        padding: 80px 0;
    }
}

/* ============================================
   About
   ============================================ */
.about {
    padding: 120px 0;
    background: var(--color-white);
}

.about__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about__image-wrap {
    position: relative;
}

.about__image {
    width: 100%;
    height: 720px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.about__image-accent {
    position: absolute;
    bottom: -24px;
    right: -24px;
    width: 200px;
    height: 200px;
    background: var(--color-terracotta);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.15;
}

.about__content {
    max-width: 480px;
}

.about__body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.about__highlights {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--color-sand-dark);
}

.highlight__number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-terracotta);
    line-height: 1;
    margin-bottom: 8px;
}

.highlight__label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}

@media (max-width: 900px) {
    .about__layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .about__image {
        height: 480px;
    }
    
    .about__content {
        max-width: 100%;
    }
}

/* ============================================
   CTA Banner
   ============================================ */
.cta-banner {
    padding: 100px 0;
    background: var(--color-charcoal);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(192, 90, 58, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.cta-banner__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.cta-banner__title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-white);
    margin-bottom: 16px;
}

.cta-banner__desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    max-width: 400px;
}

.cta-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cta-banner__inner {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-banner__desc {
        max-width: 100%;
    }
    
    .cta-banner__actions {
        justify-content: center;
    }
}

/* ============================================
   Areas
   ============================================ */
.areas {
    padding: 120px 0;
    background: var(--color-sand-light);
}

.areas__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.area-chip {
    padding: 12px 24px;
    background: var(--color-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    transition: all 0.25s ease;
}

.area-chip:hover {
    background: var(--color-terracotta);
    color: var(--color-white);
    border-color: var(--color-terracotta);
    transform: translateY(-2px);
}

/* ============================================
   Contact
   ============================================ */
.contact {
    padding: 120px 0;
    background: var(--color-cream);
}

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

.contact__body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

.contact__details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact__detail {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact__detail-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-sand);
    border-radius: var(--radius-sm);
    color: var(--color-terracotta);
    flex-shrink: 0;
}

.contact__detail-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.contact__detail-value {
    font-size: 1rem;
    color: var(--color-charcoal);
    line-height: 1.6;
}

.contact__detail-value a {
    color: var(--color-terracotta);
    font-weight: 600;
    transition: color 0.2s ease;
}

.contact__detail-value a:hover {
    color: var(--color-terracotta-dark);
}

/* Form */
.contact__form-wrap {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.contact__form-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-charcoal);
    margin-bottom: 32px;
}

.form__group {
    margin-bottom: 20px;
}

.form__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-charcoal);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.form__input {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-charcoal);
    background: var(--color-sand-light);
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    transition: border-color 0.25s ease, background 0.25s ease;
    outline: none;
}

.form__input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.form__input:focus {
    border-color: var(--color-terracotta);
    background: var(--color-white);
}

.form__select {
    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='%236B6B6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

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

.form__note {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 12px;
    text-align: center;
}

.form__success {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #E8F5E9;
    border-radius: var(--radius-sm);
    color: #2E7D32;
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 16px;
}

.form__success svg {
    flex-shrink: 0;
    color: #2E7D32;
}

@media (max-width: 900px) {
    .contact__layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .contact__form-wrap {
        padding: 32px;
    }
}

@media (max-width: 480px) {
    .contact__form-wrap {
        padding: 24px;
    }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-charcoal);
    color: rgba(255, 255, 255, 0.6);
    padding: 80px 0 0;
}

.footer__top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 16px;
}

.footer__logo-icon {
    color: var(--color-terracotta);
}

.footer__tagline {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__links a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
}

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

.footer__phone {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-terracotta-light);
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

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

.footer__address {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer__bottom {
    padding: 24px 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 768px) {
    .footer__top {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Fallback: ensure content is visible even without JS */
.no-js .reveal,
.js .reveal {
    /* JS adds .revealed class; without JS these stay at default opacity */
}
