/* ============================================
   bada.coffee - Tropical Aero Roastery
   Frutiger Aero meets artisanal coffee culture
   ============================================ */

/* --- Palette Reference ---
   Volcanic Ember:  #c85a17
   Roasted Umber:   #8b3a0f
   Honey Glaze:     #e8984a
   Crema Foam:      #fdf6ee
   Latte Wash:      #f5e6d0
   Espresso Black:  #2a1810
   Roast Smoke:     #6b4a3a
   Highland Mist:   #7a9e8c
   Aero Amber:      #f5b041
   --- */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lora', serif;
    font-weight: 500;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    color: #2a1810;
    background-color: #fdf6ee;
    overflow-x: hidden;
}

/* --- Typography --- */
.hero-title,
.section-heading,
.footer-wordmark {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.02em;
    color: #8b3a0f;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 7rem);
}

.section-heading {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    margin-bottom: 0.75em;
    overflow: hidden;
}

.section-heading .char {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-heading.revealed .char {
    transform: translateY(0);
}

.panel-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6b4a3a;
    display: block;
    margin-bottom: 1em;
}

.panel-body {
    font-family: 'Lora', serif;
    font-weight: 500;
    color: #2a1810;
    max-width: 600px;
}

.footer-wordmark {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.footer-tagline {
    font-family: 'Lora', serif;
    font-weight: 500;
    color: #6b4a3a;
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-top: 0.5em;
}

.footer-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6b4a3a;
    margin-top: 2em;
    display: flex;
    gap: 1em;
    justify-content: center;
    align-items: center;
}

.meta-divider {
    color: #c85a17;
}

/* ============================================
   Zone 1: The Canopy (Hero)
   ============================================ */

.hero-canopy {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #fdf6ee;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 65% 40%, rgba(200,90,23,0.12) 0%, rgba(245,176,65,0.06) 45%, transparent 80%);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-gradient.visible {
    opacity: 1;
}

.hero-blob {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-35%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(200, 90, 23, 0.85);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: width 1.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                height 1.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-radius 0.8s ease-in-out 0.6s;
}

.hero-blob.expanded {
    width: min(55vw, 500px);
    height: min(60vh, 550px);
    border-radius: 42% 58% 62% 38% / 45% 55% 45% 55%;
    animation: blobMorphHero 16s ease-in-out infinite 2.5s;
}

.blob-illustration {
    width: 75%;
    height: 75%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.blob-illustration.visible {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: min(35vh, 320px);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-underline {
    width: 0;
    height: 1px;
    background-color: #e8984a;
    opacity: 0.5;
    margin: 0.5em auto 0;
    transition: width 0.6s ease 0.2s;
}

.hero-content.visible .hero-underline {
    width: 40vw;
}

.scroll-chevron {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: chevronBounce 2s ease-in-out infinite;
    z-index: 2;
}

.scroll-chevron.visible {
    opacity: 1;
}

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

/* Blob morph animation */
@keyframes blobMorphHero {
    0%   { border-radius: 42% 58% 62% 38% / 45% 55% 45% 55%; }
    25%  { border-radius: 55% 45% 48% 52% / 38% 62% 42% 58%; }
    50%  { border-radius: 38% 62% 55% 45% / 52% 48% 58% 42%; }
    75%  { border-radius: 48% 52% 42% 58% / 58% 42% 55% 45%; }
    100% { border-radius: 42% 58% 62% 38% / 45% 55% 45% 55%; }
}

/* ============================================
   Zone 2: The Tasting Notes (Grid)
   ============================================ */

.tasting-notes {
    position: relative;
    padding: clamp(2rem, 6vw, 6rem) clamp(1rem, 4vw, 4rem);
    background-color: #fdf6ee;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: auto;
    gap: clamp(12px, 2vw, 24px);
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Grid panel placement */
.panel-wide-left {
    grid-column: 1 / 6;
}

.panel-narrow-right {
    grid-column: 6 / 9;
}

.panel-narrow-left {
    grid-column: 1 / 4;
}

.panel-wide-right {
    grid-column: 4 / 9;
}

.panel-full-width {
    grid-column: 1 / 9;
}

/* Grid panel base styles */
.grid-panel {
    position: relative;
    background-color: #f5e6d0;
    border-radius: 16px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(200,90,23,0.075), 0 2px 8px rgba(245,176,65,0.05), inset 0 1px 0 rgba(255,255,255,0.4);
    transition: transform 0.3s ease,
                box-shadow 0.3s ease,
                background 0.3s ease;
}

.grid-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(200,90,23,0.15), 0 2px 8px rgba(245,176,65,0.1), inset 0 1px 0 rgba(255,255,255,0.4);
    background-image: linear-gradient(135deg, rgba(232,152,74,0.08) 0%, rgba(253,246,238,0) 100%);
}

.grid-panel:hover .panel-blob-accent {
    transform: scale(1.2);
}

/* Blur-focus scroll animation */
.blur-panel {
    filter: blur(4px);
    opacity: 0.3;
    transform: translateY(20px);
    transition: filter 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blur-panel.in-view {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
}

/* Override hover transform when panel is still blurred */
.blur-panel:not(.in-view):hover {
    transform: translateY(20px);
}

.blur-panel.in-view:hover {
    transform: translateY(-4px);
}

/* Panel blob accents */
.panel-blob-accent {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    border-radius: 30% 70% 55% 45% / 60% 40% 50% 50%;
    background-color: rgba(200, 90, 23, 0.12);
    backdrop-filter: blur(2px);
    transition: transform 0.3s ease, border-radius 0.3s ease;
    animation: blobMorphCard 8s ease-in-out infinite;
}

.panel-blob-accent.accent-highland {
    background-color: rgba(122, 158, 140, 0.12);
    border: 1px solid rgba(122, 158, 140, 0.2);
}

/* Highland Mist accent color: #7a9e8c */
.accent-highland::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle, #7a9e8c 0%, transparent 70%);
    opacity: 0.06;
}

@keyframes blobMorphCard {
    0%   { border-radius: 30% 70% 55% 45% / 60% 40% 50% 50%; }
    25%  { border-radius: 55% 45% 40% 60% / 45% 55% 60% 40%; }
    50%  { border-radius: 45% 55% 60% 40% / 55% 45% 40% 60%; }
    75%  { border-radius: 60% 40% 45% 55% / 40% 60% 55% 45%; }
    100% { border-radius: 30% 70% 55% 45% / 60% 40% 50% 50%; }
}

/* Coffee ring watermark */
.coffee-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 2px solid rgba(107, 74, 58, 0.08);
    pointer-events: none;
}

.coffee-ring::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px dashed rgba(107, 74, 58, 0.05);
}

