/* ===== CSS Variables ===== */
:root {
    --color-bg: #0a0a0f;
    --color-bg-secondary: #12121a;
    --color-bg-card: #1a1a24;
    --color-bg-card-hover: #222230;
    --color-border: #2a2a3a;
    --color-border-light: #3a3a4a;

    --color-text: #ffffff;
    --color-text-secondary: #a0a0b0;
    --color-text-muted: #6a6a7a;

    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;

    --color-accent: #22d3ee;
    --color-accent-secondary: #a78bfa;

    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    --gradient-text: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-accent) 50%, var(--color-accent-secondary) 100%);

    --font-primary: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea {
    font-family: inherit;
}

/* ===== Utility Classes ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border-light);
}

.btn-secondary:hover {
    background: var(--color-bg-card);
    border-color: var(--color-primary);
}

.btn-full {
    width: 100%;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
}

.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav-menu a:hover {
    color: var(--color-text);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-base);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black, transparent);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    top: -200px;
    right: -200px;
    opacity: 0.15;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: var(--color-accent);
    bottom: -100px;
    left: -100px;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 12px;
    animation: float 2s ease-in-out infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--color-text-muted);
    border-bottom: 2px solid var(--color-text-muted);
    transform: rotate(45deg);
}

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

/* ===== Section Common ===== */
section {
    padding: 100px 0;
}

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

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary-light);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 18px;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Services Section ===== */
.services {
    background: var(--color-bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-base);
}

.service-card:hover {
    background: var(--color-bg-card-hover);
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.service-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary-light);
}

.service-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* ===== Products Section ===== */
.products-showcase {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.product-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 48px;
    transition: all var(--transition-base);
}

.product-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.product-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-screen {
    width: 100%;
    max-width: 320px;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.mockup-header {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

.mockup-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-border-light);
}

.mockup-header .dot:first-child { background: #ff5f57; }
.mockup-header .dot:nth-child(2) { background: #febc2e; }
.mockup-header .dot:nth-child(3) { background: #28c840; }

.mockup-content {
    padding: 40px;
    text-align: center;
}

.recipe-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.recipe-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.recipe-lines .line {
    height: 8px;
    width: 80%;
    background: var(--color-border);
    border-radius: var(--radius-full);
}

.recipe-lines .line.short {
    width: 50%;
}

.product-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-accent);
    background: rgba(34, 211, 238, 0.1);
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.product-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.product-desc {
    color: var(--color-text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.product-features {
    list-style: none;
    margin-bottom: 32px;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--color-text-secondary);
    font-size: 15px;
}

.product-features svg {
    width: 18px;
    height: 18px;
    color: var(--color-accent);
    flex-shrink: 0;
}

/* ===== About Section ===== */
.about {
    background: var(--color-bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text .section-tag {
    margin-bottom: 16px;
}

.about-text .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.about-desc {
    color: var(--color-text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-stats {
    display: flex;
    gap: 48px;
    margin-top: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 40px;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-muted);
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.core-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    box-shadow: var(--shadow-glow);
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    animation: float-card 3s ease-in-out infinite;
}

.floating-card svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary-light);
}

.card-1 {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.card-2 {
    bottom: 40px;
    left: 0;
    animation-delay: 1s;
}

.card-3 {
    bottom: 40px;
    right: 0;
    animation-delay: 2s;
}

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

.card-1 {
    animation-name: float-card-center;
}

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

/* ===== Contact Section ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary-light);
}

.contact-detail h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-detail p,
.contact-detail a {
    color: var(--color-text-secondary);
    font-size: 15px;
}

.contact-detail a:hover {
    color: var(--color-primary-light);
}

.contact-form {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

/* ===== Footer ===== */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 30px;
}

.footer-brand p {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-top: 8px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary-light);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    color: var(--color-text-muted);
    font-size: 13px;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-text .section-title {
        text-align: center;
    }

    .about-text {
        text-align: center;
    }

    .about-stats {
        justify-content: center;
    }

    .product-card {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-bg-secondary);
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        padding: 40px;
        transition: right var(--transition-base);
        border-left: 1px solid var(--color-border);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

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

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

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

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        flex-wrap: wrap;
        gap: 32px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .product-card {
        padding: 32px 24px;
    }

    .visual-container {
        transform: scale(0.8);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    section {
        padding: 80px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .service-card {
        padding: 24px;
    }

    .contact-form {
        padding: 24px;
    }

    .about-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 32px;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== Form Success State ===== */
.form-success {
    text-align: center;
    padding: 40px;
}

.form-success svg {
    width: 64px;
    height: 64px;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.form-success h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.form-success p {
    color: var(--color-text-secondary);
}
