/* ============================================
   Teamont Cafe — Styles
   Palette: Terracotta + Sand
   ============================================ */

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

:root {
    --terracotta: #C06C44;
    --terracotta-dark: #A85A36;
    --terracotta-light: #D4916E;
    --sand: #F5E6D3;
    --sand-light: #FBF7F2;
    --sand-dark: #E8D5C0;
    --cream: #FFFDF9;
    --charcoal: #2C2420;
    --charcoal-light: #4A3F38;
    --warm-gray: #8A7E76;
    --warm-gray-light: #B8ADA4;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--charcoal);
    background-color: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   Page Loader
   ============================================ */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--ease-out-expo), visibility 0.6s;
}

#page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-text {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    color: var(--sand);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: padding 0.4s var(--ease-out-expo), background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}

.nav.scrolled {
    padding: 0.75rem 0;
    background: rgba(255, 253, 249, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--sand-dark);
}

.nav.scrolled .nav-logo-text {
    color: var(--charcoal);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-mark {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 500;
    color: var(--sand);
    letter-spacing: 0.08em;
    border: 1px solid rgba(245, 230, 211, 0.4);
    padding: 0.35rem 0.5rem;
    transition: color 0.4s, border-color 0.4s;
}

.nav.scrolled .nav-logo-mark {
    color: var(--terracotta);
    border-color: var(--terracotta);
}

.nav-logo-text {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--sand);
    letter-spacing: 0.04em;
    transition: color 0.4s;
}

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

.nav-link {
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(245, 230, 211, 0.85);
    transition: color 0.3s;
    position: relative;
}

.nav.scrolled .nav-link {
    color: var(--charcoal-light);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--terracotta);
    transition: width 0.3s var(--ease-out-expo);
}

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

.nav-link:hover,
.nav-link:focus {
    color: var(--sand);
}

.nav.scrolled .nav-link:hover,
.nav.scrolled .nav-link:focus {
    color: var(--terracotta);
}

.nav-cta {
    border: 1px solid rgba(245, 230, 211, 0.4);
    padding: 0.5rem 1.25rem;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.nav.scrolled .nav-cta {
    border-color: var(--terracotta);
    color: var(--terracotta);
}

.nav-cta:hover {
    background: var(--terracotta);
    color: var(--sand) !important;
    border-color: var(--terracotta);
}

.nav.scrolled .nav-cta:hover {
    background: var(--terracotta);
    color: var(--sand) !important;
}

.nav-cta::after {
    display: none;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle-line {
    width: 24px;
    height: 1px;
    background: var(--sand);
    transition: transform 0.3s var(--ease-out-expo), opacity 0.3s;
    transform-origin: center;
}

.nav.scrolled .nav-toggle-line {
    background: var(--charcoal);
}

.nav-toggle.active .nav-toggle-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

.nav-toggle.active .nav-toggle-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--charcoal);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(44, 36, 32, 0.55) 0%,
        rgba(44, 36, 32, 0.4) 40%,
        rgba(44, 36, 32, 0.65) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 780px;
    padding: 0 2rem;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--sand-dark);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title-line {
    display: block;
    font-size: clamp(2.5rem, 7vw, 5rem);
    color: var(--sand);
    letter-spacing: -0.01em;
}

.hero-title-accent {
    display: block;
    font-size: clamp(2.5rem, 7vw, 5rem);
    color: var(--terracotta-light);
    font-style: italic;
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 200;
    color: rgba(245, 230, 211, 0.75);
    line-height: 1.8;
    max-width: 520px;
    margin: 0 auto 2.5rem;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.35s var(--ease-out-expo);
}

.btn-primary {
    background: var(--terracotta);
    color: var(--sand);
    border-color: var(--terracotta);
}

.btn-primary:hover {
    background: var(--terracotta-dark);
    border-color: var(--terracotta-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(192, 108, 68, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--sand);
    border-color: rgba(245, 230, 211, 0.4);
}

.btn-ghost:hover {
    border-color: var(--sand);
    background: rgba(245, 230, 211, 0.1);
}

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

.btn-ghost-dark:hover {
    background: var(--charcoal);
    color: var(--sand);
}

/* Hero Scroll */
.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(245, 230, 211, 0.5);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, rgba(245, 230, 211, 0.5), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(0.5); opacity: 1; }
}

/* ============================================
   Section Divider
   ============================================ */
.section-divider {
    background: var(--sand);
    overflow: hidden;
}

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

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

.feature-item {
    padding: 2rem 0;
    border-top: 1px solid var(--sand-dark);
}

.feature-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--terracotta);
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.feature-title {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 2vw, 1.75rem);
    font-weight: 400;
    color: var(--charcoal);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.feature-desc {
    font-size: 0.9rem;
    font-weight: 200;
    color: var(--warm-gray);
    line-height: 1.8;
}

/* ============================================
   Story
   ============================================ */
.section-story {
    background: var(--cream);
    padding: 8rem 0;
}

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

.story-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 2px;
}

.story-eyebrow {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1.25rem;
}

.story-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    color: var(--charcoal);
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

