/* ============================================
   TYTI Metal - Single Page Website
   Deep Blue theme
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #0a1530;
    --color-bg-2: #0d1c40;
    --color-bg-3: #10224a;
    --color-card: #ffffff;
    --color-border: rgba(120, 160, 240, 0.15);
    --color-text: #1a2744;
    --color-text-2: #4a5d80;
    --color-text-3: #8a98b8;
    --color-text-on-dark: #e8eef8;
    --color-text-on-dark-2: #a0b4d8;
    --color-text-on-dark-3: #6a7faa;
    --color-primary: #4a90e2;
    --color-primary-2: #6bb0ff;
    --color-accent: #ff8c42;
    --color-accent-2: #ffa368;
    --color-gold: #f0c050;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-cn: 'Noto Serif SC', 'Songti SC', 'STSong', '宋体', serif;
    --font-cn-sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-slogan: 'Brush Script MT', 'KaiTi', '楷体', 'STKaiti', cursive;
    --container-w: 1280px;
    --header-h: 96px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text-on-dark);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Background ambient effects
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 20%, rgba(74, 144, 226, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(107, 176, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 140, 66, 0.04) 0%, transparent 50%);
    z-index: -2;
    pointer-events: none;
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-5%, 3%); }
}

/* Grid pattern removed */

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

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 0 32px;
}

/* ============================================
   Header / Top Bar
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 8px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 2px 20px rgba(10, 21, 48, 0.12);
    border-bottom: 1px solid rgba(120, 160, 240, 0.2);
    transition: all 0.3s ease;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 0px;
    flex-shrink: 0;
}

.brand-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-names {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-name-en {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #1a2744;
    line-height: 1.2;
}

.brand-name-cn {
    font-family: var(--font-cn);
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5d80;
    letter-spacing: 2px;
    line-height: 1.2;
}

.slogan-art {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    border-left: 2px solid rgba(120, 160, 240, 0.3);
    border-right: 2px solid rgba(120, 160, 240, 0.3);
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.slogan-cn {
    font-family: var(--font-cn);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 4px;
    background: linear-gradient(120deg, #2d6dc4 0%, #ff8c42 50%, #2d6dc4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 100%;
    animation: shimmer 6s linear infinite;
    white-space: nowrap;
}

.slogan-en {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #2d6dc4 0%, #ff8c42 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

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

.lang-switch {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(120, 160, 240, 0.1);
    border: 1px solid rgba(120, 160, 240, 0.25);
    border-radius: 100px;
    flex-shrink: 0;
}

.lang-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    color: var(--color-text-2);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-2) 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(74, 144, 226, 0.35);
}

.lang-btn:not(.active):hover {
    color: var(--color-text);
    background: rgba(120, 160, 240, 0.12);
}

/* ============================================
   Hero / Main content
   ============================================ */
