/* ============================================
   拾玖空间设计工作室 - 官网样式
   风格：暗黑画廊 + 东方禅意 + 极简质感
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --bg-light: #141414;
    --bg-lighter: #1a1a1a;
    --text: #e8e4de;
    --text-secondary: #9a958f;
    --text-tertiary: #666666;
    --accent: #c8b4a0;
    --accent-light: #d4c5b0;
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    
    --font-cn: 'Noto Serif SC', 'PingFang SC', 'Microsoft YaHei', serif;
    --font-cn-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-en: 'Cormorant Garamond', 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
    
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-cn);
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-weight: 300;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
}

::selection {
    background: rgba(200, 180, 160, 0.3);
}

/* ============ Loading ============ */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg);
    transition: opacity 0.8s var(--ease), visibility 0.8s var(--ease);
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo {
    font-family: var(--font-cn);
    font-size: 2rem;
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.loader-en {
    font-family: var(--font-en);
    font-style: italic;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--text-tertiary);
    margin-bottom: 2rem;
}

.loader-bar {
    width: 120px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    animation: loadBar 1.8s var(--ease) forwards;
}

@keyframes loadBar {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ============ Progress Bar ============ */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #fff);
    z-index: 2000;
    transition: width 0.1s linear;
}

/* ============ Navigation ============ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.5s var(--ease);
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    filter: invert(1) brightness(0.95);
}

.nav.scrolled .nav-logo-img {
    height: 32px;
}

.nav-menu {
    display: flex;
    gap: 36px;
}

.nav-menu a {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.1em;
    opacity: 0.7;
    transition: opacity 0.3s var(--ease);
    position: relative;
    padding-bottom: 4px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease);
}

.nav-menu a:hover {
    opacity: 1;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s ease;
}

/* ============ Hero ============ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    animation: heroZoom 20s var(--ease) forwards;
}

@keyframes heroZoom {
    to { transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 10, 0.4) 0%,
        rgba(10, 10, 10, 0.2) 40%,
        rgba(10, 10, 10, 0.6) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-subtitle {
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2rem;
    font-family: var(--font-sans);
}

.hero-title {
    font-family: var(--font-cn);
    font-size: clamp(3rem, 9vw, 7rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
}

.hero-title-en {
    font-family: var(--font-en);
    font-style: italic;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.hero-desc {
    font-size: 1rem;
    font-weight: 300;
    color: rgba(232, 228, 222, 0.7);
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
}

.hero-btn {
    display: inline-block;
    border: 1px solid rgba(232, 228, 222, 0.3);
    padding: 0.85rem 3rem;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    transition: all 0.4s var(--ease);
    color: var(--text);
    font-family: var(--font-sans);
}

.hero-btn:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
}

.hero-scroll span {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: rgba(232, 228, 222, 0.4);
    margin-bottom: 0.5rem;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: rgba(232, 228, 222, 0.2);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* ============ Section Common ============ */
.section {
    padding: 140px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-label {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-family: var(--font-sans);
}

.section-title {
    font-family: var(--font-cn);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============ About / Philosophy ============ */
.about-section {
    background: var(--bg-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    position: relative;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    background: #111;
    filter: grayscale(20%);
    transition: transform 0.8s var(--ease), filter 0.8s var(--ease);
}

.about-image:hover img {
    transform: scale(1.03);
    filter: grayscale(0%);
}

.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--accent);
    margin: 20px;
    pointer-events: none;
    opacity: 0.3;
}

.about-content {
    padding: 40px 0;
}

.about-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.label-num {
    font-family: var(--font-en);
    font-size: 1rem;
    font-style: italic;
    color: var(--accent);
    letter-spacing: 0.1em;
}

.label-line {
    width: 40px;
    height: 1px;
    background: var(--accent);
}

.about-title {
    font-family: var(--font-cn);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
}

.about-title em {
    font-style: normal;
    color: var(--accent);
    font-family: var(--font-en);
    font-weight: 300;
    font-size: 2rem;
}

.about-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 2;
}

