/* Son of a Barista — V2 Visual Redesign
   Inspired by neavita.it: generous whitespace, premium minimalism,
   centered layouts, clean typography. No Tailwind dependency. */

/* ===== CSS Variables ===== */
:root {
    --espresso: #462613;
    --espresso-medium: #68432E;
    --gold: #C8A97E;
    --gold-light: #D4BA95;
    --cream: #FFFBF3;
    --cream-dark: #F5F0E8;
    --white: #FFFFFF;
    --black: #1A1A1A;
    --text: #2D2D2D;
    --text-light: #555555;
    --text-muted: #888888;

    /* City colors */
    --capri: #BC2F26;
    --portofino: #13433D;
    --positano: #5D3C65;
    --firenze: #462616;
    --torino: #1A325F;

    --nav-height: 76px;
    --container: 1200px;
    --container-narrow: 860px;
    --radius: 1.5rem;
    --radius-sm: 1rem;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background-color: var(--white);
    font-size: 17px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
    line-height: 1.15;
    color: var(--black);
}

h1 { font-size: clamp(3rem, 5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2.25rem, 4vw, 3.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.375rem); }

p {
    color: var(--text-light);
    max-width: 60ch;
}

a {
    color: var(--black);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--gold);
}

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

ul { list-style: none; }

/* ===== Layout ===== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

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

/* ===== Section Spacing — Neavita-level generous ===== */
section {
    padding: 120px 0;
}

.section-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.section-title {
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 580px;
    line-height: 1.8;
}

/* Centered section header pattern */
.section-header {
    text-align: center;
    margin-bottom: 4.5rem;
}

.section-header .section-subtitle {
    margin: 0 auto;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    height: var(--nav-height);
    transition: box-shadow 0.3s ease;
}

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

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

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-light);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--black);
}

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

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--black);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 4.5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    width: 95vw;
    max-width: 1560px;
    margin: calc(var(--nav-height) + 12px) auto 0;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 88vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.7) 0%, rgba(26, 26, 26, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 80px clamp(40px, 6vw, 120px);
    max-width: 700px;
    color: var(--white);
}

.hero-content .section-label {
    color: rgba(255, 255, 255, 0.7);
}

.hero-content h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.0625rem;
    margin-bottom: 2.5rem;
    max-width: 480px;
    line-height: 1.8;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    border-radius: 100px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--white);
    color: var(--black);
}

.btn-primary:hover {
    background: var(--cream);
    color: var(--black);
    transform: translateY(-1px);
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: var(--white);
}

.btn-dark {
    background: var(--black);
    color: var(--white);
}

.btn-dark:hover {
    background: #333;
    color: var(--white);
    transform: translateY(-1px);
}

/* Simple text link — neavita style */
.link-arrow {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--black);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease;
}

.link-arrow:hover {
    gap: 10px;
    color: var(--black);
}

.link-arrow svg {
    width: 16px;
    height: 16px;
}

/* ===== Card Grid ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.08);
}

.card-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.card-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

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

.card-body {
    padding: 1.5rem 1.75rem;
}

.card-body h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-body p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* ===== Values Grid (text-only, neavita style) ===== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.value-item {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.value-item .value-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    color: var(--black);
    opacity: 0.8;
}

.value-item .value-icon svg {
    width: 100%;
    height: 100%;
}

.value-item h4 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.value-item p {
    font-size: 0.875rem;
    margin: 0 auto;
    max-width: 260px;
    line-height: 1.7;
}

/* ===== Certificates Strip ===== */
.cert-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.cert-strip img {
    height: 56px;
    width: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    filter: grayscale(100%);
}

.cert-strip img:hover {
    opacity: 0.9;
    filter: grayscale(0%);
}

/* ===== Split Section ===== */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.split-image {
    border-radius: var(--radius);
    overflow: hidden;
}

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

/* ===== Process Steps ===== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.process-step {
    text-align: center;
    padding: 1rem;
}

.process-step img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.process-step .step-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cream-dark);
    line-height: 1;
    margin-bottom: 1rem;
}

.process-step h4 {
    margin-bottom: 0.75rem;
}

.process-step p {
    font-size: 0.9375rem;
    margin: 0 auto;
    max-width: 320px;
}

/* ===== Page Header (non-home pages) ===== */
.page-header {
    padding: calc(var(--nav-height) + 80px) 0 80px;
    text-align: center;
}

.page-header .section-label {
    margin-bottom: 1rem;
}

.page-header h1 {
    margin-bottom: 1.25rem;
}

.page-header p {
    margin: 0 auto;
    font-size: 1.0625rem;
}

/* ===== CTA Section ===== */
.cta-section {
    text-align: center;
    background: var(--cream);
    border-radius: var(--radius);
    padding: 100px 48px;
    max-width: 95vw;
    margin: 0 auto;
}

.cta-section h2 {
    margin-bottom: 1.25rem;
}

.cta-section p {
    margin: 0 auto 2.5rem;
    font-size: 1.0625rem;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand img {
    height: 36px;
    margin-bottom: 1.25rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    max-width: 280px;
    line-height: 1.7;
}

.footer h4 {
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.footer-links li {
    margin-bottom: 0.625rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

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

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
}

.footer-bottom-links a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Contact Form ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--black);
}

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

/* ===== Sustainability Pillars ===== */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.pillar-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    transition: box-shadow 0.3s ease;
}

.pillar-card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
}

.pillar-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 1.5rem;
    color: var(--black);
    opacity: 0.7;
}

.pillar-icon svg {
    width: 100%;
    height: 100%;
}

.pillar-card h3 {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
}

.pillar-card p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.pillar-card ul {
    margin-top: 1rem;
    padding: 0;
}

.pillar-card ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.pillar-card ul li .check {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ===== Scroll Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Background Variants ===== */
.bg-cream {
    background-color: var(--cream);
}

.bg-dark {
    background-color: var(--black);
}

.bg-dark h2, .bg-dark h3, .bg-dark h4 {
    color: var(--white);
}

.bg-dark p, .bg-dark .section-label {
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Legal Pages ===== */
.legal-content {
    padding: 60px 0;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1rem;
    max-width: 100%;
}

.legal-content ul, .legal-content ol {
    list-style: disc;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-light);
}

.legal-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* ===== Product Category Section ===== */
.product-section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.product-section-header .section-subtitle {
    margin: 0 auto;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    section {
        padding: 80px 0;
    }

    .split {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .pillar-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    body {
        font-size: 16px;
    }

    section {
        padding: 60px 0;
    }

    .container, .container-narrow {
        padding: 0 20px;
    }

    .nav-inner {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(24px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 1.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        min-height: 70vh;
        border-radius: var(--radius-sm);
        width: calc(100% - 16px);
        margin-left: 8px;
        margin-right: 8px;
    }

    .hero-content {
        padding: 40px 24px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .value-item {
        padding: 1.5rem 1rem;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .cert-strip {
        gap: 2rem;
    }

    .cert-strip img {
        height: 40px;
    }

    .cta-section {
        padding: 60px 24px;
        border-radius: var(--radius-sm);
    }

    .split-image {
        max-height: 360px;
    }

    .page-header {
        padding: calc(var(--nav-height) + 48px) 0 48px;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .split {
        gap: 2rem;
    }
}

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

    .hero {
        min-height: 60vh;
    }
}