.hero {
    min-height: 100vh;
    padding: calc(var(--header-h) + 40px) 0 80px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/world-map.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    width: 100%;
    text-align: center;
    max-width: 1080px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1.5px solid rgba(120, 160, 240, 0.25);
    border-radius: 100px;
    background: rgba(120, 160, 240, 0.06);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-primary-2);
    margin-bottom: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.hero-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 12px var(--color-accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.statement {
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease 0.2s forwards;
}

.statement-primary {
    font-family: var(--font-cn);
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    line-height: 1.9;
    font-weight: 600;
    color: var(--color-text-on-dark);
    letter-spacing: 1.5px;
    margin-bottom: 0;
    text-align: center;
}

.statement-primary-en {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    line-height: 1.7;
    font-weight: 600;
    color: var(--color-text-on-dark);
    letter-spacing: 0.3px;
    text-align: center;
}

.statement-primary .highlight,
.statement-primary-en .highlight {
    background: linear-gradient(120deg, var(--color-primary-2) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.statement-secondary {
    font-family: var(--font-cn);
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    line-height: 1.9;
    font-weight: 500;
    color: var(--color-text-on-dark-2);
    letter-spacing: 1px;
    text-align: center;
    margin-top: 24px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease 0.5s forwards;
}

.statement-secondary-en {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    line-height: 1.7;
    font-weight: 500;
    color: var(--color-text-on-dark-2);
    letter-spacing: 0.3px;
    text-align: center;
    font-style: italic;
    margin-top: 24px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease 0.5s forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-on-dark-3);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp 1s ease 1s forwards, bounce 2s ease-in-out 2s infinite;
}

.scroll-hint .arrow {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, transparent, var(--color-text-on-dark-3));
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

/* ============================================
   Products Section
   ============================================ */
.products {
    padding: 100px 0 120px;
    position: relative;
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 8px;
    background: linear-gradient(120deg, #ffffff 0%, #6bb0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title-cn {
    font-family: var(--font-cn);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--color-text-on-dark-2);
    letter-spacing: 4px;
}

.section-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    margin: 24px auto 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.product-card {
    position: relative;
    background: var(--color-card);
    border: 1px solid rgba(120, 160, 240, 0.15);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* CSS fallback: show cards even if JS fails completely */
@keyframes fallbackShow {
    to { opacity: 1; transform: translateY(0); }
}
.product-card:not(.visible) {
    animation: fallbackShow 0.6s ease 2.5s forwards;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.04) 0%, rgba(255, 140, 66, 0.04) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(120, 160, 240, 0.3);
    box-shadow:
        0 20px 60px -20px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(120, 160, 240, 0.12);
}

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

.product-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f0f4fa;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(120, 160, 240, 0.15);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px 24px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.product-info-main {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
    margin-bottom: 4px;
}

.product-name-cn {
    font-family: var(--font-cn);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-2);
    letter-spacing: 2px;
}

.product-num {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.35;
    flex-shrink: 0;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: 80px 0 100px;
    position: relative;
}

.contact-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-card);
    border: 1px solid rgba(120, 160, 240, 0.15);
    border-radius: 24px;
    padding: 60px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(74, 144, 226, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.contact-rows {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 32px;
    position: relative;
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: rgba(74, 144, 226, 0.04);
    border: 1px solid rgba(120, 160, 240, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-row:hover {
    border-color: rgba(120, 160, 240, 0.3);
    background: rgba(74, 144, 226, 0.08);
    transform: translateY(-2px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.25);
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-text {
    text-align: left;
    min-width: 0;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-3);
    margin-bottom: 4px;
}

.contact-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    word-break: break-word;
}

.contact-value a {
    color: var(--color-primary);
    transition: color 0.3s ease;
}

.contact-value a:hover {
    color: var(--color-accent);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    padding: 32px 0;
    border-top: 1px solid rgba(120, 160, 240, 0.1);
    text-align: center;
    color: var(--color-text-on-dark-3);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: rgba(10, 21, 48, 0.6);
}

.site-footer .footer-cn {
    margin-top: 4px;
    color: var(--color-text-on-dark-3);
    font-family: var(--font-cn);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .header-row {
        flex-wrap: wrap;
    }
    .slogan-art {
        order: 3;
        width: 100%;
        padding: 12px 0 0;
        border-left: none;
        border-right: none;
        border-top: 1px solid rgba(120, 160, 240, 0.12);
        margin-top: 12px;
        flex-direction: column;
        gap: 6px;
    }
    .slogan-cn, .slogan-en {
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 768px) {
    :root {
        --header-h: 72px;
    }
    .container {
        padding: 0 20px;
    }
    .site-header {
        padding: 10px 0;
    }
    .brand-logo {
        height: 56px;
    }
    .brand-name-en {
        font-size: 0.95rem;
    }
    .brand-name-cn {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
    .slogan-cn {
        font-size: 0.95rem;
        letter-spacing: 2px;
    }
    .slogan-en {
        font-size: 0.85rem;
    }
    .lang-btn {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    .hero {
        padding: calc(var(--header-h) + 20px) 0 60px;
    }
    .hero-eyebrow {
        font-size: 0.7rem;
        letter-spacing: 1.5px;
        padding: 6px 16px;
    }
    .statement-primary {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    .statement-primary-en {
        font-size: 1.15rem;
    }
    .statement-secondary,
    .statement-secondary-en {
        font-size: 1rem;
        margin-top: 16px;
    }
    .products {
        padding: 60px 0 80px;
    }
    .product-grid {
        gap: 20px;
    }
    .product-name {
        font-size: 1.2rem;
    }
    .product-num {
        font-size: 2rem;
    }
    .contact {
        padding: 60px 0 80px;
    }
    .contact-card {
        padding: 40px 24px;
        border-radius: 16px;
    }
    .contact-row {
        padding: 16px;
        gap: 12px;
    }
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    .contact-icon svg {
        width: 20px;
        height: 20px;
    }
    .contact-value {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .product-info {
        padding: 16px 20px 20px;
    }
}
