/* ============================================
   Madewell Nutrition — Stylesheet
   Classic & Elegant | Charcoal + Coral Palette
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* Charcoal palette */
    --charcoal-900: #1a1a1a;
    --charcoal-800: #2d2d2d;
    --charcoal-700: #3d3d3d;
    --charcoal-600: #4a4a4a;
    --charcoal-500: #5a5a5a;
    
    /* Coral palette */
    --coral-50: #fff5f0;
    --coral-100: #ffe8de;
    --coral-200: #ffd0b8;
    --coral-300: #ffaa82;
    --coral-400: #ff7a4d;
    --coral-500: #e85d3a;
    --coral-600: #d14528;
    --coral-700: #a8351f;
    
    /* Neutrals */
    --white: #ffffff;
    --off-white: #faf8f6;
    --cream: #f5f0eb;
    --warm-gray: #8a8279;
    --light-gray: #e8e2dc;
    
    /* Typography */
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-max: 1200px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--charcoal-800);
    background-color: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
    color: var(--charcoal-900);
}

/* ---------- Section Tags ---------- */
.section-tag {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--coral-500);
    margin-bottom: 16px;
    position: relative;
    padding-left: 32px;
}

.section-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 1px;
    background-color: var(--coral-500);
}

/* ---------- Section Titles ---------- */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 24px;
    color: var(--charcoal-900);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--charcoal-500);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.text-center {
    text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-primary:hover {
    background-color: var(--coral-600);
    border-color: var(--coral-600);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 93, 58, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--charcoal-800);
    border-color: var(--charcoal-600);
}

.btn-secondary:hover {
    background-color: var(--charcoal-800);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 40px;
    font-size: 0.9375rem;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--light-gray);
    transition: all var(--transition-medium);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background-color: var(--charcoal-900);
    color: var(--coral-400);
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--charcoal-900);
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--charcoal-600);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--coral-500);
    transition: width var(--transition-fast);
}

.nav-links a:hover {
    color: var(--charcoal-900);
}

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

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--charcoal-800);
    transition: all var(--transition-fast);
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--charcoal-900);
    background-image: url('https://images.pexels.com/photos/27175868/pexels-photo-27175868.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.88) 0%,
        rgba(45, 45, 45, 0.75) 50%,
        rgba(26, 26, 26, 0.6) 100%
    );
}

.hero-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--coral-300);
    background-color: rgba(255, 170, 130, 0.12);
    border: 1px solid rgba(255, 170, 130, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 28px;
}

.hero-headline {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 400;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 24px;
    max-width: 640px;
}

.hero-headline em {
    font-style: italic;
    color: var(--coral-300);
}

.hero-subheadline {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 520px;
}

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

.hero-actions .btn-secondary {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--white);
}

.hero-actions .btn-secondary:hover {
    background-color: var(--white);
    color: var(--charcoal-900);
    border-color: var(--white);
}

/* ---------- Floating Stat Cards ---------- */
.hero-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 20px 24px;
    transition: all var(--transition-medium);
}

.stat-card:hover {
    background-color: rgba(255, 255, 255, 0.14);
    transform: translateX(8px);
    border-color: rgba(255, 170, 130, 0.3);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background-color: var(--coral-500);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.stat-value {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--white);
    font-weight: 600;
}

.card-1 { animation: floatCard1 6s ease-in-out infinite; }
.card-2 { animation: floatCard2 6s ease-in-out infinite 1s; }
.card-3 { animation: floatCard3 6s ease-in-out infinite 2s; }

@keyframes floatCard1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes floatCard2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes floatCard3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ---------- About Section ---------- */
.about {
    padding: var(--section-padding);
    background-color: var(--white);
}

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

.about-image-wrapper {
    position: relative;
}

.about-image-wrapper img {
    width: 100%;
    height: 700px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
}

.about-accent {
    position: absolute;
    bottom: -24px;
    right: -24px;
    width: 200px;
    height: 200px;
    background-color: var(--coral-100);
    border-radius: 8px;
    z-index: -1;
}

