/* main.css - Unified styling for Jon Watts website */
/* Warm brown/orange palette inspired by Claude */

/* ============ FONTS ============ */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ============ CSS VARIABLES ============ */
:root {
    /* Primary Colors - Warm Palette */
    --primary: #da7756;
    --primary-light: #e8956f;
    --primary-dark: #c45a3a;
    --secondary: #a96b4d;
    --accent: #f4a261;
    --accent-light: #ffd4a3;
    
    /* Neutrals */
    --dark: #2d2926;
    --dark-soft: #3d3532;
    --gray: #6b5e57;
    --gray-light: #a89990;
    --light: #faf7f5;
    --cream: #f5efe9;
    --white: #ffffff;
    
    /* Semantic Colors */
    --success: #7da87b;
    --info: #6b9ac4;
    --warning: #e9c46a;
    --danger: #c75146;
    
    /* Typography */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing & Sizing */
    --header-height: 70px;
    --container-max: 1200px;
    --section-padding: 80px;
    --card-radius: 12px;
    --btn-radius: 6px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ RESET & BASE ============ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    font-family: var(--font-body);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
    list-style: none;
}

/* ============ UTILITY CLASSES ============ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ HEADER ============ */
header {
    background-color: rgba(250, 247, 245, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(45, 41, 38, 0.08);
    transition: var(--transition-normal);
}

header.scrolled {
    background-color: rgba(250, 247, 245, 0.98);
    box-shadow: 0 4px 20px rgba(45, 41, 38, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    min-height: var(--header-height);
}

.logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 400;
    color: var(--dark);
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.logo:hover {
    opacity: 0.8;
}

.logo span {
    color: var(--primary);
}

.logo i {
    margin-right: 10px;
    font-size: 26px;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    margin: 0;
}

.nav-link {
    font-weight: 500;
    font-size: 15px;
    color: var(--gray);
    padding: 10px 16px;
    border-radius: var(--btn-radius);
    transition: var(--transition-normal);
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
    background-color: rgba(218, 119, 86, 0.08);
}

.menu-btn {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--dark);
    padding: 8px;
    border-radius: var(--btn-radius);
    transition: var(--transition-fast);
}

.menu-btn:hover {
    background-color: rgba(218, 119, 86, 0.08);
}

/* ============ HERO SECTION ============ */
.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(218, 119, 86, 0.08) 0%, rgba(244, 162, 97, 0.08) 100%);
    margin-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

/* Particles Container */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 700px;
    text-align: center;
    padding: 40px 20px;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--dark);
}

.hero-text h1 span {
    color: var(--primary);
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--gray);
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ============ BUTTONS ============ */
.cta-btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: var(--btn-radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition-smooth);
    border: 2px solid var(--primary);
    cursor: pointer;
    text-align: center;
}

.cta-btn:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(218, 119, 86, 0.3);
}

.cta-btn-secondary {
    background-color: transparent;
    color: var(--dark);
    border: 2px solid var(--dark);
    margin-left: 15px;
}

.cta-btn-secondary:hover {
    background-color: var(--dark);
    color: var(--white);
    border-color: var(--dark);
    box-shadow: 0 6px 20px rgba(45, 41, 38, 0.2);
}

/* ============ SECTION STYLES ============ */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--dark);
    margin-bottom: 15px;
    font-weight: 400;
}

.section-header h2 span {
    color: var(--primary);
}

.section-header p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ============ SERVICES SECTION (Homepage) ============ */
.services {
    padding: var(--section-padding) 0;
    background-color: var(--white);
}

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

.service-card {
    background-color: var(--white);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(45, 41, 38, 0.06);
    transition: var(--transition-smooth);
    border: 1px solid rgba(45, 41, 38, 0.06);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(45, 41, 38, 0.12);
}

.service-image {
    height: 180px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: 20px;
}

.service-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 400;
}

.service-content p {
    color: var(--gray);
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.service-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-fast);
}

.service-link i {
    margin-left: 6px;
    transition: var(--transition-fast);
    font-size: 12px;
}

