/* PostVault 網站版：介紹頁（/about）。
   外框、按鈕、標籤、插圖沿用 app.css；這裡只放這一頁的版面。
   手機單欄、電腦分欄；字級一律 rem，會跟著使用者選的字體大小走。 */

body.is-wide .top {
    max-width: 68rem;
}

.wrap.about {
    max-width: 68rem;
    padding-bottom: 24px;
}

/* ---------- 開場 ---------- */

.about-hero {
    display: grid;
    gap: 8px;
    padding: clamp(8px, 4vh, 40px) 0 8px;
    text-align: center;
}

.about-hero__art .scene {
    width: min(100%, 300px, 40dvh);
}

.about-eyebrow {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.9375rem;
    font-weight: 600;
}

.about-hero__title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
}

.about-lead {
    margin: 16px auto 0;
    max-width: 34rem;
    color: var(--muted);
    font-size: 1.0625rem;
    line-height: 1.6;
    text-wrap: pretty;
}

.about-actions {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.about-actions .btn {
    width: 100%;
}

.about-actions--center {
    justify-items: center;
}

/* ---------- 區塊 ---------- */

.about-section,
.about-band,
.about-final {
    margin-top: clamp(48px, 9vh, 88px);
}

.about-section__title {
    margin: 0;
    font-size: clamp(1.375rem, 5.2vw, 1.875rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-align: center;
    text-wrap: balance;
}

.about-section__desc {
    margin: 12px auto 0;
    max-width: 38rem;
    color: var(--muted);
    line-height: 1.6;
    text-align: center;
    text-wrap: pretty;
}

.about-grid {
    display: grid;
    gap: 16px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.about-card,
.about-way {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
}

.about-card__icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 8px;
    border-radius: 16px;
    background: var(--bg);
    border: 1px solid var(--line);
}

.about-card__icon .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.about-card__step {
    font-size: 1.25rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.about-card__title {
    margin: 0;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.35;
}

.about-card__desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    text-wrap: pretty;
}

.about-way .btn {
    margin-top: 14px;
}

/* ---------- 平台 ---------- */

.about-tags {
    margin-top: 24px;
}

.about-tags .tag {
    min-height: 2.5rem;
    padding: 0 16px;
    font-size: 1rem;
}

.about-tags .glyph {
    width: 1rem;
    height: 1rem;
}

/* ---------- 說明小字 ---------- */

.about-fineprint {
    margin: 20px auto 0;
    max-width: 44rem;
    color: var(--faint);
    font-size: 0.9375rem;
    line-height: 1.6;
    text-align: center;
    text-wrap: pretty;
}

/* ---------- 方案、結尾 ---------- */

.about-band,
.about-final {
    padding: clamp(28px, 5vw, 48px) 20px;
    border-radius: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    text-align: center;
}

/* ---------- 常見問題 ---------- */

.about-faq {
    display: grid;
    gap: 10px;
    max-width: 46rem;
    margin: 24px auto 0;
}

.about-faq__item {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.about-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 3.5rem;
    padding: 12px 18px;
    font-weight: 650;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
}

.about-faq__item summary::-webkit-details-marker {
    display: none;
}

.about-faq__item summary .icon {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--muted);
    transition: transform 0.2s;
}

.about-faq__item[open] summary .icon {
    transform: rotate(180deg);
}

.about-faq__item p {
    margin: 0;
    padding: 0 18px 16px;
    color: var(--muted);
    line-height: 1.65;
    text-wrap: pretty;
}

/* ---------- 電腦版 ---------- */

@media (min-width: 640px) {
    .about-actions {
        grid-auto-flow: column;
        justify-content: start;
    }

    .about-actions .btn {
        width: auto;
        padding: 0 28px;
    }

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

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

    .about-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .about-hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        align-items: center;
        gap: 56px;
        text-align: left;
    }

    .about-hero__title {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
    }

    .about-lead {
        margin-left: 0;
        font-size: 1.1875rem;
    }

    .about-hero__art .scene {
        width: min(100%, 460px);
    }

    .about-grid--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .about-grid--4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .about-grid {
        gap: 24px;
    }
}

