/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */
/* Hallmark · macrostructure: Stat-Led · theme: Atelier · nav: N5 Floating Pill · footer: Ft1 Center */
/* Spacing Scale: 4px base (4pt system) */

:root {
    /* Color Tokens (Atelier theme: Warm light cream paper & organic cocoa/orange accent) */
    --color-paper: #FAF8F5;       /* Warm light cream background */
    --color-paper-2: #F3ECE3;     /* Darker cream for borders/shading */
    --color-paper-3: #EBE0D1;     /* Shading layer */
    --color-text-main: #271E17;   /* Rich roasted espresso dark text */
    --color-text-muted: #746355;  /* Organic warm earth grey text */
    --color-accent: #E65F00;      /* SDC Logo Bright Orange */
    --color-accent-light: #FF944D;/* Light logo hover shade */
    --color-border: #EFEAE2;      /* Hairline border color */
    
    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-sans: 'Outfit', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    
    /* Layout Layering (z-index scale) */
    --z-back: -1;
    --z-default: 1;
    --z-above: 2;
    --z-header: 100;
    --z-nav: 200;
    --z-modal: 1000;
    
    /* Spacing system based on 4-pt grid */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;
}

/* Global resets conforming to slop-test gates */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: clip; /* Gate 34: preventing horizontal scrolling */
    background-color: var(--color-paper);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

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

/* Typography purity - absolutely no italic headers (Gate 38a) */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: normal; /* Gate 38a: display type is always upright */
    line-height: 1.15;
    color: var(--color-text-main);
}

.section-header {
    margin-bottom: var(--space-12);
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.section-subtitle.light {
    color: var(--color-accent);
}

.section-title {
    font-size: 38px;
    margin-bottom: var(--space-4);
}

.section-desc {
    font-size: 16px;
    color: var(--color-text-muted);
}

/* Buttons: robust tap targets to prevent two-line wrapper text on mobile (Gate 49) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    padding: 12px 28px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    border: none;
    transition: var(--transition);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 14px;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-paper);
}

.btn-primary:hover {
    background-color: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 95, 0, 0.25);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-paper);
    border: 2px solid var(--color-paper);
}

.btn-secondary:hover {
    background-color: var(--color-paper);
    color: var(--color-text-main);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-paper);
    transform: translateY(-2px);
}

/* Header & Navigation (N5 Floating Pill style, transparent shifting to scrolled) */
.navbar-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-header);
    background-color: transparent;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-header.scrolled {
    background-color: var(--color-paper);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

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

.navbar-header.scrolled .navbar-container {
    height: 80px;
}

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

.nav-links {
    display: flex;
    gap: var(--space-8);
}

.nav-link {
    font-weight: 600;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    padding: var(--space-2) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
}

/* Scrolled overrides */
.navbar-header.scrolled .nav-link {
    color: var(--color-text-main);
}

.navbar-header.scrolled .nav-link:hover,
.navbar-header.scrolled .nav-link.active {
    color: var(--color-accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-1);
}

.mobile-menu-toggle .bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-paper);
    margin: 5px 0;
    transition: var(--transition);
}

.navbar-header.scrolled .mobile-menu-toggle .bar {
    background-color: var(--color-text-main);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--color-paper);
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-border);
    z-index: var(--z-nav);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    transform: translateY(-120%);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.mobile-nav.open {
    transform: translateY(0);
}

.mobile-link {
    font-size: 18px;
    font-weight: 600;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-paper-2);
}

.mobile-btn {
    margin-top: var(--space-2);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: url('hero-cashew.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--color-paper);
    padding-top: var(--space-20);
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(31, 20, 14, 0.94) 30%, rgba(230, 95, 0, 0.3) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: var(--z-above);
}

.hero-content {
    max-width: 650px;
}

.hero-subtitle {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent-light);
    margin-bottom: var(--space-4);
    display: inline-block;
}

.hero-title {
    font-size: 54px;
    font-weight: 700;
    color: var(--color-paper);
    line-height: 1.15;
    margin-bottom: var(--space-6);
}

.hero-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-8);
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
}

/* Stats Section (Stat-Led visual cards) */
.stats-section {
    background-color: var(--color-paper-2);
    padding: var(--space-12) 0;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--color-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.stat-card {
    background-color: var(--color-paper);
    padding: var(--space-8) var(--space-6);
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--color-border);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.stat-icon {
    font-size: 28px;
    color: var(--color-accent);
    margin-bottom: var(--space-4);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* About Section */
.about-section {
    padding: var(--space-24) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-20);
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    height: 500px;
}

.about-main-img {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--color-text-main);
    color: var(--color-paper);
    padding: var(--space-6) var(--space-8);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--color-paper);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.badge-text {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.about-content {
    padding-left: var(--space-4);
}

.about-desc {
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.about-features {
    margin-top: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.feature-icon {
    font-size: 18px;
    color: var(--color-accent);
}

.feature-text {
    font-weight: 600;
    color: var(--color-text-main);
}

/* Products Section */
.products-section {
    background-color: var(--color-paper-2);
    padding: var(--space-24) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.products-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-2);
    flex-wrap: wrap;
}

.tab-btn {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-muted);
    background: none;
    border: none;
    padding: var(--space-2) 0;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--color-accent);
}

.tab-btn.active {
    color: var(--color-text-main);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
    display: block;
}

