/* ========================================
   Chip's Corner Coffee — Styles
   Palette: Terracotta + Sand
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    --color-sand: #F5F0E8;
    --color-sand-light: #FAF7F2;
    --color-sand-dark: #E8E0D0;
    --color-terracotta: #C46A4A;
    --color-terracotta-dark: #A8553A;
    --color-terracotta-light: #D4896E;
    --color-charcoal: #2A2520;
    --color-warm-gray: #6B635B;
    --color-warm-gray-light: #9B938B;
    --color-white: #FFFFFF;
    --color-black: #1A1612;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 3px rgba(42, 37, 32, 0.06);
    --shadow-md: 0 4px 20px rgba(42, 37, 32, 0.08);
    --shadow-lg: 0 8px 40px rgba(42, 37, 32, 0.12);
    --shadow-float: 0 12px 48px rgba(42, 37, 32, 0.15);

    --transition-fast: 0.2s ease;
    --transition-med: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-charcoal);
    background-color: var(--color-sand);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

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

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

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

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

.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--color-charcoal);
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-terracotta);
    color: var(--color-white);
    border: 1.5px solid var(--color-terracotta);
}

.btn-primary:hover {
    background-color: var(--color-terracotta-dark);
    border-color: var(--color-terracotta-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-charcoal);
    border: 1.5px solid var(--color-sand-dark);
}

.btn-ghost:hover {
    border-color: var(--color-terracotta);
    color: var(--color-terracotta);
}

.btn-full {
    width: 100%;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-sand-dark);
    transition: box-shadow var(--transition-fast);
}

.nav.scrolled {
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-charcoal);
    letter-spacing: -0.01em;
}

.logo-icon {
    color: var(--color-terracotta);
}

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

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--color-warm-gray);
    transition: color var(--transition-fast);
    position: relative;
}

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

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

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    color: var(--color-charcoal);
    padding: 0.5rem;
}

/* --- Hero --- */
.hero {
    padding-top: calc(72px + var(--space-2xl));
    padding-bottom: var(--space-2xl);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--color-white);
    border: 1px solid var(--color-sand-dark);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-warm-gray);
    margin-bottom: var(--space-lg);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-terracotta);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.hero-headline {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-charcoal);
    letter-spacing: -0.03em;
    margin-bottom: var(--space-md);
    max-width: 560px;
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--color-warm-gray);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    max-width: 480px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.hero-visual {
    position: relative;
    height: 600px;
}

.hero-img-main {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-float);
}

.hero-img-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stat-card {
    position: absolute;
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(245, 240, 232, 0.8);
}

.stat-card--1 {
    top: 8%;
    right: -24px;
    animation: float 4s ease-in-out infinite;
}

.stat-card--2 {
    bottom: 22%;
    left: -32px;
    animation: float 4s ease-in-out infinite 1s;
}

.stat-card--3 {
    bottom: 6%;
    right: 8%;
    animation: float 4s ease-in-out infinite 2s;
}

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

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-terracotta);
    line-height: 1;
    margin-bottom: 0.375rem;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-warm-gray);
    line-height: 1.4;
}

/* --- Thin Line --- */
.thin-line {
    padding: 0 var(--space-md);
}

.thin-line-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-sand-dark), transparent);
}

.thin-line--reverse .thin-line-inner {
    background: linear-gradient(to right, transparent, var(--color-sand-dark), transparent);
}

/* --- About --- */
.about {
    padding: var(--space-3xl) 0;
}

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

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 7 / 8;
}

.about-content {
    padding: var(--space-md) 0;
}

.about-text {
    font-size: 1.0625rem;
    color: var(--color-warm-gray);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.about-text em {
    color: var(--color-charcoal);
    font-style: italic;
}

.about-stats {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-sand-dark);
}

.about-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-terracotta);
    line-height: 1;
}

.stat-desc {
    font-size: 0.8125rem;
    color: var(--color-warm-gray-light);
    letter-spacing: 0.02em;
}

