/* ============================================================
   檔案名稱：style.css
   專案名稱：Fly AI SEO 全域搜尋曝光成交頁
   用途：
   - 四張廣告圖連續式 Landing Page
   - 保留滑入、漫畫彈出、電影推進效果
   - AI 曝光分析表單、Footer、浮動 CTA
   ============================================================ */

:root {
    --fly-orange: #f06a24;
    --fly-orange-dark: #d95112;
    --fly-yellow: #ffbd2e;
    --fly-red: #df3f2b;
    --fly-green: #24b56b;
    --fly-cream: #fff8ef;
    --fly-cream-2: #f8ecdf;
    --fly-white: #ffffff;
    --fly-text: #241e1a;
    --fly-muted: #766b63;
    --fly-border: rgba(88, 57, 37, 0.16);
    --fly-shadow: 0 26px 70px rgba(76, 43, 20, 0.18);
    --fly-radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
    background: var(--fly-cream);
    color: var(--fly-text);
    overflow-x: hidden;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

/* =========================
   Buttons
========================= */

.er-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 15px 30px;
    border: 0;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transform: translateY(0);
    transition: 0.22s ease;
    box-shadow: 0 12px 0 rgba(84, 42, 18, 0.18);
}

.er-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 17px 0 rgba(84, 42, 18, 0.14);
}

.er-btn--danger {
    color: #fff;
    background: linear-gradient(135deg, var(--fly-orange), var(--fly-red));
}

.er-btn--success {
    color: #2d210f;
    background: linear-gradient(135deg, #ffd66c, var(--fly-yellow));
}

.er-btn--submit {
    width: 100%;
    min-height: 64px;
    margin-top: 6px;
}

/* =========================
   Screens / Scenes
========================= */

.scene-list {
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--fly-cream);
}

.scene-card {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--fly-cream);
}

.scene-card picture {
    display: block;
    width: 100%;
}

.scene-card img {
    width: 100%;
    min-height: 100vh;
    object-fit: contain;
    background: var(--fly-cream);
    transform-origin: center center;
}

/* =========================
   Register
========================= */

.er-register {
    padding: 104px 20px;
    color: var(--fly-text);
    background:
        radial-gradient(circle at 12% 15%, rgba(255, 189, 46, 0.22), transparent 28%),
        radial-gradient(circle at 90% 78%, rgba(240, 106, 36, 0.16), transparent 30%),
        linear-gradient(180deg, #fffdf9, var(--fly-cream));
}

.er-register__intro {
    width: min(880px, 100%);
    margin: 0 auto 44px;
    text-align: center;
}

.er-register__eyebrow {
    display: inline-flex;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--fly-orange-dark);
    background: rgba(240, 106, 36, 0.1);
    border: 1px solid rgba(240, 106, 36, 0.18);
    font-size: 14px;
    font-weight: 900;
}

.er-register__intro h1 {
    margin: 20px 0 0;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.14;
    font-weight: 1000;
    letter-spacing: -0.05em;
}

.er-register__intro h1 span {
    color: var(--fly-orange);
}

.er-register__intro p {
    max-width: 720px;
    margin: 18px auto 0;
    color: var(--fly-muted);
    font-size: 18px;
    line-height: 1.75;
    font-weight: 700;
}

.er-register__inner {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.16fr 0.84fr;
    gap: 28px;
    align-items: start;
}

.er-form-card,
.er-doctors {
    border: 1px solid var(--fly-border);
    border-radius: var(--fly-radius);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--fly-shadow);
}

.er-form-card {
    padding: clamp(24px, 4vw, 42px);
}

.er-form-card__head {
    margin-bottom: 28px;
}

.er-form-card__tag,
.er-doctors__head span {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 8px 15px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--fly-orange), var(--fly-red));
    font-size: 14px;
    font-weight: 900;
}

.er-form-card h2,
.er-doctors h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 1000;
    letter-spacing: -0.04em;
}

.er-form-card p,
.er-doctors p {
    margin: 12px 0 0;
    color: var(--fly-muted);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 700;
}

.er-form {
    display: grid;
    gap: 18px;
}

.er-form__row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.er-form label {
    display: grid;
    gap: 8px;
    font-size: 15px;
    font-weight: 900;
}

.er-form input,
.er-form textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--fly-border);
    border-radius: 16px;
    color: var(--fly-text);
    background: #fffdf9;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: 0.2s ease;
}

.er-form input {
    min-height: 54px;
}

.er-form textarea {
    resize: vertical;
}

.er-form input:focus,
.er-form textarea:focus {
    border-color: var(--fly-orange);
    box-shadow: 0 0 0 5px rgba(240, 106, 36, 0.12);
    background: #fff;
}

/* =========================
   Analysis Panel
========================= */

.er-doctors {
    position: sticky;
    top: 24px;
    padding: 30px;
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 189, 46, 0.28), transparent 22%),
        linear-gradient(150deg, #33271f, #1e1815 66%, #171311);
    color: #fff;
}

.er-doctors p {
    color: rgba(255, 255, 255, 0.7);
}

.er-doctor-list {
    margin-top: 26px;
    display: grid;
    gap: 13px;
}

.er-doctor {
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
}

.er-doctor strong {
    display: block;
    color: #ffd66c;
    font-size: 19px;
    font-weight: 900;
}

.er-doctor span {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
    line-height: 1.55;
    font-weight: 700;
}

