/* ============================================================
   CETU 官网 — 基础/共享样式 (base)
   作用范围：Reset、设计令牌（变量）、页头、按钮、页脚、通用 section 工具类
   对应模板：main/templates/main/base.html
   ============================================================ */

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

:root {
    /* ============ 颜色 ============ */
    /* 品牌色 */
    --dark-900: #1A120B;
    --dark-800: #2C1F0F;
    --gold: #FACC4F;
    --orange: #FF5A00;
    --cyan: #00AFE9;
    --green: #10B981;

    /* 中性色 / 文本 */
    --black: #000000;
    --white: #FFFFFF;
    --gray: #4D4C4D;
    --text-muted: #6B5E4A;
    --light-bg: #FFFDF7;
    --warm-light: #FFF8E7;
    --border: #E0D5C0;

    /* 透明色（命名规则：<色名>-<百分比>） */
    --dark-900-08: rgba(26, 18, 11, 0.08);
    --dark-900-10: rgba(26, 18, 11, 0.10);
    --dark-900-20: rgba(26, 18, 11, 0.20);
    --dark-800-04: rgba(44, 31, 15, 0.04);
    --dark-800-06: rgba(44, 31, 15, 0.06);
    --gold-08: rgba(250, 204, 79, 0.08);
    --gold-18: rgba(250, 204, 79, 0.18);
    --gold-30: rgba(250, 204, 79, 0.30);
    --bronze-10: rgba(160, 120, 40, 0.10);
    --bronze-12: rgba(160, 120, 40, 0.12);
    --green-10: rgba(16, 185, 129, 0.10);
    --green-20: rgba(16, 185, 129, 0.20);
    --cyan-10: rgba(0, 175, 233, 0.10);
    --cyan-20: rgba(0, 175, 233, 0.20);
    --white-60: rgba(255, 255, 255, 0.60);
    --warm-light-78: rgba(255, 248, 231, 0.78);
    --black-05: rgba(0, 0, 0, 0.05);
    --black-06: rgba(0, 0, 0, 0.06);

    /* ============ 圆角（3 档 + 胶囊） ============ */
    --radius-sm: 0.5rem;      /* 小：按钮 */
    --radius-md: 1rem;        /* 中：卡片/容器 */
    --radius-lg: 1.5rem;      /* 大：大容器 */
    --radius-full: 100px;     /* 胶囊：标签/徽章 */

    /* ============ 间距（内/外边距 3 档） ============ */
    --space-sm: 1rem;         /* 16px 基准 */
    --space-md: 1.5rem;       /* 24px 常规 */
    --space-lg: 2rem;         /* 32px 宽松 */

    /* ============ 区块留白（section 级纵向内边距） ============ */
    --section-pad-y: 7.5rem;    /* 桌面端区块上下内边距 */
    --section-pad-y-sm: 5rem;   /* 移动端区块上下内边距 */

    /* ============ 字号 ============ */
    /* 标题 */
    --font-display: clamp(3rem, 8vw, 7.5rem);      /* 展示标题（Hero） */
    --font-title: clamp(2.25rem, 5vw, 3.75rem);    /* 区块标题 */
    --font-title-sm: clamp(1.75rem, 3.5vw, 2.5rem); /* 次级标题 */
    /* 副标题 */
    --font-subtitle: 1.375rem;                      /* 卡片标题/姓名 */
    /* 文本 */
    --font-body: 1.125rem;                          /* 正文 */
    --font-body-sm: 0.9375rem;                      /* 次级文本 */
    /* 强调项 */
    --font-emphasis: 0.8125rem;                     /* 标签/说明 */
    --font-emphasis-sm: 0.75rem;                    /* 徽章/小标签 */

    /* ============ 动效 / 尺寸 ============ */
    --ease-out: cubic-bezier(0.625, 0.05, 0, 1);
    --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
    --header-height: 5rem;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--white);
    color: var(--dark-800);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

::selection {
    background: var(--gold);
    color: var(--dark-900);
}

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

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

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

/* ============================================================
   PAGE LOADER / CURTAIN
   ============================================================ */
#curtain {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.45s var(--ease-in-out);
}

#curtain.reveal {
    transform: translateX(100%);
}

.curtain__logo {
    width: clamp(180px, 30vw, 320px);
    height: auto;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    max-width: 1100px;
    width: calc(100% - 4rem);
    border-radius: var(--radius-md);
    transition: transform 0.4s var(--ease-out), background 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}

.header.animation_scrolled {
    background: var(--warm-light-78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 24px var(--dark-900-08);
}

.header__nav a {
    position: relative;
    font-size: var(--font-body-sm);
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
    overflow: hidden;
    display: inline-block;
    padding-bottom: 2px;
}

.header__nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--dark-800);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.header__nav a:hover {
    color: var(--dark-800);
}

.header__nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ============================================================
   BUTTON
   ============================================================ */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-body-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: color 0.525s var(--ease-out);
    z-index: 1;
}

.btn--primary {
    background: var(--dark-800);
    color: var(--white);
    border: 1px solid var(--dark-900-20);
}

.btn__arrow {
    display: inline-flex;
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.header__menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 4px;
    z-index: 101;
}

.header__menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark-800);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.header__nav--open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: calc(var(--header-height) + 0.5rem);
    left: 0;
    right: 0;
    background: var(--warm-light);
    border: 1px solid var(--gold-30);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    gap: 1rem;
    box-shadow: 0 8px 32px var(--dark-900-10);
}

.header__nav--open.header__nav--in {
    animation: menu-in 0.35s var(--ease-out) forwards;
}

.header__nav--open.header__nav--out {
    animation: menu-out 0.25s var(--ease-out) forwards;
}

@keyframes menu-in {
    from { opacity: 0; transform: translateY(-12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes menu-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-12px) scale(0.96); }
}

/* ============================================================
   SECTION (shared helpers)
   ============================================================ */
.section {
    padding: var(--section-pad-y) 0;
}

.section__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section__label {
    display: inline-block;
    font-size: var(--font-emphasis);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: var(--space-sm);
}

.section__desc {
    font-size: var(--font-body);
    line-height: 1.7;
    color: var(--gray);
    max-width: 600px;
}

.section__title {
    position: relative;
    display: inline-block;
    font-size: var(--font-title);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--dark-800);
    margin-bottom: var(--space-sm);
}

.section__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.25rem;
    width: 0;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
    transition: width 1s var(--ease-out) 0.5s;
}

.section__title.animation_revealed::after {
    width: 60%;
}

/* ============================================================
   REVEAL ANIMATION (scroll-triggered)
   ============================================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-reveal].animation_revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--dark-900);
    color: var(--white-60);
    padding: var(--section-pad-y-sm) 0 var(--space-lg);
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: var(--space-lg);
}

.footer__brand {
    font-size: var(--font-subtitle);
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.footer__brand-desc {
    font-size: var(--font-emphasis);
    line-height: 1.7;
}

.footer__col-title {
    font-size: var(--font-emphasis);
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.footer__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer__links a {
    transition: color 0.3s ease;
}

.footer__links a:hover {
    color: var(--white);
}

/* ============================================================
   RESPONSIVE (shared)
   ============================================================ */
@media (max-width: 1024px) {
    .header__menu-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 4rem;
    }

    .header {
        padding: 0 var(--space-sm);
        width: calc(100% - 2rem);
        top: 0.75rem;
    }

    .section {
        padding: var(--section-pad-y-sm) 0;
    }

    .section__inner {
        padding: 0 var(--space-md);
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .footer__grid {
        grid-template-columns: 1fr;
    }
}
