/* ============================================
   DESIGN SYSTEM & VARIABLES
   ============================================ */

:root {
    /* Colors */
    --bg: #F8F5F0;
    --ink: #1C2233;
    --accent: #E07B39;
    --accent-2: #3E8B8B;
    --muted: #8A8E99;
    --line: #D4CCB8;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Typography */
    --font-serif: 'DM Serif Display', serif;
    --font-sans: 'DM Sans', sans-serif;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
}

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

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248, 245, 240, 0.7);
    backdrop-filter: blur(0px);
    transition: all 0.3s var(--ease-smooth);
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(248, 245, 240, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    cursor: pointer;
}

.nav-logo-main {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--ink);
}

.nav-logo-sub {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin-top: 0.25rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--ink);
    position: relative;
    padding-bottom: 0.25rem;
    transition: color 0.3s var(--ease-smooth);
}

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

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

/* Responsive Nav */
@media (max-width: 768px) {
    .nav-container {
        padding: var(--spacing-md);
    }

    .nav-logo-main {
        font-size: 1rem;
    }

    .nav-links {
        gap: var(--spacing-md);
        font-size: 0.9rem;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--spacing-2xl) var(--spacing-md);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-contours {
    width: 100%;
    height: 100%;
}

.contour-ring {
    fill: none;
    stroke: var(--line);
    stroke-width: 2;
    opacity: 0.5;
    stroke-dasharray: 1571;
    stroke-dashoffset: 1571;
    animation: drawContour 2s var(--ease-smooth) forwards;
}

.contour-ring:nth-child(1) {
    animation-delay: 0s;
}
.contour-ring:nth-child(2) {
    animation-delay: 0.15s;
}
.contour-ring:nth-child(3) {
    animation-delay: 0.3s;
}
.contour-ring:nth-child(4) {
    animation-delay: 0.45s;
}
.contour-ring:nth-child(5) {
    animation-delay: 0.6s;
}
.contour-ring:nth-child(6) {
    animation-delay: 0.75s;
}
.contour-ring:nth-child(7) {
    animation-delay: 0.9s;
}

@keyframes drawContour {
    to {
        stroke-dashoffset: 0;
    }
}

.hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, var(--line) 0px, var(--line) 1px, transparent 1px, transparent 50px),
        repeating-linear-gradient(90deg, var(--line) 0px, var(--line) 1px, transparent 1px, transparent 50px);
    opacity: 0.08;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 700px;
    animation: fadeUp 1s var(--ease-smooth) 0.4s both;
}

.hero-coords {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
}

.hero-headline {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--ink);
    line-height: 1.15;
}

.hero-subheading {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .hero-headline {
        font-size: 2rem;
    }

    .hero-subheading {
        font-size: 1rem;
    }
}

@media (max-width: 375px) {
    .hero {
        min-height: 70vh;
    }

    .hero-headline {
        font-size: 1.5rem;
    }

    .hero-subheading {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-lg);
    }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: 0;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(224, 123, 57, 0.2);
    animation: subtlePulse 3s ease-in-out infinite;
}

.btn-primary:hover {
    background: #d4681f;
    box-shadow: 0 8px 20px rgba(224, 123, 57, 0.3);
    transform: translateY(-2px);
}

@keyframes subtlePulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(224, 123, 57, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(224, 123, 57, 0.4);
    }
}

/* ============================================
   CONTAINER & SECTIONS
   ============================================ */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-md);
}

.container-wide {
    max-width: 1400px;
}

.section-heading {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-2xl);
    color: var(--ink);
    text-align: center;
    animation: fadeSlideIn 0.8s var(--ease-smooth) forwards;
    opacity: 0;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .container {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .section-heading {
        font-size: 2rem;
        margin-bottom: var(--spacing-xl);
    }
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */

.products {
    background: linear-gradient(135deg, var(--bg) 0%, rgba(212, 204, 184, 0.1) 100%);
    position: relative;
}

.products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent 0px, transparent 50px, var(--line) 50px, var(--line) 51px),
        repeating-linear-gradient(90deg, transparent 0px, transparent 50px, var(--line) 50px, var(--line) 51px);
    opacity: 0.02;
    pointer-events: none;
    z-index: 0;
}