.story-body {
    font-size: 0.95rem;
    font-weight: 200;
    color: var(--warm-gray);
    line-height: 1.9;
    margin-bottom: 1.25rem;
}

.story-signature {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--sand-dark);
}

.story-signature-line {
    width: 40px;
    height: 1px;
    background: var(--terracotta);
    flex-shrink: 0;
}

.story-signature span {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--warm-gray);
}

/* ============================================
   Section Header (shared)
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-eyebrow {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    font-weight: 400;
    color: var(--charcoal);
    line-height: 1.25;
}

.section-divider-line {
    width: 48px;
    height: 1px;
    background: var(--terracotta);
    margin: 1.5rem auto 0;
}

/* ============================================
   Products
   ============================================ */
.section-products {
    background: var(--sand-light);
    padding: 7rem 0;
}

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

.product-card {
    background: var(--cream);
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(44, 36, 32, 0.08);
}

.product-image {
    overflow: hidden;
    aspect-ratio: 520 / 380;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

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

.product-info {
    padding: 2rem;
}

.product-name {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
}

.product-desc {
    font-size: 0.875rem;
    font-weight: 200;
    color: var(--warm-gray);
    line-height: 1.8;
}

/* ============================================
   CTA / Visit
   ============================================ */
.section-cta {
    background: var(--charcoal);
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.section-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    border: 1px solid rgba(245, 230, 211, 0.04);
    pointer-events: none;
}

.section-cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    border: 1px solid rgba(245, 230, 211, 0.04);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    text-align: center;
    margin: 0 auto;
}

.cta-content .section-eyebrow {
    color: var(--terracotta-light);
}

.cta-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 300;
    color: var(--sand);
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.cta-desc {
    font-size: 0.95rem;
    font-weight: 200;
    color: rgba(245, 230, 211, 0.6);
    line-height: 1.9;
    margin-bottom: 3rem;
}

.cta-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
    text-align: left;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.cta-detail {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cta-icon {
    color: var(--terracotta-light);
    flex-shrink: 0;
    margin-top: 3px;
}

.cta-detail-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(245, 230, 211, 0.4);
    margin-bottom: 0.25rem;
}

.cta-detail-value {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--sand);
    line-height: 1.7;
}

.cta-detail a {
    color: var(--sand);
    transition: color 0.3s;
}

.cta-detail a:hover {
    color: var(--terracotta-light);
}

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

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--charcoal);
    border-top: 1px solid rgba(245, 230, 211, 0.08);
    padding: 4rem 0 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(245, 230, 211, 0.08);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand .nav-logo-mark {
    color: var(--terracotta-light);
    border-color: rgba(192, 108, 68, 0.4);
    display: inline-block;
    width: fit-content;
}

.footer-name {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--sand);
    letter-spacing: 0.02em;
}

.footer-tagline {
    font-size: 0.875rem;
    font-weight: 200;
    color: rgba(245, 230, 211, 0.45);
    line-height: 1.8;
    max-width: 320px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.5rem;
}

.footer-contact p {
    font-size: 0.9rem;
    font-weight: 200;
    color: rgba(245, 230, 211, 0.55);
    line-height: 1.8;
}

.footer-contact a {
    color: var(--terracotta-light);
    transition: color 0.3s;
}

.footer-contact a:hover {
    color: var(--sand);
}

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

.footer-bottom p {
    font-size: 0.75rem;
    font-weight: 200;
    color: rgba(245, 230, 211, 0.3);
    letter-spacing: 0.05em;
}

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

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

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

.reveal[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.features-grid .reveal:nth-child(1) { transition-delay: 0s; }
.features-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.24s; }

.products-grid .reveal:nth-child(1) { transition-delay: 0s; }
.products-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.products-grid .reveal:nth-child(3) { transition-delay: 0.24s; }
.products-grid .reveal:nth-child(4) { transition-delay: 0.36s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .features-grid {
        gap: 2rem;
    }
    
    .story-layout {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 85vw);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        background: var(--charcoal);
        transform: translateX(100%);
        transition: transform 0.5s var(--ease-out-expo);
        z-index: 1000;
    }
    
    .nav-links.open {
        transform: translateX(0);
    }
    
    .nav-links.open .nav-link {
        color: var(--sand);
        font-size: 0.9rem;
    }
    
    .nav-links.open .nav-cta {
        border-color: var(--terracotta);
        color: var(--terracotta);
    }
    
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .nav-overlay.active {
        display: block;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1.5rem 0;
    }
    
    .story-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .story-image img {
        height: 360px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title-line,
    .hero-title-accent {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .cta-actions {
        flex-direction: column;
    }
    
    .cta-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }
    
    .nav-inner {
        padding: 0 1.25rem;
    }
    
    .hero {
        min-height: 100vh;
        min-height: 100dvh;
    }
    
    .section-features,
    .section-products {
        padding: 5rem 0;
    }
    
    .section-story,
    .section-cta {
        padding: 5rem 0;
    }
}

@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[data-reveal] {
        opacity: 1;
        transform: none;
    }
    
    #page-loader {
        display: none;
    }
}
