/* ===========================
   Firenze Coffee QR Menü
   Design System & Styles
   =========================== */

:root {
    --green-dark: #1a3a2a;
    --green-primary: #2d5a3d;
    --green-medium: #3d7a52;
    --green-light: #5a9e6f;
    --green-pale: #a8d5b8;
    --beige: #f5f0e8;
    --beige-dark: #e8dfd2;
    --cream: #faf7f2;
    --brown: #6b4c3b;
    --brown-light: #8b6c5b;
    --text-dark: #2c2c2c;
    --text-medium: #555;
    --text-light: #888;
    --gold: #c9a84c;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.18);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--green-dark);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0d1f15 0%, #1a3a2a 40%, #2d5a3d 100%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(93, 161, 118, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 70% 80%, rgba(201, 168, 76, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--green-dark), transparent);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('img/icmekan1.JPG') center/cover no-repeat;
    opacity: 0.15;
    filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    animation: fadeInUp 1s ease-out;
}

.logo-badge {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 28px;
    border: 3px solid rgba(168, 213, 184, 0.4);
    box-shadow: 0 0 60px rgba(93, 161, 118, 0.2),
        0 0 120px rgba(93, 161, 118, 0.1);
    animation: pulseGlow 4s ease-in-out infinite;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.brand-tagline {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--green-pale);
    letter-spacing: 6px;
    text-transform: uppercase;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 1);
    font-size: 0.8rem;
    letter-spacing: 2px;
    animation: bounce 2s ease-in-out infinite;
}

/* ===========================
   Category Navigation
   =========================== */
.category-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(to bottom, var(--green-dark) 0%, var(--green-dark) 85%, transparent 100%);
    padding: 16px 0 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-track {
    display: flex;
    gap: 10px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.nav-track::-webkit-scrollbar {
    display: none;
}

.nav-pill {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1.5px solid rgba(168, 213, 184, 0.2);
    border-radius: 50px;
    background: rgba(45, 90, 61, 0.3);
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    scroll-snap-align: start;
    white-space: nowrap;
}

.nav-pill:hover {
    background: rgba(45, 90, 61, 0.5);
    border-color: rgba(168, 213, 184, 0.4);
    color: #fff;
}

.nav-pill.active {
    background: linear-gradient(135deg, var(--green-medium), var(--green-primary));
    border-color: var(--green-light);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(45, 90, 61, 0.4);
}

.pill-icon {
    font-size: 1rem;
}

.pill-text {
    font-size: 0.82rem;
}

/* ===========================
   Menu Container & Pages
   =========================== */
.menu-container {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 12px;
}

.menu-page {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.menu-page.active {
    display: block;
}

.page-inner {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.page-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(245, 240, 232, 0.88);
    pointer-events: none;
}

.page-content {
    position: relative;
    z-index: 1;
    padding: 28px 20px 32px;
}

/* ===========================
   Section Titles
   =========================== */
.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.section-title.small {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.title-icon {
    font-size: 1.2rem;
}

.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--green-pale), transparent);
    margin: 24px 0;
}

/* ===========================
   Size Header
   =========================== */
.size-header {
    display: grid;
    grid-template-columns: 1fr repeat(3, 60px);
    gap: 4px;
    margin-bottom: 8px;
    padding: 0 0 6px;
    border-bottom: 1px solid rgba(45, 90, 61, 0.15);
}

.size-spacer {
    /* empty spacer for name column */
}

.size-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--green-primary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===========================
   Menu Items
   =========================== */
.menu-item {
    display: grid;
    grid-template-columns: 1fr repeat(3, 60px);
    gap: 4px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(45, 90, 61, 0.06);
    transition: background 0.2s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item.two-col {
    grid-template-columns: 1fr 80px;
}

.item-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.92rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.3;
}

.item-price {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--green-dark);
    text-align: center;
}

.item-price.single {
    text-align: right;
    padding-right: 4px;
    font-size: 0.92rem;
}

.item-price.dim {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-light);
}

.item-note {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-light);
    margin-top: -2px;
    padding-bottom: 4px;
}

/* ===========================
   Dual Section Layout
   =========================== */
.dual-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 420px) {
    .dual-section {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .dual-right {
        margin-top: 16px;
    }
}

/* ===========================
   Tea Grid
   =========================== */
.tea-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

@media (max-width: 420px) {
    .tea-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Extras Grid
   =========================== */
.extras-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0 8px;
}

@media (max-width: 420px) {
    .extras-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Page Dots
   =========================== */
.page-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(168, 213, 184, 0.3);
    cursor: pointer;
    transition: all 0.35s ease;
    padding: 0;
}

.dot.active {
    width: 28px;
    border-radius: 4px;
    background: var(--green-light);
    box-shadow: 0 0 12px rgba(93, 161, 118, 0.3);
}

/* ===========================
   Gallery Section
   =========================== */
.gallery-section {
    max-width: 520px;
    margin: 40px auto 0;
    padding: 0 12px;
}

.gallery-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gallery-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 3/4;
    box-shadow: var(--shadow-md);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

@media (max-width: 380px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-card {
        aspect-ratio: 4/3;
    }
}

/* ===========================
   Footer
   =========================== */
.footer {
    text-align: center;
    padding: 40px 20px 60px;
    margin-top: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.footer-logo {
    font-size: 1.4rem;
}

.footer-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--green-pale);
    letter-spacing: 1px;
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
}

.footer-links a:hover {
    color: var(--green-pale);
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 60px rgba(93, 161, 118, 0.2), 0 0 120px rgba(93, 161, 118, 0.1);
    }

    50% {
        box-shadow: 0 0 80px rgba(93, 161, 118, 0.3), 0 0 160px rgba(93, 161, 118, 0.15);
    }
}

/* ===========================
   Swipe Hint
   =========================== */
.swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 0 4px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.78rem;
    letter-spacing: 1px;
    animation: fadeIn 0.6s ease-out;
}

.swipe-hint svg {
    width: 16px;
    height: 16px;
}

/* ===========================
   Responsive Breakpoints
   =========================== */
@media (max-width: 380px) {
    .brand-name {
        font-size: 2.4rem;
    }

    .brand-tagline {
        font-size: 0.9rem;
        letter-spacing: 4px;
    }

    .logo-badge {
        width: 110px;
        height: 110px;
    }

    .section-title {
        font-size: 1.15rem;
    }

    .item-name {
        font-size: 0.84rem;
    }

    .item-price {
        font-size: 0.82rem;
    }

    .size-header {
        grid-template-columns: 1fr repeat(3, 52px);
    }

    .menu-item {
        grid-template-columns: 1fr repeat(3, 52px);
    }

    .page-content {
        padding: 24px 14px 28px;
    }

    .nav-pill {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

@media (min-width: 520px) {
    .menu-container {
        padding: 0 20px;
    }

    .gallery-section {
        padding: 0 20px;
    }

    .page-content {
        padding: 36px 28px 40px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .item-name {
        font-size: 1rem;
    }

    .item-price {
        font-size: 0.95rem;
    }
}

@media (min-width: 768px) {
    .brand-name {
        font-size: 3.6rem;
    }

    .brand-tagline {
        font-size: 1.3rem;
    }

    .logo-badge {
        width: 160px;
        height: 160px;
    }
}

/* ===========================
   Touch/Swipe area
   =========================== */
.menu-container {
    touch-action: pan-y;
}

/* Loading state smoothness */
.menu-page {
    will-change: transform, opacity;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}