/* ========================================
   Coffee Connection — Styles
   Terracotta + Sand | Clean Minimalist
   ======================================== */

/* --- Custom Properties --- */
:root {
    --color-terra-50: #fdf0ec;
    --color-terra-100: #fce4db;
    --color-terra-200: #f8c4b4;
    --color-terra-300: #f29e86;
    --color-terra-400: #eb7a58;
    --color-terra-500: #e05a32;
    --color-terra-600: #c0603c;
    --color-terra-700: #9e4d32;
    --color-terra-800: #813f2b;
    --color-terra-900: #6b3525;
    --color-sand-50: #fdfbf7;
    --color-sand-100: #faf5ec;
    --color-sand-200: #f3e8d4;
    --color-sand-300: #e8d5b4;
    --color-sand-400: #d4b88a;
    --color-sand-500: #c4a06a;
    --color-sand-600: #a88452;
    --color-sand-700: #8a6a42;
    --color-sand-800: #705638;
    --color-sand-900: #5c472f;
    --color-dark: #1a1612;
    --color-dark-soft: #2e2822;
    --color-gray-600: #5a524a;
    --color-gray-700: #3d3730;
    --color-gray-800: #2a2420;
    --color-gray-900: #1a1612;
    --color-line: rgba(192, 96, 60, 0.12);
    --color-line-dark: rgba(253, 250, 247, 0.08);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-gray-800);
    background-color: var(--color-sand-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

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

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

ul, ol {
    list-style: none;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--color-terra-600);
    color: white;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    font-size: 0.875rem;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Typography --- */
.eyebrow {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-terra-600);
}

.section-eyebrow {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-terra-600);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.2;
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1.0625rem;
    color: var(--color-gray-600);
    max-width: 560px;
    line-height: 1.7;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    padding: 0.8125rem 1.75rem;
    border-radius: 100px;
    transition: all 0.3s var(--ease-smooth);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-terra-600);
    color: #fff;
    box-shadow: 0 2px 12px rgba(192, 96, 60, 0.25);
}
.btn-primary:hover {
    background: var(--color-terra-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(192, 96, 60, 0.35);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

.btn-map {
    margin-top: 1.5rem;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-line);
    transition: box-shadow 0.3s var(--ease-smooth);
}
.site-header.scrolled {
    box-shadow: 0 1px 20px rgba(26, 22, 18, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Logo --- */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--color-dark);
    font-weight: 400;
}
.logo:hover {
    color: var(--color-terra-600);
}
.logo-icon {
    color: var(--color-terra-600);
    flex-shrink: 0;
}

/* --- Navigation --- */
.nav-list {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}
.nav-list a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-gray-700);
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.2s;
}
.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-terra-600);
    transition: width 0.3s var(--ease-out);
}
.nav-list a:hover {
    color: var(--color-terra-600);
}
.nav-list a:hover::after {
    width: 100%;
}

/* --- Nav Toggle --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    z-index: 101;
}
.nav-toggle-line {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
    transform-origin: center;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        #c0603c 0%,
        #d4845a 25%,
        #e0a070 45%,
        #d4a070 60%,
        #c09060 80%,
        #a07048 100%
    );
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(160, 80, 40, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(220, 140, 80, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse 90% 70% at 50% 50%, rgba(255, 200, 150, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    color: var(--color-sand-100);
    opacity: 0.6;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 720px;
    padding: 8rem 1.5rem 6rem;
}

.hero-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.25rem, 6vw, 4rem);
    line-height: 1.15;
    color: #fff;
    margin-bottom: 1.5rem;
}

.hero-accent {
    font-style: italic;
    font-weight: 400;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: float 2.5s ease-in-out infinite;
}
.hero-scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* --- Features --- */
.features {
    padding: 7rem 0;
    background: var(--color-sand-50);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3.5rem;
}

.feature-card {
    padding: 2.25rem;
    border: 1px solid var(--color-line);
    border-radius: 12px;
    transition: all 0.3s var(--ease-smooth);
    background: #fff;
}
.feature-card:hover {
    border-color: var(--color-terra-200);
    box-shadow: 0 8px 32px rgba(192, 96, 60, 0.08);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--color-terra-50);
    color: var(--color-terra-600);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.feature-desc {
    font-size: 0.9375rem;
    color: var(--color-gray-600);
    line-height: 1.7;
}

/* --- Products --- */
.products {
    padding: 7rem 0;
    background: #fff;
}

.products .section-header {
    margin-bottom: 3.5rem;
}

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

.product-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-line);
    background: var(--color-sand-50);
    transition: all 0.3s var(--ease-smooth);
}
.product-card:hover {
    box-shadow: 0 12px 40px rgba(26, 22, 18, 0.1);
    transform: translateY(-3px);
}

.product-img-wrap {
    overflow: hidden;
    aspect-ratio: 4/3;
}
.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}
.product-card:hover .product-img-wrap img {
    transform: scale(1.04);
}

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