.years-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin: 20px 0 30px;
    padding: 16px 32px;
    border: 1px solid var(--border-light);
}

.years-badge .num {
    font-family: var(--font-en);
    font-size: 3rem;
    font-weight: 300;
    color: var(--accent);
    line-height: 1;
}

.years-badge .unit {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

.designer-title {
    font-size: 0.9rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    margin-bottom: 20px;
}

/* ============ Works Grid ============ */
.works-section {
    padding-bottom: 140px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.work-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    display: block;
}

.work-item-wide {
    grid-column: span 2;
    aspect-ratio: 16/7;
}

.work-item-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 1.2s var(--ease), filter 0.6s var(--ease);
    filter: brightness(0.8);
}

.work-item:hover .work-item-img {
    transform: scale(1.05);
    filter: brightness(0.6);
}

.work-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 10, 10, 0.8) 0%,
        rgba(10, 10, 10, 0.2) 50%,
        transparent 100%
    );
    z-index: 1;
    opacity: 0.7;
    transition: opacity 0.4s var(--ease);
}

.work-item:hover .work-item-overlay {
    opacity: 1;
}

.work-info {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    z-index: 2;
    transition: transform 0.6s var(--ease);
}

.work-item:hover .work-info {
    transform: translateY(-8px);
}

.work-tag {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    padding: 4px 12px;
    border: 1px solid rgba(200, 180, 160, 0.3);
    font-family: var(--font-sans);
}

.work-info h3 {
    font-family: var(--font-cn);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.work-info p {
    font-family: var(--font-en);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.work-arrow {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s var(--ease);
    background: rgba(0, 0, 0, 0.2);
}

.work-item:hover .work-arrow {
    opacity: 1;
    transform: translateY(0);
}

.work-arrow svg {
    width: 16px;
    height: 16px;
    stroke: var(--text);
}

/* ============ Awards ============ */
.awards-section {
    background: var(--bg-light);
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--border);
}

.award-item {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 28px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s var(--ease);
}

.award-item:hover {
    background: rgba(200, 180, 160, 0.03);
}

.award-year {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent);
    min-width: 70px;
    letter-spacing: 0.05em;
}

.award-content h4 {
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.award-content p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

/* ============ Services / Qualifications ============ */
.qualifications-section {
    padding: 140px 0;
}

.qual-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.qual-card {
    padding: 40px 30px;
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease);
    text-align: center;
}

.qual-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.qual-icon {
    font-family: var(--font-en);
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 300;
}

.qual-card h4 {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.qual-card p {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    letter-spacing: 0.05em;
}

/* ============ Contact ============ */
.contact-section {
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info h3 {
    font-family: var(--font-cn);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.contact-info .sub {
    font-family: var(--font-en);
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1rem;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-item-label {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    min-width: 80px;
    padding-top: 2px;
    text-transform: uppercase;
    font-family: var(--font-sans);
}

.contact-item-value {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.6;
}

.contact-form-wrap {
    padding: 40px;
    border: 1px solid var(--border);
    background: var(--bg-light);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-light);
    padding: 10px 0;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-submit {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: var(--bg);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 0.3s var(--ease);
    font-family: var(--font-sans);
}

.form-submit:hover {
    background: var(--accent-light);
}

/* ============ Footer ============ */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
}

.footer-brand {
    font-family: var(--font-en);
    font-style: italic;
    color: var(--accent);
}

/* ============ Reveal Animation ============ */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .about-image img {
        height: 450px;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .work-item-wide {
        grid-column: span 1;
        aspect-ratio: 4/3;
    }

    .qual-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .awards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .section {
        padding: 80px 0;
    }

    .section-header {
        margin-bottom: 50px;
    }

    .qual-grid {
        grid-template-columns: 1fr;
    }

    .work-info {
        bottom: 24px;
        left: 24px;
        right: 24px;
    }

    .work-info h3 {
        font-size: 1.2rem;
    }

    .about-title {
        font-size: 1.8rem;
    }

    .hero-title {
        letter-spacing: 0.1em;
    }
}