.products .container {
    position: relative;
    z-index: 1;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.product-card {
    padding: var(--spacing-xl);
    background: white;
    border: 1px solid var(--line);
    text-align: center;
    transition: all 0.4s var(--ease-smooth);
    animation: fadeUp 0.8s var(--ease-smooth) forwards;
    opacity: 0;
}

.product-card:nth-child(1) {
    animation-delay: 0.2s;
}
.product-card:nth-child(2) {
    animation-delay: 0.4s;
}
.product-card:nth-child(3) {
    animation-delay: 0.6s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(28, 34, 51, 0.12);
    border-color: var(--accent);
}

.product-icon {
    color: var(--accent-2);
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: center;
}

.product-icon svg {
    width: 60px;
    height: 60px;
}

.product-title {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.product-card:hover .product-title::after {
    width: 100%;
}

.product-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: width 0.4s var(--ease-smooth);
}

.product-desc {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* ============================================
   SHOP SECTION
   ============================================ */

.shop {
    background: white;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.shop-card {
    padding: var(--spacing-xl);
    background: var(--bg);
    border: 2px solid var(--line);
    text-decoration: none;
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.8s var(--ease-smooth) forwards;
    opacity: 0;
}

.shop-card:nth-child(1) {
    animation-delay: 0.2s;
}
.shop-card:nth-child(2) {
    animation-delay: 0.4s;
}

.shop-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    opacity: 0.05;
    transition: left 0.4s var(--ease-smooth);
    z-index: 0;
}

.shop-card:not(.shop-card-coming-soon):hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(224, 123, 57, 0.15);
}

.shop-card:not(.shop-card-coming-soon):hover::before {
    left: 100%;
}

.shop-card-header {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.shop-card p {
    font-size: 0.95rem;
    color: var(--muted);
    position: relative;
    z-index: 1;
    margin-bottom: var(--spacing-md);
}

.shop-card-arrow {
    font-size: 1.5rem;
    color: var(--accent);
    position: relative;
    z-index: 1;
    transition: transform 0.3s var(--ease-smooth);
}

.shop-card:not(.shop-card-coming-soon):hover .shop-card-arrow {
    transform: translateX(4px);
}

.shop-card-coming-soon {
    cursor: not-allowed;
    opacity: 0.7;
}

.shop-card-coming-soon .shop-card-arrow {
    color: var(--line);
}

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

/* ============================================
   ABOUT SECTION
   ============================================ */

.about {
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    margin-bottom: var(--spacing-2xl);
    animation: fadeUp 0.8s var(--ease-smooth) 0.3s both;
}

.about-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--ink);
}

.about-text p {
    margin-bottom: var(--spacing-lg);
    color: var(--muted);
}

.about-text p:first-child {
    color: var(--ink);
    font-weight: 500;
}

.about-visual {
    animation: fadeUp 0.8s var(--ease-smooth) 0.5s both;
}

.elevation-profile {
    width: 100%;
    height: auto;
    max-width: 400px;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid var(--line);
    animation: fadeUp 0.8s var(--ease-smooth) 0.6s both;
}

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

.stat-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: var(--spacing-sm);
    font-weight: 400;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--ink);
    color: white;
    padding: var(--spacing-2xl) var(--spacing-md);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-main {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-sm);
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-socials {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: flex-end;
}

.footer-link {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s var(--ease-smooth);
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s var(--ease-smooth);
}

.footer-link:hover {
    color: white;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-socials {
        justify-content: flex-start;
    }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.section-heading.in-view,
.about-content.in-view,
.stats-row.in-view {
    animation-play-state: running !important;
}

/* ============================================
   UTILITY & RESPONSIVE
   ============================================ */

@media (max-width: 375px) {
    :root {
        font-size: 14px;
    }

    .hero-coords {
        font-size: 0.8rem;
    }

    .product-card,
    .shop-card {
        padding: var(--spacing-lg);
    }

    .footer-container {
        padding-bottom: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }
}
