/* =====================================================
   Assemble - marketing site
   Design system (refs: Evernote, Notion)
   ===================================================== */

:root {
    --bg: #FAFAFA;
    --text-primary: #3F2538;
    --text-highlight: #723B5C;
    --text-muted: #9A7A8F;
    --card-bg: #fef0f2;
    --card-img-1: #FFF3FB;
    --card-img-2: #F8C9E8;
    --bg-secondary: #FDF5F8;
    --btn-1: #FB6CC1;
    --btn-2: #FF93A5;
    --border: #F0E2EA;

    --font-sans: 'Inter', 'Noto Sans TC', 'PingFang TC', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 48px;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --shadow-sm: 0 2px 8px rgba(63, 37, 56, 0.06);
    --shadow-md: 0 8px 24px rgba(63, 37, 56, 0.08);
    --shadow-lg: 0 16px 48px rgba(63, 37, 56, 0.12);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;   /* ← 關鍵：開關選單時捲軸空間固定，不位移 */
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

p {
    font-size: 1rem;
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 32px;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(63, 37, 56, 0.08);
    border-bottom-color: var(--border);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.navbar-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.navbar-title {
    font-size: 1.25rem;
    font-weight: 700;
}

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

.navbar-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-links a:hover {
    color: var(--text-highlight);
}

.navbar-download {
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--btn-1), var(--btn-2));
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(251, 108, 193, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.navbar-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 108, 193, 0.45);
}

/* ---------- Mobile hamburger menu ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--text-primary);
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    visibility: hidden;
    transition: visibility 0.3s ease;
}

.mobile-menu.open {
    visibility: visible;
}

.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 18, 28, 0.45);   /* 變暗的背景 */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu.open .mobile-menu-backdrop {
    opacity: 1;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(50%, 360px);               /* 只佔一半（寬度可調） */
    background: var(--bg);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 24px 32px;
    box-shadow: -8px 0 32px rgba(63, 37, 56, 0.12);
}

.mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 32px;                          /* 跟 navbar 的 32px padding 對齊 */
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-menu-close:hover {
    color: var(--text-highlight);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}

.mobile-menu-links a {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-menu-links a:hover {
    color: var(--text-highlight);
}

.mobile-menu-links .mobile-download {
    margin-top: 10px;
    padding: 12px 28px;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--btn-1), var(--btn-2));
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(251, 108, 193, 0.35);
}

body.menu-open {
    overflow: hidden;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.footer-brand span {
    font-weight: 700;
}

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

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
}

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

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .typing-wrap {
        min-width: 5.25em;
        white-space: nowrap;
    }

    h1 {
        font-size: 2.35rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    p {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .navbar-links,
    .navbar-download {
        display: none;
    }
    .hamburger {
        display: flex;
    }
}


@media (min-width: 1024px) {
    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    p {
        font-size: 1.25rem;
    }
}

@media (min-width: 1280px) {
    h1 {
        font-size: 4.5rem;
    }

    h2 {
        font-size: 3rem;
    }

    p {
        font-size: 1.5rem;
    }
}