/* 卡片裡的次要按鈕：底色和卡片一樣，要有外框才看得出是按鈕 */
.about-way .btn--line,
.about-band .btn--line {
    border: 1px solid var(--faint);
    background: transparent;
}

/* ---------- 可以存下什麼 ---------- */

.about-save {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 14px 14px 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    transition: transform 0.2s, border-color 0.2s;
}

.about-save:hover {
    transform: translateY(-3px);
    border-color: var(--faint);
}

.about-save__visual {
    margin-bottom: 8px;
}

.about-save .about-card__title,
.about-save .about-card__desc {
    padding: 0 8px;
}

.about-save .vis {
    min-height: 9rem;
    background: var(--bg);
    align-content: center;
}

/* 文字：一行一行打出來 */
.vis-text {
    gap: 12px;
}

.vis-text__line {
    display: block;
    height: 0.75rem;
    border-radius: 999px;
    background: var(--ink);
    opacity: 0.8;
}

.vis-text__line--1 { width: 100%; animation: text-1 5s infinite; }
.vis-text__line--2 { width: 84%; animation: text-2 5s infinite; }
.vis-text__line--3 { width: 58%; animation: text-3 5s infinite; }

@keyframes text-1 {
    0% { width: 0; }
    22%, 90% { width: 100%; }
    100% { width: 0; }
}

@keyframes text-2 {
    0%, 18% { width: 0; }
    42%, 90% { width: 84%; }
    100% { width: 0; }
}

@keyframes text-3 {
    0%, 38% { width: 0; }
    58%, 90% { width: 58%; }
    100% { width: 0; }
}

/* 圖片：疊在一起的照片散開 */
.vis-photo {
    place-items: center;
}

.vis-photo__card {
    grid-area: 1 / 1;
    display: grid;
    place-items: center;
    width: 5.5rem;
    height: 6.5rem;
    border-radius: 14px;
    color: #0f172a;
    box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.5);
}

.vis-photo__card .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.vis-photo__card--1 {
    background: linear-gradient(135deg, #a78bfa, #38bdf8);
    transform: translateX(-34%) rotate(-12deg);
    animation: photo-1 4.5s infinite;
}

.vis-photo__card--2 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    transform: translateX(34%) rotate(12deg);
    animation: photo-2 4.5s infinite;
}

.vis-photo__card--3 {
    background: linear-gradient(135deg, #38bdf8, #34d399);
}

@keyframes photo-1 {
    0%, 12% { transform: translateX(0) rotate(0); }
    40%, 80% { transform: translateX(-34%) rotate(-12deg); }
    100% { transform: translateX(0) rotate(0); }
}

@keyframes photo-2 {
    0%, 12% { transform: translateX(0) rotate(0); }
    40%, 80% { transform: translateX(34%) rotate(12deg); }
    100% { transform: translateX(0) rotate(0); }
}

/* 影片：播放鈕與進度條 */
.vis-video {
    gap: 12px;
}

.vis-video__screen {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: linear-gradient(135deg, #38bdf8, #34d399);
    color: #0f172a;
}

.vis-video__screen .icon {
    width: 2rem;
    height: 2rem;
    animation: video-pulse 2s infinite;
}

.vis-video__bar {
    display: block;
    height: 0.4rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--line);
}

.vis-video__progress {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--ink);
    animation: video-progress 4.5s linear infinite;
}

@keyframes video-pulse {
    50% { transform: scale(1.18); }
}

@keyframes video-progress {
    0% { width: 0; }
    90%, 100% { width: 100%; }
}

/* 音樂：音量條跳動 */
.vis-music {
    place-items: center;
    gap: 10px;
}

.vis-music__note {
    color: var(--muted);
}

.vis-music__note .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.vis-music__bars {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 4.5rem;
}