.er-contact-box {
    margin-top: 24px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.er-contact-box div {
    display: grid;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.er-contact-box span {
    color: #ffd66c;
    font-size: 13px;
    font-weight: 900;
}

.er-contact-box a {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.er-contact-box p {
    color: rgba(255, 255, 255, 0.68);
}

/* =========================
   Footer
========================= */

.er-footer {
    padding: 86px 20px 120px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(255, 189, 46, 0.16), transparent 34%),
        #1b1613;
}

.er-footer h2 {
    margin: 0;
    color: #ffd66c;
    font-size: clamp(34px, 5vw, 62px);
    font-weight: 1000;
}

.er-footer p {
    margin: 12px 0 28px;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(18px, 2vw, 25px);
    font-weight: 700;
}

/* =========================
   Floating CTA
========================= */

.er-floating {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 30;
}

.er-floating__main {
    position: relative;
    width: 150px;
    height: 150px;
    border: 4px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: radial-gradient(circle at 35% 25%, #ff9c69, var(--fly-orange), var(--fly-red));
    cursor: pointer;
    box-shadow: 0 16px 42px rgba(223, 63, 43, 0.34);
}

.er-floating__main strong,
.er-floating__main small {
    position: relative;
    z-index: 2;
    display: block;
    font-family: inherit;
}

.er-floating__main strong {
    font-size: 23px;
    font-weight: 1000;
}

.er-floating__main small {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 900;
}

.er-floating__pulse {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 4px solid rgba(240, 106, 36, 0.38);
    animation: erPulse 1.6s infinite;
}

.er-floating__panel {
    position: absolute;
    right: 0;
    bottom: 166px;
    width: 190px;
    padding: 12px;
    border-radius: 20px;
    color: var(--fly-text);
    background: #fff;
    box-shadow: var(--fly-shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: 0.22s ease;
}

.er-floating:hover .er-floating__panel,
.er-floating.is-open .er-floating__panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.er-floating__panel a {
    display: block;
    padding: 13px 14px;
    border-radius: 14px;
    font-weight: 900;
}

.er-floating__panel a:hover {
    color: var(--fly-orange-dark);
    background: var(--fly-cream);
}

@keyframes erPulse {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }
    100% {
        transform: scale(1.18);
        opacity: 0;
    }
}

/* =========================
   Go Top
========================= */

.go-top {
    position: fixed;
    right: 28px;
    bottom: 190px;
    z-index: 29;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: var(--fly-text);
    background: var(--fly-yellow);
    font-size: 24px;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(76, 43, 20, 0.22);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: 0.2s ease;
}

.go-top.is-show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* =========================
   Reveal Animation Hook
========================= */

.scene-card,
.er-register,
.er-footer {
    opacity: 0;
    transform: translateY(44px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scene-card.is-visible,
.er-register.is-visible,
.er-footer.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.is-comic-pop {
    animation: erComicPop 0.65s cubic-bezier(.2, 1.4, .4, 1);
}

@keyframes erComicPop {
    0% {
        transform: translateY(54px) scale(0.96);
    }
    70% {
        transform: translateY(-6px) scale(1.01);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.is-cinematic-zoom {
    animation: erCinematicZoom 8s ease-out forwards;
}

@keyframes erCinematicZoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.035);
    }
}

.er-floating.is-ending-alert .er-floating__main {
    animation: erEmergencyJump 0.42s ease-in-out 4;
}

@keyframes erEmergencyJump {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.06);
    }
}

.er-btn.is-loading {
    opacity: 0.82;
    cursor: wait;
}

/* =========================
   Progress
========================= */

.er-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    width: 100%;
    height: 7px;
    background: rgba(36, 30, 26, 0.72);
}

.er-progress__bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--fly-orange), var(--fly-yellow), var(--fly-green));
    transition: width 0.16s linear;
}

.er-progress__label {
    position: absolute;
    top: 11px;
    right: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(36, 30, 26, 0.76);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

/* =========================
   Toast
========================= */

.er-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    z-index: 90;
    min-width: 280px;
    max-width: calc(100vw - 32px);
    padding: 16px 20px;
    border: 1px solid var(--fly-border);
    border-radius: 20px;
    color: var(--fly-text);
    background: #fff;
    box-shadow: var(--fly-shadow);
    transform: translate(-50%, 18px);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
}

.er-toast.is-show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.er-toast strong {
    display: block;
    margin-bottom: 4px;
    color: var(--fly-orange-dark);
    font-size: 15px;
    font-weight: 1000;
}

.er-toast span {
    display: block;
    font-size: 15px;
    font-weight: 800;
}

/* =========================
   RWD
========================= */

@media (max-width: 1024px) {
    .er-register__inner {
        grid-template-columns: 1fr;
    }

    .er-doctors {
        position: static;
    }
}

@media (max-width: 768px) {
    .scene-card img {
        min-height: auto;
        object-fit: contain;
    }

    .er-register {
        padding: 72px 16px;
    }

    .er-register__intro {
        margin-bottom: 30px;
    }

    .er-register__intro h1 {
        font-size: 36px;
    }

    .er-register__intro p {
        font-size: 16px;
    }

    .er-form__row {
        grid-template-columns: 1fr;
    }

    .er-btn {
        width: 100%;
    }

    .er-floating {
        right: 16px;
        bottom: 16px;
    }

    .er-floating__main {
        width: 116px;
        height: 116px;
    }

    .er-floating__main strong {
        font-size: 18px;
    }

    .er-floating__main small {
        font-size: 11px;
    }

    .er-floating__panel {
        bottom: 130px;
    }

    .go-top {
        right: 18px;
        bottom: 146px;
    }

    .er-progress {
        height: 6px;
    }

    .er-progress__label {
        top: 9px;
        right: 10px;
        font-size: 11px;
    }

    .er-toast {
        bottom: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
