/* ============================================
   SALEM HOMESTEAD — Brand Stylesheet
   Palette: Terracotta + Sand | Fresh & Airy
   ============================================ */

/* ---------- Custom Properties ---------- */
:root {
    /* Terracotta */
    --terracotta-50: #fdf0ec;
    --terracotta-100: #f9d5c8;
    --terracotta-200: #f2b49c;
    --terracotta-300: #e8916f;
    --terracotta-400: #df704a;
    --terracotta-500: #c4846c;
    --terracotta-600: #b06b52;
    --terracotta-700: #925341;
    --terracotta-800: #774436;
    --terracotta-900: #62392e;

    /* Sand */
    --sand-50: #fdfcfa;
    --sand-100: #faf5ef;
    --sand-200: #f3e8d8;
    --sand-300: #e8d5bc;
    --sand-400: #d4ba96;
    --sand-500: #c4a57a;
    --sand-600: #a8895f;

    /* Neutrals */
    --neutral-50: #faf9f7;
    --neutral-100: #f5f3ef;
    --neutral-200: #ebe7e0;
    --neutral-300: #d4cfc6;
    --neutral-400: #a89f93;
    --neutral-500: #7a7067;
    --neutral-600: #5c534b;
    --neutral-700: #4a423a;
    --neutral-800: #332e28;
    --neutral-900: #1f1b16;

    /* Typography */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Outfit', system-ui, sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --section-padding: clamp(4rem, 10vw, 8rem);
    --gutter: clamp(1.5rem, 4vw, 3rem);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--neutral-800);
    background-color: var(--sand-50);
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

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

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Section Eyebrow ---------- */
.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta-500);
    margin-bottom: 1rem;
}

/* ---------- Section Title ---------- */
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 500;
    line-height: 1.2;
    color: var(--neutral-900);
    margin-bottom: 1.5rem;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 60px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--terracotta-500);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--terracotta-600);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 132, 108, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--neutral-700);
    border: 1.5px solid var(--sand-400);
}

.btn-secondary:hover {
    border-color: var(--terracotta-400);
    color: var(--terracotta-600);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sand-200);
    transition: box-shadow 0.3s ease;
}

.nav.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.nav-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--terracotta-500);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
}

.nav-logo-text {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--neutral-800);
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--neutral-600);
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
    position: relative;
}

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

.nav-links a:hover {
    color: var(--terracotta-600);
}

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

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--neutral-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(253, 252, 250, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-menu-link {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 500;
    color: var(--neutral-800);
    transition: color 0.25s ease;
}

.mobile-menu-link:hover {
    color: var(--terracotta-500);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sand-50) 0%, var(--terracotta-50) 50%, var(--sand-100) 100%);
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(196, 132, 108, 0.06) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(212, 186, 150, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    padding-right: 1rem;
}

.hero-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--terracotta-500);
    margin-bottom: 1.5rem;
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 500;
    line-height: 1.25;
    color: var(--neutral-900);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.hero-subhead {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--neutral-600);
    margin-bottom: 2.5rem;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Hero Image Stack */
.hero-visual {
    position: relative;
}

.hero-image-stack {
    position: relative;
    height: clamp(480px, 60vh, 680px);
}

.hero-img {
    position: absolute;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.hero-img-primary {
    width: 72%;
    top: 0;
    right: 0;
    height: 88%;
}

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

.hero-img-secondary {
    width: 55%;
    bottom: 0;
    left: 0;
    height: 55%;
    border: 6px solid var(--sand-50);
}

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

.hero-badge {
    position: absolute;
    bottom: 48%;
    left: 38%;
    transform: translate(-50%, 50%);
    background: var(--terracotta-500);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    box-shadow: 0 8px 24px rgba(196, 132, 108, 0.35);
    z-index: 2;
}

/* ---------- About ---------- */
.about {
    padding: var(--section-padding) 0;
    background: var(--neutral-50);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 7/9;
}

.about-content {
    padding: 1rem 0;
}

.about-text {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--neutral-600);
    margin-bottom: 1.25rem;
}

