/* Modern Rounded Look Variables */
:root {
    --core-white: #FFFFFF;
    --core-black: #1A1A1A;
    --gray-bg: #F7F9FC;
    --gray-light: #F0F3F7;
    --gray-text: #6B7280;
    --border-color: #E5E7EB;

    /* ECOCO Standard Colors */
    --ecoco-orange: #FF5000;
    --ecoco-blue: #060E9F;
    --ecoco-yellow: #FFCE00;
    --ecoco-light-blue: #8EB9C9;
    --ecoco-beige: #FAE0B8;
    --ecoco-dark-cyan: #0076A9;

    --transition-fast: 0.2s ease-out;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Rounded Corners */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-pill: 9999px;

    /* Soft Shadows */
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.06);
    --shadow-hover: 0 20px 50px -10px rgba(0,0,0,0.12);
    --shadow-sm: 0 4px 16px rgba(0,0,0,0.04);
}

/* Global Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans TC', system-ui, -apple-system, sans-serif;
    color: var(--core-black);
    background-color: var(--core-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.container-large { max-width: 1300px; }
.section-padding { padding: 6rem 0; }
.section-padding-sm { padding: 2rem 0; }
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-full { height: 100%; }
.h-12 { height: 48px; }
.h-16 { height: 60px; }
.h-48 { height: 280px; }
.min-h-240 { min-height: 240px; }
.max-w-sm { max-width: 400px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2.5rem; }
.mb-10 { margin-bottom: 3.5rem; }
.mb-12 { margin-bottom: 4rem; }
.mb-16 { margin-bottom: 6rem; }
.mt-auto { margin-top: auto; }
.pt-8 { padding-top: 2rem; }
.pb-6 { padding-bottom: 1.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.gap-md { gap: 1.5rem; }
.block { display: block; }
.w-fit { width: fit-content; }

/* Tagline chip */
.tagline {
    display: inline-block;
    font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.12em; color: var(--ecoco-orange);
    background: rgba(255,80,0,0.1); padding: 0.35rem 1rem;
    border-radius: var(--radius-pill); margin-bottom: 1.25rem;
}

/* Colors */
.bg-white { background-color: var(--core-white); }
.bg-gray { background-color: var(--gray-bg); }
.bg-gray-light { background-color: var(--gray-light); }
.text-white { color: var(--core-white); }
.text-white-70 { color: rgba(255, 255, 255, 0.7); }
.text-black { color: var(--core-black); }
.text-black-50 { color: rgba(0, 0, 0, 0.5); }
.text-gray { color: var(--gray-text); }
.text-orange { color: var(--ecoco-orange); }
.text-blue { color: var(--ecoco-blue); }
.text-solid-blue { color: var(--ecoco-blue); }

/* Background Brand Colors */
.bg-orange { background-color: var(--ecoco-orange); }
.bg-blue { background-color: var(--ecoco-blue); }
.bg-yellow { background-color: var(--ecoco-yellow); }
.bg-light-blue { background-color: var(--ecoco-light-blue); }
.bg-beige { background-color: var(--ecoco-beige); }
.bg-dark-cyan { background-color: var(--ecoco-dark-cyan); }

/* Text Brand Colors */
.text-yellow { color: var(--ecoco-yellow); }
.text-light-blue { color: var(--ecoco-light-blue); }
.text-beige { color: var(--ecoco-beige); }

