/* ============================================
   JPin 宅拼空間設計 - Stylesheet
   ============================================ */

/* Variables */
:root {
    --gold: #C9A96E;
    --gold-light: #E8D4B0;
    --dark: #1A1A1A;
    --white: #FFFFFF;
    --gray-light: #F7F6F4;
    --gray-mid: #888888;
    --gray-border: #E0DDD8;
    --font: 'Noto Sans TC', sans-serif;
    --transition: all 0.3s ease;
    --max-width: 1160px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--dark);
    background: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.6rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.07);
    padding: 1rem 3rem;
}

/* Logo */
.logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
    gap: 3px;
}

.logo-main {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--gold);
    transition: var(--transition);
}

.navbar:not(.scrolled) .logo-main {
    color: var(--white);
}

.logo-sub {
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--gold-light);
    transition: var(--transition);
}

.navbar.scrolled .logo-sub {
    color: var(--gray-mid);
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 2.8rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
}

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

.nav-links a:hover {
    color: var(--gold);
}

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

.navbar.scrolled .nav-links a {
    color: var(--dark);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

.navbar.scrolled .hamburger span {
    background: var(--dark);
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

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

/* ============================================
   Hero
   ============================================ */
.hero {
    height: 100vh;
    min-height: 620px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(145deg, #1C120C 0%, #2D1E14 45%, #1A1A1A 100%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('../images/hero-bg.jpg') center / cover no-repeat;
    opacity: 0.22;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 1.5rem;
    max-width: 720px;
}

.hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 300;
    letter-spacing: 6px;
    color: var(--gold-light);
    margin-bottom: 1.6rem;
    opacity: 0.9;
}

.hero-title {
    font-size: clamp(3rem, 7.5vw, 5.2rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1.6rem;
    letter-spacing: 3px;
}

.hero-divider {
    width: 50px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto 1.6rem;
}

.hero-sub {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 2px;
    margin-bottom: 2.8rem;
    line-height: 2.2;
}

.hero-sub-sm {
    display: block;
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
}

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.hero-scroll-hint span {
    display: block;
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--gold));
    margin: 0 auto;
    animation: scrollHint 2s ease-in-out infinite;
}

@keyframes scrollHint {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.95rem 2.4rem;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    border-radius: 0;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gold);
    color: var(--dark);
    border-color: var(--gold);
}

.btn-primary:hover {
    background: transparent;
    color: var(--gold);
}

.btn-outline {
    background: transparent;
    color: var(--dark);
    border-color: var(--dark);
}

.btn-outline:hover {
    background: var(--dark);
    color: var(--white);
}

.btn-facebook {
    background: #1877F2;
    color: var(--white);
    border-color: #1877F2;
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.btn-facebook:hover {
    background: #1465D5;
    border-color: #1465D5;
}

.btn-line {
    background: #06C755;
    color: var(--white);
    border-color: #06C755;
    width: 100%;
    text-align: center;
}

.btn-line:hover {
    background: #05AF4A;
    border-color: #05AF4A;
}

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

.section-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 6px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3.5rem;
    letter-spacing: 1px;
}

/* ============================================
   About
   ============================================ */
.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.about-text p {
    color: #666;
    margin-bottom: 1.3rem;
    font-size: 0.95rem;
    line-height: 2;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.feature-icon {
    color: var(--gold);
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 4px;
    line-height: 1.7;
}

.feature h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    letter-spacing: 1.5px;
}

.feature p {
    font-size: 0.85rem;
    color: var(--gray-mid);
    line-height: 1.7;
}

/* ============================================
   Services
   ============================================ */
.services {
    background: var(--gray-light);
}

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

.service-card {
    background: var(--white);
    padding: 3rem 2.2rem;
    text-align: center;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.service-card:hover {
    border-bottom-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.07);
}

.service-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 1.8rem;
    color: var(--gold);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 1.1rem;
    letter-spacing: 2.5px;
}

.service-card p {
    font-size: 0.85rem;
    color: var(--gray-mid);
    line-height: 1.9;
}

/* ============================================
   Portfolio
   ============================================ */
.portfolio {
    background: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 3rem;
}

.portfolio-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover img {
    transform: scale(1.06);
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #EAE6E1 0%, #D8D3CD 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.portfolio-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(201,169,110,0.08) 0%, transparent 60%);
}

.portfolio-placeholder:hover {
    background: linear-gradient(135deg, #DDD8D2 0%, #C9C4BE 100%);
}

.portfolio-placeholder span {
    font-size: 0.72rem;
    letter-spacing: 3px;
    color: #AAA;
    position: relative;
}

.portfolio-cta {
    text-align: center;
}

/* ============================================
   Contact
   ============================================ */
.contact {
    background: var(--gray-light);
}

.contact-subtitle {
    font-size: 0.95rem;
    color: var(--gray-mid);
    max-width: 580px;
    margin-bottom: 3.5rem;
    line-height: 1.9;
}

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

.contact-card {
    background: var(--white);
    padding: 2.8rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.3rem;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-card h3 {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.contact-card p {
    font-size: 0.85rem;
    color: var(--gray-mid);
    line-height: 1.8;
}

/* QR Code placeholder */
.qr-placeholder {
    width: 130px;
    height: 130px;
    margin: 0.5rem auto;
}

.qr-box {
    width: 100%;
    height: 100%;
    border: 2px dashed var(--gray-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #CCC;
}

.qr-box p {
    font-size: 0.7rem !important;
    letter-spacing: 1px;
    color: #CCC !important;
}

/* Contact note */
.contact-note {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: auto;
}

.contact-note p {
    font-size: 0.82rem !important;
    color: var(--gold) !important;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.45);
    padding: 3.5rem 2rem;
    text-align: center;
}

.footer-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 7px;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.72rem;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1.5rem;
}

.footer p {
    font-size: 0.78rem;
    letter-spacing: 1px;
    margin-bottom: 0.6rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
    letter-spacing: 1px;
}

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

.footer-links span {
    color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Responsive - Tablet
   ============================================ */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

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

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
    section {
        padding: 70px 0;
    }

    .navbar {
        padding: 1.2rem 1.5rem;
    }

    .navbar.scrolled {
        padding: 0.9rem 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 72%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 2.5rem;
        padding: 2rem 2.5rem;
        box-shadow: -5px 0 40px rgba(0, 0, 0, 0.12);
        transition: right 0.35s ease;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        color: var(--dark) !important;
        font-size: 0.95rem;
        letter-spacing: 3px;
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 1rem 1.2rem;
    }

    .hero-eyebrow {
        letter-spacing: 3px;
        font-size: 0.65rem;
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
}
