/* ============================================
   Palm Beach Canvas Co. — Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* --- Accessibility --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #B85C38;
    color: #FDF9F4;
    padding: 0.75rem 1.5rem;
    z-index: 100;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF9F4;
}
::-webkit-scrollbar-thumb {
    background: #D4956A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B85C38;
}

/* --- Typography --- */
.font-serif {
    font-family: 'Playfair Display', Georgia, serif;
}

.font-sans {
    font-family: 'Inter', system-ui, sans-serif;
}

/* --- Eyebrow Label --- */
.eyebrow-label {
    line-height: 1;
}

/* --- Buttons --- */
.cta-btn {
    display: inline-flex;
    align-items: center;
    background: #B85C38;
    color: #FDF9F4;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.cta-btn:hover {
    background: #9A4A2C;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(184, 92, 56, 0.3);
}

.cta-btn:active {
    transform: translateY(0);
}

.cta-outline {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #3D2417;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1.5px solid #3D2417;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    cursor: pointer;
}

.cta-outline:hover {
    background: #3D2417;
    color: #FDF9F4;
    transform: translateY(-2px);
}

/* --- Nav --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #B85C38;
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Header State --- */
#site-header.scrolled {
    background: rgba(253, 249, 244, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(61, 36, 23, 0.08);
}

#site-header.scrolled .font-serif {
    color: #3D2417;
}

/* --- Hero Grid --- */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding-bottom: 3rem;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 4rem;
        padding-top: 2rem;
    }
}

/* --- Hero Image --- */
.hero-image-wrap {
    position: relative;
}

.hero-image-inner {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.hero-image-inner:hover .hero-img {
    transform: scale(1.03);
}

.hero-image-accent {
    position: absolute;
    bottom: -16px;
    right: -16px;
    width: 60%;
    height: 40%;
    background: #B85C38;
    border-radius: 12px;
    z-index: -1;
    opacity: 0.15;
}

.hero-floating-card {
    position: absolute;
    bottom: 2rem;
    left: -1.5rem;
    background: white;
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 16px 48px rgba(61, 36, 23, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
}

.floating-card-img {
    width: 56px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.floating-card-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #3D2417;
}

/* --- Section Header --- */
.section-header {
    max-width: 720px;
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

.service-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(61, 36, 23, 0.12);
}

.service-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
}

.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.service-card-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(61, 36, 23, 0.15), transparent 50%);
}

.service-card-body {
    padding: 1.5rem;
    background: white;
}

.service-number {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #D4956A;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #B85C38;
    text-decoration: none;
    transition: gap 0.2s;
    gap: 0.25rem;
}

.service-link:hover {
    gap: 0.5rem;
}

/* --- About Grid --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: 0.9fr 1.1fr;
        gap: 4rem;
    }
}

.about-images {
    position: relative;
}

.about-img-main {
    border-radius: 12px;
    overflow: hidden;
}

.about-img-main img {
    width: 100%;
    height: auto;
    display: block;
}

.about-img-secondary {
    position: absolute;
    bottom: -2rem;
    right: -1rem;
    width: 55%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(61, 36, 23, 0.15);
    border: 4px solid #FDF9F4;
}

.about-img-secondary img {
    width: 100%;
    height: auto;
    display: block;
}

.about-img-badge {
    position: absolute;
    top: -1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.badge-circle {
    width: 64px;
    height: 64px;
    background: #B85C38;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FDF9F4;
}

.badge-circle-text {
    font-family: 'Playfair Display', serif;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: absolute;
    bottom: 12px;
}

.badge-badge-text {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #B85C38;
    background: #FDF9F4;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.about-body p {
    margin-bottom: 0;
}

.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    margin-top: 2rem;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.value-icon {
    flex-shrink: 0;
}

.value-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #3D2417;
}

/* --- Work Gallery --- */
.work-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .work-gallery {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto;
    }
    .work-item-lg {
        grid-column: span 2;
    }
    .work-item-lg:first-child {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.work-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.work-item-lg:first-child img {
    height: 100%;
    min-height: 400px;
}

.work-item:not(:first-child) img {
    aspect-ratio: 4/5;
}

.work-item:hover img {
    transform: scale(1.05);
}

.work-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(61, 36, 23, 0.8) 0%, rgba(61, 36, 23, 0) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.work-item:hover .work-item-overlay {
    opacity: 1;
}

.work-item-label {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #FDF9F4;
}

.work-item-loc {
    font-size: 0.8125rem;
    color: #F4C0B5;
    margin-top: 0.25rem;
}

/* --- Process Steps --- */
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .process-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

.process-step {
    position: relative;
    padding: 2rem;
    background: white;
    border-radius: 12px;
}

.process-step-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 800;
    color: #F2E0C8;
    line-height: 1;
    margin-bottom: 1rem;
}

.process-step-line {
    margin-top: 1.5rem;
    height: 2px;
    background: linear-gradient(to right, #F2E0C8, transparent);
    border-radius: 1px;
}

.process-step:last-child .process-step-line {
    display: none;
}

/* --- Contact Grid --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.contact-detail {
    display: flex;
    gap: 1rem;
}

.contact-detail-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #F9DDD3;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-form-wrap {
    background: #FDF9F4;
    border-radius: 16px;
    padding: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7A6355;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: white;
    border: 1.5px solid #F2E0C8;
    border-radius: 8px;
    color: #3D2417;
    font-size: 0.9375rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.form-input::placeholder {
    color: #D4956A;
}

.form-input:focus {
    border-color: #B85C38;
    box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.1);
}

.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 12 12' fill='none' stroke='%23B85C38' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

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

.form-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #FDF0EB;
    border: 1px solid #F4C0B5;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #7D3C24;
}

.form-success.hidden {
    display: none;
}

/* --- Footer --- */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 3rem;
    }
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 0;
}

/* --- 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; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* --- Reduced motion fallback --- */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
    .hero-img,
    .service-card-img img,
    .work-item img {
        transition: none;
    }
}