/* Flexbox */
.text-center { text-align: center; }
.text-left { text-align: left; }
.font-bold { font-weight: bold; }
.font-en { font-family: 'Montserrat', sans-serif; }
.mono-text { font-family: 'SF Mono', monospace; }
.letter-spacing-wide { letter-spacing: 0.1em; }
.flex-column { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.overflow-hidden { overflow: hidden; }

/* Images and Alignment */
.align-left-img { margin-left: 0; margin-right: auto; }

/* Grid */
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.grid-3-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.column-span-2 { grid-column: span 2; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-lg { gap: 4rem; }
.gap-xl { gap: 6rem; }

/* Alternating */
@media (min-width: 900px) {
    .layout-alternate > .left-content { order: 2; }
    .layout-alternate > .text-content { order: 1; }
}

/* Rounded */
.rounded-md { border-radius: var(--radius-md); }
.card-rounded { border-radius: var(--radius-lg); overflow: hidden; }
.shadow-soft { box-shadow: var(--shadow-soft); transition: var(--transition-smooth); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.border-light { border: 1px solid rgba(0,0,0,0.06); }
.border-top-light { border-top: 1px solid rgba(0,0,0,0.06); }
.border-bottom-dashed { border-bottom: 1px dashed var(--border-color); }

.hover-float-sm { transition: var(--transition-smooth); }
.hover-float-sm:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }

/* Circle Card for Core Values - with hover animation */
.circle-card {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    cursor: default;
    will-change: transform;
}
.circle-card:hover {
    transform: scale(1.06) translateY(-8px);
    box-shadow: 0 32px 64px -16px rgba(0,0,0,0.25);
}
.circle-card:hover h3 {
    letter-spacing: 0.04em;
    transition: letter-spacing 0.3s ease;
}
.bg-orange.circle-card:hover { box-shadow: 0 32px 64px -16px rgba(255, 80, 0, 0.40); }
.bg-blue.circle-card:hover { box-shadow: 0 32px 64px -16px rgba(6, 14, 159, 0.40); }
.bg-yellow.circle-card:hover { box-shadow: 0 32px 64px -16px rgba(255, 206, 0, 0.45); }
.divider-white-center { width: 40px; height: 2px; background: rgba(255,255,255,0.4); margin: 0 auto; transition: width 0.3s ease; }
.divider-black-center { width: 40px; height: 2px; background: rgba(0,0,0,0.2); margin: 0 auto; transition: width 0.3s ease; }
.circle-card:hover .divider-white-center,
.circle-card:hover .divider-black-center { width: 80px; }

/* Typography Scale */
.heading-xxl { font-size: 3.5rem; font-weight: 900; line-height: 1.2; letter-spacing: -0.01em; }
.heading-xl { font-size: 2.2rem; font-weight: 800; line-height: 1.3; }
.heading-md { font-size: 1.35rem; font-weight: 700; }
.heading-sm { font-size: 1.1rem; font-weight: 700; }
.text-large { font-size: 1.2rem; color: var(--gray-text); }
.text-medium { font-size: 1.05rem; }
.text-small { font-size: 0.85rem; }
.w-900 { font-weight: 900; }

/* Buttons */
.btn { display: inline-flex; padding: 0.8rem 2rem; border-radius: var(--radius-pill); font-weight: 600; text-decoration: none; cursor: pointer; border: none; white-space: nowrap; }
.btn-sm { padding: 0.6rem 1.6rem; font-size: 0.9rem; }
.btn-primary { background: var(--ecoco-blue); color: white; }
.btn-primary:active { background: var(--ecoco-orange); }
.btn-outline { background: white; color: black; box-shadow: inset 0 0 0 2px var(--border-color); }

/* Navbar */
.navbar { height: 80px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); position: fixed; top: 0; width: 100%; z-index: 100; border-bottom: 1px solid rgba(0,0,0,0.05); }
.navbar-container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.navbar-menu { display: flex; align-items: center; gap: 2rem; }
.navbar-links { list-style: none; display: flex; gap: 2rem; align-items: center; }
.navbar-links a { text-decoration: none; color: var(--gray-text); font-weight: 600; font-size: 0.9rem; transition: color 0.2s; }
.navbar-links a:hover { color: var(--ecoco-orange); }
.navbar-actions { display: flex; align-items: center; }
.brand-logo img { height: 32px; }

/* Hero Marquee - Seamless infinite loop via JS clone */
.hero { padding-top: calc(80px + 6rem); padding-bottom: 5rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-marquee-wrapper {
    display: flex; gap: 1.5rem; height: 500px;
    mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
    overflow: hidden;
}
/* Each track scrolls its full height (2x content, cloned by JS) */
.marquee-track {
    display: flex; flex-direction: column; gap: 1.5rem;
    animation: scroll-up 20s linear infinite;
    width: 50%;
    will-change: transform;
}
.track-reverse { animation-direction: reverse; animation-duration: 26s; }
.marquee-content, .marquee-content.reverse {
    display: flex; flex-direction: column; gap: 1.5rem;
}
.marquee-content img {
    border-radius: var(--radius-md); width: 100%; display: block;
    box-shadow: var(--shadow-sm);
}
/* Animation: move by 50% because JS doubles the content */
@keyframes scroll-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }

/* Reveal Animation */
.reveal-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal-up.active { opacity: 1; transform: translateY(0); }

/* Identity Imagery (Fitted) */
.identity-img-fitted {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.4s ease;
}
.identity-img-fitted:hover { transform: scale(1.05); }

/* Misuse */
.dont-card { position: relative; height: 180px; display: flex; align-items: center; justify-content: center; overflow: visible; }
.dont-mark { position: absolute; top: -10px; left: -10px; width: 24px; height: 24px; background: #FF3B30; color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 1.1rem; box-shadow: 0 4px 10px rgba(255, 59, 48, 0.4);}
.misuse-img { max-width: 70%; max-height: 70%; object-fit: contain; transition: transform 0.3s; }

/* Color System */
.color-card { cursor: pointer; overflow: hidden; display: flex; flex-direction: column; border-radius: var(--radius-lg); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.color-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.color-fill { height: 160px; width: 100%; flex-shrink: 0; }
.color-info { padding: 1.5rem; text-align: left; }
.color-codes-stack { display: flex; flex-direction: column; gap: 0.4rem; }
.hex-code { font-size: 1.2rem; font-weight: 800; }
.code-sub { font-size: 0.75rem; background: var(--gray-bg); padding: 0.2rem 0.6rem; border-radius: 6px; font-weight: 600; width: fit-content; }

/* Typography */
.heading-lg { font-size: 1.6rem; font-weight: 700; line-height: 1.4; }
.tag-pill { background: var(--gray-bg); padding: 0.4rem 0.8rem; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 600; display: inline-block; }
.typo-list { background: transparent; }
.typo-row { width: 100%; }

/* Sticky positioning for side text */
.sticky-top { position: sticky; top: 100px; }

/* Brand Assets */
.asset-img-full { width: 90%; height: 90%; object-fit: contain; transition: transform 0.4s ease; }
.asset-img-full:hover { transform: scale(1.04); }

/* IP Characters Section */
.ip-hero-card { overflow: hidden; }
.ip-hero-gallery { display: flex; flex-direction: column; gap: 1rem; }
.ip-main-img-wrap {
    width: 100%; aspect-ratio: 1 / 1;
    background: var(--core-white); border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.ip-main-img {
    max-width: 90%; max-height: 90%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}
.ip-thumb-row {
    display: flex; gap: 0.75rem; flex-wrap: wrap;
}
.ip-thumb {
    width: 72px; height: 72px; object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--core-white);
    border: 2px solid transparent;
    cursor: pointer; transition: border-color 0.2s, transform 0.2s;
    padding: 4px;
}
.ip-thumb:hover { transform: scale(1.08); border-color: var(--ecoco-orange); }
.ip-thumb.active { border-color: var(--ecoco-orange); }

.ip-char-card { display: flex; flex-direction: column; }
.ip-char-img-wrap {
    width: 100%; aspect-ratio: 4 / 3;
    background: var(--core-white); border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.ip-char-img {
    max-width: 80%; max-height: 80%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ip-char-card:hover .ip-char-img { transform: scale(1.08) translateY(-4px); }

/* CTA Area */
.btn-cta-wrapper { width: 100%; display: flex; gap: 1rem; justify-content: center; align-items: center; }

/* Footer */
.footer { background: white; padding: 2rem 0; }
.footer-logo img { height: 26px; }

/* Section Rule Divider (Logo sub-sections) */
.section-rule {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 5rem 0;
}

/* Toast */
.toast { position: fixed; bottom: -60px; left: 50%; transform: translateX(-50%); background: #1a1a1a; color: white; padding: 12px 24px; border-radius: 99px; opacity: 0; transition: 0.4s; z-index: 9999; white-space: nowrap; }
.toast.show { bottom: 30px; opacity: 1; }

@media (max-width: 1000px) {
    .navbar-links { gap: 1rem; }
    .navbar-links a { font-size: 0.8rem; }
}
@media (max-width: 900px) {
    .grid-2-col, .grid-3-col, .hero-grid { grid-template-columns: 1fr; }
    /* 手機版：layout-alternate 強制讓標題在上、卡片在下 */
    .layout-alternate > .left-content { order: 2; }
    .layout-alternate > .text-content { order: 1; }
    .circle-card { max-width: 280px; }
    .sticky-top { position: relative; top: 0; }
    .column-span-2 { grid-column: span 1; }
}
@media (max-width: 768px) {
    .navbar-menu { display: none; }
    .heading-xxl { font-size: 2.4rem; }
    .heading-xl { font-size: 1.8rem; }
    .btn-cta-wrapper { flex-direction: column; }
}