.vis-music__bar {
    display: block;
    width: 0.5rem;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(to top, #34d399, #38bdf8);
    transform: scaleY(0.6);
    transform-origin: bottom;
    animation: music-bounce 1s ease-in-out infinite alternate;
}

.vis-music__bar:nth-child(2n) { animation-duration: 0.7s; }
.vis-music__bar:nth-child(3n) { animation-duration: 1.3s; }
.vis-music__bar:nth-child(4n) { animation-duration: 0.9s; }
.vis-music__bar:nth-child(5n) { animation-delay: -0.4s; }
.vis-music__bar:nth-child(7n) { animation-delay: -0.8s; }

@keyframes music-bounce {
    from { transform: scaleY(0.2); }
    to { transform: scaleY(1); }
}

/* ---------- 平台跑馬燈 ---------- */

.marquee {
    display: grid;
    gap: 12px;
    margin-top: 28px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 34s linear infinite;
}

.marquee__row--reverse .marquee__track {
    animation-direction: reverse;
}

.marquee__set {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0 10px 0 0;
    list-style: none;
}

.marquee .tag {
    min-height: 2.75rem;
    padding: 0 18px;
    font-size: 1rem;
    white-space: nowrap;
}

.marquee .glyph {
    width: 1.125rem;
    height: 1.125rem;
}

@keyframes marquee {
    to { transform: translateX(-33.3333%); }
}

/* ---------- 資料流向：檔案從來源直接到你的裝置，伺服器只看連結 ---------- */

.flow {
    display: grid;
    gap: 8px;
    max-width: 44rem;
    margin: 28px auto 0;
    padding: 24px 20px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
}

.flow__server {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    padding-bottom: 26px;
    text-align: center;
}

.flow__server-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px dashed var(--faint);
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
}

.flow__server-note {
    color: var(--faint);
    font-size: 0.9375rem;
}

.flow__drop {
    position: absolute;
    bottom: 0;
    left: 50%;
    height: 22px;
    border-left: 2px dashed var(--faint);
}

.flow__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.flow__node {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 5.5rem;
    text-align: center;
}

.flow__icon {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--bg);
}

.flow__icon .icon {
    width: 1.5rem;
    height: 1.5rem;
}

.flow__label {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
}

.flow__track {
    position: relative;
    height: 3.5rem;
}

.flow__track::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    border-top: 2px solid var(--line);
}

.flow__dot {
    position: absolute;
    top: calc(50% - 6px);
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ok);
    animation: flow-dot 3s linear infinite;
}

.flow__dot--2 { animation-delay: -0.75s; }
.flow__dot--3 { animation-delay: -1.5s; }
.flow__dot--4 { animation-delay: -2.25s; }

.flow__caption {
    position: absolute;
    top: calc(50% + 14px);
    right: 0;
    left: 0;
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.35;
    text-align: center;
}

@keyframes flow-dot {
    0% { left: 100%; opacity: 0; }
    10%, 90% { opacity: 1; }
    100% { left: 0; opacity: 0; }
}

/* 手機：標籤放不下就縮小 */
@media (max-width: 480px) {
    .flow__node {
        width: 4.5rem;
    }

    .flow__label {
        font-size: 0.875rem;
    }
}

/* ---------- 減少動態：全部停住，顯示完整的樣子 ---------- */

@media (prefers-reduced-motion: reduce) {
    .anim *,
    .anim *::before,
    .anim *::after {
        animation: none !important;
    }

    .reveal {
        transition: none;
    }

    .marquee__track {
        flex-wrap: wrap;
        width: auto;
        justify-content: center;
    }

    .marquee__set[aria-hidden="true"],
    .marquee__row--reverse {
        display: none;
    }

    .marquee__set {
        flex-wrap: wrap;
        justify-content: center;
    }

    .vis-music__bar {
        transform: scaleY(0.7);
    }

    .flow__dot--1 {
        left: 50%;
    }

    .flow__dot--2,
    .flow__dot--3,
    .flow__dot--4 {
        display: none;
    }
}
