/* ========================================
   DAOMATCHA - Mobile Web App Styles
   ======================================== */

/* CSS Variables - Brand Colors */
:root {
    --color-dark-green: #6D832D;
    --color-light-green: #859C33;
    --color-cream: #F4F4ED;
    --color-white: #FFFFFF;
    --color-black: #1a1a1a;
    
    /* Gradients */
    --gradient-matcha: linear-gradient(135deg, #859C33 0%, #6D832D 100%);
    --gradient-matcha-soft: linear-gradient(180deg, #859C33 0%, #6D832D 50%, #5a7025 100%);
    
    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(109, 131, 45, 0.15);
    --shadow-medium: 0 8px 32px rgba(109, 131, 45, 0.2);
    --shadow-strong: 0 12px 40px rgba(109, 131, 45, 0.3);
    
    /* Typography */
    --font-main: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 50%;
}

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-dark-green);
    color: var(--color-white);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden {
    display: none !important;
}

/* ========================================
   Splash Screen
   ======================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1000;
    margin: 0;
    padding: 0;
    background-image: url('../assets/preview-logo.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #859C33;
    overflow: hidden;
    transition: opacity 0.6s ease;
    animation: splashZoom 3s ease-out forwards;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

@keyframes splashZoom {
    0% {
        background-size: cover;
        transform: scale(1);
    }
    100% {
        background-size: cover;
        transform: scale(1.05);
    }
}

/* ========================================
   Main Menu
   ======================================== */
.main-menu {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-lg);
    padding-top: calc(env(safe-area-inset-top) + var(--spacing-lg));
    padding-bottom: calc(env(safe-area-inset-bottom) + var(--spacing-lg));
    animation: menuAppear 0.8s ease-out forwards;
}

@keyframes menuAppear {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Background */
.menu-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.matcha-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-matcha-soft);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.matcha-texture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0,0,0,0.1) 0%, transparent 60%);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Floating Leaves */
.floating-leaves {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.leaf {
    position: absolute;
    font-size: 24px;
    opacity: 0.4;
    animation: floatLeaf 20s linear infinite;
}

.leaf-1 { left: 10%; animation-delay: 0s; }
.leaf-2 { left: 30%; animation-delay: -5s; }
.leaf-3 { left: 60%; animation-delay: -10s; }
.leaf-4 { left: 85%; animation-delay: -15s; }

@keyframes floatLeaf {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ========================================
   Header
   ======================================== */
.menu-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-top: var(--spacing-md);
}

.enso-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
}

.enso-svg {
    width: 100%;
    height: 100%;
}

.enso-path {
    fill: none;
    stroke: var(--color-white);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 251;
    stroke-dashoffset: 251;
    animation: drawEnso 2s ease-out forwards;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

@keyframes drawEnso {
    to {
        stroke-dashoffset: 0;
    }
}

.brand-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: titleAppear 0.8s ease-out 0.3s both;
}

@keyframes titleAppear {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-tagline {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: var(--spacing-xs);
    animation: titleAppear 0.8s ease-out 0.5s both;
}

/* ========================================
   Menu Navigation
   ======================================== */
.menu-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    flex: 1;
}

.menu-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--color-white);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    animation: btnAppear 0.6s ease-out both;
}

.menu-btn:nth-child(1) { animation-delay: 0.4s; }
.menu-btn:nth-child(2) { animation-delay: 0.5s; }
.menu-btn:nth-child(3) { animation-delay: 0.6s; }
.menu-btn:nth-child(4) { animation-delay: 0.7s; }
.menu-btn:nth-child(5) { animation-delay: 0.8s; }

@keyframes btnAppear {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-btn:hover,
.menu-btn:focus {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(8px);
    box-shadow: var(--shadow-medium);
}

.menu-btn:active {
    transform: translateX(4px) scale(0.98);
    background: rgba(255, 255, 255, 0.28);
}

/* Button Icon */
.btn-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.btn-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-white);
}

.menu-btn:hover .btn-icon {
    background: var(--color-white);
}

.menu-btn:hover .btn-icon svg {
    stroke: var(--color-dark-green);
}

/* Button Content */
.btn-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btn-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.3px;
}

/* Button Arrow */
.btn-arrow {
    font-size: 1.25rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.menu-btn:hover .btn-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ========================================
   Footer
   ======================================== */
.menu-footer {
    text-align: center;
    padding-top: var(--spacing-lg);
    margin-top: auto;
}

.menu-footer p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (min-width: 390px) {
    .brand-title {
        font-size: 2.25rem;
        letter-spacing: 5px;
    }
    
    .splash-logo {
        max-width: 340px;
    }
}

@media (min-width: 430px) {
    .brand-title {
        font-size: 2.5rem;
        letter-spacing: 6px;
    }
    
    .menu-btn {
        padding: var(--spacing-lg);
    }
    
    .btn-icon {
        width: 52px;
        height: 52px;
    }
}

/* Landscape orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .splash-logo {
        max-width: 200px;
    }
    
    .menu-header {
        margin-bottom: var(--spacing-md);
    }
    
    .enso-circle {
        width: 50px;
        height: 50px;
    }
    
    .brand-title {
        font-size: 1.5rem;
    }
    
    .menu-btn {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.menu-btn:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}