.about-content {
    padding: 20px 0;
}

.about-text {
    font-size: 1.0625rem;
    color: var(--charcoal-600);
    line-height: 1.9;
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 36px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    color: var(--charcoal-700);
    font-weight: 500;
}

.feature-item svg {
    color: var(--coral-500);
    flex-shrink: 0;
}

/* ---------- Offerings Section ---------- */
.offerings {
    padding: var(--section-padding);
    background-color: var(--cream);
}

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

.offerings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.offering-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: all var(--transition-medium);
}

.offering-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.offering-image {
    overflow: hidden;
    height: 240px;
}

.offering-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.offering-card:hover .offering-image img {
    transform: scale(1.08);
}

.offering-content {
    padding: 28px 32px;
}

.offering-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--charcoal-900);
}

.offering-content p {
    font-size: 0.9375rem;
    color: var(--charcoal-500);
    line-height: 1.8;
}

/* ---------- Craft Section ---------- */
.craft {
    padding: var(--section-padding);
    background-color: var(--charcoal-900);
}

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

.craft-content .section-tag {
    color: var(--coral-300);
}

.craft-content .section-tag::before {
    background-color: var(--coral-300);
}

.craft-content .section-title {
    color: var(--white);
}

.craft-text {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.9;
    margin-bottom: 20px;
}

.craft-stats {
    display: flex;
    gap: 48px;
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.craft-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.craft-stat .stat-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--coral-400);
    line-height: 1;
}

.craft-stat .stat-desc {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.craft-image {
    overflow: hidden;
    border-radius: 8px;
}

.craft-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

/* ---------- Visit Section ---------- */
.visit {
    padding: var(--section-padding);
    background-color: var(--white);
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
}

.visit-info {
    padding: 40px 0;
}

.visit-text {
    font-size: 1.0625rem;
    color: var(--charcoal-500);
    line-height: 1.8;
    margin-bottom: 40px;
}

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

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-icon {
    width: 52px;
    height: 52px;
    background-color: var(--coral-50);
    border: 1px solid var(--coral-200);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--coral-500);
    flex-shrink: 0;
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--warm-gray);
}

.contact-text span,
.contact-text a {
    font-size: 1rem;
    color: var(--charcoal-800);
    font-weight: 500;
}

.contact-text a:hover {
    color: var(--coral-500);
}

.visit-map {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-height: 450px;
}

/* ---------- CTA Section ---------- */
.cta {
    padding: 80px 0;
    background-color: var(--coral-500);
}

.cta-content {
    text-align: center;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white);
    margin-bottom: 16px;
}

.cta-text {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 36px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-actions .btn-secondary {
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--white);
}

.cta-actions .btn-secondary:hover {
    background-color: var(--white);
    color: var(--coral-500);
    border-color: var(--white);
}

/* ---------- Footer ---------- */
.footer {
    background-color: var(--charcoal-900);
    padding: 64px 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding-bottom: 48px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

.footer-logo .logo-text {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    color: var(--white);
}

.footer-desc {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    max-width: 320px;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-col h4 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--coral-400);
    margin-bottom: 20px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li a,
.footer-col ul li {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 0;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-headline {
        max-width: 100%;
    }
    
    .hero-subheadline {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-cards {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-card {
        flex: 1;
        min-width: 200px;
    }
    
    .about-container,
    .craft-layout,
    .visit-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .about-image-wrapper img {
        height: 500px;
    }
    
    .craft-image img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 72px 0;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 32px 24px;
        gap: 24px;
        border-bottom: 1px solid var(--light-gray);
        transform: translateY(-120%);
        opacity: 0;
        transition: all var(--transition-medium);
        pointer-events: none;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .offerings-grid {
        grid-template-columns: 1fr;
    }
    
    .craft-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 32px;
    }
    
    .hero-cards {
        flex-direction: column;
    }
    
    .stat-card {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* ---------- Accessibility: Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