.about-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--sand-200);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--terracotta-500);
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--neutral-500);
    letter-spacing: 0.02em;
}

/* ---------- Collection ---------- */
.collection {
    padding: var(--section-padding) 0;
    background: var(--sand-50);
}

.collection-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 4rem;
}

.collection-intro {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--neutral-500);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.collection-card {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    background: var(--neutral-50);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.collection-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.collection-card-img {
    overflow: hidden;
    aspect-ratio: 5/6;
}

.collection-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.collection-card-info {
    padding: 1.75rem;
}

.collection-card-info h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 0.625rem;
}

.collection-card-info p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--neutral-500);
}

/* ---------- Testimonial ---------- */
.testimonial {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, var(--terracotta-500) 0%, var(--terracotta-700) 100%);
}

.testimonial-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.testimonial-quote-icon {
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 1.5rem;
}

.testimonial blockquote {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.45;
    color: #fff;
    margin-bottom: 1.75rem;
}

.testimonial-source {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

/* ---------- Visit ---------- */
.visit {
    padding: var(--section-padding) 0;
    background: var(--neutral-50);
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.visit-text {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--neutral-500);
    margin-bottom: 2.5rem;
}

.visit-details {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.visit-detail {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.visit-icon {
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--terracotta-500);
}

.visit-detail-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--neutral-400);
    margin-bottom: 0.25rem;
}

.visit-detail-value {
    display: block;
    font-size: 1rem;
    color: var(--neutral-800);
    line-height: 1.6;
}

.visit-link {
    color: var(--terracotta-600);
    transition: color 0.25s ease;
}

.visit-link:hover {
    color: var(--terracotta-700);
    text-decoration: underline;
}

.visit-map {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    aspect-ratio: 4/3;
    min-height: 360px;
}

/* ---------- Contact ---------- */
.contact {
    padding: var(--section-padding) 0;
    background: var(--sand-50);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.contact-text {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--neutral-500);
    margin-bottom: 2rem;
}

.contact-form-wrapper {
    background: var(--neutral-50);
    border-radius: 20px;
    padding: clamp(1.75rem, 3vw, 2.5rem);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--neutral-600);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--sand-300);
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--neutral-800);
    background: var(--sand-50);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.form-input::placeholder {
    color: var(--neutral-400);
}

.form-input:focus {
    border-color: var(--terracotta-400);
    box-shadow: 0 0 0 3px rgba(196, 132, 108, 0.12);
}

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

.form-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--terracotta-50);
    border: 1px solid var(--terracotta-100);
    border-radius: 10px;
    color: var(--terracotta-700);
    font-size: 0.9375rem;
}

.form-success-icon {
    flex-shrink: 0;
    color: var(--terracotta-500);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--neutral-900);
    color: var(--neutral-400);
    padding: 4rem 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--terracotta-500);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.footer-logo-text {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--neutral-100);
    margin-bottom: 0.75rem;
}

.footer-tagline {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--neutral-500);
    max-width: 280px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--neutral-400);
    transition: color 0.25s ease;
}

.footer-links a:hover {
    color: var(--terracotta-300);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: var(--neutral-400);
    transition: color 0.25s ease;
}

.footer-link:hover {
    color: var(--terracotta-300);
}

.footer-address {
    align-items: flex-start;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid var(--neutral-800);
    padding: 1.5rem 0;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--neutral-600);
}

/* ---------- Reveal Animations ---------- */
[data-reveal] {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding-right: 0;
        text-align: center;
    }

    .hero-subhead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        max-width: 480px;
        margin: 0 auto;
    }

    .about-grid,
    .visit-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 560px;
        margin: 0 auto;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: 10rem 0 5rem;
    }

    .hero-image-stack {
        height: 420px;
    }

    .hero-img-primary {
        width: 70%;
        height: 75%;
    }

    .hero-img-secondary {
        width: 55%;
        height: 50%;
    }

    .collection-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    .about-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-image-stack {
        height: 340px;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.6rem 1rem;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