.product-card-title {
    font-family: var(--font-display);
    font-size: 1.1875rem;
    font-weight: 400;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-card-desc {
    font-size: 0.9375rem;
    color: var(--color-gray-600);
    line-height: 1.65;
}

/* --- Story --- */
.story {
    padding: 7rem 0;
    background: var(--color-sand-100);
}

.story-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.story-image {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 6/5;
}
.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.story-eyebrow {
    margin-bottom: 1rem;
}

.story-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-dark);
    margin-bottom: 1.5rem;
}

.story-text {
    font-size: 1rem;
    color: var(--color-gray-600);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.story-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-line);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.stat-number {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--color-dark);
}
.stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gray-600);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-line);
    flex-shrink: 0;
}

/* --- Visit --- */
.visit {
    padding: 7rem 0;
    background: #fff;
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.visit-info {
    padding: 1rem 0;
}

.visit-details {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.visit-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--color-terra-50);
    color: var(--color-terra-600);
    flex-shrink: 0;
}

.visit-item-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gray-600);
    margin-bottom: 0.25rem;
}

.visit-item-value {
    font-size: 1rem;
    color: var(--color-dark);
    line-height: 1.5;
}
.visit-item-value a {
    color: var(--color-terra-600);
    transition: color 0.2s;
}
.visit-item-value a:hover {
    color: var(--color-terra-700);
    text-decoration: underline;
}

/* Map placeholder */
.visit-map {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-line);
    aspect-ratio: 4/3;
    background: var(--color-sand-100);
}

.map-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--color-sand-100), var(--color-terra-50));
}
.map-icon {
    color: var(--color-terra-400);
    opacity: 0.6;
}
.map-placeholder-text {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--color-dark);
    line-height: 1.5;
}
.map-placeholder-sub {
    font-size: 0.8125rem;
    color: var(--color-gray-600);
}

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

.contact-header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.contact-header .section-desc {
    margin: 0 auto;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Form */
.contact-form {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-line);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}
.form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-gray-700);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--color-dark);
    background: var(--color-sand-50);
    border: 1px solid var(--color-line);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-gray-700);
    opacity: 0.5;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-terra-400);
    box-shadow: 0 0 0 3px rgba(192, 96, 60, 0.1);
}

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

.btn-submit {
    width: 100%;
    justify-content: center;
}

.form-success {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    background: var(--color-terra-50);
    border: 1px solid var(--color-terra-200);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--color-terra-800);
}
.form-success.show {
    display: flex;
}

/* Contact info cards */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--color-line);
}

.contact-info-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--color-dark);
    margin-bottom: 1.25rem;
}

.contact-info-list,
.contact-hours {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.contact-info-list li {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.contact-info-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gray-600);
}

.contact-info-value {
    font-size: 0.9375rem;
    color: var(--color-dark);
}
.contact-info-value a {
    color: var(--color-terra-600);
    transition: color 0.2s;
}
.contact-info-value a:hover {
    color: var(--color-terra-700);
    text-decoration: underline;
}

.hours-day {
    font-size: 0.9375rem;
    color: var(--color-dark);
}
.hours-time {
    font-size: 0.9375rem;
    color: var(--color-gray-600);
    margin-left: auto;
}
.hours-note {
    font-size: 0.8125rem;
    color: var(--color-gray-600);
    margin-top: 1rem;
    font-style: italic;
}

/* --- Footer --- */
.site-footer {
    background: var(--color-dark);
    color: rgba(253, 251, 247, 0.6);
    padding: 3.5rem 0 2rem;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-line-dark);
}

.footer-logo {
    color: rgba(253, 251, 247, 0.9);
}
.footer-logo:hover {
    color: var(--color-terra-300);
}

.footer-nav {
    display: flex;
    gap: 2rem;
}
.footer-nav a {
    font-size: 0.875rem;
    color: rgba(253, 251, 247, 0.6);
    transition: color 0.2s;
}
.footer-nav a:hover {
    color: var(--color-terra-300);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    font-size: 0.8125rem;
}

.footer-address {
    opacity: 0.5;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .features-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-layout,
    .visit-grid,
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .story-image {
        aspect-ratio: 16/9;
    }
}

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

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 85vw);
        height: 100vh;
        height: 100dvh;
        background: var(--color-sand-50);
        border-left: 1px solid var(--color-line);
        padding: 6rem 2rem 2rem;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out);
        z-index: 100;
    }
    .main-nav.open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .nav-list a {
        font-size: 1.0625rem;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(26, 22, 18, 0.4);
        z-index: 99;
    }
    .nav-overlay.show {
        display: block;
    }

    .features-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 7rem 1.5rem 5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .story-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .stat-divider {
        width: 40px;
        height: 1px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.125rem;
    }

    .features,
    .products,
    .story,
    .visit,
    .contact {
        padding: 5rem 0;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

/* --- 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;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