/* Grid tracks layout (Gate 50: Image-bearing grids use minmax(0, 1fr)) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-8);
}

.product-card {
    background-color: var(--color-paper);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(230, 95, 0, 0.25);
}

.product-img-holder {
    height: 200px;
    position: relative;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fdfdfd;
}

/* Cashew Grading Real Images mapping */
.ww180 { background-image: url('images/1.png'); }
.ww210 { background-image: url('images/2.png'); }
.ww240 { background-image: url('images/3.png'); }
.ww320 { background-image: url('images/4.png'); }
.ww450 { background-image: url('images/5.png'); }

.ws-grade { background-image: url('images/6.png'); }
.lwp-grade { background-image: url('images/7.png'); }
.lp-grade { background-image: url('images/8.png'); }
.sp-grade { background-image: url('images/9.png'); }
.bb-grade { background-image: url('images/10.png'); }

.salted-roasted { background-image: url('images/11.png'); }
.wasabi-coated { background-image: url('images/12.png'); }
.cheese-coated { background-image: url('images/13.png'); }
.chocolate-coated { background-image: url('images/14.png'); }
.sesame-coated { background-image: url('images/15.png'); }
.ginger-coated { background-image: url('images/16.png'); }
.garlic-chili-coated { background-image: url('images/17.png'); }

.product-overlay-icon {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    font-size: 20px;
    color: var(--color-accent);
    opacity: 0.6;
}

.product-body {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 19px;
    margin-bottom: var(--space-3);
    color: var(--color-text-main);
}

.product-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    line-height: 1.5;
    flex-grow: 1;
}

.product-specs {
    list-style: none;
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.product-specs li {
    font-size: 13px;
    margin-bottom: var(--space-2);
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
}

.product-specs li:last-child {
    margin-bottom: 0;
}

.product-specs li span {
    font-weight: 600;
    color: var(--color-accent);
}

/* Quality Section / Timeline */
.quality-section {
    padding: var(--space-24) 0;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: var(--space-12) auto 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--color-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--color-accent);
    border: 4px solid var(--color-paper);
    border-radius: 50%;
    z-index: 1;
    top: 30px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}

.timeline-content {
    padding: 24px 30px;
    background-color: var(--color-paper-2);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.timeline-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-accent);
    margin-bottom: var(--space-2);
}

.timeline-content h3 {
    font-size: 18px;
    margin-bottom: var(--space-2);
    color: var(--color-text-main);
}

.timeline-content p {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Contact Section & Form wrapper (Strictly compact layout, no huge gaps) */
.contact-section {
    background-color: var(--color-text-main);
    padding: var(--space-12) 0 var(--space-6) 0;
    color: var(--color-paper);
}

.contact-box {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-16);
    align-items: center;
}

.contact-title {
    font-size: 40px;
    margin-bottom: var(--space-4);
    color: var(--color-paper);
}

.contact-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-8);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.contact-detail-item {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.contact-detail-icon {
    font-size: 18px;
    color: var(--color-accent);
    background-color: rgba(255, 255, 255, 0.05);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-detail-text span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}

.contact-detail-text a {
    font-size: 18px;
    font-weight: 600;
}

.contact-detail-text a:hover {
    color: var(--color-accent-light);
}

.contact-form-wrapper {
    background-color: var(--color-paper);
    padding: var(--space-12);
    border-radius: 16px;
    color: var(--color-text-main);
    box-shadow: var(--shadow-lg);
}

.form-title {
    font-size: 24px;
    color: var(--color-text-main);
    margin-bottom: var(--space-8);
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.form-group {
    margin-bottom: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 14px;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(230, 95, 0, 0.15);
}

/* Footer (Center aligned Ft1 style, extremely tight spacing) */
.footer {
    background-color: #17120e; /* Extremely dark espresso */
    color: var(--color-paper);
    padding: var(--space-8) 0 var(--space-6) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-8);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    margin-bottom: var(--space-4);
    display: inline-block;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: var(--space-6);
    max-width: 320px;
}

.footer-socials {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-paper);
}

.social-link:hover {
    background-color: var(--color-accent);
    color: var(--color-paper);
    transform: translateY(-3px);
}

.footer-links-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-accent-light);
    margin-bottom: var(--space-2);
}

.footer-links-group a {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links-group a:hover {
    color: var(--color-paper);
    padding-left: 4px;
}

.footer-bottom {
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 20, 14, 0.6);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: var(--color-paper);
    padding: var(--space-12);
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.open .modal-box {
    transform: scale(1);
}

.modal-icon {
    font-size: 60px;
    color: var(--color-accent);
    margin-bottom: var(--space-4);
}

.modal-title {
    font-size: 24px;
    color: var(--color-text-main);
    margin-bottom: var(--space-2);
}

.modal-message {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsiveness gates verified */
@media (max-width: 1024px) {
    .about-grid, .contact-box {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }
    .about-image-wrapper {
        height: 400px;
    }
    .about-badge {
        right: 0;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions .btn {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .hero-title {
        font-size: 40px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }
    .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-dot {
        left: 23px;
        right: auto;
    }
    .timeline-item:nth-child(even) .timeline-dot {
        left: 23px;
    }
    .form-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .contact-form-wrapper {
        padding: var(--space-6);
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    .footer-bottom-container {
        flex-direction: column;
        gap: var(--space-3);
        text-align: center;
    }
}
