/* ===============================================
   1-base.css - 基础层
   The Ulala Recipe - MVP v2.0
   
   职责：
   - CSS变量定义（颜色、间距、字号、阴影）
   - 基础Reset
   - Container容器
   - 通用工具类
   
   不包含：
   - 任何具体组件样式
   - 任何布局代码
   =============================================== */

/* ======================
   CSS Variables - 设计系统
   ====================== */
:root {
    /* === 颜色 - 极简绿灰系统 === */
    --green: #B4CF9E;
    --green-light: #E8F5E9;
    --green-dark: #8FB87A;
    
    --gray-900: #2c3e50;
    --gray-700: #666;
    --gray-500: #999;
    --gray-300: #ddd;
    --gray-100: #f5f5f5;
    
    --white: #fff;
    --bg-page: #fafafa;
    
    /* === 间距系统 === */
    --gap-xs: 12px;
    --gap-sm: 16px;
    --gap-md: 24px;
    --gap-lg: 40px;
    --gap-xl: 56px;
    --gap-2xl: 80px;
    
    /* === 字体系统 === */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 17px;    /* 日文舒适基准 */
    --text-lg: 18px;
    --text-xl: 24px;
    --text-2xl: 32px;
    --text-3xl: 40px;
    
    /* === 视觉效果 === */
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
    
    /* === 过渡 === */
    --transition: all 0.3s ease;
}

/* ======================
   Reset - 基础归零
   ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', 'M PLUS Rounded 1c', 'Hiragino Sans', sans-serif;
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--gray-900);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

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

ul, ol {
    list-style: none;
}

/* ======================
   Container - 页面容器
   ====================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 60px;
    }
}

/* ======================
   Typography - 通用文字样式
   ====================== */
.section-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--gap-lg);
    color: var(--gray-900);
    line-height: 1.3;
}

@media (min-width: 768px) {
    .section-title {
        font-size: var(--text-2xl);
    }
}

.section-subtitle {
    font-size: var(--text-base);
    color: var(--gray-700);
    margin-bottom: var(--gap-md);
    line-height: 1.7;
}

.section-intro {
    font-size: var(--text-sm);
    color: var(--gray-700);
    margin-bottom: var(--gap-md);
    line-height: 1.8;
    text-align: center;
}

/* ======================
   Dividers - 分隔线
   ====================== */
.divider {
    height: 1px;
    background: var(--gray-300);
    margin: var(--gap-xl) 0;
    border: none;
}

.divider-lg {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gray-300), transparent);
    margin: var(--gap-2xl) 0;
    border: none;
}

/* ======================
   Utilities - 通用工具类
   ====================== */

/* 文字对齐 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* 间距 */
.mt-sm { margin-top: var(--gap-sm); }
.mt-md { margin-top: var(--gap-md); }
.mt-lg { margin-top: var(--gap-lg); }
.mt-xl { margin-top: var(--gap-xl); }

.mb-sm { margin-bottom: var(--gap-sm); }
.mb-md { margin-bottom: var(--gap-md); }
.mb-lg { margin-bottom: var(--gap-lg); }
.mb-xl { margin-bottom: var(--gap-xl); }

/* 显示/隐藏 */
.hidden { display: none; }
.visible { display: block; }

/* 响应式显示 */
@media (max-width: 767px) {
    .hide-mobile { display: none; }
}

@media (min-width: 768px) {
    .hide-desktop { display: none; }
}

/* ======================
   Animations - 基础动画
   ====================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Mobile: 0-767px (default) */

/* Tablet: 768-1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --text-base: 18px;
    }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
    :root {
        --text-base: 18px;
        --text-2xl: 36px;
        --text-3xl: 48px;
    }
}

/* Very Small Mobile: 0-374px */
@media (max-width: 374px) {
    :root {
        --text-base: 16px;
        --text-xl: 20px;
        --text-2xl: 28px;
    }
    
    .container {
        padding: 0 20px;
    }
}

/* ======================
   Print Styles
   ====================== */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}
