/* ============================================
   汇照虹光电科技 - 公共样式
   ============================================ */

/* CSS变量 */
:root {
    --bg: #ffffff;
    --bg-secondary: #f5f6f8;
    --fg: #1a1a2e;
    --fg-muted: #6b7280;
    --accent: #b8860b;
    --accent-glow: rgba(184, 134, 11, 0.25);
    --accent-blue: #0077b6;
    --card: #ffffff;
    --card-hover: #f8f9fb;
    --border: #e0e3e8;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: var(--bg);
    color: var(--fg);
    overflow-x: hidden;
    line-height: 1.7;
}

.font-display {
    font-family: 'Cormorant Garamond', serif;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: #c0c4cc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* 渐入动画 */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ============================================
   导航栏样式
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    height: 42px;
    width: auto;
    transition: opacity 0.3s ease;
}

.logo-img:hover {
    opacity: 0.8;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* 桌面导航 */
.nav-menu {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
}

.nav-link {
    position: relative;
    padding: 0.5rem 0;
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--fg);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, #c49642 100%);
    color: var(--bg);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--accent-glow);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

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

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--fg);
}

.mobile-menu-link {
    font-size: 1.5rem;
    color: var(--fg);
    text-decoration: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease;
}

.mobile-menu.open .mobile-menu-link {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-link:nth-child(5) { transition-delay: 0.3s; }

/* ============================================
   Hero Banner 样式
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-banner {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Banner遮罩层 - 可在HTML内联样式中调整 */
.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 100%);
    z-index: 1;
}

.hero-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1280px;
    margin: 0 auto;
    padding: 8rem 1.5rem 4rem;
    width: 100%;
}

.hero-label {
    font-size: 0.875rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.hero-title .highlight {
    color: var(--fg-muted);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--fg-muted);
    max-width: 600px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* 页面Banner（非首页） */
.page-banner {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.page-banner .hero-banner::after {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 0%, var(--bg) 100%);
}

.page-banner .hero-content {
    padding-top: 6rem;
}

/* 滚动提示 */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--fg-muted);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    z-index: 10;
}

.scroll-hint-line {
    width: 1px;
    height: 3rem;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   按钮样式
   ============================================ */
.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent) 0%, #c49642 100%);
    color: var(--bg);
    font-weight: 500;
    text-decoration: none;
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--accent-glow);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: 1px solid var(--border);
    color: var(--fg);
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(184, 134, 11, 0.06);
}

/* ============================================
   卡片样式
   ============================================ */
.service-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    display: block;
    color: inherit;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    background: var(--card-hover);
    border-color: rgba(184, 134, 11, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.1), rgba(184, 134, 11, 0.05));
    border-radius: 4px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.2), rgba(184, 134, 11, 0.1));
    box-shadow: 0 0 30px var(--accent-glow);
}

.service-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.service-desc {
    color: var(--fg-muted);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* 案例卡片 */
.case-card {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.case-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-card:hover img {
    transform: scale(1.08);
}

.case-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 46, 0.85) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.case-card:hover .case-overlay {
    opacity: 1;
}

.case-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-card:hover .case-info {
    transform: translateY(0);
    opacity: 1;
}

.case-label {
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.case-title {
    font-size: 1.125rem;
    font-weight: 500;
}

/* ============================================
   统计数字
   ============================================ */
.stat-number {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--accent) 0%, #e8c97a 50%, var(--accent) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.stat-label {
    color: var(--fg-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ============================================
   分割线
   ============================================ */
.divider-line {
    width: 60px;
    height: 1px;
    background: var(--accent);
}

/* ============================================
   Section通用样式
   ============================================ */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    font-size: 0.875rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.section-divider {
    width: 60px;
    height: 1px;
    background: var(--accent);
    margin: 0 auto;
}

/* ============================================
   Footer样式
   ============================================ */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    height: 32px;
    width: auto;
}

.footer-company {
    font-weight: 500;
}

.footer-copyright {
    color: var(--fg-muted);
    font-size: 0.875rem;
}
.footer-copyright a{
    color: var(--fg-muted);
}
.footer-copyright a:hover {
    color: var(--accent);
}

/* ============================================
   表单样式
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--fg);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--fg-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   其他通用组件
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(1, 1fr); }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.grid-4 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.contact-value {
    color: var(--fg-muted);
    font-size: 0.875rem;
}

.advantage-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.advantage-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-align: center;
}

.advantage-desc {
    color: var(--fg-muted);
    font-size: 0.875rem;
    text-align: center;
}

/* 时间线 */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    transform: translateX(-50%);
}

.timeline-year {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-desc {
    color: var(--fg-muted);
    font-size: 0.875rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .stat-number {
        animation: none;
    }

    .scroll-hint-line {
        animation: none;
    }
}