.about-stat-divider {
    width: 1px;
    height: 40px;
    background-color: var(--color-sand-dark);
}

/* --- Menu --- */
.menu {
    padding: var(--space-3xl) 0;
    background-color: var(--color-sand-light);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.menu-card {
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-sand-dark);
    transition: all var(--transition-med);
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.menu-card-img {
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

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

.menu-card:hover .menu-card-img img {
    transform: scale(1.04);
}

.menu-card-body {
    padding: var(--space-md);
}

.menu-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-charcoal);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

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

/* --- Visit --- */
.visit {
    padding: var(--space-3xl) 0;
}

.visit-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.visit-info {
    padding: var(--space-md) 0;
}

.visit-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.visit-detail {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.visit-detail-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background-color: var(--color-white);
    border: 1px solid var(--color-sand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-terracotta);
}

.visit-detail strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-charcoal);
    margin-bottom: 0.25rem;
}

.visit-detail p,
.visit-detail a {
    font-size: 0.9375rem;
    color: var(--color-warm-gray);
    line-height: 1.6;
}

.visit-detail a:hover {
    color: var(--color-terracotta);
    text-decoration: underline;
}

.visit-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-sand-dark);
}

.map-placeholder {
    aspect-ratio: 4 / 3.5;
}

.map-placeholder iframe {
    width: 100%;
    height: 100%;
}

/* --- Contact --- */
.contact {
    padding: var(--space-3xl) 0;
    background-color: var(--color-charcoal);
}

.contact .section-label {
    color: var(--color-terracotta-light);
}

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

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.contact-sub {
    font-size: 1.0625rem;
    color: var(--color-warm-gray-light);
    line-height: 1.7;
    margin-top: var(--space-sm);
    max-width: 400px;
}

.contact-form-wrapper {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

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

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-warm-gray-light);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    outline: none;
    transition: all var(--transition-fast);
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-warm-gray);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-terracotta);
    background-color: rgba(255, 255, 255, 0.1);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239B938B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-group select option {
    background-color: var(--color-charcoal);
    color: var(--color-white);
}

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

/* Form Success */
.form-success {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
}

.success-icon {
    color: var(--color-terracotta-light);
    margin-bottom: var(--space-md);
}

.success-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.form-success p {
    font-size: 0.9375rem;
    color: var(--color-warm-gray-light);
}

/* --- Footer --- */
.footer {
    background-color: var(--color-black);
    padding: var(--space-2xl) 0 var(--space-md);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
    font-size: 0.9375rem;
    color: var(--color-warm-gray);
    line-height: 1.7;
    margin-top: var(--space-sm);
    max-width: 280px;
}

.footer-brand .logo {
    color: var(--color-white);
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-warm-gray-light);
    margin-bottom: var(--space-sm);
}

.footer-col a {
    display: block;
    font-size: 0.9375rem;
    color: var(--color-warm-gray);
    padding: 0.3rem 0;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--color-terracotta-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--color-warm-gray);
}

/* --- Mobile Menu --- */
.nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background-color: rgba(245, 240, 232, 0.98);
    backdrop-filter: blur(12px);
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-sand-dark);
    gap: var(--space-sm);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-visual {
        height: 480px;
    }

    .stat-card--1 { right: -16px; }
    .stat-card--2 { left: -16px; }
}

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

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .hero {
        padding-top: calc(72px + var(--space-lg));
        min-height: auto;
    }

    .hero-visual {
        height: 360px;
        order: -1;
    }

    .stat-card--1 { right: -8px; top: 5%; }
    .stat-card--2 { left: -8px; bottom: 25%; }
    .stat-card--3 { right: 4%; bottom: 2%; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .about-image {
        max-height: 400px;
    }

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

    .visit-layout {
        grid-template-columns: 1fr;
    }

    .visit-map {
        order: -1;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

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

    .footer-top {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

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

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

@media (max-width: 480px) {
    .hero-headline {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .stat-card {
        padding: var(--space-sm) var(--space-md);
    }

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

    .about-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .about-stat-divider {
        display: none;
    }
}
