/* ========================================
   妍雅品牌设计建站 - 侘寂风全局样式
   配色：麻灰 #B8A99A, 土黄 #C4A777, 浅棕 #A68B6C
   ======================================== */

/* CSS Reset & 基础设置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #B8A99A;
    --color-bg-light: #D4C5B9;
    --color-primary: #C4A777;
    --color-secondary: #A68B6C;
    --color-text: #5C4D3C;
    --color-text-light: #8B7D6B;
    --color-white: #F5F1ED;
    
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 40px;
    
    --shadow-soft: 0 4px 20px rgba(92, 77, 60, 0.08);
    --shadow-medium: 0 8px 40px rgba(92, 77, 60, 0.12);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./images/texture.jpg');
    background-size: 400px;
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ========================================
   导航栏样式 - 椭圆形悬浮设计
   ======================================== */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1200px;
    background: rgba(184, 169, 154, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 1rem 2rem;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-normal);
    border: 1px solid rgba(196, 167, 119, 0.2);
}

.navbar.scrolled {
    top: 10px;
    width: calc(100% - 20px);
    background: rgba(184, 169, 154, 0.98);
    box-shadow: var(--shadow-medium);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand img {
    height: 40px;
    border-radius: 8px;
}

.navbar-brand span {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 2px;
}

.navbar-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.navbar-nav a {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.95rem;
    color: var(--color-text);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.navbar-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
    border-radius: 25px;
}

.navbar-nav a:hover::before {
    opacity: 0.15;
}

.navbar-nav a:hover {
    color: var(--color-text);
}

.navbar-nav a.active {
    background: var(--color-primary);
    color: var(--color-white);
}

/* 移动端汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-fast);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========================================
   页脚样式 - 椭圆形底部设计
   ======================================== */
.footer {
    background: var(--color-text);
    color: var(--color-white);
    padding: 4rem 2rem 2rem;
    margin-top: 6rem;
    border-radius: 40px 40px 0 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    opacity: 0.05;
    pointer-events: none;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.footer-section p,
.footer-section a {
    color: var(--color-bg-light);
    line-height: 2;
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: var(--color-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 197, 185, 0.2);
    text-align: center;
    color: var(--color-bg-light);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* ========================================
   通用布局组件 - 椭圆形错落布局
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--color-text);
    margin-bottom: 1rem;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.section-title p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* 椭圆形卡片布局 */
.ellipse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
}

.ellipse-card {
    background: var(--color-bg-light);
    border-radius: 30px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(196, 167, 119, 0.1);
}

.ellipse-card:nth-child(odd) {
    border-radius: 40px 20px 40px 20px;
}

.ellipse-card:nth-child(even) {
    border-radius: 20px 40px 20px 40px;
}

.ellipse-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.ellipse-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

.ellipse-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.ellipse-card p {
    color: var(--color-text-light);
    line-height: 1.8;
}

/* ========================================
   Hero Banner - 全屏椭圆形设计
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 2rem 4rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, var(--color-primary) 0%, transparent 70%);
    opacity: 0.15;
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(ellipse, var(--color-secondary) 0%, transparent 70%);
    opacity: 0.1;
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -50px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 30px) rotate(240deg);
    }
}

.hero-content {
    text-align: center;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    letter-spacing: 5px;
    line-height: 1.2;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    line-height: 2;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   按钮样式
   ======================================== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-secondary);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(196, 167, 119, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-text);
    color: var(--color-white);
    transform: translateY(-3px);
}

/* ========================================
   滚动渐入动画
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        top: 10px;
        width: calc(100% - 20px);
        padding: 0.8rem 1.5rem;
    }
    
    .navbar-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--color-bg);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateY(-150%);
        opacity: 0;
        transition: all var(--transition-normal);
        border-radius: 0 0 30px 30px;
        box-shadow: var(--shadow-medium);
    }
    
    .navbar-nav.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero {
        padding: 100px 1.5rem 3rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .ellipse-grid {
        grid-template-columns: 1fr;
    }
    
    .footer {
        padding: 3rem 1.5rem 1.5rem;
        border-radius: 30px 30px 0 0;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
}