.service-link:hover {
    color: var(--primary-dark);
}

.service-link:hover i {
    transform: translateX(4px);
}

/* ============ PAGE CONTENT (Subpages) ============ */
.page-content {
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: 60px;
    min-height: calc(100vh - 200px);
}

/* Page Hero Banner */
.page-hero-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    padding: 50px 0;
    text-align: center;
    margin-bottom: 50px;
}

.page-hero-banner h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 12px;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-hero-banner p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.95;
    line-height: 1.6;
}

/* Items Grid (Subpages) */
.items-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 30px;
}

/* Item Card */
.item-card {
    background-color: var(--white);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(45, 41, 38, 0.06);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(45, 41, 38, 0.06);
}

.item-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(45, 41, 38, 0.1);
}

.item-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: var(--transition-normal);
}

.item-card:hover img {
    transform: scale(1.03);
}

.item-card-content {
    padding: 22px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.item-card-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 400;
}

.item-card-content p {
    color: var(--gray);
    margin-bottom: 18px;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.item-card .cta-btn {
    align-self: flex-start;
    padding: 10px 22px;
    font-size: 14px;
}

/* ============ FOOTER ============ */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 50px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
}

.footer-about {
    padding-right: 20px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
}

.footer-logo i {
    margin-right: 10px;
    color: var(--primary);
}

.footer-desc {
    color: var(--gray-light);
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-desc i {
    color: var(--primary);
    margin-right: 8px;
    width: 16px;
}

.footer-links h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 18px;
    color: var(--white);
    font-weight: 400;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--gray-light);
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    color: var(--gray-light);
    font-size: 0.9rem;
}

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

/* Large tablets and small desktops */
@media screen and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media screen and (max-width: 991px) {
    :root {
        --section-padding: 60px;
    }
    
    .hero-content {
        flex-direction: column;
    }

    .hero-text {
        margin-bottom: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-about {
        grid-column: 1 / -1;
        padding-right: 0;
        text-align: center;
    }
    
    .footer-links {
        text-align: center;
    }
}

/* Mobile devices */
@media screen and (max-width: 768px) {
    :root {
        --section-padding: 50px;
        --header-height: 65px;
    }
    
    .menu-btn {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: var(--white);
        padding: 20px;
        box-shadow: 0 10px 30px rgba(45, 41, 38, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: var(--transition-normal);
        gap: 5px;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        text-align: center;
        padding: 12px 16px;
    }

    .hero {
        min-height: auto;
        padding: 40px 0;
    }
    
    .hero-text {
        padding: 20px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }

    .cta-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .cta-btn-secondary {
        margin-left: 0;
        margin-top: 12px;
    }
    
    /* Stack buttons on mobile */
    .hero-text .cta-btn-secondary {
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-top: 12px;
    }

    .services-grid,
    .items-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card,
    .item-card {
        max-width: 100%;
    }

    .page-hero-banner {
        padding: 40px 0;
        margin-bottom: 40px;
    }
    
    .page-hero-banner h1 {
        font-size: 1.8rem;
    }
    
    .page-hero-banner p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .section-header {
        margin-bottom: 30px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-about {
        padding-right: 0;
    }
    
    .footer-links a:hover {
        padding-left: 0;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo i {
        font-size: 22px;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .service-image,
    .item-card img {
        height: 160px;
    }
    
    .service-content,
    .item-card-content {
        padding: 18px;
    }
    
    .service-content h3,
    .item-card-content h3 {
        font-size: 1.2rem;
    }
}

/* ============ ADMIN PANEL (Hidden by default) ============ */
.admin-panel {
    display: none;
}

/* ============ SELECTION ============ */
::selection {
    background-color: var(--primary);
    color: var(--white);
}

/* ============ FOCUS STATES (Accessibility) ============ */
a:focus,
button:focus,
.cta-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============ PRINT STYLES ============ */
@media print {
    header,
    footer,
    .particles-container {
        display: none;
    }
    
    .page-content {
        padding-top: 0;
    }
}