/* Origin strip */
.origin-strip {
    background-color: #fdf6ee;
    padding: clamp(1rem, 2vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.origin-panorama {
    width: 100%;
    max-height: 200px;
}

/* Panel illustrations */
.panel-illustration {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-top: 1.5em;
    opacity: 0.85;
}

.panel-illustration.small-illust {
    max-width: 150px;
}

/* SVG draw animation */
.draw-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}

.draw-path.drawn {
    stroke-dashoffset: 0;
}

/* Steam animation */
.steam-path {
    animation: steamDrift 4s ease-in-out infinite;
}

@keyframes steamDrift {
    0%   { transform: translateY(0); opacity: 0.85; }
    50%  { transform: translateY(-8px); opacity: 0.4; }
    100% { transform: translateY(0); opacity: 0.85; }
}

/* Background elements */
.dot-scatter {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.dot-scatter::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 200%;
    background-image: radial-gradient(circle 1.5px at center, rgba(200, 90, 23, 0.1) 100%, transparent 100%);
    background-size: clamp(20px, 4vw, 60px) clamp(20px, 4vw, 60px);
    will-change: transform;
}

.background-blob {
    position: absolute;
    border-radius: 42% 58% 62% 38% / 45% 55% 45% 55%;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.blob-bg-1 {
    width: 400px;
    height: 420px;
    top: 15%;
    left: -100px;
    background-color: rgba(232, 152, 74, 0.08);
    animation: blobMorphHero 14s ease-in-out infinite;
}

.blob-bg-2 {
    width: 350px;
    height: 380px;
    top: 55%;
    right: -80px;
    background-color: rgba(122, 158, 140, 0.06);
    animation: blobMorphCard 12s ease-in-out infinite;
}

/* ============================================
   Zone 3: The Cupping Table (Footer)
   ============================================ */

.cupping-table {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: clamp(3rem, 8vw, 8rem) clamp(1rem, 4vw, 4rem);
    background-color: #fdf6ee;
    overflow: hidden;
}

.footer-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%;
    background-color: rgba(200, 90, 23, 0.1);
    backdrop-filter: blur(2px);
    box-shadow: 0 8px 32px rgba(200,90,23,0.15), 0 2px 8px rgba(245,176,65,0.1);
    animation: blobMorphHero 12s ease-in-out infinite;
    z-index: 0;
}

/* Aero Amber glow for interactive elements */
.grid-panel:hover .panel-blob-accent {
    box-shadow: 0 4px 16px #f5b041;
}

.footer-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* ============================================
   Responsive
   ============================================ */

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

    .panel-wide-left,
    .panel-narrow-right,
    .panel-narrow-left,
    .panel-wide-right,
    .panel-full-width {
        grid-column: 1 / -1;
    }

    .hero-blob.expanded {
        width: min(80vw, 350px);
        height: min(50vh, 380px);
    }

    .hero-content {
        margin-top: min(30vh, 250px);
    }

    .hero-content.visible .hero-underline {
        width: 60vw;
    }

    .background-blob {
        display: none;
    }
}

@media (max-width: 480px) {
    .footer-meta {
        flex-direction: column;
        gap: 0.5em;
    }

    .meta-divider {
        display: none;
    }
}
